diff --git a/src/webui/static/app/acleditor.js b/src/webui/static/app/acleditor.js index eaeddbf4..1b55fae6 100644 --- a/src/webui/static/app/acleditor.js +++ b/src/webui/static/app/acleditor.js @@ -1,84 +1,75 @@ - tvheadend.acleditor = function() { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 60 - }); + var fm = Ext.form; - var streamingColumn = new Ext.grid.CheckColumn({ - header: "Streaming", - dataIndex: 'streaming', - width: 100 - }); + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 60 + }); - var dvrColumn = new Ext.grid.CheckColumn({ - header: "Video Recorder", - dataIndex: 'dvr', - width: 100 - }); + var streamingColumn = new Ext.grid.CheckColumn({ + header : "Streaming", + dataIndex : 'streaming', + width : 100 + }); - var dvrallcfgColumn = new Ext.grid.CheckColumn({ - header: "All Configs (VR)", - dataIndex: 'dvrallcfg', - width: 100 - }); + var dvrColumn = new Ext.grid.CheckColumn({ + header : "Video Recorder", + dataIndex : 'dvr', + width : 100 + }); - var webuiColumn = new Ext.grid.CheckColumn({ - header: "Web Interface", - dataIndex: 'webui', - width: 100 - }); + var dvrallcfgColumn = new Ext.grid.CheckColumn({ + header : "All Configs (VR)", + dataIndex : 'dvrallcfg', + width : 100 + }); - var adminColumn = new Ext.grid.CheckColumn({ - header: "Admin", - dataIndex: 'admin', - width: 100 - }); + var webuiColumn = new Ext.grid.CheckColumn({ + header : "Web Interface", + dataIndex : 'webui', + width : 100 + }); - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Username", - dataIndex: 'username', - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Password", - dataIndex: 'password', - renderer: function(value, metadata, record, row, col, store) { - return 'Hidden'; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Prefix", - dataIndex: 'prefix', - editor: new fm.TextField({allowBlank: false}) - }, - streamingColumn, - dvrColumn, - dvrallcfgColumn, - webuiColumn, - adminColumn, - { - header: "Comment", - dataIndex: 'comment', - width: 400, - editor: new fm.TextField({}) - } - ]); - - var UserRecord = Ext.data.Record.create([ - 'enabled','streaming','dvr','dvrallcfg','admin','webui','username', - 'prefix','password','comment' - ]); + var adminColumn = new Ext.grid.CheckColumn({ + header : "Admin", + dataIndex : 'admin', + width : 100 + }); - return new tvheadend.tableEditor('Access control', 'accesscontrol', cm, - UserRecord, - [enabledColumn, streamingColumn, - dvrColumn, dvrallcfgColumn, webuiColumn, - adminColumn], - null, - 'config_access.html', 'group'); + var cm = new Ext.grid.ColumnModel([ enabledColumn, { + header : "Username", + dataIndex : 'username', + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Password", + dataIndex : 'password', + renderer : function(value, metadata, record, row, col, store) { + return 'Hidden'; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Prefix", + dataIndex : 'prefix', + editor : new fm.TextField({ + allowBlank : false + }) + }, streamingColumn, dvrColumn, dvrallcfgColumn, webuiColumn, adminColumn, { + header : "Comment", + dataIndex : 'comment', + width : 400, + editor : new fm.TextField({}) + } ]); + + var UserRecord = Ext.data.Record.create([ 'enabled', 'streaming', 'dvr', + 'dvrallcfg', 'admin', 'webui', 'username', 'prefix', 'password', + 'comment' ]); + + return new tvheadend.tableEditor('Access control', 'accesscontrol', cm, + UserRecord, [ enabledColumn, streamingColumn, dvrColumn, dvrallcfgColumn, + webuiColumn, adminColumn ], null, 'config_access.html', 'group'); } diff --git a/src/webui/static/app/capmteditor.js b/src/webui/static/app/capmteditor.js index 7ba42441..469c5f2f 100644 --- a/src/webui/static/app/capmteditor.js +++ b/src/webui/static/app/capmteditor.js @@ -1,77 +1,79 @@ - tvheadend.capmteditor = function() { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 60 - }); + var fm = Ext.form; - function setMetaAttr(meta, record){ - var enabled = record.get('enabled'); - if(!enabled) return; + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 60 + }); - var connected = record.get('connected'); - if(connected == 1){ - meta.attr = 'style="color:green;"'; - } else { - meta.attr = 'style="color:red;"'; - } - } + function setMetaAttr(meta, record) { + var enabled = record.get('enabled'); + if (!enabled) return; - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Camd.socket Filename", - dataIndex: 'camdfilename', - width: 200, - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Listenport", - dataIndex: 'port', - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Comment", - dataIndex: 'comment', - width: 400, - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField() + var connected = record.get('connected'); + if (connected == 1) { + meta.attr = 'style="color:green;"'; + } + else { + meta.attr = 'style="color:red;"'; + } } - ]); - var rec = Ext.data.Record.create([ - 'enabled','connected','camdfilename','port','comment' - ]); + var cm = new Ext.grid.ColumnModel([ enabledColumn, { + header : "Camd.socket Filename", + dataIndex : 'camdfilename', + width : 200, + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Listenport", + dataIndex : 'port', + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Comment", + dataIndex : 'comment', + width : 400, + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField() + } ]); - store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "tablemgr", - autoLoad: true, - id: 'id', - baseParams: {table: 'capmt', op: "get"} - }); + var rec = Ext.data.Record.create([ 'enabled', 'connected', 'camdfilename', + 'port', 'comment' ]); - tvheadend.comet.on('capmtStatus', function(server) { - var rec = store.getById(server.id); - if(rec){ - rec.set('connected', server.connected); - } - }); + store = new Ext.data.JsonStore({ + root : 'entries', + fields : rec, + url : "tablemgr", + autoLoad : true, + id : 'id', + baseParams : { + table : 'capmt', + op : "get" + } + }); - return new tvheadend.tableEditor('Capmt Connections', 'capmt', cm, rec, - [enabledColumn], store, - 'config_capmt.html', 'key'); + tvheadend.comet.on('capmtStatus', function(server) { + var rec = store.getById(server.id); + if (rec) { + rec.set('connected', server.connected); + } + }); + + return new tvheadend.tableEditor('Capmt Connections', 'capmt', cm, rec, + [ enabledColumn ], store, 'config_capmt.html', 'key'); } diff --git a/src/webui/static/app/chconf.js b/src/webui/static/app/chconf.js index 0004a050..0e4b5435 100644 --- a/src/webui/static/app/chconf.js +++ b/src/webui/static/app/chconf.js @@ -1,371 +1,350 @@ - /** * Channel tags */ tvheadend.channelTags = new Ext.data.JsonStore({ - autoLoad:true, - root:'entries', - fields: ['identifier', 'name'], - id: 'identifier', - url:'channeltags', - baseParams: { - op: 'listTags' - } + autoLoad : true, + root : 'entries', + fields : [ 'identifier', 'name' ], + id : 'identifier', + url : 'channeltags', + baseParams : { + op : 'listTags' + } }); tvheadend.channelTags.setDefaultSort('name', 'ASC'); tvheadend.comet.on('channeltags', function(m) { - if(m.reload != null) - tvheadend.channelTags.reload(); + if (m.reload != null) tvheadend.channelTags.reload(); }); - /** * Channels */ tvheadend.channels = new Ext.data.JsonStore({ - autoLoad: true, - root:'entries', - fields: ['name', 'chid', 'epggrabsrc', 'tags', 'ch_icon', - 'epg_pre_start', 'epg_post_end', 'number'], - id: 'chid', - sortInfo: { field: 'number', direction: "ASC" }, - url: "channels", - baseParams: { - op: 'list' - } + autoLoad : true, + root : 'entries', + fields : [ 'name', 'chid', 'epggrabsrc', 'tags', 'ch_icon', 'epg_pre_start', + 'epg_post_end', 'number' ], + id : 'chid', + sortInfo : { + field : 'number', + direction : "ASC" + }, + url : "channels", + baseParams : { + op : 'list' + } }); tvheadend.comet.on('channels', function(m) { - if(m.reload != null) - tvheadend.channels.reload(); + if (m.reload != null) tvheadend.channels.reload(); }); - -/** -* -*/ -tvheadend.mergeChannel = function(chan) { - - function doMerge() { - panel.getForm().submit({ - url:'mergechannel/' + chan.chid, - success: function() { - win.close(); - } - }); - } - - var panel = new Ext.FormPanel({ - frame:true, - border:true, - bodyStyle:'padding:5px', - labelAlign: 'right', - labelWidth: 110, - defaultType: 'textfield', - items: [ - new Ext.form.ComboBox({ - store: tvheadend.channels, - fieldLabel: 'Target channel', - name: 'targetchannel', - hiddenName: 'targetID', - editable: false, - allowBlank: false, - triggerAction: 'all', - mode: 'remote', - displayField:'name', - valueField:'chid', - emptyText: 'Select a channel...' - }) - ], - buttons: [{ - text: 'Merge', - handler: doMerge - }] - }); - - win = new Ext.Window({ - title: 'Merge channel ' + chan.name + ' into...', - layout: 'fit', - width: 500, - height: 120, - modal: true, - plain: true, - items: panel - }); - win.show(); - -} - - /** * */ -tvheadend.chconf = function() -{ - var fm = Ext.form; +tvheadend.mergeChannel = function(chan) { - var actions = new Ext.ux.grid.RowActions({ - header:'', - dataIndex: 'actions', - width: 45, - actions: [ - { - iconCls:'merge', - qtip:'Merge this channel with another channel', - cb: function(grid, record, action, row, col) { - tvheadend.mergeChannel(record.data); - } - } - ] - }); - - - var cm = new Ext.grid.ColumnModel([ - { - header: "Number", - dataIndex: 'number', - sortable: true, - width: 50, - renderer: function(value, metadata, record, row, col, store) { - if (!value) { - return 'Not set'; - } else { - return value; - } - }, - - editor: new fm.NumberField({ - minValue: 0, - maxValue: 9999 - }) - }, - { - header: "Name", - dataIndex: 'name', - width: 150, - editor: new fm.TextField({ - allowBlank: false - }) - }, - { - header: "Play", - dataIndex: 'chid', - width: 50, - renderer: function(value, metadata, record, row, col, store) { - url = 'playlist/channelid/' + value - return "Play" - } - }, - { - header: "EPG Grab source", - dataIndex: 'epggrabsrc', - width: 150, - editor: new Ext.ux.form.LovCombo({ - loadingText: 'Loading...', - store: tvheadend.epggrabChannels, - allowBlank: true, - typeAhead: true, - minChars: 2, - lazyRender: true, - triggerAction: 'all', - mode: 'remote', - displayField:'mod-name', - valueField:'mod-id' - }) - }, - { - header: "Tags", - dataIndex: 'tags', - width: 300, - renderer: function(value, metadata, record, row, col, store) { - if (typeof value === 'undefined' || value.length < 1) { - return 'No tags'; - } - - ret = []; - tags = value.split(','); - for (var i = 0; i < tags.length; i++) { - var tag = tvheadend.channelTags.getById(tags[i]); - if (typeof tag !== 'undefined') { - ret.push(tag.data.name); - } - } - return ret.join(', '); - }, - editor: new Ext.ux.form.LovCombo({ - store: tvheadend.channelTags, - mode:'local', - valueField: 'identifier', - displayField: 'name' - }) - }, - { - header: "Icon (full URL)", - dataIndex: 'ch_icon', - width: 200, - editor: new fm.TextField() - }, - { - header: "DVR Pre-Start", - dataIndex: 'epg_pre_start', - width: 100, - - renderer: function(value, metadata, record, row, col, store) { - if (!value) { - return 'Not set'; - } else { - return value + ' min'; - } - }, - - editor: new fm.NumberField({ - minValue: 0, - maxValue: 1440 - }) - }, - { - header: "DVR Post-End", - dataIndex: 'epg_post_end', - width: 100, - renderer: function(value, metadata, record, row, col, store) { - if (!value) { - return 'Not set'; - } else { - return value + ' min'; - } - }, - - editor: new fm.NumberField({ - minValue: 0, - maxValue: 1440 - }) - }, actions - ]); - - - function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if(selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', - deleteRecord); - } else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - } - - - function deleteRecord(btn) { - if(btn=='yes') { - var selectedKeys = grid.selModel.selections.keys; - - Ext.Ajax.request({ - url: "channels", - params: { - op:"delete", - entries:Ext.encode(selectedKeys) - }, - failure:function(response,options) { - Ext.MessageBox.alert('Server Error','Unable to delete'); - } - }) - } - } - - function saveChanges() { - var mr = tvheadend.channels.getModifiedRecords(); - var out = new Array(); - for (var x = 0; x < mr.length; x++) { - v = mr[x].getChanges(); - out[x] = v; - out[x].id = mr[x].id; + function doMerge() { + panel.getForm().submit({ + url : 'mergechannel/' + chan.chid, + success : function() { + win.close(); + } + }); } - Ext.Ajax.request({ - url: "channels", - params: { - op:"update", - entries:Ext.encode(out) - }, - success:function(response,options) { - tvheadend.channels.commitChanges(); - }, - failure:function(response,options) { - Ext.MessageBox.alert('Message', response.statusText); - } + var panel = new Ext.FormPanel({ + frame : true, + border : true, + bodyStyle : 'padding:5px', + labelAlign : 'right', + labelWidth : 110, + defaultType : 'textfield', + items : [ new Ext.form.ComboBox({ + store : tvheadend.channels, + fieldLabel : 'Target channel', + name : 'targetchannel', + hiddenName : 'targetID', + editable : false, + allowBlank : false, + triggerAction : 'all', + mode : 'remote', + displayField : 'name', + valueField : 'chid', + emptyText : 'Select a channel...' + }) ], + buttons : [ { + text : 'Merge', + handler : doMerge + } ] }); - } - var selModel = new Ext.grid.RowSelectionModel({ - singleSelect:false - }); + win = new Ext.Window({ + title : 'Merge channel ' + chan.name + ' into...', + layout : 'fit', + width : 500, + height : 120, + modal : true, + plain : true, + items : panel + }); + win.show(); - var delBtn = new Ext.Toolbar.Button({ - tooltip: 'Delete one or more selected channels', - iconCls:'remove', - text: 'Delete selected', - handler: delSelected, - disabled: true - }); - - selModel.on('selectionchange', function(s) { - delBtn.setDisabled(s.getCount() == 0); - }); - - var saveBtn = new Ext.Toolbar.Button({ - tooltip: 'Save any changes made (Changed cells have red borders).', - iconCls:'save', - text: "Save changes", - handler: saveChanges, - disabled: true - }); - - var rejectBtn = new Ext.Toolbar.Button({ - tooltip: 'Revert any changes made (Changed cells have red borders).', - iconCls:'undo', - text: "Revert changes", - handler: function() { - tvheadend.channels.rejectChanges(); - }, - disabled: true - }); - - - var grid = new Ext.grid.EditorGridPanel({ - stripeRows: true, - title: 'Channels', - iconCls: 'television', - store: tvheadend.channels, - plugins: [actions], - clicksToEdit: 2, - cm: cm, - viewConfig: { - forceFit:true - }, - selModel: selModel, - tbar: [ - delBtn, '-', saveBtn, rejectBtn, '->', { - text: 'Help', - handler: function() { - new tvheadend.help('Channels', 'config_channels.html'); - } - } - ] - }); - - tvheadend.channels.on('update', function(s, r, o) { - d = s.getModifiedRecords().length == 0 - saveBtn.setDisabled(d); - rejectBtn.setDisabled(d); - }); - - tvheadend.channelTags.on('load', function(s, r, o) { - if(grid.rendered) - grid.getView().refresh(); - }); - - return grid; +} + +/** + * + */ +tvheadend.chconf = function() { + var fm = Ext.form; + + var actions = new Ext.ux.grid.RowActions({ + header : '', + dataIndex : 'actions', + width : 45, + actions : [ { + iconCls : 'merge', + qtip : 'Merge this channel with another channel', + cb : function(grid, record, action, row, col) { + tvheadend.mergeChannel(record.data); + } + } ] + }); + + var cm = new Ext.grid.ColumnModel([ { + header : "Number", + dataIndex : 'number', + sortable : true, + width : 50, + renderer : function(value, metadata, record, row, col, store) { + if (!value) { + return 'Not set'; + } + else { + return value; + } + }, + + editor : new fm.NumberField({ + minValue : 0, + maxValue : 9999 + }) + }, { + header : "Name", + dataIndex : 'name', + width : 150, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Play", + dataIndex : 'chid', + width : 50, + renderer : function(value, metadata, record, row, col, store) { + url = 'playlist/channelid/' + value + return "Play" + } + }, { + header : "EPG Grab source", + dataIndex : 'epggrabsrc', + width : 150, + editor : new Ext.ux.form.LovCombo({ + loadingText : 'Loading...', + store : tvheadend.epggrabChannels, + allowBlank : true, + typeAhead : true, + minChars : 2, + lazyRender : true, + triggerAction : 'all', + mode : 'remote', + displayField : 'mod-name', + valueField : 'mod-id' + }) + }, { + header : "Tags", + dataIndex : 'tags', + width : 300, + renderer : function(value, metadata, record, row, col, store) { + if (typeof value === 'undefined' || value.length < 1) { + return 'No tags'; + } + + ret = []; + tags = value.split(','); + for ( var i = 0; i < tags.length; i++) { + var tag = tvheadend.channelTags.getById(tags[i]); + if (typeof tag !== 'undefined') { + ret.push(tag.data.name); + } + } + return ret.join(', '); + }, + editor : new Ext.ux.form.LovCombo({ + store : tvheadend.channelTags, + mode : 'local', + valueField : 'identifier', + displayField : 'name' + }) + }, { + header : "Icon (full URL)", + dataIndex : 'ch_icon', + width : 200, + editor : new fm.TextField() + }, { + header : "DVR Pre-Start", + dataIndex : 'epg_pre_start', + width : 100, + + renderer : function(value, metadata, record, row, col, store) { + if (!value) { + return 'Not set'; + } + else { + return value + ' min'; + } + }, + + editor : new fm.NumberField({ + minValue : 0, + maxValue : 1440 + }) + }, { + header : "DVR Post-End", + dataIndex : 'epg_post_end', + width : 100, + renderer : function(value, metadata, record, row, col, store) { + if (!value) { + return 'Not set'; + } + else { + return value + ' min'; + } + }, + + editor : new fm.NumberField({ + minValue : 0, + maxValue : 1440 + }) + }, actions ]); + + function delSelected() { + var selectedKeys = grid.selModel.selections.keys; + if (selectedKeys.length > 0) { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + } + else { + Ext.MessageBox.alert('Message', + 'Please select at least one item to delete'); + } + } + + function deleteRecord(btn) { + if (btn == 'yes') { + var selectedKeys = grid.selModel.selections.keys; + + Ext.Ajax.request({ + url : "channels", + params : { + op : "delete", + entries : Ext.encode(selectedKeys) + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to delete'); + } + }) + } + } + + function saveChanges() { + var mr = tvheadend.channels.getModifiedRecords(); + var out = new Array(); + for ( var x = 0; x < mr.length; x++) { + v = mr[x].getChanges(); + out[x] = v; + out[x].id = mr[x].id; + } + + Ext.Ajax.request({ + url : "channels", + params : { + op : "update", + entries : Ext.encode(out) + }, + success : function(response, options) { + tvheadend.channels.commitChanges(); + }, + failure : function(response, options) { + Ext.MessageBox.alert('Message', response.statusText); + } + }); + } + + var selModel = new Ext.grid.RowSelectionModel({ + singleSelect : false + }); + + var delBtn = new Ext.Toolbar.Button({ + tooltip : 'Delete one or more selected channels', + iconCls : 'remove', + text : 'Delete selected', + handler : delSelected, + disabled : true + }); + + selModel.on('selectionchange', function(s) { + delBtn.setDisabled(s.getCount() == 0); + }); + + var saveBtn = new Ext.Toolbar.Button({ + tooltip : 'Save any changes made (Changed cells have red borders).', + iconCls : 'save', + text : "Save changes", + handler : saveChanges, + disabled : true + }); + + var rejectBtn = new Ext.Toolbar.Button({ + tooltip : 'Revert any changes made (Changed cells have red borders).', + iconCls : 'undo', + text : "Revert changes", + handler : function() { + tvheadend.channels.rejectChanges(); + }, + disabled : true + }); + + var grid = new Ext.grid.EditorGridPanel({ + stripeRows : true, + title : 'Channels', + iconCls : 'television', + store : tvheadend.channels, + plugins : [ actions ], + clicksToEdit : 2, + cm : cm, + viewConfig : { + forceFit : true + }, + selModel : selModel, + tbar : [ delBtn, '-', saveBtn, rejectBtn, '->', { + text : 'Help', + handler : function() { + new tvheadend.help('Channels', 'config_channels.html'); + } + } ] + }); + + tvheadend.channels.on('update', function(s, r, o) { + d = s.getModifiedRecords().length == 0 + saveBtn.setDisabled(d); + rejectBtn.setDisabled(d); + }); + + tvheadend.channelTags.on('load', function(s, r, o) { + if (grid.rendered) grid.getView().refresh(); + }); + + return grid; } diff --git a/src/webui/static/app/comet.js b/src/webui/static/app/comet.js index 6182b318..74638788 100644 --- a/src/webui/static/app/comet.js +++ b/src/webui/static/app/comet.js @@ -2,19 +2,19 @@ * Comet interfaces */ Ext.extend(tvheadend.Comet = function() { - this.addEvents({ - accessUpdate: true, - tvAdapter: true, - dvbMux: true, - dvbStore: true, - dvbSatConf: true, - logmessage: true, - channeltags: true, - autorec: true, - dvrdb: true, - dvrconfig: true, - channels: true - }); + this.addEvents({ + accessUpdate : true, + tvAdapter : true, + dvbMux : true, + dvbStore : true, + dvbSatConf : true, + logmessage : true, + channeltags : true, + autorec : true, + dvrdb : true, + dvrconfig : true, + channels : true + }); }, Ext.util.Observable); tvheadend.comet = new tvheadend.Comet(); @@ -22,49 +22,49 @@ tvheadend.boxid = null; tvheadend.cometPoller = function() { - var failures = 0; + var failures = 0; - var cometRequest = new Ext.util.DelayedTask(function() { + var cometRequest = new Ext.util.DelayedTask(function() { - Ext.Ajax.request({ - url: 'comet/poll', - params : { - boxid: (tvheadend.boxid ? tvheadend.boxid : null), - immediate: failures > 0 ? 1 : 0 - }, - success: function(result, request) { - parse_comet_response(result.responseText); + Ext.Ajax + .request({ + url : 'comet/poll', + params : { + boxid : (tvheadend.boxid ? tvheadend.boxid : null), + immediate : failures > 0 ? 1 : 0 + }, + success : function(result, request) { + parse_comet_response(result.responseText); - if(failures > 1) { - tvheadend.log('Reconnected to Tvheadend', - 'font-weight: bold; color: #080'); - } - failures = 0; - }, - failure: function(result, request) { - cometRequest.delay(failures ? 1000 : 1); - if(failures == 1) { - tvheadend.log('There seems to be a problem with the ' + - 'live update feed from Tvheadend. ' + - 'Trying to reconnect...', - 'font-weight: bold; color: #f00'); - } - failures++; - } + if (failures > 1) { + tvheadend.log('Reconnected to Tvheadend', + 'font-weight: bold; color: #080'); + } + failures = 0; + }, + failure : function(result, request) { + cometRequest.delay(failures ? 1000 : 1); + if (failures == 1) { + tvheadend.log('There seems to be a problem with the ' + + 'live update feed from Tvheadend. ' + + 'Trying to reconnect...', + 'font-weight: bold; color: #f00'); + } + failures++; + } + }); }); - }); - function parse_comet_response(responsetxt) { - response = Ext.util.JSON.decode(responsetxt); - tvheadend.boxid = response.boxid - for(x = 0; x < response.messages.length; x++) { - m = response.messages[x]; - tvheadend.comet.fireEvent(m.notificationClass, m); + function parse_comet_response(responsetxt) { + response = Ext.util.JSON.decode(responsetxt); + tvheadend.boxid = response.boxid + for (x = 0; x < response.messages.length; x++) { + m = response.messages[x]; + tvheadend.comet.fireEvent(m.notificationClass, m); + } + cometRequest.delay(100); } + ; + cometRequest.delay(100); - }; - - cometRequest.delay(100); } - - diff --git a/src/webui/static/app/config.js b/src/webui/static/app/config.js index e3830720..37ed6913 100644 --- a/src/webui/static/app/config.js +++ b/src/webui/static/app/config.js @@ -1,98 +1,89 @@ tvheadend.miscconf = function() { + /* + * Basic Config + */ + var confreader = new Ext.data.JsonReader({ + root : 'config' + }, [ 'muxconfpath', 'language' ]); - /* - * Basic Config - */ + /* **************************************************************** + * Form Fields + * ***************************************************************/ - var confreader = new Ext.data.JsonReader( - { root: 'config' }, - [ - 'muxconfpath', 'language' - ] - ); + var dvbscanPath = new Ext.form.TextField({ + fieldLabel : 'DVB scan files path', + name : 'muxconfpath', + allowBlank : true + }); - /* **************************************************************** - * Form Fields - * ***************************************************************/ + var language = new Ext.form.TextField({ + fieldLabel : 'Default Language(s)', + name : 'language', + allowBlank : true + }); - var dvbscanPath = new Ext.form.TextField({ - fieldLabel : 'DVB scan files path', - name : 'muxconfpath', - allowBlank : true - }); + /* **************************************************************** + * Form + * ***************************************************************/ - var language = new Ext.form.TextField({ - fieldLabel : 'Default Language(s)', - name : 'language', - allowBlank : true - }); + var saveButton = new Ext.Button({ + text : "Save configuration", + tooltip : 'Save changes made to configuration below', + iconCls : 'save', + handler : saveChanges + }); - /* **************************************************************** - * Form - * ***************************************************************/ + var helpButton = new Ext.Button({ + text : 'Help', + handler : function() { + new tvheadend.help('General Configuration', 'config_misc.html'); + } + }); - var saveButton = new Ext.Button({ - text : "Save configuration", - tooltip : 'Save changes made to configuration below', - iconCls :'save', - handler : saveChanges - }); + var confpanel = new Ext.FormPanel({ + title : 'General', + iconCls : 'wrench', + border : false, + bodyStyle : 'padding:15px', + labelAlign : 'left', + labelWidth : 150, + waitMsgTarget : true, + reader : confreader, + layout : 'form', + defaultType : 'textfield', + autoHeight : true, + items : [ language, dvbscanPath ], + tbar : [ saveButton, '->', helpButton ] + }); - var helpButton = new Ext.Button({ - text : 'Help', - handler : function() { - new tvheadend.help('General Configuration', - 'config_misc.html'); - } - }); + /* **************************************************************** + * Load/Save + * ***************************************************************/ - var confpanel = new Ext.FormPanel({ - title : 'General', - iconCls : 'wrench', - border : false, - bodyStyle : 'padding:15px', - labelAlign : 'left', - labelWidth : 150, - waitMsgTarget : true, - reader : confreader, - layout : 'form', - defaultType : 'textfield', - autoHeight : true, - items : [ - language, - dvbscanPath - ], - tbar: [ - saveButton, - '->', - helpButton - ] - }); + confpanel.on('render', function() { + confpanel.getForm().load({ + url : 'config', + params : { + op : 'loadSettings' + }, + success : function(form, action) { + confpanel.enable(); + } + }); + }); - /* **************************************************************** - * Load/Save - * ***************************************************************/ + function saveChanges() { + confpanel.getForm().submit({ + url : 'config', + params : { + op : 'saveSettings' + }, + waitMsg : 'Saving Data...', + failure : function(form, action) { + Ext.Msg.alert('Save failed', action.result.errormsg); + } + }); + } - confpanel.on('render', function() { - confpanel.getForm().load({ - url : 'config', - params : { op : 'loadSettings' }, - success : function ( form, action ) { - confpanel.enable(); - } - }); - }); - - function saveChanges() { - confpanel.getForm().submit({ - url : 'config', - params : { op : 'saveSettings' }, - waitMsg : 'Saving Data...', - failure : function (form, action) { - Ext.Msg.alert('Save failed', action.result.errormsg); - } - }); - } - - return confpanel; + return confpanel; } diff --git a/src/webui/static/app/cteditor.js b/src/webui/static/app/cteditor.js index 57eef7a6..578c6182 100644 --- a/src/webui/static/app/cteditor.js +++ b/src/webui/static/app/cteditor.js @@ -1,60 +1,49 @@ - tvheadend.cteditor = function() { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 60 - }); + var fm = Ext.form; - var internalColumn = new Ext.grid.CheckColumn({ - header: "Internal", - dataIndex: 'internal', - width: 100 - }); + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 60 + }); - var titledIconColumn = new Ext.grid.CheckColumn({ - header: "Icon has title", - dataIndex: 'titledIcon', - width: 100, - tooltip: 'Set this if the supplied icon has a title embedded. ' + - 'This will tell displaying application not to superimpose title '+ - 'on top of logo.' - }); + var internalColumn = new Ext.grid.CheckColumn({ + header : "Internal", + dataIndex : 'internal', + width : 100 + }); + var titledIconColumn = new Ext.grid.CheckColumn({ + header : "Icon has title", + dataIndex : 'titledIcon', + width : 100, + tooltip : 'Set this if the supplied icon has a title embedded. ' + + 'This will tell displaying application not to superimpose title ' + + 'on top of logo.' + }); - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Name", - dataIndex: 'name', - editor: new fm.TextField({allowBlank: false}) - }, - internalColumn, - { - header: "Icon (full URL)", - dataIndex: 'icon', - width: 400, - editor: new fm.TextField({}) - }, - titledIconColumn, - { - header: "Comment", - dataIndex: 'comment', - width: 400, - editor: new fm.TextField({}) - } - ]); - - var ChannelTagRecord = Ext.data.Record.create([ - 'enabled','name','internal','icon','comment','titledIcon' - ]); - - return new tvheadend.tableEditor('Channel Tags', 'channeltags', cm, - ChannelTagRecord, - [enabledColumn, internalColumn, - titledIconColumn], - null, - 'config_tags.html', 'tags'); + var cm = new Ext.grid.ColumnModel([ enabledColumn, { + header : "Name", + dataIndex : 'name', + editor : new fm.TextField({ + allowBlank : false + }) + }, internalColumn, { + header : "Icon (full URL)", + dataIndex : 'icon', + width : 400, + editor : new fm.TextField({}) + }, titledIconColumn, { + header : "Comment", + dataIndex : 'comment', + width : 400, + editor : new fm.TextField({}) + } ]); + + var ChannelTagRecord = Ext.data.Record.create([ 'enabled', 'name', + 'internal', 'icon', 'comment', 'titledIcon' ]); + + return new tvheadend.tableEditor('Channel Tags', 'channeltags', cm, + ChannelTagRecord, [ enabledColumn, internalColumn, titledIconColumn ], + null, 'config_tags.html', 'tags'); } diff --git a/src/webui/static/app/cwceditor.js b/src/webui/static/app/cwceditor.js index ac5f610a..05fa188a 100644 --- a/src/webui/static/app/cwceditor.js +++ b/src/webui/static/app/cwceditor.js @@ -1,121 +1,125 @@ - tvheadend.cwceditor = function() { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 60 - }); + var fm = Ext.form; - var emmColumn = new Ext.grid.CheckColumn({ - header: "Update Card", - dataIndex: 'emm', - width: 100 - }); + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 60 + }); - var emmexColumn = new Ext.grid.CheckColumn({ - header: "Update One", - dataIndex: 'emmex', - width: 100 - }); + var emmColumn = new Ext.grid.CheckColumn({ + header : "Update Card", + dataIndex : 'emm', + width : 100 + }); - function setMetaAttr(meta, record){ - var enabled = record.get('enabled'); - if(!enabled) return; + var emmexColumn = new Ext.grid.CheckColumn({ + header : "Update One", + dataIndex : 'emmex', + width : 100 + }); - var connected = record.get('connected'); - if(connected == 1){ - meta.attr = 'style="color:green;"'; - } else { - meta.attr = 'style="color:red;"'; - } - } + function setMetaAttr(meta, record) { + var enabled = record.get('enabled'); + if (!enabled) return; - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Hostname", - dataIndex: 'hostname', - width: 200, - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Port", - dataIndex: 'port', - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Username", - dataIndex: 'username', - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Password", - dataIndex: 'password', - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return 'Hidden'; - }, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "DES Key", - dataIndex: 'deskey', - width: 300, - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return 'Hidden'; - }, - editor: new fm.TextField({allowBlank: false}) - }, - emmColumn, - emmexColumn, - { - header: "Comment", - dataIndex: 'comment', - width: 400, - renderer: function(value, metadata, record, row, col, store) { - setMetaAttr(metadata, record); - return value; - }, - editor: new fm.TextField() + var connected = record.get('connected'); + if (connected == 1) { + meta.attr = 'style="color:green;"'; + } + else { + meta.attr = 'style="color:red;"'; + } } - ]); - var rec = Ext.data.Record.create([ - 'enabled', 'connected', 'hostname', 'port', 'username', - 'password', 'deskey', 'emm', 'emmex', 'comment' - ]); + var cm = new Ext.grid.ColumnModel([ enabledColumn, { + header : "Hostname", + dataIndex : 'hostname', + width : 200, + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Port", + dataIndex : 'port', + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Username", + dataIndex : 'username', + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Password", + dataIndex : 'password', + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return 'Hidden'; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "DES Key", + dataIndex : 'deskey', + width : 300, + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return 'Hidden'; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, emmColumn, emmexColumn, { + header : "Comment", + dataIndex : 'comment', + width : 400, + renderer : function(value, metadata, record, row, col, store) { + setMetaAttr(metadata, record); + return value; + }, + editor : new fm.TextField() + } ]); - var store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "tablemgr", - autoLoad: true, - id: 'id', - baseParams: {table: 'cwc', op: "get"} - }); + var rec = Ext.data.Record.create([ 'enabled', 'connected', 'hostname', + 'port', 'username', 'password', 'deskey', 'emm', 'emmex', 'comment' ]); - var grid = new tvheadend.tableEditor('Code Word Client', 'cwc', cm, rec, - [enabledColumn, emmColumn, emmexColumn], store, - 'config_cwc.html', 'key'); - - tvheadend.comet.on('cwcStatus', function(msg) { - var rec = store.getById(msg.id); - if(rec) { - rec.set('connected', msg.connected); - grid.getView().refresh(); - } - }); + var store = new Ext.data.JsonStore({ + root : 'entries', + fields : rec, + url : "tablemgr", + autoLoad : true, + id : 'id', + baseParams : { + table : 'cwc', + op : "get" + } + }); - return grid; + var grid = new tvheadend.tableEditor('Code Word Client', 'cwc', cm, rec, [ + enabledColumn, emmColumn, emmexColumn ], store, 'config_cwc.html', 'key'); + + tvheadend.comet.on('cwcStatus', function(msg) { + var rec = store.getById(msg.id); + if (rec) { + rec.set('connected', msg.connected); + grid.getView().refresh(); + } + }); + + return grid; } diff --git a/src/webui/static/app/dvb.js b/src/webui/static/app/dvb.js index 649ddb2f..34957e9c 100644 --- a/src/webui/static/app/dvb.js +++ b/src/webui/static/app/dvb.js @@ -1,1053 +1,1025 @@ - - /** * DVB Mux grid */ tvheadend.dvb_muxes = function(adapterData, satConfStore) { - adapterId = adapterData.identifier; + adapterId = adapterData.identifier; - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 40 - }); + var fm = Ext.form; - var qualityColumn = new Ext.ux.grid.ProgressColumn({ - header : "Quality", - dataIndex : 'quality', - width : 85, - textPst : '%', - colored : true - }); - - var cmlist = Array(); - - cmlist.push(enabledColumn, - { - header: "Network", - dataIndex: 'network', - width: 200 - }, - { - header: "Frequency", - dataIndex: 'freq', - width: 50 - }, - { - header: "Modulation", - dataIndex: 'mod', - width: 100 + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 40 }); - if(adapterData.satConf) { - // Include DVB-S specific stuff - - satConfStore.on('update', function(s, r, c) { - if(grid.rendered) - grid.getView().refresh(); + var qualityColumn = new Ext.ux.grid.ProgressColumn({ + header : "Quality", + dataIndex : 'quality', + width : 85, + textPst : '%', + colored : true }); - satConfStore.on('load', function(s, r, o) { - if(grid.rendered) - grid.getView().refresh(); + var cmlist = Array(); + + cmlist.push(enabledColumn, { + header : "Network", + dataIndex : 'network', + width : 200 + }, { + header : "Frequency", + dataIndex : 'freq', + width : 50 + }, { + header : "Modulation", + dataIndex : 'mod', + width : 100 }); - tvheadend.comet.on('dvbSatConf', function(m) { - if(m.adapterId == adapterId) - satConfStore.reload(); - }); + if (adapterData.satConf) { + // Include DVB-S specific stuff + + satConfStore.on('update', function(s, r, c) { + if (grid.rendered) grid.getView().refresh(); + }); + + satConfStore.on('load', function(s, r, o) { + if (grid.rendered) grid.getView().refresh(); + }); + + tvheadend.comet.on('dvbSatConf', function(m) { + if (m.adapterId == adapterId) satConfStore.reload(); + }); + + cmlist + .push( + { + header : "Polarisation", + dataIndex : 'pol', + width : 50 + }, + { + header : "Satellite config", + dataIndex : 'satconf', + width : 100, + renderer : function(value, metadata, record, row, col, store) { + r = satConfStore.getById(value); + return typeof r === 'undefined' ? 'Unset' + : r.data.name; + } + }, { + header : "Frontend status", + dataIndex : 'fe_status', + width : 30 + }); + } cmlist.push({ - header: "Polarisation", - dataIndex: 'pol', - width: 50 - }, { - header: "Satellite config", - dataIndex: 'satconf', - width: 100, - renderer: function(value, metadata, record, row, col, store) { - r = satConfStore.getById(value); - return typeof r === 'undefined' ? - 'Unset' - : r.data.name; - } - }, { - header: "Frontend status", - dataIndex: 'fe_status', - width: 30 - }); - } + header : "MuxID", + dataIndex : 'muxid', + width : 50 + }, qualityColumn); - cmlist.push( - { - header: "MuxID", - dataIndex: 'muxid', - width: 50 - }, - qualityColumn - ); + var cm = new Ext.grid.ColumnModel(cmlist); + cm.defaultSortable = true; - var cm = new Ext.grid.ColumnModel(cmlist); - cm.defaultSortable = true; + var rec = Ext.data.Record.create([ 'id', 'enabled', 'network', 'freq', + 'pol', 'satconf', 'muxid', 'quality', 'fe_status', 'mod' ]); - var rec = Ext.data.Record.create([ - 'id', 'enabled','network', 'freq', 'pol', 'satconf', - 'muxid', 'quality', 'fe_status', 'mod' - ]); - - var store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "dvb/muxes/" + adapterId, - autoLoad: true, - id: 'id', - baseParams: {op: "get"}, - listeners: { - 'update': function(s, r, o) { - d = s.getModifiedRecords().length == 0 - saveBtn.setDisabled(d); - rejectBtn.setDisabled(d); - } - } - }); - - tvheadend.comet.on('dvbMux', function(m) { - - r = store.getById(m.id) - if(typeof r === 'undefined') { - store.reload(); - return; - } - - for (key in m) - r.data[key] = m[key]; - - store.afterEdit(r); - store.fireEvent('updated', store, r, Ext.data.Record.COMMIT); - }); - - function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if(selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', - deleteRecord); - } else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - }; - - - function deleteRecord(btn) { - if(btn=='yes') { - var selectedKeys = grid.selModel.selections.keys; - - Ext.Ajax.request({ - url: "dvb/muxes/" + adapterId, - params: { - op:"delete", - entries:Ext.encode(selectedKeys) + var store = new Ext.data.JsonStore({ + root : 'entries', + fields : rec, + url : "dvb/muxes/" + adapterId, + autoLoad : true, + id : 'id', + baseParams : { + op : "get" }, - failure:function(response,options) { - Ext.MessageBox.alert('Server Error','Unable to delete'); - }, - success:function(response,options) { - store.reload(); + listeners : { + 'update' : function(s, r, o) { + d = s.getModifiedRecords().length == 0 + saveBtn.setDisabled(d); + rejectBtn.setDisabled(d); + } } - }) - } - } - - - function copySelected() { - - function doCopy() { - var selectedKeys = grid.selModel.selections.keys; - var target = panel.getForm().getValues('targetID').targetID; - - if(adapterData.satConf) { - var satconf = panel.getForm().getValues('targetSatConfID').targetSatConfID; - var mparams = { - entries:Ext.encode(selectedKeys), - satconf:satconf - }; - } else { - var mparams = { - entries:Ext.encode(selectedKeys) - }; - } - - Ext.Ajax.request({ - url: "dvb/copymux/" + target, - params: mparams, - failure:function(response,options) { - Ext.MessageBox.alert('Server Error','Unable to copy'); - }, - success: function() { - win.close(); - } - }); - } - - targetStore = new Ext.data.JsonStore({ - root:'entries', - id: 'identifier', - url:'dvb/adapter', - fields: ['identifier', - 'name'], - baseParams: {sibling: adapterId} - }); - if(adapterData.satConf) { - targetSatConfStore = new Ext.data.JsonStore({ - root:'entries', - id: 'identifier', - url:'dvb/satconf', - fields: ['identifier', - 'name'], - baseParams: {adapter: adapterId} - }); - satConf = new Ext.form.ComboBox({ - store: targetSatConfStore, - fieldLabel: 'Target Satellite config', - name: 'targetsatconf', - hiddenName: 'targetSatConfID', - editable: false, - allowBlank: false, - triggerAction: 'all', - mode: 'remote', - displayField:'name', - valueField:'identifier', - emptyText: 'Select target adapter first...' - }); - } else { - satConf = null; - } - - var mitems = [ - new Ext.form.ComboBox({ - store: targetStore, - fieldLabel: 'Target adapter', - name: 'targetadapter', - hiddenName: 'targetID', - editable: false, - allowBlank: false, - triggerAction: 'all', - mode: 'remote', - displayField:'name', - valueField:'identifier', - emptyText: 'Select target adapter...', - listeners: { - 'select': function(combo, value) { - if (satConf) { - satConf.emptyText = 'Select satellite configuration...'; - satConf.clearValue(); - targetSatConfStore.baseParams = {adapter: combo.value}; - targetSatConfStore.load(); - satConf.focus(); - satConf.expand(); - } - } - } - }) - ]; - - if (satConf) - mitems.push(satConf); - - var panel = new Ext.FormPanel({ - frame:true, - border:true, - bodyStyle:'padding:5px', - labelAlign: 'right', - labelWidth: 150, - defaultType: 'textfield', - items: mitems, - buttons: [{ - text: 'Copy', - handler: doCopy - }] - }); - - win = new Ext.Window({ - title: 'Copy multiplex configuration', - layout: 'fit', - width: 500, - height: 150, - modal: true, - plain: true, - items: panel - }); - win.show(); - } - - - function saveChanges() { - var mr = store.getModifiedRecords(); - var out = new Array(); - for (var x = 0; x < mr.length; x++) { - v = mr[x].getChanges(); - out[x] = v; - out[x].id = mr[x].id; - } - - Ext.Ajax.request({ - url: "dvb/muxes/" + adapterId, - params: { - op:"update", - entries:Ext.encode(out) - }, - success:function(response,options) { - store.commitChanges(); - }, - failure:function(response,options) { - Ext.MessageBox.alert('Message',response.statusText); - } }); - } - - var selModel = new Ext.grid.RowSelectionModel({ - singleSelect:false - }); - var delBtn = new Ext.Toolbar.Button({ - tooltip: 'Delete one or more selected muxes', - iconCls:'remove', - text: 'Delete selected...', - handler: delSelected, - disabled: true - }); + tvheadend.comet.on('dvbMux', function(m) { - var copyBtn = new Ext.Toolbar.Button({ - tooltip: 'Copy selected multiplexes to other adapter', - iconCls:'clone', - text: 'Copy to other adapter...', - handler: copySelected, - disabled: true - }); - - selModel.on('selectionchange', function(s) { - delBtn.setDisabled(s.getCount() == 0); - copyBtn.setDisabled(s.getCount() == 0); - }); - - var saveBtn = new Ext.Toolbar.Button({ - tooltip: 'Save any changes made (Changed cells have red borders).', - iconCls:'save', - text: "Save changes", - handler: saveChanges, - disabled: true - }); - - var rejectBtn = new Ext.Toolbar.Button({ - tooltip: 'Revert any changes made (Changed cells have red borders).', - iconCls:'undo', - text: "Revert changes", - handler: function() { - store.rejectChanges(); - }, - disabled: true - }); - - var grid = new Ext.grid.EditorGridPanel({ - stripeRows: true, - title: 'Multiplexes', - plugins: [enabledColumn, qualityColumn], - store: store, - clicksToEdit: 2, - cm: cm, - viewConfig: {forceFit:true}, - selModel: selModel, - tbar: [ - delBtn, copyBtn, '-', saveBtn, rejectBtn, '-', { - text: 'Add mux(es) manually...', - iconCls:'add', - handler: function() { - tvheadend.addMuxManually(adapterData, satConfStore) + r = store.getById(m.id) + if (typeof r === 'undefined') { + store.reload(); + return; } - } - ] - }); - return grid; + for (key in m) + r.data[key] = m[key]; + + store.afterEdit(r); + store.fireEvent('updated', store, r, Ext.data.Record.COMMIT); + }); + + function delSelected() { + var selectedKeys = grid.selModel.selections.keys; + if (selectedKeys.length > 0) { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + } + else { + Ext.MessageBox.alert('Message', + 'Please select at least one item to delete'); + } + } + ; + + function deleteRecord(btn) { + if (btn == 'yes') { + var selectedKeys = grid.selModel.selections.keys; + + Ext.Ajax.request({ + url : "dvb/muxes/" + adapterId, + params : { + op : "delete", + entries : Ext.encode(selectedKeys) + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to delete'); + }, + success : function(response, options) { + store.reload(); + } + }) + } + } + + function copySelected() { + + function doCopy() { + var selectedKeys = grid.selModel.selections.keys; + var target = panel.getForm().getValues('targetID').targetID; + + if (adapterData.satConf) { + var satconf = panel.getForm().getValues('targetSatConfID').targetSatConfID; + var mparams = { + entries : Ext.encode(selectedKeys), + satconf : satconf + }; + } + else { + var mparams = { + entries : Ext.encode(selectedKeys) + }; + } + + Ext.Ajax.request({ + url : "dvb/copymux/" + target, + params : mparams, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to copy'); + }, + success : function() { + win.close(); + } + }); + } + + targetStore = new Ext.data.JsonStore({ + root : 'entries', + id : 'identifier', + url : 'dvb/adapter', + fields : [ 'identifier', 'name' ], + baseParams : { + sibling : adapterId + } + }); + if (adapterData.satConf) { + targetSatConfStore = new Ext.data.JsonStore({ + root : 'entries', + id : 'identifier', + url : 'dvb/satconf', + fields : [ 'identifier', 'name' ], + baseParams : { + adapter : adapterId + } + }); + satConf = new Ext.form.ComboBox({ + store : targetSatConfStore, + fieldLabel : 'Target Satellite config', + name : 'targetsatconf', + hiddenName : 'targetSatConfID', + editable : false, + allowBlank : false, + triggerAction : 'all', + mode : 'remote', + displayField : 'name', + valueField : 'identifier', + emptyText : 'Select target adapter first...' + }); + } + else { + satConf = null; + } + + var mitems = [ new Ext.form.ComboBox({ + store : targetStore, + fieldLabel : 'Target adapter', + name : 'targetadapter', + hiddenName : 'targetID', + editable : false, + allowBlank : false, + triggerAction : 'all', + mode : 'remote', + displayField : 'name', + valueField : 'identifier', + emptyText : 'Select target adapter...', + listeners : { + 'select' : function(combo, value) { + if (satConf) { + satConf.emptyText = 'Select satellite configuration...'; + satConf.clearValue(); + targetSatConfStore.baseParams = { + adapter : combo.value + }; + targetSatConfStore.load(); + satConf.focus(); + satConf.expand(); + } + } + } + }) ]; + + if (satConf) mitems.push(satConf); + + var panel = new Ext.FormPanel({ + frame : true, + border : true, + bodyStyle : 'padding:5px', + labelAlign : 'right', + labelWidth : 150, + defaultType : 'textfield', + items : mitems, + buttons : [ { + text : 'Copy', + handler : doCopy + } ] + }); + + win = new Ext.Window({ + title : 'Copy multiplex configuration', + layout : 'fit', + width : 500, + height : 150, + modal : true, + plain : true, + items : panel + }); + win.show(); + } + + function saveChanges() { + var mr = store.getModifiedRecords(); + var out = new Array(); + for ( var x = 0; x < mr.length; x++) { + v = mr[x].getChanges(); + out[x] = v; + out[x].id = mr[x].id; + } + + Ext.Ajax.request({ + url : "dvb/muxes/" + adapterId, + params : { + op : "update", + entries : Ext.encode(out) + }, + success : function(response, options) { + store.commitChanges(); + }, + failure : function(response, options) { + Ext.MessageBox.alert('Message', response.statusText); + } + }); + } + + var selModel = new Ext.grid.RowSelectionModel({ + singleSelect : false + }); + + var delBtn = new Ext.Toolbar.Button({ + tooltip : 'Delete one or more selected muxes', + iconCls : 'remove', + text : 'Delete selected...', + handler : delSelected, + disabled : true + }); + + var copyBtn = new Ext.Toolbar.Button({ + tooltip : 'Copy selected multiplexes to other adapter', + iconCls : 'clone', + text : 'Copy to other adapter...', + handler : copySelected, + disabled : true + }); + + selModel.on('selectionchange', function(s) { + delBtn.setDisabled(s.getCount() == 0); + copyBtn.setDisabled(s.getCount() == 0); + }); + + var saveBtn = new Ext.Toolbar.Button({ + tooltip : 'Save any changes made (Changed cells have red borders).', + iconCls : 'save', + text : "Save changes", + handler : saveChanges, + disabled : true + }); + + var rejectBtn = new Ext.Toolbar.Button({ + tooltip : 'Revert any changes made (Changed cells have red borders).', + iconCls : 'undo', + text : "Revert changes", + handler : function() { + store.rejectChanges(); + }, + disabled : true + }); + + var grid = new Ext.grid.EditorGridPanel({ + stripeRows : true, + title : 'Multiplexes', + plugins : [ enabledColumn, qualityColumn ], + store : store, + clicksToEdit : 2, + cm : cm, + viewConfig : { + forceFit : true + }, + selModel : selModel, + tbar : [ delBtn, copyBtn, '-', saveBtn, rejectBtn, '-', { + text : 'Add mux(es) manually...', + iconCls : 'add', + handler : function() { + tvheadend.addMuxManually(adapterData, satConfStore) + } + } ] + }); + + return grid; } - /** * DVB service grid */ tvheadend.dvb_services = function(adapterId) { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 45 - }); + var fm = Ext.form; + + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 45 + }); var eitColumn = new Ext.grid.CheckColumn({ - header: "EIT", - dataIndex: 'dvb_eit_enable', - width: 45 + header : "EIT", + dataIndex : 'dvb_eit_enable', + width : 45 }); - var actions = new Ext.ux.grid.RowActions({ - header:'', - dataIndex: 'actions', - width: 45, - actions: [ - { - iconCls:'info', - qtip:'Detailed information about service', - cb: function(grid, record, action, row, col) { - Ext.Ajax.request({ - url: "servicedetails/" + record.id, - success:function(response, options) { - r = Ext.util.JSON.decode(response.responseText); - tvheadend.showTransportDetails(r); + var actions = new Ext.ux.grid.RowActions({ + header : '', + dataIndex : 'actions', + width : 45, + actions : [ { + iconCls : 'info', + qtip : 'Detailed information about service', + cb : function(grid, record, action, row, col) { + Ext.Ajax.request({ + url : "servicedetails/" + record.id, + success : function(response, options) { + r = Ext.util.JSON.decode(response.responseText); + tvheadend.showTransportDetails(r); + } + }) } - }) - } - } - ] - }); - - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Service name", - dataIndex: 'svcname', - width: 150 - }, - { - header: "Play", - dataIndex: 'id', - width: 50, - renderer: function(value, metadata, record, row, col, store) { - url = 'stream/service/' + value - return 'Play' - } - }, - { - header: "Channel name", - dataIndex: 'channelname', - width: 150, - renderer: function(value, metadata, record, row, col, store) { - return value ? value : - 'Unmapped'; - }, - editor: new fm.ComboBox({ - store: tvheadend.channels, - allowBlank: true, - typeAhead: true, - minChars: 2, - lazyRender: true, - triggerAction: 'all', - mode: 'local', - displayField:'name' - }) - }, - { - header: "DVB default charset", - dataIndex: 'dvb_default_charset', - width: 200, - renderer: function(value, metadata, record, row, col, store) { - return value ? value : - 'ISO6937'; - }, - editor: new fm.ComboBox({ - mode: 'local', - store: new Ext.data.SimpleStore({ - fields: ['key','value'], - data: [ - ['ISO6937','default'], - ['ISO6937','ISO6937'], - ['ISO8859-1','ISO8859-1'], - ['ISO8859-2','ISO8859-2'], - ['ISO8859-3','ISO8859-3'], - ['ISO8859-4','ISO8859-4'], - ['ISO8859-5','ISO8859-5'], - ['ISO8859-6','ISO8859-6'], - ['ISO8859-7','ISO8859-7'], - ['ISO8859-8','ISO8859-8'], - ['ISO8859-9','ISO8859-9'], - ['ISO8859-10','ISO8859-10'], - ['ISO8859-11','ISO8859-11'], - ['ISO8859-12','ISO8859-12'], - ['ISO8859-13','ISO8859-13'], - ['ISO8859-14','ISO8859-14'], - ['ISO8859-15','ISO8859-15'] - ] - }), - typeAhead: true, - lazyRender: true, - triggerAction: 'all', - displayField:'value', - valueField:'key' - }) - }, - eitColumn, - { - header: "Type", - dataIndex: 'type', - width: 50 - }, - { - header: "Provider", - dataIndex: 'provider', - width: 150 - }, - { - header: "Network", - dataIndex: 'network', - width: 100 - }, - { - header: "Multiplex", - dataIndex: 'mux', - width: 100 - }, - { - header: "Service ID", - dataIndex: 'sid', - width: 50, - hidden: true - }, - { - header: "PMT PID", - dataIndex: 'pmt', - width: 50, - hidden: true - }, - { - header: "PCR PID", - dataIndex: 'pcr', - width: 50, - hidden: true - }, actions - ]); - - cm.defaultSortable = true; - - var store = new Ext.data.JsonStore({ - root: 'entries', - fields: Ext.data.Record.create([ - 'id', 'enabled', 'type', 'sid', 'pmt', 'pcr', 'svcname', 'network', - 'provider', 'mux', 'channelname', 'dvb_default_charset', 'dvb_eit_enable' - ]), - url: "dvb/services/" + adapterId, - autoLoad: true, - id: 'id', - baseParams: {op: "get"}, - listeners: { - 'update': function(s, r, o) { - d = s.getModifiedRecords().length == 0 - saveBtn.setDisabled(d); - rejectBtn.setDisabled(d); - } - } - }); - - var storeReloader = new Ext.util.DelayedTask(function() { - store.reload() - }); - - tvheadend.comet.on('dvbService', function(m) { - storeReloader.delay(500); - }); - - - function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if(selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', - deleteRecord); - } else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - }; - - - function saveChanges() { - var mr = store.getModifiedRecords(); - var out = new Array(); - for (var x = 0; x < mr.length; x++) { - v = mr[x].getChanges(); - out[x] = v; - out[x].id = mr[x].id; - } - - Ext.Ajax.request({ - url: "dvb/services/" + adapterId, - params: { - op:"update", - entries:Ext.encode(out) - }, - success:function(response,options) { - store.commitChanges(); - }, - failure:function(response,options) { - Ext.MessageBox.alert('Message',response.statusText); - } + } ] }); - } - var saveBtn = new Ext.Toolbar.Button({ - tooltip: 'Save any changes made (Changed cells have red borders).', - iconCls:'save', - text: "Save changes", - handler: saveChanges, - disabled: true - }); + var cm = new Ext.grid.ColumnModel([ + enabledColumn, + { + header : "Service name", + dataIndex : 'svcname', + width : 150 + }, + { + header : "Play", + dataIndex : 'id', + width : 50, + renderer : function(value, metadata, record, row, col, store) { + url = 'stream/service/' + value + return 'Play' + } + }, + { + header : "Channel name", + dataIndex : 'channelname', + width : 150, + renderer : function(value, metadata, record, row, col, store) { + return value ? value + : 'Unmapped'; + }, + editor : new fm.ComboBox({ + store : tvheadend.channels, + allowBlank : true, + typeAhead : true, + minChars : 2, + lazyRender : true, + triggerAction : 'all', + mode : 'local', + displayField : 'name' + }) + }, + { + header : "DVB default charset", + dataIndex : 'dvb_default_charset', + width : 200, + renderer : function(value, metadata, record, row, col, store) { + return value ? value + : 'ISO6937'; + }, + editor : new fm.ComboBox({ + mode : 'local', + store : new Ext.data.SimpleStore({ + fields : [ 'key', 'value' ], + data : [ [ 'ISO6937', 'default' ], [ 'ISO6937', 'ISO6937' ], + [ 'ISO8859-1', 'ISO8859-1' ], [ 'ISO8859-2', 'ISO8859-2' ], + [ 'ISO8859-3', 'ISO8859-3' ], [ 'ISO8859-4', 'ISO8859-4' ], + [ 'ISO8859-5', 'ISO8859-5' ], [ 'ISO8859-6', 'ISO8859-6' ], + [ 'ISO8859-7', 'ISO8859-7' ], [ 'ISO8859-8', 'ISO8859-8' ], + [ 'ISO8859-9', 'ISO8859-9' ], [ 'ISO8859-10', 'ISO8859-10' ], + [ 'ISO8859-11', 'ISO8859-11' ], + [ 'ISO8859-12', 'ISO8859-12' ], + [ 'ISO8859-13', 'ISO8859-13' ], + [ 'ISO8859-14', 'ISO8859-14' ], + [ 'ISO8859-15', 'ISO8859-15' ] ] + }), + typeAhead : true, + lazyRender : true, + triggerAction : 'all', + displayField : 'value', + valueField : 'key' + }) + }, eitColumn, { + header : "Type", + dataIndex : 'type', + width : 50 + }, { + header : "Provider", + dataIndex : 'provider', + width : 150 + }, { + header : "Network", + dataIndex : 'network', + width : 100 + }, { + header : "Multiplex", + dataIndex : 'mux', + width : 100 + }, { + header : "Service ID", + dataIndex : 'sid', + width : 50, + hidden : true + }, { + header : "PMT PID", + dataIndex : 'pmt', + width : 50, + hidden : true + }, { + header : "PCR PID", + dataIndex : 'pcr', + width : 50, + hidden : true + }, actions ]); - var rejectBtn = new Ext.Toolbar.Button({ - tooltip: 'Revert any changes made (Changed cells have red borders).', - iconCls:'undo', - text: "Revert changes", - handler: function() { - store.rejectChanges(); - }, - disabled: true - }); - - var selModel = new Ext.grid.RowSelectionModel({ - singleSelect:false - }); + cm.defaultSortable = true; - var grid = new Ext.grid.EditorGridPanel({ - stripeRows: true, - title: 'Services', - plugins: [enabledColumn, eitColumn, actions], - store: store, - clicksToEdit: 2, - cm: cm, - viewConfig: {forceFit:true}, - selModel: selModel, - tbar: [saveBtn, rejectBtn] - }); - return grid; + var store = new Ext.data.JsonStore({ + root : 'entries', + fields : Ext.data.Record.create([ 'id', 'enabled', 'type', 'sid', 'pmt', + 'pcr', 'svcname', 'network', 'provider', 'mux', 'channelname', + 'dvb_default_charset', 'dvb_eit_enable' ]), + url : "dvb/services/" + adapterId, + autoLoad : true, + id : 'id', + baseParams : { + op : "get" + }, + listeners : { + 'update' : function(s, r, o) { + d = s.getModifiedRecords().length == 0 + saveBtn.setDisabled(d); + rejectBtn.setDisabled(d); + } + } + }); + + var storeReloader = new Ext.util.DelayedTask(function() { + store.reload() + }); + + tvheadend.comet.on('dvbService', function(m) { + storeReloader.delay(500); + }); + + function delSelected() { + var selectedKeys = grid.selModel.selections.keys; + if (selectedKeys.length > 0) { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + } + else { + Ext.MessageBox.alert('Message', + 'Please select at least one item to delete'); + } + } + ; + + function saveChanges() { + var mr = store.getModifiedRecords(); + var out = new Array(); + for ( var x = 0; x < mr.length; x++) { + v = mr[x].getChanges(); + out[x] = v; + out[x].id = mr[x].id; + } + + Ext.Ajax.request({ + url : "dvb/services/" + adapterId, + params : { + op : "update", + entries : Ext.encode(out) + }, + success : function(response, options) { + store.commitChanges(); + }, + failure : function(response, options) { + Ext.MessageBox.alert('Message', response.statusText); + } + }); + } + + var saveBtn = new Ext.Toolbar.Button({ + tooltip : 'Save any changes made (Changed cells have red borders).', + iconCls : 'save', + text : "Save changes", + handler : saveChanges, + disabled : true + }); + + var rejectBtn = new Ext.Toolbar.Button({ + tooltip : 'Revert any changes made (Changed cells have red borders).', + iconCls : 'undo', + text : "Revert changes", + handler : function() { + store.rejectChanges(); + }, + disabled : true + }); + + var selModel = new Ext.grid.RowSelectionModel({ + singleSelect : false + }); + + var grid = new Ext.grid.EditorGridPanel({ + stripeRows : true, + title : 'Services', + plugins : [ enabledColumn, eitColumn, actions ], + store : store, + clicksToEdit : 2, + cm : cm, + viewConfig : { + forceFit : true + }, + selModel : selModel, + tbar : [ saveBtn, rejectBtn ] + }); + return grid; } /** * */ tvheadend.addMuxByLocation = function(adapterData, satConfStore) { - - var addBtn = new Ext.Button({ - text: 'Add DVB network', - disabled: true, - handler: function() { - var n = locationList.getSelectionModel().getSelectedNode(); - Ext.Ajax.request({ - url: 'dvb/adapter/' + adapterData.identifier, - params: { - network: n.attributes.id, - satconf: satConfCombo ? satConfCombo.getValue() : null, - op: 'addnetwork' + + var locationListBBarElements = []; + var satConfCombo = null; + + if (satConfStore) { + satConfCombo = new Ext.form.ComboBox({ + store : satConfStore, + width : 480, + editable : false, + allowBlank : false, + triggerAction : 'all', + mode : 'remote', + displayField : 'name', + valueField : 'identifier', + emptyText : 'Select satellite configuration...' + }); + locationListBBarElements.push(satConfCombo); + } + + var addBtn = new Ext.Button({ + text : 'Add DVB network', + disabled : true, + handler : function() { + var n = locationList.getSelectionModel().getSelectedNode(); + Ext.Ajax.request({ + url : 'dvb/adapter/' + adapterData.identifier, + params : { + network : n.attributes.id, + satconf : satConfCombo != null ? satConfCombo.getValue() : null, + op : 'addnetwork' + } + }); + win.close(); } - }); - win.close(); - } - }); - - if(satConfStore) { - satConfCombo = new Ext.form.ComboBox({ - store: satConfStore, - width: 480, - editable: false, - allowBlank: false, - triggerAction: 'all', - mode: 'remote', - displayField:'name', - valueField:'identifier', - emptyText: 'Select satellite configuration...' }); - } else { - satConfCombo = false; - } - var locationList = new Ext.tree.TreePanel({ - title:'By location', - autoScroll:true, - rootVisible:false, - loader: new Ext.tree.TreeLoader({ - baseParams: {adapter: adapterData.identifier}, - dataUrl:'dvbnetworks' - }), - - root: new Ext.tree.AsyncTreeNode({ - id:'root' - }), - - bbar: [satConfCombo], + var locationList = new Ext.tree.TreePanel({ + title : 'By location', + autoScroll : true, + rootVisible : false, + loader : new Ext.tree.TreeLoader({ + baseParams : { + adapter : adapterData.identifier + }, + dataUrl : 'dvbnetworks' + }), + root : new Ext.tree.AsyncTreeNode({ + id : 'root' + }), + bbar : locationListBBarElements, + buttons : [ addBtn ], + buttonAlign : 'center' + }); - buttons: [addBtn], - buttonAlign: 'center' - }); - + locationList.on('click', function(n) { + if (n.attributes.leaf) { + addBtn.enable(); + } + else { + addBtn.disable(); + } + }); - locationList.on('click', function(n) { - if(n.attributes.leaf) { - addBtn.enable(); - } else { - addBtn.disable(); - } - }); - - win = new Ext.Window({ - title: 'Add muxes on ' + adapterData.name, - layout: 'fit', - width: 500, - height: 500, - modal: true, - plain: true, - items: new Ext.TabPanel({ - autoTabs: true, - activeTab: 0, - deferredRender: false, - border: false, - items: locationList - }) - }); - win.show(); + win = new Ext.Window({ + title : 'Add muxes on ' + adapterData.name, + layout : 'fit', + width : 500, + height : 500, + modal : true, + plain : true, + items : new Ext.TabPanel({ + autoTabs : true, + activeTab : 0, + deferredRender : false, + border : false, + items : locationList + }) + }); + win.show(); } - /** * Add mux by manual configuration */ tvheadend.addMuxManually = function(adapterData, satConfStore) { - - var adId = adapterData.identifier; + var adId = adapterData.identifier; - var items = []; + var items = []; - switch(adapterData.deliverySystem) { - case 'DVB-T': + switch (adapterData.deliverySystem) { + case 'DVB-T': - items.push(new Ext.form.NumberField({ - fieldLabel: 'Frequency (kHz)', - name: 'frequency', - allowNegative: false, - allowBlank: false, - minValue: adapterData.freqMin, - maxValue: adapterData.freqMax - })); + items.push(new Ext.form.NumberField({ + fieldLabel : 'Frequency (kHz)', + name : 'frequency', + allowNegative : false, + allowBlank : false, + minValue : adapterData.freqMin, + maxValue : adapterData.freqMax + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Bandwidth', - name: 'bandwidth', - hiddenName: 'bandwidthID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/bandwidths/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Bandwidth', + name : 'bandwidth', + hiddenName : 'bandwidthID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/bandwidths/' + adId + }) + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Constellation', - name: 'constellation', - hiddenName: 'constellationID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/constellations/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Constellation', + name : 'constellation', + hiddenName : 'constellationID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/constellations/' + adId + }) + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Transmission mode', - name: 'tmode', - hiddenName: 'tmodeID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/transmissionmodes/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Transmission mode', + name : 'tmode', + hiddenName : 'tmodeID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/transmissionmodes/' + adId + }) + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Guard interval', - name: 'guardinterval', - hiddenName: 'guardintervalID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/guardintervals/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Guard interval', + name : 'guardinterval', + hiddenName : 'guardintervalID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/guardintervals/' + adId + }) + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Hierarchy', - name: 'hierarchy', - hiddenName: 'hierarchyID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/hierarchies/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Hierarchy', + name : 'hierarchy', + hiddenName : 'hierarchyID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/hierarchies/' + adId + }) + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'FEC Hi', - name: 'fechi', - hiddenName: 'fechiID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/fec/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'FEC Hi', + name : 'fechi', + hiddenName : 'fechiID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/fec/' + adId + }) + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'FEC Lo', - name: 'feclo', - hiddenName: 'fecloID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/fec/' + adId - }) - })); - break; + items.push(new Ext.form.ComboBox({ + fieldLabel : 'FEC Lo', + name : 'feclo', + hiddenName : 'fecloID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/fec/' + adId + }) + })); + break; - case 'DVB-C': - items.push(new Ext.form.NumberField({ - fieldLabel: 'Frequency (kHz)', - name: 'frequency', - allowNegative: false, - allowBlank: false, - minValue: adapterData.freqMin, - maxValue: adapterData.freqMax - })); + case 'DVB-C': + items.push(new Ext.form.NumberField({ + fieldLabel : 'Frequency (kHz)', + name : 'frequency', + allowNegative : false, + allowBlank : false, + minValue : adapterData.freqMin, + maxValue : adapterData.freqMax + })); - items.push(new Ext.form.NumberField({ - fieldLabel: 'Symbolrate (baud)', - name: 'symbolrate', - allowNegative: false, - allowBlank: false, - minValue: adapterData.symrateMin, - maxValue: adapterData.symrateMax - })); - - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Constellation', - name: 'constellation', - hiddenName: 'constellationID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/constellations/' + adId - }) - })); - - items.push(new Ext.form.ComboBox({ - fieldLabel: 'FEC', - name: 'fec', - hiddenName: 'fecID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/fec/' + adId - }) - })); - break; + items.push(new Ext.form.NumberField({ + fieldLabel : 'Symbolrate (baud)', + name : 'symbolrate', + allowNegative : false, + allowBlank : false, + minValue : adapterData.symrateMin, + maxValue : adapterData.symrateMax + })); - case 'DVB-S': - items.push(new Ext.form.NumberField({ - fieldLabel: 'Frequency (kHz)', - name: 'frequency', - allowBlank: false, - allowNegative: false - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Constellation', + name : 'constellation', + hiddenName : 'constellationID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/constellations/' + adId + }) + })); - items.push(new Ext.form.NumberField({ - fieldLabel: 'Symbolrate (baud)', - name: 'symbolrate', - allowNegative: false, - allowBlank: false, - minValue: adapterData.symrateMin, - maxValue: adapterData.symrateMax - })); - - items.push(new Ext.form.ComboBox({ - fieldLabel: 'FEC', - name: 'fec', - hiddenName: 'fecID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/fec/' + adId - }) - })); + items.push(new Ext.form.ComboBox({ + fieldLabel : 'FEC', + name : 'fec', + hiddenName : 'fecID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/fec/' + adId + }) + })); + break; - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Delivery System', - name: 'delsys', - hiddenName: 'delsysID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/delsys/' + adId - }) - })); + case 'DVB-S': + items.push(new Ext.form.NumberField({ + fieldLabel : 'Frequency (kHz)', + name : 'frequency', + allowBlank : false, + allowNegative : false + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Constellation', - name: 'constellation', - hiddenName: 'constellationID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/constellations/' + adId - }) - })); + items.push(new Ext.form.NumberField({ + fieldLabel : 'Symbolrate (baud)', + name : 'symbolrate', + allowNegative : false, + allowBlank : false, + minValue : adapterData.symrateMin, + maxValue : adapterData.symrateMax + })); - items.push(new Ext.form.ComboBox({ - fieldLabel: 'Polarisation', - name: 'polarisation', - hiddenName: 'polarisationID', - editable: false, - allowBlank: false, - displayField: 'title', - valueField:'id', - mode:'remote', - triggerAction: 'all', - store: new Ext.data.JsonStore({ - root:'entries', - fields: ['title', 'id'], - url: 'dvb/feopts/polarisations/' + adId - }) - })); - } - - if(satConfStore) { - items.push(new Ext.form.ComboBox({ - store: satConfStore, - fieldLabel: 'Satellite config', - name: 'satconf', - hiddenName: 'satconfID', - editable: false, - allowBlank: false, - triggerAction: 'all', - mode: 'remote', - displayField:'name', - valueField:'identifier' - })); - } + items.push(new Ext.form.ComboBox({ + fieldLabel : 'FEC', + name : 'fec', + hiddenName : 'fecID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/fec/' + adId + }) + })); + + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Delivery System', + name : 'delsys', + hiddenName : 'delsysID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/delsys/' + adId + }) + })); + + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Constellation', + name : 'constellation', + hiddenName : 'constellationID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/constellations/' + adId + }) + })); + + items.push(new Ext.form.ComboBox({ + fieldLabel : 'Polarisation', + name : 'polarisation', + hiddenName : 'polarisationID', + editable : false, + allowBlank : false, + displayField : 'title', + valueField : 'id', + mode : 'remote', + triggerAction : 'all', + store : new Ext.data.JsonStore({ + root : 'entries', + fields : [ 'title', 'id' ], + url : 'dvb/feopts/polarisations/' + adId + }) + })); + } + + if (satConfStore) { + items.push(new Ext.form.ComboBox({ + store : satConfStore, + fieldLabel : 'Satellite config', + name : 'satconf', + hiddenName : 'satconfID', + editable : false, + allowBlank : false, + triggerAction : 'all', + mode : 'remote', + displayField : 'name', + valueField : 'identifier' + })); + } + + function addMux() { + panel.getForm().submit({ + url : 'dvb/addmux/' + adapterId, + waitMsg : 'Creating mux...' + }); + } + + var panel = new Ext.FormPanel({ + frame : true, + border : true, + bodyStyle : 'padding:5px', + labelAlign : 'right', + labelWidth : 110, + defaultType : 'textfield', + items : items, + buttons : [ { + text : 'Add', + handler : addMux + } ] - function addMux() { - panel.getForm().submit({ - url:'dvb/addmux/' + adapterId, - waitMsg:'Creating mux...' }); - } - - var panel = new Ext.FormPanel({ - frame:true, - border:true, - bodyStyle:'padding:5px', - labelAlign: 'right', - labelWidth: 110, - defaultType: 'textfield', - items: items, - buttons: [{ - text: 'Add', - handler: addMux - }] - - }); - - win = new Ext.Window({ - title: 'Add muxes on ' + adapterData.name, - layout: 'fit', - width: 500, - height: 500, - plain: true, - items: panel - }); - win.show(); + win = new Ext.Window({ + title : 'Add muxes on ' + adapterData.name, + layout : 'fit', + width : 500, + height : 500, + plain : true, + items : panel + }); + win.show(); } @@ -1056,337 +1028,317 @@ tvheadend.addMuxManually = function(adapterData, satConfStore) { */ tvheadend.dvb_adapter_general = function(adapterData, satConfStore) { - adapterId = adapterData.identifier; + adapterId = adapterData.identifier; - var addMuxByLocationBtn = new Ext.Button({ - style:'margin:5px', - iconCls:'add', - text: 'Add DVB Network by location...', - handler:function() { - tvheadend.addMuxByLocation(adapterData, satConfStore); - } - }); - - var serviceScanBtn = new Ext.Button({ - style:'margin:5px', - iconCls:'option', - text: 'Map DVB services to channels...', - disabled: adapterData.services == 0 || adapterData.initialMuxes, - handler:function() { - Ext.Ajax.request({ - url:'dvb/adapter/' + adapterId, - params: { - op: 'serviceprobe' + var addMuxByLocationBtn = new Ext.Button({ + style : 'margin:5px', + iconCls : 'add', + text : 'Add DVB Network by location...', + handler : function() { + tvheadend.addMuxByLocation(adapterData, satConfStore); } - }) - } - }); - - - /* Tool panel */ - - var toolpanel = new Ext.Panel({ - layout: 'table', - title: 'Tools', - style:'margin:10px', - bodyStyle:'padding:5px', - columnWidth: .25, - layoutConfig: { - columns: 1 - }, - - items: [ - addMuxByLocationBtn, - serviceScanBtn - ] - }); - - /* Conf panel */ - - var confreader = new Ext.data.JsonReader({ - root: 'dvbadapters' - }, ['name', 'automux', 'skip_initialscan', 'idlescan', 'diseqcversion', 'qmon', - 'skip_checksubscr', 'dumpmux', 'poweroff', 'sidtochan', 'nitoid','extrapriority', 'disable_pmt_monitor']); - - - function saveConfForm () { - confform.getForm().submit({ - url:'dvb/adapter/' + adapterId, - params:{'op':'save'}, - waitMsg:'Saving Data...' }); - } - var items = [ - { - fieldLabel: 'Adapter name', - name: 'name', - width: 250 - }, - new Ext.form.Checkbox({ - fieldLabel: 'Autodetect muxes', - name: 'automux' - }), - new Ext.form.Checkbox({ - fieldLabel: 'Skip initial scan', - name: 'skip_initialscan' - }), - new Ext.form.Checkbox({ - fieldLabel: 'Idle scanning', - name: 'idlescan' - }), - new Ext.form.Checkbox({ - fieldLabel: 'Skip service availability check when mapping', - name: 'skip_checksubscr' - }), - new Ext.form.Checkbox({ - fieldLabel: 'Monitor signal quality', - name: 'qmon' - }), - new Ext.form.Checkbox({ - fieldLabel: 'Disable PMT monitoring', - name: 'disable_pmt_monitor' - }), - new Ext.form.Checkbox({ - fieldLabel: 'Write full DVB MUX to disk', - name: 'dumpmux', - handler: function(s, v) { - if(v) - Ext.MessageBox.alert('DVB Mux dump', - 'Please note that keeping this ' + - 'option enabled can consume a lot ' + - 'of diskspace. You have been warned'); - } - }), - { - fieldLabel: 'NIT-o Network ID', - name: 'nitoid', - width: 50 - }, - { - fieldLabel: 'Extra priority', - name: 'extrapriority', - width: 50 - } - ]; - - if(satConfStore) { - v = new Ext.form.ComboBox({ - name: 'diseqcversion', - fieldLabel: 'DiSEqC version', - editable: false, - allowBlank: false, - mode: 'remote', - triggerAction: 'all', - store: ['DiSEqC 1.0 / 2.0', 'DiSEqC 1.1 / 2.1'] + var serviceScanBtn = new Ext.Button({ + style : 'margin:5px', + iconCls : 'option', + text : 'Map DVB services to channels...', + disabled : adapterData.services == 0 || adapterData.initialMuxes, + handler : function() { + Ext.Ajax.request({ + url : 'dvb/adapter/' + adapterId, + params : { + op : 'serviceprobe' + } + }) + } }); - items.push(v); - v = new Ext.form.Checkbox({ - fieldLabel: 'Turn off LNB when idle', - name: 'poweroff' + /* Tool panel */ + + var toolpanel = new Ext.Panel({ + layout : 'table', + title : 'Tools', + style : 'margin:10px', + bodyStyle : 'padding:5px', + columnWidth : .25, + layoutConfig : { + columns : 1 + }, + + items : [ addMuxByLocationBtn, serviceScanBtn ] }); - new Ext.form.Checkbox({ - fieldLabel: 'Use SID as channel number during mapping', - name: 'sidtochan' - }), - items.push(v); - } - - var confform = new Ext.FormPanel({ - title:'Adapter configuration', - columnWidth: .40, - frame:true, - border:true, - disabled:true, - style:'margin:10px', - bodyStyle:'padding:5px', - labelAlign: 'right', - labelWidth: 160, - waitMsgTarget: true, - reader: confreader, - defaultType: 'textfield', - items: items, - buttons: [{ - text: 'Save', - handler: saveConfForm - }] - }); - - confform.getForm().load({ - url:'dvb/adapter/' + adapterId, - params:{'op':'load'}, - success:function(form, action) { - confform.enable(); + + /* Conf panel */ + + var confreader = new Ext.data.JsonReader({ + root : 'dvbadapters' + }, [ 'name', 'automux', 'skip_initialscan', 'idlescan', 'diseqcversion', + 'qmon', 'skip_checksubscr', 'dumpmux', 'poweroff', 'sidtochan', 'nitoid', + 'extrapriority', 'disable_pmt_monitor' ]); + + function saveConfForm() { + confform.getForm().submit({ + url : 'dvb/adapter/' + adapterId, + params : { + 'op' : 'save' + }, + waitMsg : 'Saving Data...' + }); } - }); - /** - * Information / capabilities panel - */ - - var infoTemplate = new Ext.XTemplate( - '

Hardware

' + - '

Device path:

{path}' + - '

Device name:

{devicename}' + - '

Host connection:

{hostconnection}' + - '

Intermediate Frequency range:

{freqMin} kHz - {freqMax} kHz' + - ', in steps of {freqStep} kHz' + - '' + - '

Symbolrate range:

' + - '{symrateMin} Baud - {symrateMax} Baud
' + - '

Status

' + - '

Currently tuned to:

{currentMux} ' + - '

Services:

{services}' + - '

Muxes:

{muxes}' + - '

Muxes awaiting initial scan:

{initialMuxes}' - ); - + var items = [ + { + fieldLabel : 'Adapter name', + name : 'name', + width : 250 + }, + new Ext.form.Checkbox({ + fieldLabel : 'Autodetect muxes', + name : 'automux' + }), + new Ext.form.Checkbox({ + fieldLabel : 'Skip initial scan', + name : 'skip_initialscan' + }), + new Ext.form.Checkbox({ + fieldLabel : 'Idle scanning', + name : 'idlescan' + }), + new Ext.form.Checkbox({ + fieldLabel : 'Skip service availability check when mapping', + name : 'skip_checksubscr' + }), + new Ext.form.Checkbox({ + fieldLabel : 'Monitor signal quality', + name : 'qmon' + }), + new Ext.form.Checkbox({ + fieldLabel : 'Disable PMT monitoring', + name : 'disable_pmt_monitor' + }), + new Ext.form.Checkbox({ + fieldLabel : 'Write full DVB MUX to disk', + name : 'dumpmux', + handler : function(s, v) { + if (v) Ext.MessageBox.alert('DVB Mux dump', + 'Please note that keeping this ' + + 'option enabled can consume a lot ' + + 'of diskspace. You have been warned'); + } + }), { + fieldLabel : 'NIT-o Network ID', + name : 'nitoid', + width : 50 + }, { + fieldLabel : 'Extra priority', + name : 'extrapriority', + width : 50 + } ]; - var infoPanel = new Ext.Panel({ - title:'Information and capabilities', - columnWidth: .35, - frame:true, - border:true, - style:'margin:10px', - bodyStyle:'padding:5px', - html: infoTemplate.applyTemplate(adapterData) - }); + if (satConfStore) { + v = new Ext.form.ComboBox({ + name : 'diseqcversion', + fieldLabel : 'DiSEqC version', + editable : false, + allowBlank : false, + mode : 'remote', + triggerAction : 'all', + store : [ 'DiSEqC 1.0 / 2.0', 'DiSEqC 1.1 / 2.1' ] + }); + items.push(v); - /** - * Main adapter panel - */ - var panel = new Ext.Panel({ - title: 'General', - layout:'column', - items: [toolpanel, confform, infoPanel] - }); + v = new Ext.form.Checkbox({ + fieldLabel : 'Turn off LNB when idle', + name : 'poweroff' + }); + new Ext.form.Checkbox({ + fieldLabel : 'Use SID as channel number during mapping', + name : 'sidtochan' + }), items.push(v); + } + var confform = new Ext.FormPanel({ + title : 'Adapter configuration', + columnWidth : .40, + frame : true, + border : true, + disabled : true, + style : 'margin:10px', + bodyStyle : 'padding:5px', + labelAlign : 'right', + labelWidth : 160, + waitMsgTarget : true, + reader : confreader, + defaultType : 'textfield', + items : items, + buttons : [ { + text : 'Save', + handler : saveConfForm + } ] + }); - /** - * Subscribe and react on updates for this adapter - */ - tvheadend.tvAdapterStore.on('update', function(s, r, o) { - if(r.data.identifier != adapterId) - return; - infoTemplate.overwrite(infoPanel.body, r.data); + confform.getForm().load({ + url : 'dvb/adapter/' + adapterId, + params : { + 'op' : 'load' + }, + success : function(form, action) { + confform.enable(); + } + }); - if(r.data.services > 0 && r.data.initialMuxes == 0) - serviceScanBtn.enable(); - else - serviceScanBtn.disable(); - }); + /** + * Information / capabilities panel + */ - return panel; -} + var infoTemplate = new Ext.XTemplate( + '

Hardware

' + + '

Device path:

{path}' + + '

Device name:

{devicename}' + + '

Host connection:

{hostconnection}' + + '

Intermediate Frequency range:

{freqMin} kHz - {freqMax} kHz' + + ', in steps of {freqStep} kHz' + '' + + '

Symbolrate range:

' + + '{symrateMin} Baud - {symrateMax} Baud
' + + '

Status

' + + '

Currently tuned to:

{currentMux} ' + + '

Services:

{services}' + '

Muxes:

{muxes}' + + '

Muxes awaiting initial scan:

{initialMuxes}'); + var infoPanel = new Ext.Panel({ + title : 'Information and capabilities', + columnWidth : .35, + frame : true, + border : true, + style : 'margin:10px', + bodyStyle : 'padding:5px', + html : infoTemplate.applyTemplate(adapterData) + }); + /** + * Main adapter panel + */ + var panel = new Ext.Panel({ + title : 'General', + layout : 'column', + items : [ toolpanel, confform, infoPanel ] + }); -/** - * - */ -tvheadend.dvb_dummy = function(title) -{ - return new Ext.Panel({ - layout:'fit', - items:[{border: false}], - title: title - }); + /** + * Subscribe and react on updates for this adapter + */ + tvheadend.tvAdapterStore.on('update', function(s, r, o) { + if (r.data.identifier != adapterId) return; + infoTemplate.overwrite(infoPanel.body, r.data); + + if (r.data.services > 0 && r.data.initialMuxes == 0) serviceScanBtn + .enable(); + else serviceScanBtn.disable(); + }); + + return panel; } /** * */ -tvheadend.dvb_satconf = function(adapterId, lnbStore) -{ - var fm = Ext.form; - - var cm = new Ext.grid.ColumnModel([ - { - header: "Name", - dataIndex: 'name', - width: 200, - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Switchport", - dataIndex: 'port', - editor: new fm.NumberField({ - minValue: 0, - maxValue: 15 - }) - },{ - header: "LNB type", - dataIndex: 'lnb', - width: 200, - editor: new fm.ComboBox({ - store: lnbStore, - editable: false, - allowBlank: false, - triggerAction: 'all', - mode: 'remote', - displayField:'identifier', - valueField:'identifier', - emptyText: 'Select LNB type...' - }) - },{ - header: "Comment", - dataIndex: 'comment', - width: 400, - editor: new fm.TextField() - } - ]); - - var rec = Ext.data.Record.create([ - 'name','port','comment','lnb' - ]); - - return new tvheadend.tableEditor('Satellite config', - 'dvbsatconf/' + adapterId, cm, rec, - null, null, null); +tvheadend.dvb_dummy = function(title) { + return new Ext.Panel({ + layout : 'fit', + items : [ { + border : false + } ], + title : title + }); } - /** * */ -tvheadend.dvb_adapter = function(data) -{ +tvheadend.dvb_satconf = function(adapterId, lnbStore) { + var fm = Ext.form; - if(data.satConf) { - var lnbStore = new Ext.data.JsonStore({ - root:'entries', - autoload:true, - fields: ['identifier'], - url:'dvb/lnbtypes' + var cm = new Ext.grid.ColumnModel([ { + header : "Name", + dataIndex : 'name', + width : 200, + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Switchport", + dataIndex : 'port', + editor : new fm.NumberField({ + minValue : 0, + maxValue : 15 + }) + }, { + header : "LNB type", + dataIndex : 'lnb', + width : 200, + editor : new fm.ComboBox({ + store : lnbStore, + editable : false, + allowBlank : false, + triggerAction : 'all', + mode : 'remote', + displayField : 'identifier', + valueField : 'identifier', + emptyText : 'Select LNB type...' + }) + }, { + header : "Comment", + dataIndex : 'comment', + width : 400, + editor : new fm.TextField() + } ]); + + var rec = Ext.data.Record.create([ 'name', 'port', 'comment', 'lnb' ]); + + return new tvheadend.tableEditor('Satellite config', 'dvbsatconf/' + + adapterId, cm, rec, null, null, null); +} + +/** + * + */ +tvheadend.dvb_adapter = function(data) { + + if (data.satConf) { + var lnbStore = new Ext.data.JsonStore({ + root : 'entries', + autoload : true, + fields : [ 'identifier' ], + url : 'dvb/lnbtypes' + }); + + var satConfStore = new Ext.data.JsonStore({ + root : 'entries', + autoLoad : true, + id : 'identifier', + fields : [ 'identifier', 'name' ], + url : 'dvb/satconf/' + data.identifier + }); + } + else { + satConfStore = false; + } + + var items = [ new tvheadend.dvb_adapter_general(data, satConfStore), + new tvheadend.dvb_muxes(data, satConfStore), + new tvheadend.dvb_services(data.identifier) ]; + + if (data.satConf) items.push(new tvheadend.dvb_satconf(data.identifier, + lnbStore)); + + var panel = new Ext.TabPanel({ + border : false, + activeTab : 0, + autoScroll : true, + items : items }); - var satConfStore = new Ext.data.JsonStore({ - root:'entries', - autoLoad: true, - id: 'identifier', - fields: ['identifier', 'name'], - url:'dvb/satconf/' + data.identifier - }); - } else { - satConfStore = false; - } - - var items = [ - new tvheadend.dvb_adapter_general(data, satConfStore), - new tvheadend.dvb_muxes(data, satConfStore), - new tvheadend.dvb_services(data.identifier) - ]; - - if(data.satConf) - items.push(new tvheadend.dvb_satconf(data.identifier, lnbStore)); - - var panel = new Ext.TabPanel({ - border: false, - activeTab:0, - autoScroll:true, - items: items - }); - - return panel; + return panel; } diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index ca45ee58..50b1970d 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -1,156 +1,142 @@ - tvheadend.weekdays = new Ext.data.SimpleStore({ - fields: ['identifier', 'name'], - id: 0, - data: [ - ['1', 'Mon'], - ['2', 'Tue'], - ['3', 'Wed'], - ['4', 'Thu'], - ['5', 'Fri'], - ['6', 'Sat'], - ['7', 'Sun'] - ] + fields : [ 'identifier', 'name' ], + id : 0, + data : [ [ '1', 'Mon' ], [ '2', 'Tue' ], [ '3', 'Wed' ], [ '4', 'Thu' ], + [ '5', 'Fri' ], [ '6', 'Sat' ], [ '7', 'Sun' ] ] }); - -// This should be loaded from tvheadend +//This should be loaded from tvheadend tvheadend.dvrprio = new Ext.data.SimpleStore({ - fields: ['identifier', 'name'], - id: 0, - data: [ - ['important', 'Important'], - ['high', 'High'], - ['normal', 'Normal'], - ['low', 'Low'], - ['unimportant', 'Unimportant'] - ] + fields : [ 'identifier', 'name' ], + id : 0, + data : [ [ 'important', 'Important' ], [ 'high', 'High' ], + [ 'normal', 'Normal' ], [ 'low', 'Low' ], + [ 'unimportant', 'Unimportant' ] ] }); -// For the container configuration +//For the container configuration tvheadend.containers = new Ext.data.SimpleStore({ - fields: ['identifier','name'], - id: 0, - data: [ - ['matroska','Matroska'], - ['pass','Pass-through'] - ] + fields : [ 'identifier', 'name' ], + id : 0, + data : [ [ 'matroska', 'Matroska' ], [ 'pass', 'Pass-through' ] ] }); /** * Configuration names */ tvheadend.configNames = new Ext.data.JsonStore({ - autoLoad:true, - root:'entries', - fields: ['identifier','name'], - id: 'identifier', - url:'confignames', - baseParams: { - op: 'list' - } + autoLoad : true, + root : 'entries', + fields : [ 'identifier', 'name' ], + id : 'identifier', + url : 'confignames', + baseParams : { + op : 'list' + } }); tvheadend.configNames.setDefaultSort('name', 'ASC'); tvheadend.comet.on('dvrconfig', function(m) { - if(m.reload != null) - tvheadend.configNames.reload(); + if (m.reload != null) tvheadend.configNames.reload(); }); - /** * */ tvheadend.dvrDetails = function(entry) { - var content = ''; - var but; + var content = ''; + var but; - if(entry.chicon != null && entry.chicon.length > 0) - content += ''; + if (entry.chicon != null && entry.chicon.length > 0) content += ''; - content += '
' + entry.title + '
'; - content += '
' + entry.description + '
'; - content += '
' - content += '
Status: ' + entry.status + '
'; + content += '
' + entry.title + '
'; + content += '
' + entry.description + '
'; + content += '
' + content += '
Status: ' + entry.status + '
'; - if(entry.url != null && entry.filesize > 0) { - content += '
' + - 'Download '+ - parseInt(entry.filesize/1000000) + ' MB
' + - "Play" + - '
'; - } + if (entry.url != null && entry.filesize > 0) { + content += '
' + 'Download ' + + parseInt(entry.filesize / 1000000) + ' MB
' + + "Play" + '
'; + } - var win = new Ext.Window({ - title: entry.title, - layout: 'fit', - width: 400, - height: 300, - constrainHeader: true, - buttonAlign: 'center', - html: content - }); - - switch(entry.schedstate) { - case 'scheduled': - win.addButton({ - handler: cancelEvent, - text: "Remove from schedule" + var win = new Ext.Window({ + title : entry.title, + layout : 'fit', + width : 400, + height : 300, + constrainHeader : true, + buttonAlign : 'center', + html : content }); - break; - case 'recording': - case 'recordingError': - win.addButton({ - handler: cancelEvent, - text: "Abort recording" - }); - break; - case 'completedError': - case 'completed': - win.addButton({ - handler: deleteEvent, - text: "Delete recording" - }); - break; - } + switch (entry.schedstate) { + case 'scheduled': + win.addButton({ + handler : cancelEvent, + text : "Remove from schedule" + }); + break; + case 'recording': + case 'recordingError': + win.addButton({ + handler : cancelEvent, + text : "Abort recording" + }); + break; + case 'completedError': + case 'completed': + win.addButton({ + handler : deleteEvent, + text : "Delete recording" + }); + break; + } + win.show(); - win.show(); + function cancelEvent() { + Ext.Ajax.request({ + url : 'dvr', + params : { + entryId : entry.id, + op : 'cancelEntry' + }, + success : function(response, options) { + win.close(); + }, - function cancelEvent() { - Ext.Ajax.request({ - url: 'dvr', - params: {entryId: entry.id, op: 'cancelEntry'}, + failure : function(response, options) { + Ext.MessageBox.alert('DVR', response.statusText); + } + }); + } - success:function(response, options) { - win.close(); - }, + function deleteEvent() { + Ext.Ajax.request({ + url : 'dvr', + params : { + entryId : entry.id, + op : 'deleteEntry' + }, - failure:function(response, options) { - Ext.MessageBox.alert('DVR', response.statusText); - } - }); - } + success : function(response, options) { + win.close(); + v + }, - function deleteEvent() { - Ext.Ajax.request({ - url: 'dvr', - params: {entryId: entry.id, op: 'deleteEntry'}, - - success:function(response, options) { - win.close();v - }, - - failure:function(response, options) { - Ext.MessageBox.alert('DVR', response.statusText); - } - }); - } + failure : function(response, options) { + Ext.MessageBox.alert('DVR', response.statusText); + } + }); + } } @@ -159,708 +145,712 @@ tvheadend.dvrDetails = function(entry) { */ tvheadend.dvrschedule = function() { - var actions = new Ext.ux.grid.RowActions({ - header:'', - dataIndex: 'actions', - width: 45, - actions: [ - { - iconIndex:'schedstate' - } - ] - }); - - function renderDate(value){ - var dt = new Date(value); - return dt.format('D j M H:i'); - } - - function renderDuration(value){ - value = value / 60; /* Nevermind the seconds */ - - if(value >= 60) { - var min = parseInt(value % 60); - var hours = parseInt(value / 60); - - if(min == 0) { - return hours + ' hrs'; - } - return hours + ' hrs, ' + min + ' min'; - } else { - return parseInt(value) + ' min'; - } - } - - function renderPri(value) { - return tvheadend.dvrprio.getById(value).data.name; - } - - var dvrCm = new Ext.grid.ColumnModel([ - actions, - { - width: 250, - id:'title', - header: "Title", - dataIndex: 'title' - },{ - width: 100, - id:'episode', - header: "Episode", - dataIndex: 'episode' - },{ - width: 100, - id:'pri', - header: "Priority", - dataIndex: 'pri', - renderer: renderPri - },{ - width: 100, - id:'start', - header: "Start", - dataIndex: 'start', - renderer: renderDate - },{ - width: 100, - hidden:true, - id:'end', - header: "End", - dataIndex: 'end', - renderer: renderDate - },{ - width: 100, - id:'duration', - header: "Duration", - dataIndex: 'duration', - renderer: renderDuration - },{ - width: 250, - id:'channel', - header: "Channel", - dataIndex: 'channel' - },{ - width: 200, - id:'creator', - header: "Created by", - hidden:true, - dataIndex: 'creator' - },{ - width: 200, - id:'config_name', - header: "DVR Configuration", - renderer: function(value, metadata, record, row, col, store) { - if (!value) { - return '(default)'; - } else { - return value; - } - }, - dataIndex: 'config_name' - },{ - width: 200, - id:'status', - header: "Status", - dataIndex: 'status' - } - ]); - - function addEntry() { - - function createRecording() { - panel.getForm().submit({ - params:{'op':'createEntry'}, - url:'dvr/addentry', - waitMsg:'Creating entry...', - failure:function(response, options) { - Ext.MessageBox.alert('Server Error', - 'Unable to create entry'); - }, - success: function() { - win.close(); - } - }); - } - - var panel = new Ext.FormPanel({ - frame:true, - border:true, - bodyStyle:'padding:5px', - labelAlign: 'right', - labelWidth: 110, - defaultType: 'textfield', - items: [ - new Ext.form.ComboBox({ - fieldLabel: 'Channel', - name: 'channel', - hiddenName: 'channelid', - editable: false, - allowBlank: false, - displayField: 'name', - valueField:'chid', - mode:'remote', - triggerAction: 'all', - store: tvheadend.channels - }), - new Ext.form.DateField({ - allowBlank: false, - fieldLabel: 'Date', - name: 'date' - }), - new Ext.form.TimeField({ - allowBlank: false, - fieldLabel: 'Start time', - name: 'starttime', - increment: 10, - format: 'H:i' - }), - new Ext.form.TimeField({ - allowBlank: false, - fieldLabel: 'Stop time', - name: 'stoptime', - increment: 10, - format: 'H:i' - }), - new Ext.form.ComboBox({ - store: tvheadend.dvrprio, - value: "normal", - triggerAction: 'all', - mode: 'local', - fieldLabel: 'Priority', - valueField: 'identifier', - displayField: 'name', - name: 'pri' - }), - { - allowBlank: false, - fieldLabel: 'Title', - name: 'title' - }, - new Ext.form.ComboBox({ - store: tvheadend.configNames, - triggerAction: 'all', - mode: 'local', - fieldLabel: 'DVR Configuration', - valueField: 'identifier', - displayField: 'name', - name: 'config_name', - emptyText: '(default)', - value: '', - editable: false - }) - ], - buttons: [{ - text: 'Create', - handler: createRecording - }] - + var actions = new Ext.ux.grid.RowActions({ + header : '', + dataIndex : 'actions', + width : 45, + actions : [ { + iconIndex : 'schedstate' + } ] }); - - win = new Ext.Window({ - title: 'Add single recording', - layout: 'fit', - width: 500, - height: 300, - plain: true, - items: panel - }); - win.show(); - new Ext.form.ComboBox({ - store: tvheadend.configNames, - triggerAction: 'all', - mode: 'local', - fieldLabel: 'DVR Configuration', - valueField: 'identifier', - displayField: 'name', - name: 'config_name', - emptyText: '(default)', - value: '', - editable: false - }) - }; + function renderDate(value) { + var dt = new Date(value); + return dt.format('D j M H:i'); + } - var panel = new Ext.grid.GridPanel({ - loadMask: true, - stripeRows: true, - disableSelection: true, - title: 'Recorder schedule', - iconCls: 'clock', - store: tvheadend.dvrStore, - cm: dvrCm, - plugins: [actions], - viewConfig: {forceFit:true}, - tbar: [ - { - tooltip: 'Schedule a new recording session on the server.', - iconCls:'add', - text: 'Add entry', - handler: addEntry - },'->',{ - text: 'Help', - handler: function() { - new tvheadend.help('Digital Video Recorder', - 'dvrlog.html'); + function renderDuration(value) { + value = value / 60; /* Nevermind the seconds */ + + if (value >= 60) { + var min = parseInt(value % 60); + var hours = parseInt(value / 60); + + if (min == 0) { + return hours + ' hrs'; + } + return hours + ' hrs, ' + min + ' min'; } - } - ], - bbar: new Ext.PagingToolbar({ - store: tvheadend.dvrStore, - pageSize: 20, - displayInfo: true, - displayMsg: 'Programs {0} - {1} of {2}', - emptyMsg: "No programs to display" - }) + else { + return parseInt(value) + ' min'; + } + } - }); + function renderPri(value) { + return tvheadend.dvrprio.getById(value).data.name; + } - - panel.on('rowclick', rowclicked); - function rowclicked(grid, index) { - new tvheadend.dvrDetails(grid.getStore().getAt(index).data); - } - return panel; + var dvrCm = new Ext.grid.ColumnModel([ actions, { + width : 250, + id : 'title', + header : "Title", + dataIndex : 'title' + }, { + width : 100, + id : 'episode', + header : "Episode", + dataIndex : 'episode' + }, { + width : 100, + id : 'pri', + header : "Priority", + dataIndex : 'pri', + renderer : renderPri + }, { + width : 100, + id : 'start', + header : "Start", + dataIndex : 'start', + renderer : renderDate + }, { + width : 100, + hidden : true, + id : 'end', + header : "End", + dataIndex : 'end', + renderer : renderDate + }, { + width : 100, + id : 'duration', + header : "Duration", + dataIndex : 'duration', + renderer : renderDuration + }, { + width : 250, + id : 'channel', + header : "Channel", + dataIndex : 'channel' + }, { + width : 200, + id : 'creator', + header : "Created by", + hidden : true, + dataIndex : 'creator' + }, { + width : 200, + id : 'config_name', + header : "DVR Configuration", + renderer : function(value, metadata, record, row, col, store) { + if (!value) { + return '(default)'; + } + else { + return value; + } + }, + dataIndex : 'config_name' + }, { + width : 200, + id : 'status', + header : "Status", + dataIndex : 'status' + } ]); + + function addEntry() { + + function createRecording() { + panel.getForm().submit({ + params : { + 'op' : 'createEntry' + }, + url : 'dvr/addentry', + waitMsg : 'Creating entry...', + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to create entry'); + }, + success : function() { + win.close(); + } + }); + } + + var panel = new Ext.FormPanel({ + frame : true, + border : true, + bodyStyle : 'padding:5px', + labelAlign : 'right', + labelWidth : 110, + defaultType : 'textfield', + items : [ new Ext.form.ComboBox({ + fieldLabel : 'Channel', + name : 'channel', + hiddenName : 'channelid', + editable : false, + allowBlank : false, + displayField : 'name', + valueField : 'chid', + mode : 'remote', + triggerAction : 'all', + store : tvheadend.channels + }), new Ext.form.DateField({ + allowBlank : false, + fieldLabel : 'Date', + name : 'date' + }), new Ext.form.TimeField({ + allowBlank : false, + fieldLabel : 'Start time', + name : 'starttime', + increment : 10, + format : 'H:i' + }), new Ext.form.TimeField({ + allowBlank : false, + fieldLabel : 'Stop time', + name : 'stoptime', + increment : 10, + format : 'H:i' + }), new Ext.form.ComboBox({ + store : tvheadend.dvrprio, + value : "normal", + triggerAction : 'all', + mode : 'local', + fieldLabel : 'Priority', + valueField : 'identifier', + displayField : 'name', + name : 'pri' + }), { + allowBlank : false, + fieldLabel : 'Title', + name : 'title' + }, new Ext.form.ComboBox({ + store : tvheadend.configNames, + triggerAction : 'all', + mode : 'local', + fieldLabel : 'DVR Configuration', + valueField : 'identifier', + displayField : 'name', + name : 'config_name', + emptyText : '(default)', + value : '', + editable : false + }) ], + buttons : [ { + text : 'Create', + handler : createRecording + } ] + + }); + + win = new Ext.Window({ + title : 'Add single recording', + layout : 'fit', + width : 500, + height : 300, + plain : true, + items : panel + }); + win.show(); + new Ext.form.ComboBox({ + store : tvheadend.configNames, + triggerAction : 'all', + mode : 'local', + fieldLabel : 'DVR Configuration', + valueField : 'identifier', + displayField : 'name', + name : 'config_name', + emptyText : '(default)', + value : '', + editable : false + }) + } + ; + + var panel = new Ext.grid.GridPanel({ + loadMask : true, + stripeRows : true, + disableSelection : true, + title : 'Recorder schedule', + iconCls : 'clock', + store : tvheadend.dvrStore, + cm : dvrCm, + plugins : [ actions ], + viewConfig : { + forceFit : true + }, + tbar : [ { + tooltip : 'Schedule a new recording session on the server.', + iconCls : 'add', + text : 'Add entry', + handler : addEntry + }, '->', { + text : 'Help', + handler : function() { + new tvheadend.help('Digital Video Recorder', 'dvrlog.html'); + } + } ], + bbar : new Ext.PagingToolbar({ + store : tvheadend.dvrStore, + pageSize : 20, + displayInfo : true, + displayMsg : 'Programs {0} - {1} of {2}', + emptyMsg : "No programs to display" + }) + + }); + + panel.on('rowclick', rowclicked); + function rowclicked(grid, index) { + new tvheadend.dvrDetails(grid.getStore().getAt(index).data); + } + return panel; } /** * */ - /** * */ tvheadend.autoreceditor = function() { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 30 - }); + var fm = Ext.form; - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Title (Regexp)", - dataIndex: 'title', - editor: new fm.TextField({allowBlank: true}) - },{ - header: "Channel", - dataIndex: 'channel', - editor: new Ext.form.ComboBox({ - loadingText: 'Loading...', - displayField:'name', - store: tvheadend.channels, - mode: 'local', - editable: false, - triggerAction: 'all', - emptyText: 'Only include channel...' - }) - },{ - header : "SeriesLink", - dataIndex: 'serieslink', - renderer : function(v) { - return v ? 'yes' : 'no'; - } - },{ - header: "Channel tag", - dataIndex: 'tag', - editor: new Ext.form.ComboBox({ - displayField:'name', - store: tvheadend.channelTags, - mode: 'local', - editable: false, - triggerAction: 'all', - emptyText: 'Only include tag...' - }) - },{ - header: "Genre", - dataIndex: 'contenttype', - renderer: function(v) { - return tvheadend.contentGroupLookupName(v); - }, - editor: new Ext.form.ComboBox({ - valueField: 'code', - displayField:'name', - store: tvheadend.ContentGroupStore, - mode: 'local', - editable: false, - triggerAction: 'all', - emptyText: 'Only include content...' - }) - }, { - header: "Weekdays", - dataIndex: 'weekdays', - renderer: function(value, metadata, record, row, col, store) { - if (typeof value === 'undefined' || value.length < 1) - return 'No days'; + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 30 + }); - if (value == '1,2,3,4,5,6,7') - return 'All days'; + var cm = new Ext.grid.ColumnModel( + [ + enabledColumn, + { + header : "Title (Regexp)", + dataIndex : 'title', + editor : new fm.TextField({ + allowBlank : true + }) + }, + { + header : "Channel", + dataIndex : 'channel', + editor : new Ext.form.ComboBox({ + loadingText : 'Loading...', + displayField : 'name', + store : tvheadend.channels, + mode : 'local', + editable : false, + triggerAction : 'all', + emptyText : 'Only include channel...' + }) + }, + { + header : "SeriesLink", + dataIndex : 'serieslink', + renderer : function(v) { + return v ? 'yes' : 'no'; + } + }, + { + header : "Channel tag", + dataIndex : 'tag', + editor : new Ext.form.ComboBox({ + displayField : 'name', + store : tvheadend.channelTags, + mode : 'local', + editable : false, + triggerAction : 'all', + emptyText : 'Only include tag...' + }) + }, + { + header : "Genre", + dataIndex : 'contenttype', + renderer : function(v) { + return tvheadend.contentGroupLookupName(v); + }, + editor : new Ext.form.ComboBox({ + valueField : 'code', + displayField : 'name', + store : tvheadend.ContentGroupStore, + mode : 'local', + editable : false, + triggerAction : 'all', + emptyText : 'Only include content...' + }) + }, + { + header : "Weekdays", + dataIndex : 'weekdays', + renderer : function(value, metadata, record, row, col, store) { + if (typeof value === 'undefined' || value.length < 1) return 'No days'; - ret = []; - tags = value.split(','); - for (var i = 0; i < tags.length; i++) { - var tag = tvheadend.weekdays.getById(tags[i]); - if (typeof tag !== 'undefined') - ret.push(tag.data.name); - } - return ret.join(', '); - }, - editor: new Ext.ux.form.LovCombo({ - store: tvheadend.weekdays, - mode:'local', - valueField: 'identifier', - displayField: 'name' - }) - }, { - header: "Starting Around", - dataIndex: 'approx_time', - renderer: function(value, metadata, record, row, col, store) { - if (typeof value === 'string') - return value; + if (value == '1,2,3,4,5,6,7') return 'All days'; - if (value === 0) - return ''; + ret = []; + tags = value.split(','); + for ( var i = 0; i < tags.length; i++) { + var tag = tvheadend.weekdays.getById(tags[i]); + if (typeof tag !== 'undefined') ret.push(tag.data.name); + } + return ret.join(', '); + }, + editor : new Ext.ux.form.LovCombo({ + store : tvheadend.weekdays, + mode : 'local', + valueField : 'identifier', + displayField : 'name' + }) + }, { + header : "Starting Around", + dataIndex : 'approx_time', + renderer : function(value, metadata, record, row, col, store) { + if (typeof value === 'string') return value; - var hours = Math.floor(value / 60); - var mins = value % 60; - var dt = new Date(); - dt.setHours(hours); - dt.setMinutes(mins); - return dt.format('H:i'); - }, - editor: new Ext.form.TimeField({ - allowBlank: true, - increment: 10, - format: 'H:i' - }) - }, { - header: "Priority", - dataIndex: 'pri', - width: 100, - renderer: function(value, metadata, record, row, col, store) { - return tvheadend.dvrprio.getById(value).data.name; - }, - editor: new fm.ComboBox({ - store: tvheadend.dvrprio, - triggerAction: 'all', - mode: 'local', - valueField: 'identifier', - displayField: 'name' - }) - },{ - header: "DVR Configuration", - dataIndex: 'config_name', - renderer: function(value, metadata, record, row, col, store) { - if (!value) { - return '(default)'; - } else { - return value; - } - }, - editor: new Ext.form.ComboBox({ - store: tvheadend.configNames, - triggerAction: 'all', - mode: 'local', - valueField: 'identifier', - displayField: 'name', - name: 'config_name', - emptyText: '(default)', - editable: false - }) - },{ - header: "Created by", - dataIndex: 'creator', - editor: new fm.TextField({allowBlank: false}) - },{ - header: "Comment", - dataIndex: 'comment', - editor: new fm.TextField({allowBlank: false}) - } - ]); + if (value === 0) return ''; + var hours = Math.floor(value / 60); + var mins = value % 60; + var dt = new Date(); + dt.setHours(hours); + dt.setMinutes(mins); + return dt.format('H:i'); + }, + editor : new Ext.form.TimeField({ + allowBlank : true, + increment : 10, + format : 'H:i' + }) + }, { + header : "Priority", + dataIndex : 'pri', + width : 100, + renderer : function(value, metadata, record, row, col, store) { + return tvheadend.dvrprio.getById(value).data.name; + }, + editor : new fm.ComboBox({ + store : tvheadend.dvrprio, + triggerAction : 'all', + mode : 'local', + valueField : 'identifier', + displayField : 'name' + }) + }, { + header : "DVR Configuration", + dataIndex : 'config_name', + renderer : function(value, metadata, record, row, col, store) { + if (!value) { + return '(default)'; + } + else { + return value; + } + }, + editor : new Ext.form.ComboBox({ + store : tvheadend.configNames, + triggerAction : 'all', + mode : 'local', + valueField : 'identifier', + displayField : 'name', + name : 'config_name', + emptyText : '(default)', + editable : false + }) + }, { + header : "Created by", + dataIndex : 'creator', + editor : new fm.TextField({ + allowBlank : false + }) + }, { + header : "Comment", + dataIndex : 'comment', + editor : new fm.TextField({ + allowBlank : false + }) + } ]); - return new tvheadend.tableEditor('Automatic Recorder', - 'autorec', cm, tvheadend.autorecRecord, - [enabledColumn], tvheadend.autorecStore, - 'autorec.html', 'wand'); + return new tvheadend.tableEditor('Automatic Recorder', 'autorec', cm, + tvheadend.autorecRecord, [ enabledColumn ], tvheadend.autorecStore, + 'autorec.html', 'wand'); } /** * */ tvheadend.dvr = function() { + tvheadend.dvrStore = new Ext.data.JsonStore({ + root : 'entries', + totalProperty : 'totalCount', + fields : [ { + name : 'id' + }, { + name : 'channel' + }, { + name : 'title' + }, { + name : 'episode' + }, { + name : 'pri' + }, { + name : 'description' + }, { + name : 'chicon' + }, { + name : 'start', + type : 'date', + dateFormat : 'U' /* unix time */ + }, { + name : 'end', + type : 'date', + dateFormat : 'U' /* unix time */ + }, { + name : 'config_name' + }, { + name : 'status' + }, { + name : 'schedstate' + }, { + name : 'creator' + }, { + name : 'duration' + }, { + name : 'filesize' + }, { + name : 'url' + } ], + url : 'dvrlist', + autoLoad : true, + id : 'id', + remoteSort : true + }); - tvheadend.dvrStore = new Ext.data.JsonStore({ - root: 'entries', - totalProperty: 'totalCount', - fields: [ - {name: 'id'}, - {name: 'channel'}, - {name: 'title'}, - {name: 'episode'}, - {name: 'pri'}, - {name: 'description'}, - {name: 'chicon'}, - {name: 'start', type: 'date', dateFormat: 'U' /* unix time */}, - {name: 'end', type: 'date', dateFormat: 'U' /* unix time */}, - {name: 'config_name'}, - {name: 'status'}, - {name: 'schedstate'}, - {name: 'creator'}, - {name: 'duration'}, - {name: 'filesize'}, - {name: 'url'} - ], - url: 'dvrlist', - autoLoad: true, - id: 'id', - remoteSort: true - }); - - tvheadend.comet.on('dvrdb', function(m) { + tvheadend.comet.on('dvrdb', function(m) { - if(m.reload != null) - tvheadend.dvrStore.reload(); + if (m.reload != null) tvheadend.dvrStore.reload(); - if(m.updateEntry != null) { - r = tvheadend.dvrStore.getById(m.id) - if(typeof r === 'undefined') { - tvheadend.dvrStore.reload(); - return; - } + if (m.updateEntry != null) { + r = tvheadend.dvrStore.getById(m.id) + if (typeof r === 'undefined') { + tvheadend.dvrStore.reload(); + return; + } - r.data.status = m.status; - r.data.schedstate = m.schedstate; + r.data.status = m.status; + r.data.schedstate = m.schedstate; - tvheadend.dvrStore.afterEdit(r); - tvheadend.dvrStore.fireEvent('updated', - tvheadend.dvrStore, r, - Ext.data.Record.COMMIT); - } - }); + tvheadend.dvrStore.afterEdit(r); + tvheadend.dvrStore.fireEvent('updated', tvheadend.dvrStore, r, + Ext.data.Record.COMMIT); + } + }); - - tvheadend.autorecRecord = Ext.data.Record.create([ - 'enabled','title', 'serieslink', 'channel','tag','creator','contenttype','comment', - 'weekdays', 'pri', 'approx_time', 'config_name' - ]); - + tvheadend.autorecRecord = Ext.data.Record.create([ 'enabled', 'title', + 'serieslink', 'channel', 'tag', 'creator', 'contenttype', 'comment', + 'weekdays', 'pri', 'approx_time', 'config_name' ]); - tvheadend.autorecStore = new Ext.data.JsonStore({ - root: 'entries', - fields: tvheadend.autorecRecord, - url: "tablemgr", - autoLoad: true, - id: 'id', - baseParams: {table: "autorec", op: "get"} - }); - - tvheadend.comet.on('autorec', function(m) { - if(m.reload != null) - tvheadend.autorecStore.reload(); - }); + tvheadend.autorecStore = new Ext.data.JsonStore({ + root : 'entries', + fields : tvheadend.autorecRecord, + url : "tablemgr", + autoLoad : true, + id : 'id', + baseParams : { + table : "autorec", + op : "get" + } + }); + tvheadend.comet.on('autorec', function(m) { + if (m.reload != null) tvheadend.autorecStore.reload(); + }); - var panel = new Ext.TabPanel({ - activeTab:0, - autoScroll:true, - title: 'Digital Video Recorder', - iconCls: 'drive', - items: [new tvheadend.dvrschedule, - new tvheadend.autoreceditor - ] - }); - return panel; + var panel = new Ext.TabPanel({ + activeTab : 0, + autoScroll : true, + title : 'Digital Video Recorder', + iconCls : 'drive', + items : [ new tvheadend.dvrschedule, new tvheadend.autoreceditor ] + }); + return panel; } - - /** * Configuration panel (located under configuration) */ tvheadend.dvrsettings = function() { - var confreader = new Ext.data.JsonReader({ - root: 'dvrSettings' - }, ['storage','postproc','retention','dayDirs', - 'channelDirs','channelInTitle', 'container', - 'dateInTitle','timeInTitle', - 'preExtraTime', 'postExtraTime', 'whitespaceInTitle', - 'titleDirs', 'episodeInTitle', 'cleanTitle', 'tagFiles']); + var confreader = new Ext.data.JsonReader({ + root : 'dvrSettings' + }, [ 'storage', 'postproc', 'retention', 'dayDirs', 'channelDirs', + 'channelInTitle', 'container', 'dateInTitle', 'timeInTitle', + 'preExtraTime', 'postExtraTime', 'whitespaceInTitle', 'titleDirs', + 'episodeInTitle', 'cleanTitle', 'tagFiles' ]); - var confcombo = new Ext.form.ComboBox({ - store: tvheadend.configNames, - triggerAction: 'all', - mode: 'local', - displayField: 'name', - name: 'config_name', - emptyText: '(default)', - value: '', - editable: true - }); - - var delButton = new Ext.Toolbar.Button({ - tooltip: 'Delete named configuration', - iconCls:'remove', - text: "Delete configuration", - handler: deleteConfiguration, - disabled: true - }); - - var confpanel = new Ext.FormPanel({ - title:'Digital Video Recorder', - iconCls: 'drive', - border:false, - bodyStyle:'padding:15px', - anchor: '100% 50%', - labelAlign: 'right', - labelWidth: 250, - waitMsgTarget: true, - reader: confreader, - defaultType: 'textfield', - layout: 'form', - items: [{ - width: 300, - fieldLabel: 'Recording system path', - name: 'storage' - }, new Ext.form.ComboBox({ - store: tvheadend.containers, - fieldLabel: 'Media container', - mode: 'local', - triggerAction: 'all', - displayField: 'name', - valueField: 'identifier', - editable: false, - hiddenName: 'container' - }), new Ext.form.NumberField({ - allowNegative: false, - allowDecimals: false, - minValue: 1, - fieldLabel: 'DVR Log retention time (days)', - name: 'retention' - }), new Ext.form.NumberField({ - allowDecimals: false, - fieldLabel: 'Extra time before recordings (minutes)', - name: 'preExtraTime' - }), new Ext.form.NumberField({ - allowDecimals: false, - fieldLabel: 'Extra time after recordings (minutes)', - name: 'postExtraTime' - }), new Ext.form.Checkbox({ - fieldLabel: 'Make subdirectories per day', - name: 'dayDirs' - }), new Ext.form.Checkbox({ - fieldLabel: 'Make subdirectories per channel', - name: 'channelDirs' - }), new Ext.form.Checkbox({ - fieldLabel: 'Make subdirectories per title', - name: 'titleDirs' - }), new Ext.form.Checkbox({ - fieldLabel: 'Include channel name in filename', - name: 'channelInTitle' - }), new Ext.form.Checkbox({ - fieldLabel: 'Remove all unsafe characters from filename', - name: 'cleanTitle' - }), new Ext.form.Checkbox({ - fieldLabel: 'Include date in filename', - name: 'dateInTitle' - }), new Ext.form.Checkbox({ - fieldLabel: 'Include time in filename', - name: 'timeInTitle' - }), new Ext.form.Checkbox({ - fieldLabel: 'Include episode in filename', - name: 'episodeInTitle' - }), new Ext.form.Checkbox({ - fieldLabel: 'Replace whitespace in title with \'-\'', - name: 'whitespaceInTitle' - }), new Ext.form.Checkbox({ - fieldLabel: 'Tag files with metadata', - name: 'tagFiles' - }), { - width: 300, - fieldLabel: 'Post-processor command', - name: 'postproc' - }], - tbar: [confcombo, { - tooltip: 'Save changes made to dvr configuration below', - iconCls:'save', - text: "Save configuration", - handler: saveChanges - }, delButton, '->', { - text: 'Help', - handler: function() { - new tvheadend.help('DVR configuration', - 'config_dvr.html'); - } - }] - }); - - function loadConfig() { - confpanel.getForm().load({ - url:'dvr', - params:{'op':'loadSettings','config_name':confcombo.getValue()}, - success:function(form, action) { - confpanel.enable(); - } + var confcombo = new Ext.form.ComboBox({ + store : tvheadend.configNames, + triggerAction : 'all', + mode : 'local', + displayField : 'name', + name : 'config_name', + emptyText : '(default)', + value : '', + editable : true }); - } - confcombo.on('select', function() { - if (confcombo.getValue() == '') - delButton.disable(); - else - delButton.enable(); - loadConfig(); - }); - - confpanel.on('render', function() { - loadConfig(); - }); - - - function saveChanges() { - var config_name = confcombo.getValue(); - confpanel.getForm().submit({ - url:'dvr', - params:{'op':'saveSettings','config_name':config_name}, - waitMsg:'Saving Data...', - success: function(form, action) { - confcombo.setValue(config_name); - confcombo.fireEvent('select'); - }, - failure: function(form, action) { - Ext.Msg.alert('Save failed', action.result.errormsg); - } + var delButton = new Ext.Toolbar.Button({ + tooltip : 'Delete named configuration', + iconCls : 'remove', + text : "Delete configuration", + handler : deleteConfiguration, + disabled : true }); - } - function deleteConfiguration() { - if (confcombo.getValue() != "") { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete DVR configuration \'' + - confcombo.getValue() + '\'?', - deleteAction); - } - } - - function deleteAction(btn) { - if (btn == 'yes') { - confpanel.getForm().submit({ - url:'dvr', - params:{'op':'deleteSettings','config_name':confcombo.getValue()}, - waitMsg:'Deleting Data...', - success: function(form, action) { - confcombo.setValue(''); - confcombo.fireEvent('select'); - }, - failure: function(form, action) { - Ext.Msg.alert('Delete failed', action.result.errormsg); - } + var confpanel = new Ext.FormPanel({ + title : 'Digital Video Recorder', + iconCls : 'drive', + border : false, + bodyStyle : 'padding:15px', + anchor : '100% 50%', + labelAlign : 'right', + labelWidth : 250, + waitMsgTarget : true, + reader : confreader, + defaultType : 'textfield', + layout : 'form', + items : [ { + width : 300, + fieldLabel : 'Recording system path', + name : 'storage' + }, new Ext.form.ComboBox({ + store : tvheadend.containers, + fieldLabel : 'Media container', + mode : 'local', + triggerAction : 'all', + displayField : 'name', + valueField : 'identifier', + editable : false, + hiddenName : 'container' + }), new Ext.form.NumberField({ + allowNegative : false, + allowDecimals : false, + minValue : 1, + fieldLabel : 'DVR Log retention time (days)', + name : 'retention' + }), new Ext.form.NumberField({ + allowDecimals : false, + fieldLabel : 'Extra time before recordings (minutes)', + name : 'preExtraTime' + }), new Ext.form.NumberField({ + allowDecimals : false, + fieldLabel : 'Extra time after recordings (minutes)', + name : 'postExtraTime' + }), new Ext.form.Checkbox({ + fieldLabel : 'Make subdirectories per day', + name : 'dayDirs' + }), new Ext.form.Checkbox({ + fieldLabel : 'Make subdirectories per channel', + name : 'channelDirs' + }), new Ext.form.Checkbox({ + fieldLabel : 'Make subdirectories per title', + name : 'titleDirs' + }), new Ext.form.Checkbox({ + fieldLabel : 'Include channel name in filename', + name : 'channelInTitle' + }), new Ext.form.Checkbox({ + fieldLabel : 'Remove all unsafe characters from filename', + name : 'cleanTitle' + }), new Ext.form.Checkbox({ + fieldLabel : 'Include date in filename', + name : 'dateInTitle' + }), new Ext.form.Checkbox({ + fieldLabel : 'Include time in filename', + name : 'timeInTitle' + }), new Ext.form.Checkbox({ + fieldLabel : 'Include episode in filename', + name : 'episodeInTitle' + }), new Ext.form.Checkbox({ + fieldLabel : 'Replace whitespace in title with \'-\'', + name : 'whitespaceInTitle' + }), new Ext.form.Checkbox({ + fieldLabel : 'Tag files with metadata', + name : 'tagFiles' + }), { + width : 300, + fieldLabel : 'Post-processor command', + name : 'postproc' + } ], + tbar : [ confcombo, { + tooltip : 'Save changes made to dvr configuration below', + iconCls : 'save', + text : "Save configuration", + handler : saveChanges + }, delButton, '->', { + text : 'Help', + handler : function() { + new tvheadend.help('DVR configuration', 'config_dvr.html'); + } + } ] }); - } - } - return confpanel; + function loadConfig() { + confpanel.getForm().load({ + url : 'dvr', + params : { + 'op' : 'loadSettings', + 'config_name' : confcombo.getValue() + }, + success : function(form, action) { + confpanel.enable(); + } + }); + } + + confcombo.on('select', function() { + if (confcombo.getValue() == '') delButton.disable(); + else delButton.enable(); + loadConfig(); + }); + + confpanel.on('render', function() { + loadConfig(); + }); + + function saveChanges() { + var config_name = confcombo.getValue(); + confpanel.getForm().submit({ + url : 'dvr', + params : { + 'op' : 'saveSettings', + 'config_name' : config_name + }, + waitMsg : 'Saving Data...', + success : function(form, action) { + confcombo.setValue(config_name); + confcombo.fireEvent('select'); + }, + failure : function(form, action) { + Ext.Msg.alert('Save failed', action.result.errormsg); + } + }); + } + + function deleteConfiguration() { + if (confcombo.getValue() != "") { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete DVR configuration \'' + + confcombo.getValue() + '\'?', deleteAction); + } + } + + function deleteAction(btn) { + if (btn == 'yes') { + confpanel.getForm().submit({ + url : 'dvr', + params : { + 'op' : 'deleteSettings', + 'config_name' : confcombo.getValue() + }, + waitMsg : 'Deleting Data...', + success : function(form, action) { + confcombo.setValue(''); + confcombo.fireEvent('select'); + }, + failure : function(form, action) { + Ext.Msg.alert('Delete failed', action.result.errormsg); + } + }); + } + } + + return confpanel; } - diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 0c92d17c..306abe4d 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -1,528 +1,530 @@ tvheadend.brands = new Ext.data.JsonStore({ - root: 'entries', - fields: [ 'uri', 'title' ], - autoLoad: true, - url : 'epgobject', - baseParams : { op : 'brandList' } + root : 'entries', + fields : [ 'uri', 'title' ], + autoLoad : true, + url : 'epgobject', + baseParams : { + op : 'brandList' + } }); -// WIBNI: might want this store to periodically update +//WIBNI: might want this store to periodically update tvheadend.ContentGroupStore = new Ext.data.JsonStore({ - root:'entries', - fields: ['name', 'code'], - autoLoad: true, - url:'ecglist' + root : 'entries', + fields : [ 'name', 'code' ], + autoLoad : true, + url : 'ecglist' }); -tvheadend.contentGroupLookupName = function(code) -{ - ret = ""; - tvheadend.ContentGroupStore.each(function(r) - { - if (r.data.code == code) - ret = r.data.name; - else if (ret == "" && r.data.code == code & 0xF0) - ret = r.data.name; - }); - return ret; +tvheadend.contentGroupLookupName = function(code) { + ret = ""; + tvheadend.ContentGroupStore.each(function(r) { + if (r.data.code == code) ret = r.data.name; + else if (ret == "" && r.data.code == code & 0xF0) ret = r.data.name; + }); + return ret; } tvheadend.ContentGroupStore.setDefaultSort('code', 'ASC'); tvheadend.epgDetails = function(event) { - var content = ''; - - if(event.chicon != null && event.chicon.length > 0) - content += ''; + var content = ''; + + if (event.chicon != null && event.chicon.length > 0) + content += ''; + + content += '
' + event.title; + if (event.subtitle) + content += " : " + event.subtitle; + content += '
'; + content += '
' + event.episode + '
'; + content += '
' + event.description + '
'; + content += '
' + tvheadend.contentGroupLookupName(event.contenttype) + '
'; - content += '
' + event.title; - if (event.subtitle) content += " : " + event.subtitle; - content += '
'; - content += '
' + event.episode + '
'; - content += '
' + event.description + '
'; + if (event.ext_desc != null) + content += '
' + event.ext_desc + '
'; - content += '
' + tvheadend.contentGroupLookupName(event.contenttype) + '
'; + if (event.ext_item != null) + content += '
' + event.ext_item + '
'; - if(event.ext_desc != null) - content += '
' + event.ext_desc + '
'; + if (event.ext_text != null) + content += '
' + event.ext_text + '
'; - if(event.ext_item != null) - content += '
' + event.ext_item + '
'; + content += '
Search IMDB
' - if(event.ext_text != null) - content += '
' + event.ext_text + '
'; + now = new Date(); + if (event.start < now && event.end > now) { + content += "
Play" + "
"; + } - content += '
Search IMDB
' + content += ''; + content += '
'; - now = new Date(); - if(event.start < now && event.end > now) { - content += "
" + - "Play" + "
"; - } - - content += ''; - content += '
'; - - var confcombo = new Ext.form.ComboBox({ - store: tvheadend.configNames, - triggerAction: 'all', - mode: 'local', - valueField: 'identifier', - displayField: 'name', - name: 'config_name', - emptyText: '(default)', - value: '', - editable: false - }); - - var win = new Ext.Window({ - title: event.title, - layout: 'fit', - width: 500, - height: 300, - constrainHeader: true, - buttons: [ - confcombo, - new Ext.Button({ - handler: recordEvent, - text: "Record program" - }), - new Ext.Button({ - handler: recordSeries, - text: event.serieslink ? "Record series" : "Autorec" - }) - ], - buttonAlign: 'center', - html: content - }); - win.show(); - - function recordEvent() { - record('recordEvent'); - } - - function recordSeries() { - record('recordSeries'); - } - - function record(op) { - Ext.Ajax.request({ - url: 'dvr', - params: { - eventId: event.id, - op: op, - config_name: confcombo.getValue() - }, - - success:function(response, options) { - win.close(); - }, - - failure:function(response, options) { - Ext.MessageBox.alert('DVR', response.statusText); - } + var confcombo = new Ext.form.ComboBox({ + store : tvheadend.configNames, + triggerAction : 'all', + mode : 'local', + valueField : 'identifier', + displayField : 'name', + name : 'config_name', + emptyText : '(default)', + value : '', + editable : false }); - } - function showAlternatives (s) { - var e = Ext.get('altbcast') - html = ''; - if ( s.getTotalCount() > 0 ) { - html += '
Alternative Broadcasts
'; - for ( i = 0; i < s.getTotalCount(); i++ ) { - var ab = s.getAt(i).data; - var dt = Date.parseDate(ab.start, 'U'); - html += '
' + dt.format('l H:i') + '   ' + ab.channel + '
'; - } - } - e.dom.innerHTML = html; - } - function showRelated (s) - { - var e = Ext.get('related') - html = ''; - if ( s.getTotalCount() > 0 ) { - html += '
Related Episodes
'; - for ( i = 0; i < s.getTotalCount(); i++ ) { - var ee = s.getAt(i).data; - html += '
'; - if (ee.episode) html += ee.episode + '   '; - html += ee.title; - if (ee.subtitle) html += ' : ' + ee.subtitle - html += '
'; - } - } - e.dom.innerHTML = html; - } + var win = new Ext.Window({ + title : event.title, + layout : 'fit', + width : 500, + height : 300, + constrainHeader : true, + buttons : [ confcombo, new Ext.Button({ + handler : recordEvent, + text : "Record program" + }), new Ext.Button({ + handler : recordSeries, + text : event.seriesLink ? "Record series" : "Autorec" + }) ], + buttonAlign : 'center', + html : content + }); + win.show(); - var ab = new Ext.data.JsonStore({ - root: 'entries', - url: 'epgrelated', - autoLoad: false, - id: 'id', - baseParams: { op: 'get', id: event.id, type: 'alternative' }, - fields: Ext.data.Record.create([ 'id', 'channel', 'start' ]), - listeners: { 'datachanged': showAlternatives} - }); - var re = new Ext.data.JsonStore({ - root: 'entries', - url: 'epgrelated', - autoLoad: false, - id: 'uri', - baseParams: { op: 'get', id: event.id, type: 'related' }, - fields: Ext.data.Record.create([ 'uri', 'title', 'subtitle', 'episode']), - listeners: { 'datachanged': showRelated} - }); + function recordEvent() { + record('recordEvent'); + } + + function recordSeries() { + record('recordSeries'); + } + + function record(op) { + Ext.Ajax.request({ + url : 'dvr', + params : { + eventId : event.id, + op : op, + config_name : confcombo.getValue() + }, + + success : function(response, options) { + win.close(); + }, + + failure : function(response, options) { + Ext.MessageBox.alert('DVR', response.statusText); + } + }); + } + + function showAlternatives(s) { + var e = Ext.get('altbcast') + html = ''; + if (s.getTotalCount() > 0) { + html += '
Alternative Broadcasts
'; + for (i = 0; i < s.getTotalCount(); i++) { + var ab = s.getAt(i).data; + var dt = Date.parseDate(ab.start, 'U'); + html += '
' + dt.format('l H:i') + + '   ' + ab.channel + '
'; + } + } + e.dom.innerHTML = html; + } + function showRelated(s) { + var e = Ext.get('related') + html = ''; + if (s.getTotalCount() > 0) { + html += '
Related Episodes
'; + for (i = 0; i < s.getTotalCount(); i++) { + var ee = s.getAt(i).data; + html += '
'; + if (ee.episode) html += ee.episode + '   '; + html += ee.title; + if (ee.subtitle) html += ' : ' + ee.subtitle + html += '
'; + } + } + e.dom.innerHTML = html; + } + + var ab = new Ext.data.JsonStore({ + root : 'entries', + url : 'epgrelated', + autoLoad : false, + id : 'id', + baseParams : { + op : 'get', + id : event.id, + type : 'alternative' + }, + fields : Ext.data.Record.create([ 'id', 'channel', 'start' ]), + listeners : { + 'datachanged' : showAlternatives + } + }); + var re = new Ext.data.JsonStore({ + root : 'entries', + url : 'epgrelated', + autoLoad : false, + id : 'uri', + baseParams : { + op : 'get', + id : event.id, + type : 'related' + }, + fields : Ext.data.Record + .create([ 'uri', 'title', 'subtitle', 'episode' ]), + listeners : { + 'datachanged' : showRelated + } + }); } - -/** - * - */ - tvheadend.epg = function() { - var xg = Ext.grid; + var xg = Ext.grid; - var actions = new Ext.ux.grid.RowActions({ - header:'', - width:20, - dataIndex: 'actions', - actions: [ - { - iconIndex:'schedstate' - } - ] - }); + var actions = new Ext.ux.grid.RowActions({ + header : '', + width : 20, + dataIndex : 'actions', + actions : [ { + iconIndex : 'schedstate' + } ] + }); + var epgStore = new Ext.ux.grid.livegrid.Store({ + autoLoad : true, + url : 'epg', + bufferSize : 300, + reader : new Ext.ux.grid.livegrid.JsonReader({ + root : 'entries', + totalProperty : 'totalCount', + id : 'id' + }, [ { + name : 'id' + }, { + name : 'channel' + }, { + name : 'channelid' + }, { + name : 'title' + }, { + name : 'subtitle' + }, { + name : 'episode' + }, { + name : 'description' + }, { + name : 'chicon' + }, { + name : 'start', + type : 'date', + dateFormat : 'U' /* unix time */ + }, { + name : 'end', + type : 'date', + dateFormat : 'U' /* unix time */ + }, { + name : 'duration' + }, { + name : 'contenttype' + }, { + name : 'schedstate' + }, { + name : 'serieslink' + } ]) + }); - var epgStore = new Ext.ux.grid.livegrid.Store({ - autoLoad: true, - url: 'epg', - bufferSize: 300, - reader: new Ext.ux.grid.livegrid.JsonReader({ - root: 'entries', - totalProperty: 'totalCount', - id: 'id' - },[ - {name: 'id'}, - {name: 'channel'}, - {name: 'channelid'}, - {name: 'title'}, - {name: 'subtitle'}, - {name: 'episode'}, - {name: 'description'}, - {name: 'chicon'}, - {name: 'start', type: 'date', dateFormat: 'U' /* unix time */}, - {name: 'end', type: 'date', dateFormat: 'U' /* unix time */}, - {name: 'duration'}, - {name: 'contenttype'}, - {name: 'schedstate'}, - {name: 'serieslink'}, - ]) - }); + function setMetaAttr(meta, record) { + var now = new Date; + var start = record.get('start'); - function setMetaAttr(meta, record){ - var now = new Date; - var start = record.get('start'); - - if(now.getTime() > start.getTime()){ - meta.attr = 'style="font-weight:bold;"'; - } - } - - function renderDate(value, meta, record, rowIndex, colIndex, store){ - setMetaAttr(meta, record); - - var dt = new Date(value); - return dt.format('l H:i'); - } - - function renderDuration(value, meta, record, rowIndex, colIndex, store){ - setMetaAttr(meta, record); - - value = Math.floor(value / 60); - - if(value >= 60) { - var min = value % 60; - var hours = Math.floor(value / 60); - - if(min == 0) { - return hours + ' hrs'; - } - return hours + ' hrs, ' + min + ' min'; - } else { - return value + ' min'; - } - } - - function renderText(value, meta, record, rowIndex, colIndex, store){ - setMetaAttr(meta, record); - - return value; - } - - var epgCm = new Ext.grid.ColumnModel([ - actions, - { - width: 250, - id:'title', - header: "Title", - dataIndex: 'title', - renderer: renderText - },{ - width: 250, - id:'subtitle', - header: "SubTitle", - dataIndex: 'subtitle', - renderer: renderText - },{ - width: 100, - id:'episode', - header: "Episode", - dataIndex: 'episode', - renderer: renderText - },{ - width: 100, - id:'start', - header: "Start", - dataIndex: 'start', - renderer: renderDate - },{ - width: 100, - hidden:true, - id:'end', - header: "End", - dataIndex: 'end', - renderer: renderDate - },{ - width: 100, - id:'duration', - header: "Duration", - dataIndex: 'duration', - renderer: renderDuration - },{ - width: 250, - id:'channel', - header: "Channel", - dataIndex: 'channel', - renderer: renderText - },{ - width: 250, - id:'contenttype', - header: "Content Type", - dataIndex: 'contenttype', - renderer: function(v) { - return tvheadend.contentGroupLookupName(v); - } - } - ]); - - - // Title search box - - var epgFilterTitle = new Ext.form.TextField({ - emptyText: 'Search title...', - width: 200 - }); - - - // Channels, uses global store - - var epgFilterChannels = new Ext.form.ComboBox({ - loadingText: 'Loading...', - width: 200, - displayField:'name', - store: tvheadend.channels, - mode: 'local', - editable: false, - triggerAction: 'all', - emptyText: 'Only include channel...' - }); - - // Tags, uses global store - - var epgFilterChannelTags = new Ext.form.ComboBox({ - width: 200, - displayField:'name', - store: tvheadend.channelTags, - mode: 'local', - editable: false, - triggerAction: 'all', - emptyText: 'Only include tag...' - }); - - // Content groups - - - var epgFilterContentGroup = new Ext.form.ComboBox({ - loadingText: 'Loading...', - width: 200, - displayField:'name', - store: tvheadend.ContentGroupStore, - mode: 'local', - editable: false, - triggerAction: 'all', - emptyText: 'Only include content...' - }); - - - function epgQueryClear() { - epgStore.baseParams.channel = null; - epgStore.baseParams.tag = null; - epgStore.baseParams.contenttype = null; - epgStore.baseParams.title = null; - - epgFilterChannels.setValue(""); - epgFilterChannelTags.setValue(""); - epgFilterContentGroup.setValue(""); - epgFilterTitle.setValue(""); - - epgStore.reload(); - } - - epgFilterChannels.on('select', function(c, r) { - if(epgStore.baseParams.channel != r.data.name) { - epgStore.baseParams.channel = r.data.name; - epgStore.reload(); - } - }); - - epgFilterChannelTags.on('select', function(c, r) { - if(epgStore.baseParams.tag != r.data.name) { - epgStore.baseParams.tag = r.data.name; - epgStore.reload(); - } - }); - - epgFilterContentGroup.on('select', function(c, r) { - if(epgStore.baseParams.contenttype != r.data.code) { - epgStore.baseParams.contenttype = r.data.code; - epgStore.reload(); - } - }); - - epgFilterTitle.on('valid', function(c) { - var value = c.getValue(); - - if(value.length < 1) - value = null; - - if(epgStore.baseParams.title != value) { - epgStore.baseParams.title = value; - epgStore.reload(); - } - }); - - var epgView = new Ext.ux.grid.livegrid.GridView({ - nearLimit : 100, - loadMask : { - msg : 'Buffering. Please wait...' - } - }); - - var panel = new Ext.ux.grid.livegrid.GridPanel({ - enableDragDrop : false, - cm: epgCm, - plugins: [actions], - title: 'Electronic Program Guide', - iconCls: 'newspaper', - store : epgStore, - selModel : new Ext.ux.grid.livegrid.RowSelectionModel(), - view : epgView, - tbar: [ - epgFilterTitle, - '-', - epgFilterChannels, - '-', - epgFilterChannelTags, - '-', - epgFilterContentGroup, - '-', - { - text: 'Reset', - handler: epgQueryClear - }, - '->', - { - text: 'Watch TV', - iconCls: 'eye', - handler: function() { - new tvheadend.VLC(); + if (now.getTime() > start.getTime()) { + meta.attr = 'style="font-weight:bold;"'; } - }, - '-', - { - text: 'Create AutoRec', - iconCls: 'wand', - tooltip: 'Create an automatic recording entry that will ' + - 'record all future programmes that matches ' + - 'the current query.', - handler: createAutoRec - }, - '-', - { - text: 'Help', - handler: function() { - new tvheadend.help('Electronic Program Guide', 'epg.html'); + } + + function renderDate(value, meta, record, rowIndex, colIndex, store) { + setMetaAttr(meta, record); + + var dt = new Date(value); + return dt.format('l H:i'); + } + + function renderDuration(value, meta, record, rowIndex, colIndex, store) { + setMetaAttr(meta, record); + + value = Math.floor(value / 60); + + if (value >= 60) { + var min = value % 60; + var hours = Math.floor(value / 60); + + if (min == 0) { + return hours + ' hrs'; + } + return hours + ' hrs, ' + min + ' min'; } - } - ], + else { + return value + ' min'; + } + } - bbar : new Ext.ux.grid.livegrid.Toolbar({ - view : epgView, - displayInfo : true - }) - }); + function renderText(value, meta, record, rowIndex, colIndex, store) { + setMetaAttr(meta, record); - panel.on('rowclick', rowclicked); + return value; + } + var epgCm = new Ext.grid.ColumnModel([ actions, { + width : 250, + id : 'title', + header : "Title", + dataIndex : 'title', + renderer : renderText + }, { + width : 250, + id : 'subtitle', + header : "SubTitle", + dataIndex : 'subtitle', + renderer : renderText + }, { + width : 100, + id : 'episode', + header : "Episode", + dataIndex : 'episode', + renderer : renderText + }, { + width : 100, + id : 'start', + header : "Start", + dataIndex : 'start', + renderer : renderDate + }, { + width : 100, + hidden : true, + id : 'end', + header : "End", + dataIndex : 'end', + renderer : renderDate + }, { + width : 100, + id : 'duration', + header : "Duration", + dataIndex : 'duration', + renderer : renderDuration + }, { + width : 250, + id : 'channel', + header : "Channel", + dataIndex : 'channel', + renderer : renderText + }, { + width : 250, + id : 'contenttype', + header : "Content Type", + dataIndex : 'contenttype', + renderer : function(v) { + return tvheadend.contentGroupLookupName(v); + } + } ]); - function rowclicked(grid, index) { - new tvheadend.epgDetails(grid.getStore().getAt(index).data); - } + // Title search box - function createAutoRec() { + var epgFilterTitle = new Ext.form.TextField({ + emptyText : 'Search title...', + width : 200 + }); - var title = epgStore.baseParams.title ? - epgStore.baseParams.title : "Don't care"; - var channel = epgStore.baseParams.channel ? - epgStore.baseParams.channel : "Don't care"; - var tag = epgStore.baseParams.tag ? - epgStore.baseParams.tag : "Don't care"; - var contenttype = epgStore.baseParams.contenttype ? - epgStore.baseParams.contenttype : "Don't care"; + // Channels, uses global store - Ext.MessageBox.confirm('Auto Recorder', - 'This will create an automatic rule that ' + - 'continuously scans the EPG for programmes ' + - 'to record that matches this query: ' + - '

' + - '
Title:
' + title + '
' + - '
Channel:
' + channel + '
' + - '
Tag:
' + tag + '
' + - '
Genre:
' + contenttype + '
' + - '
' + - 'Currently this will match (and record) ' + - epgStore.getTotalCount() + ' events. ' + - 'Are you sure?', + var epgFilterChannels = new Ext.form.ComboBox({ + loadingText : 'Loading...', + width : 200, + displayField : 'name', + store : tvheadend.channels, + mode : 'local', + editable : true, + forceSelection: true, + triggerAction : 'all', + emptyText : 'Filter channel...' + }); - function(button) { - if(button == 'no') - return; - createAutoRec2(epgStore.baseParams); - } - ); - } + // Tags, uses global store - function createAutoRec2(params) { - /* Really do it */ - params.op = 'createAutoRec'; - Ext.Ajax.request({url: 'dvr', params: params}); - } + var epgFilterChannelTags = new Ext.form.ComboBox({ + width : 200, + displayField : 'name', + store : tvheadend.channelTags, + mode : 'local', + editable : true, + forceSelection: true, + triggerAction : 'all', + emptyText : 'Filter tag...' + }); - return panel; + // Content groups + + var epgFilterContentGroup = new Ext.form.ComboBox({ + loadingText : 'Loading...', + width : 200, + displayField : 'name', + store : tvheadend.ContentGroupStore, + mode : 'local', + editable : true, + forceSelection: true, + triggerAction : 'all', + emptyText : 'Filter content type...' + }); + + function epgQueryClear() { + delete epgStore.baseParams.channel; + delete epgStore.baseParams.tag; + delete epgStore.baseParams.contenttype; + delete epgStore.baseParams.title; + + epgFilterChannels.setValue(""); + epgFilterChannelTags.setValue(""); + epgFilterContentGroup.setValue(""); + epgFilterTitle.setValue(""); + + epgStore.reload(); + } + + epgFilterChannels.on('select', function(c, r) { + if (epgStore.baseParams.channel != r.data.name) { + epgStore.baseParams.channel = r.data.name; + epgStore.reload(); + } + }); + + epgFilterChannelTags.on('select', function(c, r) { + if (epgStore.baseParams.tag != r.data.name) { + epgStore.baseParams.tag = r.data.name; + epgStore.reload(); + } + }); + + epgFilterContentGroup.on('select', function(c, r) { + if (epgStore.baseParams.contenttype != r.data.code) { + epgStore.baseParams.contenttype = r.data.code; + epgStore.reload(); + } + }); + + epgFilterTitle.on('valid', function(c) { + var value = c.getValue(); + + if (value.length < 1) value = null; + + if (epgStore.baseParams.title != value) { + epgStore.baseParams.title = value; + epgStore.reload(); + } + }); + + var epgView = new Ext.ux.grid.livegrid.GridView({ + nearLimit : 100, + loadMask : { + msg : 'Buffering. Please wait...' + } + }); + + var panel = new Ext.ux.grid.livegrid.GridPanel({ + enableDragDrop : false, + cm : epgCm, + plugins : [ actions ], + title : 'Electronic Program Guide', + iconCls : 'newspaper', + store : epgStore, + selModel : new Ext.ux.grid.livegrid.RowSelectionModel(), + view : epgView, + tbar : [ + epgFilterTitle, + '-', + epgFilterChannels, + '-', + epgFilterChannelTags, + '-', + epgFilterContentGroup, + '-', + { + text : 'Reset', + handler : epgQueryClear + }, + '->', + { + text : 'Watch TV', + iconCls : 'eye', + handler : function() { + new tvheadend.VLC(); + } + }, + '-', + { + text : 'Create AutoRec', + iconCls : 'wand', + tooltip : 'Create an automatic recording entry that will ' + + 'record all future programmes that matches ' + + 'the current query.', + handler : createAutoRec + }, '-', { + text : 'Help', + handler : function() { + new tvheadend.help('Electronic Program Guide', 'epg.html'); + } + } ], + + bbar : new Ext.ux.grid.livegrid.Toolbar({ + view : epgView, + displayInfo : true + }) + }); + + panel.on('rowclick', rowclicked); + + function rowclicked(grid, index) { + new tvheadend.epgDetails(grid.getStore().getAt(index).data); + } + + function createAutoRec() { + + var title = epgStore.baseParams.title ? epgStore.baseParams.title + : "Don't care"; + var channel = epgStore.baseParams.channel ? epgStore.baseParams.channel + : "Don't care"; + var tag = epgStore.baseParams.tag ? epgStore.baseParams.tag + : "Don't care"; + var contenttype = epgStore.baseParams.contenttype ? epgStore.baseParams.contenttype + : "Don't care"; + + Ext.MessageBox.confirm('Auto Recorder', + 'This will create an automatic rule that ' + + 'continuously scans the EPG for programmes ' + + 'to record that matches this query: ' + '

' + + '
Title:
' + title + '
' + + '
Channel:
' + channel + '
' + + '
Tag:
' + tag + '
' + + '
Genre:
' + contenttype + '
' + + '
' + 'Currently this will match (and record) ' + + epgStore.getTotalCount() + ' events. ' + 'Are you sure?', + + function(button) { + if (button == 'no') return; + createAutoRec2(epgStore.baseParams); + }); + } + + function createAutoRec2(params) { + /* Really do it */ + params.op = 'createAutoRec'; + Ext.Ajax.request({ + url : 'dvr', + params : params + }); + } + + return panel; } - diff --git a/src/webui/static/app/epggrab.js b/src/webui/static/app/epggrab.js index 47827b7e..7df48fd8 100644 --- a/src/webui/static/app/epggrab.js +++ b/src/webui/static/app/epggrab.js @@ -1,426 +1,405 @@ tvheadend.epggrabChannels = new Ext.data.JsonStore({ - root : 'entries', - url : 'epggrab', - baseParams : { op : 'channelList' }, - fields : [ 'id', 'mod', 'name', 'icon', 'number', 'channel', - 'mod-id', 'mod-name' ] + root : 'entries', + url : 'epggrab', + baseParams : { + op : 'channelList' + }, + fields : [ 'id', 'mod', 'name', 'icon', 'number', 'channel', 'mod-id', + 'mod-name' ] }); tvheadend.epggrab = function() { - /* **************************************************************** - * Data - * ***************************************************************/ + /* **************************************************************** + * Data + * ***************************************************************/ - /* - * Module lists (I'm sure there is a better way!) - */ - var EPGGRAB_MODULE_INTERNAL = 0; - var EPGGRAB_MODULE_EXTERNAL = 1; - var EPGGRAB_MODULE_OTA = 2; + /* + * Module lists (I'm sure there is a better way!) + */ + var EPGGRAB_MODULE_INTERNAL = 0; + var EPGGRAB_MODULE_EXTERNAL = 1; + var EPGGRAB_MODULE_OTA = 2; - var moduleStore = new Ext.data.JsonStore({ - root : 'entries', - url : 'epggrab', - baseParams : { op : 'moduleList' }, - autoLoad : true, - fields : [ 'id', 'name', 'path', 'type', 'enabled' ] - }); - var internalModuleStore = new Ext.data.Store({ - recordType: moduleStore.recordType - }); - var externalModuleStore = new Ext.data.Store({ - recordType: moduleStore.recordType - }); - var otaModuleStore = new Ext.data.Store({ - recordType: moduleStore.recordType - }); - moduleStore.on('load', function() { - moduleStore.filterBy(function(r) { - return r.get('type') == EPGGRAB_MODULE_INTERNAL; - }); - r = new internalModuleStore.recordType({ id: '', name : 'Disabled'}); - internalModuleStore.add(r); - moduleStore.each(function(r) { - internalModuleStore.add(r.copy()); - }); - moduleStore.filterBy(function(r) { - return r.get('type') == EPGGRAB_MODULE_EXTERNAL; - }); - moduleStore.each(function(r) { - externalModuleStore.add(r.copy()); - }); - moduleStore.filterBy(function(r) { - return r.get('type') == EPGGRAB_MODULE_OTA; - }); - moduleStore.each(function(r) { - otaModuleStore.add(r.copy()); - }); - moduleStore.filterBy(function(r) { - return r.get('type') != EPGGRAB_MODULE_INTERNAL; - }); - }); + var moduleStore = new Ext.data.JsonStore({ + root : 'entries', + url : 'epggrab', + baseParams : { + op : 'moduleList' + }, + autoLoad : true, + fields : [ 'id', 'name', 'path', 'type', 'enabled' ] + }); + var internalModuleStore = new Ext.data.Store({ + recordType : moduleStore.recordType + }); + var externalModuleStore = new Ext.data.Store({ + recordType : moduleStore.recordType + }); + var otaModuleStore = new Ext.data.Store({ + recordType : moduleStore.recordType + }); + moduleStore.on('load', function() { + moduleStore.filterBy(function(r) { + return r.get('type') == EPGGRAB_MODULE_INTERNAL; + }); + r = new internalModuleStore.recordType({ + id : '', + name : 'Disabled' + }); + internalModuleStore.add(r); + moduleStore.each(function(r) { + internalModuleStore.add(r.copy()); + }); + moduleStore.filterBy(function(r) { + return r.get('type') == EPGGRAB_MODULE_EXTERNAL; + }); + moduleStore.each(function(r) { + externalModuleStore.add(r.copy()); + }); + moduleStore.filterBy(function(r) { + return r.get('type') == EPGGRAB_MODULE_OTA; + }); + moduleStore.each(function(r) { + otaModuleStore.add(r.copy()); + }); + moduleStore.filterBy(function(r) { + return r.get('type') != EPGGRAB_MODULE_INTERNAL; + }); + }); - /* Enable module in one of the stores (will auto update primary) */ - function moduleSelect ( r, e ) - { - r.set('enabled', e); - t = moduleStore.getById(r.id); - if (t) t.set('enabled', e); - } + /* Enable module in one of the stores (will auto update primary) */ + function moduleSelect(r, e) { + r.set('enabled', e); + t = moduleStore.getById(r.id); + if (t) t.set('enabled', e); + } - /* - * Basic Config - */ + /* + * Basic Config + */ - var confreader = new Ext.data.JsonReader( - { root: 'epggrabSettings' }, - [ - 'module', 'interval', - 'channel_rename', 'channel_renumber', 'channel_reicon' - ] - ); + var confreader = new Ext.data.JsonReader({ + root : 'epggrabSettings' + }, [ 'module', 'interval', 'channel_rename', 'channel_renumber', + 'channel_reicon' ]); - /* **************************************************************** - * Basic Fields - * ***************************************************************/ + /* **************************************************************** + * Basic Fields + * ***************************************************************/ - /* - * Module selector - */ - var internalModule = new Ext.form.ComboBox({ - fieldLabel : 'Module', - hiddenName : 'module', - width : 300, - valueField : 'id', - displayField : 'name', - forceSelection : true, - editable : false, - mode : 'local', - triggerAction : 'all', - store : internalModuleStore - }); + /* + * Module selector + */ + var internalModule = new Ext.form.ComboBox({ + fieldLabel : 'Module', + hiddenName : 'module', + width : 300, + valueField : 'id', + displayField : 'name', + forceSelection : true, + editable : false, + mode : 'local', + triggerAction : 'all', + store : internalModuleStore + }); - /* - * Interval selector - */ - var intervalUnits = [ - [ 86400, 'Days' ], - [ 3600, 'Hours' ], - [ 60, 'Minutes' ], - [ 1, 'Seconds' ] - ]; - var intervalValue = new Ext.form.NumberField({ - width : 300, - allowNegative : false, - allowDecimals : false, - minValue : 1, - maxValue : 7, - value : 1, - fieldLabel : 'Grab interval', - name : 'intervalValue', - listeners : { - 'valid' : function (e) { - v = e.getValue() * intervalUnit.getValue(); - interval.setValue(v); - } - } - }) - var intervalUnit = new Ext.form.ComboBox({ - name : 'intervalUnit', - width : 300, - valueField : 'key', - displayField : 'value', - value : 86400, - forceSelection : true, - editable : false, - triggerAction : 'all', - mode : 'local', - store : new Ext.data.SimpleStore({ - fields : [ 'key', 'value' ], - data : intervalUnits - }), - listeners : { - 'change' : function (e, n, o) { - intervalValue.maxValue = (7 * 86400) / n; - intervalValue.validate(); - } - } - }); - var interval = new Ext.form.Hidden({ - name : 'interval', - value : 86400, - listeners : { - 'enable' : function (e) { - v = e.getValue(); - for ( i = 0; i < intervalUnits.length; i++ ) { - u = intervalUnits[i][0]; - if ( (v % u) == 0 ) { - intervalUnit.setValue(u); - intervalValue.maxValue = (7 * 86400) / u; - intervalValue.setValue(v / u); - intervalValue.validate(); - break; - } - } - } - } - }); + /* + * Interval selector + */ + var intervalUnits = [ [ 86400, 'Days' ], [ 3600, 'Hours' ], + [ 60, 'Minutes' ], [ 1, 'Seconds' ] ]; + var intervalValue = new Ext.form.NumberField({ + width : 300, + allowNegative : false, + allowDecimals : false, + minValue : 1, + maxValue : 7, + value : 1, + fieldLabel : 'Grab interval', + name : 'intervalValue', + listeners : { + 'valid' : function(e) { + v = e.getValue() * intervalUnit.getValue(); + interval.setValue(v); + } + } + }) + var intervalUnit = new Ext.form.ComboBox({ + name : 'intervalUnit', + width : 300, + valueField : 'key', + displayField : 'value', + value : 86400, + forceSelection : true, + editable : false, + triggerAction : 'all', + mode : 'local', + store : new Ext.data.SimpleStore({ + fields : [ 'key', 'value' ], + data : intervalUnits + }), + listeners : { + 'change' : function(e, n, o) { + intervalValue.maxValue = (7 * 86400) / n; + intervalValue.validate(); + } + } + }); + var interval = new Ext.form.Hidden({ + name : 'interval', + value : 86400, + listeners : { + 'enable' : function(e) { + v = e.getValue(); + for (i = 0; i < intervalUnits.length; i++) { + u = intervalUnits[i][0]; + if ((v % u) == 0) { + intervalUnit.setValue(u); + intervalValue.maxValue = (7 * 86400) / u; + intervalValue.setValue(v / u); + intervalValue.validate(); + break; + } + } + } + } + }); - /* - * Channel handling - */ - var channelRename = new Ext.form.Checkbox({ - name : 'channel_rename', - fieldLabel : 'Update channel name' - }); + /* + * Channel handling + */ + var channelRename = new Ext.form.Checkbox({ + name : 'channel_rename', + fieldLabel : 'Update channel name' + }); - var channelRenumber = new Ext.form.Checkbox({ - name : 'channel_renumber', - fieldLabel : 'Update channel number' - }); + var channelRenumber = new Ext.form.Checkbox({ + name : 'channel_renumber', + fieldLabel : 'Update channel number' + }); - var channelReicon = new Ext.form.Checkbox({ - name : 'channel_reicon', - fieldLabel : 'Update channel icon' - }); + var channelReicon = new Ext.form.Checkbox({ + name : 'channel_reicon', + fieldLabel : 'Update channel icon' + }); - /* - * Simple fieldet - */ - var simplePanel = new Ext.form.FieldSet({ - title : 'Basic Config', - width : 800, - autoHeight : true, - collapsible : true, - items : [ - interval, - internalModule, - intervalValue, - intervalUnit, - channelRename, - channelRenumber, - channelReicon - ] - }); - + /* + * Simple fieldet + */ + var simplePanel = new Ext.form.FieldSet({ + title : 'Basic Config', + width : 800, + autoHeight : true, + collapsible : true, + items : [ interval, internalModule, intervalValue, intervalUnit, + channelRename, channelRenumber, channelReicon ] + }); - /* **************************************************************** - * Advanced Fields - * ***************************************************************/ + /* **************************************************************** + * Advanced Fields + * ***************************************************************/ + /* + * External modules + */ + var externalSelectionModel = new Ext.grid.CheckboxSelectionModel({ + singleSelect : false, + listeners : { + 'rowselect' : function(s, ri, r) { + moduleSelect(r, 1); + }, + 'rowdeselect' : function(s, ri, r) { + moduleSelect(r, 0); + } + } + }); - /* - * External modules - */ - var externalSelectionModel = new Ext.grid.CheckboxSelectionModel({ - singleSelect : false, - listeners : { - 'rowselect' : function (s, ri, r) { - moduleSelect(r, 1); - }, - 'rowdeselect' : function (s, ri, r) { - moduleSelect(r, 0); - } - } - }); + var externalColumnModel = new Ext.grid.ColumnModel([ externalSelectionModel, + { + header : 'Module', + dataIndex : 'name', + width : 200, + sortable : false + }, { + header : 'Path', + dataIndex : 'path', + width : 300, + sortable : false + } ]); - var externalColumnModel = new Ext.grid.ColumnModel([ - externalSelectionModel, - { - header : 'Module', - dataIndex : 'name', - width : 200, - sortable : false - }, - { - header : 'Path', - dataIndex : 'path', - width : 300, - sortable : false - } - ]); + var externalGrid = new Ext.grid.EditorGridPanel({ + store : externalModuleStore, + cm : externalColumnModel, + sm : externalSelectionModel, + width : 600, + height : 150, + frame : false, + viewConfig : { + forceFit : true + }, + iconCls : 'icon-grid' + }); - var externalGrid = new Ext.grid.EditorGridPanel({ - store : externalModuleStore, - cm : externalColumnModel, - sm : externalSelectionModel, - width : 600, - height : 150, - frame : false, - viewConfig : { - forceFit : true - }, - iconCls : 'icon-grid' - }); + var externalPanel = new Ext.form.FieldSet({ + title : 'External Interfaces', + width : 800, + autoHeight : true, + collapsible : true, + collapsed : true, + items : [ externalGrid ] + }); - var externalPanel = new Ext.form.FieldSet({ - title : 'External Interfaces', - width : 800, - autoHeight : true, - collapsible : true, - collapsed : true, - items : [ - externalGrid - ] - }); + /* + * OTA modules + */ - /* - * OTA modules - */ + var otaSelectionModel = new Ext.grid.CheckboxSelectionModel({ + singleSelect : false, + listeners : { + 'rowselect' : function(s, ri, r) { + moduleSelect(r, 1); + }, + 'rowdeselect' : function(s, ri, r) { + moduleSelect(r, 0); + } + } + }); - var otaSelectionModel = new Ext.grid.CheckboxSelectionModel({ - singleSelect : false, - listeners : { - 'rowselect' : function (s, ri, r) { - moduleSelect(r, 1); - }, - 'rowdeselect' : function (s, ri, r) { - moduleSelect(r, 0); - } - } - }); + var otaColumnModel = new Ext.grid.ColumnModel([ otaSelectionModel, { + header : 'Module', + dataIndex : 'name', + width : 200, + sortable : false + } ]); - var otaColumnModel = new Ext.grid.ColumnModel([ - otaSelectionModel, - { - header : 'Module', - dataIndex : 'name', - width : 200, - sortable : false - } - ]); + var otaGrid = new Ext.grid.EditorGridPanel({ + store : otaModuleStore, + cm : otaColumnModel, + sm : otaSelectionModel, + width : 600, + height : 150, + frame : false, + viewConfig : { + forceFit : true + }, + iconCls : 'icon-grid' + }); - var otaGrid = new Ext.grid.EditorGridPanel({ - store : otaModuleStore, - cm : otaColumnModel, - sm : otaSelectionModel, - width : 600, - height : 150, - frame : false, - viewConfig : { - forceFit : true - }, - iconCls : 'icon-grid' - }); + var otaPanel = new Ext.form.FieldSet({ + title : 'OTA Interfaces', + width : 800, + autoHeight : true, + collapsible : true, + collapsed : true, + items : [ otaGrid ] + }); - var otaPanel = new Ext.form.FieldSet({ - title : 'OTA Interfaces', - width : 800, - autoHeight : true, - collapsible : true, - collapsed : true, - items : [ - otaGrid - ] - }); + /* **************************************************************** + * Form + * ***************************************************************/ - /* **************************************************************** - * Form - * ***************************************************************/ + var saveButton = new Ext.Button({ + text : "Save configuration", + tooltip : 'Save changes made to configuration below', + iconCls : 'save', + handler : saveChanges + }); - var saveButton = new Ext.Button({ - text : "Save configuration", - tooltip : 'Save changes made to configuration below', - iconCls :'save', - handler : saveChanges - }); + var helpButton = new Ext.Button({ + text : 'Help', + handler : function() { + new tvheadend.help('EPG Grab Configuration', 'config_epggrab.html'); + } + }); - var helpButton = new Ext.Button({ - text : 'Help', - handler : function() { - new tvheadend.help('EPG Grab Configuration', - 'config_epggrab.html'); - } - }); + var confpanel = new Ext.FormPanel({ + title : 'EPG Grabber', + iconCls : 'xml', + border : false, + bodyStyle : 'padding:15px', + labelAlign : 'left', + labelWidth : 150, + waitMsgTarget : true, + reader : confreader, + layout : 'form', + defaultType : 'textfield', + autoHeight : true, + items : [ simplePanel, externalPanel, otaPanel ], + tbar : [ saveButton, '->', helpButton ] + }); - var confpanel = new Ext.FormPanel({ - title : 'EPG Grabber', - iconCls : 'xml', - border : false, - bodyStyle : 'padding:15px', - labelAlign : 'left', - labelWidth : 150, - waitMsgTarget : true, - reader : confreader, - layout : 'form', - defaultType : 'textfield', - autoHeight : true, - items : [ - simplePanel, - externalPanel, - otaPanel - ], - tbar: [ - saveButton, - '->', - helpButton - ] - }); + /* **************************************************************** + * Load/Save + * ***************************************************************/ - /* **************************************************************** - * Load/Save - * ***************************************************************/ + /* HACK: get display working */ + externalGrid.on('render', function() { + delay = new Ext.util.DelayedTask(function() { + rows = []; + externalModuleStore.each(function(r) { + if (r.get('enabled')) rows.push(r); + }); + externalSelectionModel.selectRecords(rows); + }); + delay.delay(100); + }); + otaGrid.on('render', function() { + delay = new Ext.util.DelayedTask(function() { + rows = []; + otaModuleStore.each(function(r) { + if (r.get('enabled')) rows.push(r); + }); + otaSelectionModel.selectRecords(rows); + }); + delay.delay(100); + }); - /* HACK: get display working */ - externalGrid.on('render', function(){ - delay = new Ext.util.DelayedTask(function(){ - rows = []; - externalModuleStore.each(function(r){ - if (r.get('enabled')) rows.push(r); - }); - externalSelectionModel.selectRecords(rows); - }); - delay.delay(100); - }); - otaGrid.on('render', function(){ - delay = new Ext.util.DelayedTask(function(){ - rows = []; - otaModuleStore.each(function(r){ - if (r.get('enabled')) rows.push(r); - }); - otaSelectionModel.selectRecords(rows); - }); - delay.delay(100); - }); + confpanel.on('render', function() { - confpanel.on('render', function() { + /* Hack to get display working */ + delay = new Ext.util.DelayedTask(function() { + simplePanel.doLayout(false); + externalPanel.doLayout(false); + otaPanel.doLayout(false); + }); + delay.delay(100); - /* Hack to get display working */ - delay = new Ext.util.DelayedTask(function(){ - simplePanel.doLayout(false); - externalPanel.doLayout(false); - otaPanel.doLayout(false); - }); - delay.delay(100); + confpanel.getForm().load({ + url : 'epggrab', + params : { + op : 'loadSettings' + }, + success : function(form, action) { + confpanel.enable(); + } + }); + }); - confpanel.getForm().load({ - url : 'epggrab', - params : { op : 'loadSettings' }, - success : function ( form, action ) { - confpanel.enable(); - } - }); - }); + function saveChanges() { + mods = []; + moduleStore.each(function(r) { + mods.push({ + id : r.get('id'), + enabled : r.get('enabled') ? 1 : 0 + }); + }); + mods = Ext.util.JSON.encode(mods); + confpanel.getForm().submit({ + url : 'epggrab', + params : { + op : 'saveSettings', + external : mods + }, + waitMsg : 'Saving Data...', + success : function(form, action) { + externalModuleStore.commitChanges(); + }, + failure : function(form, action) { + Ext.Msg.alert('Save failed', action.result.errormsg); + } + }); + } - function saveChanges() { - mods = []; - moduleStore.each(function(r) { - mods.push({id: r.get('id'), enabled: r.get('enabled') ? 1 : 0}); - }); - mods = Ext.util.JSON.encode(mods); - confpanel.getForm().submit({ - url : 'epggrab', - params : { op : 'saveSettings', external : mods }, - waitMsg : 'Saving Data...', - success : function(form, action) { - externalModuleStore.commitChanges(); - }, - failure : function (form, action) { - Ext.Msg.alert('Save failed', action.result.errormsg); - } - }); - } - - return confpanel; + return confpanel; } diff --git a/src/webui/static/app/ext.css b/src/webui/static/app/ext.css index d0b93e96..a256b6aa 100644 --- a/src/webui/static/app/ext.css +++ b/src/webui/static/app/ext.css @@ -4,311 +4,332 @@ * licensing@extjs.com * * http://extjs.com/license - */ - - -.x-tree-col { - float:left; - overflow:hidden; - padding:0 1px; - zoom:1; + */ +#header { + font-family: tahoma,arial; + background-color: #507AAA; + color: #F8F8F8; + height: 5.3em; + margin: 0; + padding: 6px 8px 0 6px; + background: url("../img/bg-header.png") repeat-x scroll 0 0 transparent; + height: 45px; +} + + #header > h1 { + background: url("../img/logo.png") no-repeat scroll 10px 20% transparent; + color: #E0E0E0; + font-size: 22px; + padding: 2px 55px; + text-shadow: 0 -2px rgba(0, 0, 0, 0.2); } -.x-tree-col-text, .x-tree-hd-text { - overflow:hidden; - -o-text-overflow: ellipsis; +.x-tree-col { + float: left; + overflow: hidden; + padding: 0 1px; + zoom: 1; +} + +.x-tree-col-text,.x-tree-hd-text { + overflow: hidden; + -o-text-overflow: ellipsis; text-overflow: ellipsis; - padding:3px 3px 3px 5px; - white-space: nowrap; - font:normal 11px arial, tahoma, helvetica, sans-serif; + padding: 3px 3px 3px 5px; + white-space: nowrap; + font: normal 11px arial, tahoma, helvetica, sans-serif; } .x-tree-headers { - background: #f9f9f9 url(../extjs/resources/images/default/grid/grid3-hrow.gif) repeat-x 0 bottom; - cursor:default; - zoom:1; + background: #f9f9f9 + url(../extjs/resources/images/default/grid/grid3-hrow.gif) repeat-x 0 + bottom; + cursor: default; + zoom: 1; } .x-tree-hd { - float:left; - overflow:hidden; - border-left:1px solid #eee; - border-right:1px solid #d0d0d0; + float: left; + overflow: hidden; + border-left: 1px solid #eee; + border-right: 1px solid #d0d0d0; } -.ux-mselect{ - overflow:auto; - background:white; - position:relative; /* for calculating scroll offsets */ - zoom:1; - overflow:auto; -} -.ux-mselect-item{ - font:normal 12px tahoma, arial, helvetica, sans-serif; - padding:2px; - border:1px solid #fff; - white-space: nowrap; - cursor:pointer; -} -.ux-mselect-selected{ - border:1px dotted #a3bae9 !important; - background:#DFE8F6; - cursor:pointer; +.ux-mselect { + overflow: auto; + background: white; + position: relative; /* for calculating scroll offsets */ + zoom: 1; + overflow: auto; } -.x-view-drag-insert-above { - border-top:1px dotted #3366cc; -} -.x-view-drag-insert-below { - border-bottom:1px dotted #3366cc; -} +.ux-mselect-item { + font: normal 12px tahoma, arial, helvetica, sans-serif; + padding: 2px; + border: 1px solid #fff; + white-space: nowrap; + cursor: pointer; +} +.ux-mselect-selected { + border: 1px dotted #a3bae9 !important; + background: #DFE8F6; + cursor: pointer; +} + +.x-view-drag-insert-above { + border-top: 1px dotted #3366cc; +} + +.x-view-drag-insert-below { + border-bottom: 1px dotted #3366cc; +} .x-grid3-progresscol .x-grid3-cell-inner { - padding: 0px 0px 0px 5px; + padding: 0px 0px 0px 5px; } .x-grid3-progresscol .x-progress-bar { - height: 16px; + height: 16px; } .x-grid3-progresscol .x-progress-inner { - height: 16px; + height: 16px; } .x-grid3-progresscol .x-progress-text-front-ie6 { - padding: 2.5px 5px; + padding: 2.5px 5px; } .x-grid3-progresscol .x-progress-text-front { - padding: 2px 5px; + padding: 2px 5px; } .x-progress-bar-red,.x-progress-bar-orange,.x-progress-bar-green { - border-bottom: 1px solid #7fa9e4; - float: left; - height: 16px; + border-bottom: 1px solid #7fa9e4; + float: left; + height: 16px; } .x-progress-bar-red { - background: #ff0000 url(../icons/progress-bg-red.gif) repeat-x scroll left - center; - border-top: 1px solid #ecb7ad; + background: #ff0000 url(../icons/progress-bg-red.gif) repeat-x scroll + left center; + border-top: 1px solid #ecb7ad; } .x-progress-bar-orange { - background: #9cbfee url(../icons/progress-bg-orange.gif) repeat-x scroll - left center; - border-right: 1px solid #deab7e; - border-top: 1px solid #d7b290; + background: #9cbfee url(../icons/progress-bg-orange.gif) repeat-x scroll + left center; + border-right: 1px solid #deab7e; + border-top: 1px solid #d7b290; } .x-progress-bar-green { - background: #00ff00 url(../icons/progress-bg-green.gif) repeat-x scroll - left center; - border-right: 1px solid #5bd976; - border-top: 1px solid #79e18f; + background: #00ff00 url(../icons/progress-bg-green.gif) repeat-x scroll + left center; + border-right: 1px solid #5bd976; + border-top: 1px solid #79e18f; } .tvh-grid-unset { - color: #888; - font-style:italic; + color: #888; + font-style: italic; } .add { - background-image:url(../icons/add.gif) !important; + background-image: url(../icons/add.gif) !important; } + .option { - background-image:url(../icons/plugin.gif) !important; + background-image: url(../icons/plugin.gif) !important; } + .remove { - background-image:url(../icons/delete.gif) !important; + background-image: url(../icons/delete.gif) !important; } + .save { - background-image:url(../icons/save.gif) !important; + background-image: url(../icons/save.gif) !important; } + .rec { - background-image:url(../icons/rec.png) !important; + background-image: url(../icons/rec.png) !important; } + .info { - background-image:url(../icons/information.png) !important; + background-image: url(../icons/information.png) !important; } + .undo { - background-image:url(../icons/undo.png) !important; + background-image: url(../icons/undo.png) !important; } .key { - background-image:url(../icons/key.png) !important; + background-image: url(../icons/key.png) !important; } .tags { - background-image:url(../icons/tag_blue.png) !important; + background-image: url(../icons/tag_blue.png) !important; } .xml { - background-image:url(../icons/tag.png) !important; + background-image: url(../icons/tag.png) !important; } .drive { - background-image:url(../icons/drive.png) !important; + background-image: url(../icons/drive.png) !important; } .group { - background-image:url(../icons/group.png) !important; + background-image: url(../icons/group.png) !important; } .hardware { - background-image:url(../icons/pci.png) !important; + background-image: url(../icons/pci.png) !important; } .television { - background-image:url(../icons/television.png) !important; + background-image: url(../icons/television.png) !important; } .eye { - background-image:url(../icons/eye.png) !important; + background-image: url(../icons/eye.png) !important; } .control_play { - background-image:url(../icons/control_play.png) !important; + background-image: url(../icons/control_play.png) !important; } .control_pause { - background-image:url(../icons/control_pause.png) !important; + background-image: url(../icons/control_pause.png) !important; } .control_stop { - background-image:url(../icons/control_stop.png) !important; + background-image: url(../icons/control_stop.png) !important; } .control_volume { - background-image:url(../icons/sound.png) !important; + background-image: url(../icons/sound.png) !important; } .control_fullscreen { - background-image:url(../icons/arrow_out.png) !important; + background-image: url(../icons/arrow_out.png) !important; } .newspaper { - background-image:url(../icons/newspaper.png) !important; + background-image: url(../icons/newspaper.png) !important; } .clock { - background-image:url(../icons/clock.png) !important; + background-image: url(../icons/clock.png) !important; } .wrench { - background-image:url(../icons/wrench.png) !important; + background-image: url(../icons/wrench.png) !important; } .wand { - background-image:url(../icons/wand.png) !important; + background-image: url(../icons/wand.png) !important; } .merge { - background-image:url(../icons/arrow_join.png) !important; + background-image: url(../icons/arrow_join.png) !important; } .iptv { - background-image:url(../icons/world.png) !important; + background-image: url(../icons/world.png) !important; } .clone { - background-image:url(../icons/layers.png) !important; + background-image: url(../icons/layers.png) !important; } .scheduled { - background-image:url(../icons/clock.png) !important; + background-image: url(../icons/clock.png) !important; } .recordingError { - background-image:url(../icons/exclamation.png) !important; + background-image: url(../icons/exclamation.png) !important; } .completed { - background-image:url(../icons/tick.png) !important; + background-image: url(../icons/tick.png) !important; } .completedError { - background-image:url(../icons/exclamation.png) !important; + background-image: url(../icons/exclamation.png) !important; } .recording { - background-image:url(../icons/rec.png) !important; + background-image: url(../icons/rec.png) !important; } - - .x-smallhdr { - float:left; - width: 100px; + float: left; + width: 100px; } .x-epg-title { - margin: 5px; - font:normal 15px arial, tahoma, helvetica, sans-serif; - font-weight:bold; + margin: 5px; + font: normal 15px arial, tahoma, helvetica, sans-serif; + font-weight: bold; } .x-epg-subtitle { - margin: 5px; - font:normal 12px arial, tahoma, helvetica, sans-serif; - font-weight:bold; + margin: 5px; + font: normal 12px arial, tahoma, helvetica, sans-serif; + font-weight: bold; } .x-epg-desc { - margin: 5px; + margin: 5px; } .x-epg-chicon { - float: right; - margin: 5px; - max-width: 132px; - max-height: 99px; + float: right; + margin: 5px; + max-width: 132px; + max-height: 99px; } .x-epg-meta { - margin: 5px; + margin: 5px; } - -.hts-t-info { - float:left; - width:100px; +.hts-t-info { + float: left; + width: 100px; } - - .hts-doc-text { - font:normal 11px verdana; - padding: 5px; + font: normal 11px verdana; + padding: 5px; } .hts-doc-text dt { - padding-top: 10px; - font-weight: bold; + padding-top: 10px; + font-weight: bold; } .hts-doc-text dl { - padding-left: 10px; - padding-bottom: 10px; + padding-left: 10px; + padding-bottom: 10px; } .hts-doc-text li { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 5px; + padding-bottom: 5px; } .hts-doc-text img { - padding: 10px; + padding: 10px; } .about-title { - font:normal 24px verdana; - font-weight: bold; + font-size: 24px; + font-weight: bold; } - /** vim: ts=4:sw=4:nu:fdc=4:nospell * * Ext.ux.grid.RowActions.css @@ -329,60 +350,69 @@ /* styles for rows */ .ux-row-action-cell .x-grid3-cell-inner { - padding:1px 0 0 0; + padding: 1px 0 0 0; } + .ux-row-action-item { - float:left; - min-width:16px; - height:16px; - background-repeat:no-repeat; + float: left; + min-width: 16px; + height: 16px; + background-repeat: no-repeat; margin: 0 5px 0 0; - cursor:pointer; - overflow:hidden; + cursor: pointer; + overflow: hidden; } + .ext-ie .ux-row-action-item { - width:16px; + width: 16px; } + .ext-ie .ux-row-action-text { - width:auto; + width: auto; } + .ux-row-action-item span { - vertical-align:middle; - padding:0 0 0 20px; - line-height:18px; + vertical-align: middle; + padding: 0 0 0 20px; + line-height: 18px; } + .ext-ie .ux-row-action-item span { - width:auto; + width: auto; } /* styles for groups */ .x-grid-group-hd div { - position:relative; - height:16px; + position: relative; + height: 16px; } + .ux-grow-action-item { - min-width:16px; - height:16px; - background-repeat:no-repeat; + min-width: 16px; + height: 16px; + background-repeat: no-repeat; background-position: 0 50% ! important; margin: 0 0 0 4px; padding: 0 ! important; - cursor:pointer; - float:left; + cursor: pointer; + float: left; } + .ext-ie .ux-grow-action-item { - width:16px; + width: 16px; } + .ux-action-right { - float:right; + float: right; margin: 0 3px 0 2px; padding: 0 ! important; } + .ux-grow-action-text { padding: 0 ! important; - margin:0 ! important; - background:transparent none ! important; - float:left; + margin: 0 ! important; + background: transparent none ! important; + float: left; } /** vim: ts=4:sw=4:nu:fdc=4:nospell @@ -401,19 +431,22 @@ * * License details: http://www.gnu.org/licenses/lgpl.html */ - .ux-lovcombo-icon { - width:16px; - height:16px; - float:left; + width: 16px; + height: 16px; + float: left; background-position: -1px -1px ! important; - background-repeat:no-repeat ! important; + background-repeat: no-repeat ! important; } + .ux-lovcombo-icon-checked { - background: transparent url(../extjs/resources/images/default/menu/checked.gif); + background: transparent + url(../extjs/resources/images/default/menu/checked.gif); } + .ux-lovcombo-icon-unchecked { - background: transparent url(../extjs/resources/images/default/menu/unchecked.gif); + background: transparent + url(../extjs/resources/images/default/menu/unchecked.gif); } - -/* eof */ + +/* eof */ \ No newline at end of file diff --git a/src/webui/static/app/extensions.js b/src/webui/static/app/extensions.js index b5aecf66..281a98e4 100644 --- a/src/webui/static/app/extensions.js +++ b/src/webui/static/app/extensions.js @@ -6,12 +6,9 @@ * http://extjs.com/license */ - - /** * CheckedColumn */ - Ext.grid.CheckColumn = function(config){ Ext.apply(this, config); if(!this.id){ @@ -602,43 +599,69 @@ Ext.extend(Ext.ux.grid.ProgressColumn, Ext.util.Observable, { } }); - - -// vim: ts=4:sw=4:nu:fdc=4:nospell +//vim: ts=4:sw=4:nu:fdc=4:nospell +/*global Ext */ /** - * RowActions plugin for Ext grid + * @class Ext.ux.grid.RowActions + * @extends Ext.util.Observable * - * Contains renderer for icons and fires events when an icon is clicked + * RowActions plugin for Ext grid. Contains renderer for icons and fires events when an icon is clicked. + * CSS rules from Ext.ux.RowActions.css are mandatory + * + * Important general information: Actions are identified by iconCls. Wherever an action + * is referenced (event argument, callback argument), the iconCls of clicked icon is used. + * In other words, action identifier === iconCls. * * @author Ing. Jozef Sakáloš + * @copyright (c) 2008, by Ing. Jozef Sakáloš * @date 22. March 2008 - * @version $Id: Ext.ux.grid.RowActions.js 150 2008-04-08 21:50:58Z jozo $ + * @version 1.0 + * @revision $Id: Ext.ux.grid.RowActions.js 747 2009-09-03 23:30:52Z jozo $ * * @license Ext.ux.grid.RowActions is licensed under the terms of * the Open Source LGPL 3.0 license. Commercial use is permitted to the extent * that the code/component(s) do NOT become part of another Open Source or Commercially * licensed development library or toolkit without explicit permission. * - * License details: http://www.gnu.org/licenses/lgpl.html + *

License details: http://www.gnu.org/licenses/lgpl.html

+ * + * @forum 29961 + * @demo http://rowactions.extjs.eu + * @download + * + * + * @donate + *
+ * + * + * + * + *
*/ -/*global Ext */ - Ext.ns('Ext.ux.grid'); +// add RegExp.escape if it has not been already added +if('function' !== typeof RegExp.escape) { + RegExp.escape = function(s) { + if('string' !== typeof s) { + return s; + } + // Note: if pasting from forum, precede ]/\ with backslash manually + return s.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g, '\\$1'); + }; // eo function escape +} + /** - * @class Ext.ux.grid.RowActions - * @extends Ext.util.Observable - * - * CSS rules from Ext.ux.RowActions.css are mandatory - * - * Important general information: Actions are identified by iconCls. Wherever an action - * is referenced (event argument, callback argument), the iconCls of clicked icon is used. - * In another words, action identifier === iconCls. - * * Creates new RowActions plugin * @constructor - * @param {Object} config The config object + * @param {Object} config A config object */ Ext.ux.grid.RowActions = function(config) { Ext.apply(this, config); @@ -695,73 +718,105 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { // configuration options // {{{ /** - * @cfg {Array} actions Mandatory. Array of action configuration objects. The following - * configuration options of action are recognized: - * - * - @cfg {Function} callback Optional. Function to call if the action icon is clicked. + * @cfg {Array} actions Mandatory. Array of action configuration objects. The action + * configuration object recognizes the following options: + * */ /** - * @cfg {String} actionEvnet Event to trigger actions, e.g. click, dblclick, mouseover (defaults to 'click') + * @cfg {String} actionEvent Event to trigger actions, e.g. click, dblclick, mouseover (defaults to 'click') */ actionEvent:'click' - /** - * @cfg {Boolean} autoWidth true to calculate field width for iconic actions only. + * @cfg {Boolean} autoWidth true to calculate field width for iconic actions only (defaults to true). + * If true, the width is calculated as {@link #widthSlope} * number of actions + {@link #widthIntercept}. */ ,autoWidth:true + /** + * @cfg {String} dataIndex - Do not touch! + * @private + */ + ,dataIndex:'' + + /** + * @cfg {Boolean} editable - Do not touch! + * Must be false to prevent errors in editable grids + */ + ,editable:false + /** * @cfg {Array} groupActions Array of action to use for group headers of grouping grids. - * These actions support static icons, texts and tooltips same way as actions. There is one - * more action config recognized: - * - @cfg {String} align Set it to 'left' to place action icon next to the group header text. + * These actions support static icons, texts and tooltips same way as {@link #actions}. There is one + * more action config option recognized: + * */ /** * @cfg {Object} callbacks iconCls keyed object that contains callback functions. For example: + *
 	 * callbacks:{
-	 *      'icon-open':function(...) {...}
-	 *     ,'icon-save':function(...) {...}
+	 *      'icon-open':function(...) {...}
+	 *     ,'icon-save':function(...) {...}
 	 * }
+	 * 
*/ /** @@ -769,13 +824,30 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { */ ,header:'' + /** + * @cfg {Boolean} isColumn + * Tell ColumnModel that we are column. Do not touch! + * @private + */ + ,isColumn:true + + /** + * @cfg {Boolean} keepSelection + * Set it to true if you do not want action clicks to affect selected row(s) (defaults to false). + * By default, when user clicks an action icon the clicked row is selected and the action events are fired. + * If this option is true then the current selection is not affected, only the action events are fired. + */ + ,keepSelection:false + /** * @cfg {Boolean} menuDisabled No sense to display header menu for this column + * @private */ ,menuDisabled:true /** * @cfg {Boolean} sortable Usually it has no sense to sort by this column + * @private */ ,sortable:false @@ -803,12 +875,22 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { +'' /** - * @private {Number} widthIntercept constant used for auto-width calculation + * @cfg {String} hideMode How to hide hidden icons. Valid values are: 'visibility' and 'display' + * (defaluts to 'visibility'). If the mode is visibility the hidden icon is not visible but there + * is still blank space occupied by the icon. In display mode, the visible icons are shifted taking + * the space of the hidden icon. + */ + ,hideMode:'visibility' + + /** + * @cfg {Number} widthIntercept Constant used for auto-width calculation (defaults to 4). + * See {@link #autoWidth} for explanation. */ ,widthIntercept:4 /** - * @private {Number} widthSlope constant used for auto-width calculation + * @cfg {Number} widthSlope Constant used for auto-width calculation (defaults to 21). + * See {@link #autoWidth} for explanation. */ ,widthSlope:21 // }}} @@ -822,6 +904,14 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { ,init:function(grid) { this.grid = grid; + // the actions column must have an id for Ext 3.x + this.id = this.id || Ext.id(); + + // for Ext 3.x compatibility + var lookup = grid.getColumnModel().lookup; + delete(lookup[undefined]); + lookup[this.id] = this; + // {{{ // setup template if(!this.tpl) { @@ -840,11 +930,10 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { var view = grid.getView(); var cfg = {scope:this}; cfg[this.actionEvent] = this.onClick; - grid.on({ - render:{scope:this, fn:function() { - view.mainBody.on(cfg); - }} - }); + grid.afterRender = grid.afterRender.createSequence(function() { + view.mainBody.on(cfg); + grid.on('destroy', this.purgeListeners, this); + }, this); // setup renderer if(!this.renderer) { @@ -866,6 +955,15 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { +this.processActions(this.groupActions, this.tplGroup).apply() ; } + + // cancel click + if(true === this.keepSelection) { + grid.processEvent = grid.processEvent.createInterceptor(function(name, e) { + if('mousedown' === name) { + return !this.getAction(e); + } + }, this); + } } // eo function init // }}} @@ -878,7 +976,7 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { * @param {Number} row row index * @param {Number} col col index * @param {Ext.data.Store} store object from which the record is extracted - * @returns {Object} data to apply to template + * @return {Object} data to apply to template */ ,getData:function(value, cell, record, row, col, store) { return record.data || {}; @@ -908,7 +1006,10 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { cls:a.iconIndex ? '{' + a.iconIndex + '}' : (a.iconCls ? a.iconCls : '') ,qtip:a.qtipIndex ? '{' + a.qtipIndex + '}' : (a.tooltip || a.qtip ? a.tooltip || a.qtip : '') ,text:a.textIndex ? '{' + a.textIndex + '}' : (a.text ? a.text : '') - ,hide:a.hideIndex ? 'visibility:hidden;' : (a.hide ? 'visibility:hidden;' : '') + ,hide:a.hideIndex + ? '' + + ('display' === this.hideMode ? 'display:none' :'visibility:hidden') + ';' + : (a.hide ? ('display' === this.hideMode ? 'display:none' :'visibility:hidden;') : '') ,align:a.align || 'right' ,style:a.style ? a.style : '' }; @@ -921,20 +1022,8 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { } // eo function processActions // }}} - // {{{ - /** - * Grid body actionEvent event handler - * @private - */ - ,onClick:function(e, target) { - - var view = this.grid.getView(); + ,getAction:function(e) { var action = false; - - // handle row action click - var row = e.getTarget('.x-grid3-row'); - var col = view.findCellIndex(target.parentNode.parentNode); - var t = e.getTarget('.ux-row-action-item'); if(t) { action = t.className.replace(/ux-row-action-item /, ''); @@ -943,6 +1032,31 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { action = action.trim(); } } + return action; + } // eo function getAction + // {{{ + /** + * Grid body actionEvent event handler + * @private + */ + ,onClick:function(e, target) { + + var view = this.grid.getView(); + + // handle row action click + var row = e.getTarget('.x-grid3-row'); + var col = view.findCellIndex(target.parentNode.parentNode); + var action = this.getAction(e); + +// var t = e.getTarget('.ux-row-action-item'); +// if(t) { +// action = this.getAction(t); +// action = t.className.replace(/ux-row-action-item /, ''); +// if(action) { +// action = action.replace(/ ux-row-action-text/, ''); +// action = action.trim(); +// } +// } if(false !== row && false !== col && false !== action) { var record = this.grid.store.getAt(row.rowIndex); @@ -971,7 +1085,7 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { // get matching records var records; if(groupId) { - var re = new RegExp(groupId); + var re = new RegExp(RegExp.escape(groupId)); records = this.grid.store.queryBy(function(r) { return r._groupId.match(re); }); @@ -998,6 +1112,9 @@ Ext.extend(Ext.ux.grid.RowActions, Ext.util.Observable, { // registre xtype Ext.reg('rowactions', Ext.ux.grid.RowActions); +// eof + + /** * Ext.ux.form.LovCombo, List of Values Combo diff --git a/src/webui/static/app/iptv.js b/src/webui/static/app/iptv.js index af4652c2..fe07186c 100644 --- a/src/webui/static/app/iptv.js +++ b/src/webui/static/app/iptv.js @@ -1,10 +1,12 @@ tvheadend.servicetypeStore = new Ext.data.JsonStore({ - root : 'entries', - id : 'val', - url : '/iptv/services', - baseParams : { op : 'servicetypeList' }, - fields : [ 'val', 'str' ], - autoLoad : true + root : 'entries', + id : 'val', + url : '/iptv/services', + baseParams : { + op : 'servicetypeList' + }, + fields : [ 'val', 'str' ], + autoLoad : true }); /** @@ -12,294 +14,295 @@ tvheadend.servicetypeStore = new Ext.data.JsonStore({ */ tvheadend.iptv = function(adapterId) { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 45 - }); + var fm = Ext.form; - var actions = new Ext.ux.grid.RowActions({ - header:'', - dataIndex: 'actions', - width: 45, - actions: [ - { - iconCls:'info', - qtip:'Detailed information about service', - cb: function(grid, record, action, row, col) { - Ext.Ajax.request({ - url: "servicedetails/" + record.id, - success:function(response, options) { - r = Ext.util.JSON.decode(response.responseText); - tvheadend.showTransportDetails(r); + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 45 + }); + + var actions = new Ext.ux.grid.RowActions({ + header : '', + dataIndex : 'actions', + width : 45, + actions : [ { + iconCls : 'info', + qtip : 'Detailed information about service', + cb : function(grid, record, action, row, col) { + Ext.Ajax.request({ + url : "servicedetails/" + record.id, + success : function(response, options) { + r = Ext.util.JSON.decode(response.responseText); + tvheadend.showTransportDetails(r); + } + }) + } + } ] + }); + + var cm = new Ext.grid.ColumnModel([ + enabledColumn, + { + header : "Channel name", + dataIndex : 'channelname', + width : 150, + renderer : function(value, metadata, record, row, col, store) { + return value ? value + : 'Unmapped'; + }, + editor : new fm.ComboBox({ + store : tvheadend.channels, + allowBlank : true, + typeAhead : true, + minChars : 2, + lazyRender : true, + triggerAction : 'all', + mode : 'local', + displayField : 'name' + }) + }, + { + header : "Interface", + dataIndex : 'interface', + width : 100, + renderer : function(value, metadata, record, row, col, store) { + return value ? value : 'Unset'; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, + { + header : "Group", + dataIndex : 'group', + width : 100, + renderer : function(value, metadata, record, row, col, store) { + return value ? value : 'Unset'; + }, + editor : new fm.TextField({ + allowBlank : false + }) + }, + { + header : "UDP Port", + dataIndex : 'port', + width : 60, + editor : new fm.NumberField({ + minValue : 1, + maxValue : 65535 + }) + }, + { + header : "Service ID", + dataIndex : 'sid', + width : 50, + hidden : true + }, + { + header : 'Service Type', + width : 100, + dataIndex : 'stype', + hidden : true, + editor : new fm.ComboBox({ + valueField : 'val', + displayField : 'str', + forceSelection : false, + editable : false, + mode : 'local', + triggerAction : 'all', + store : tvheadend.servicetypeStore + }), + renderer : function(value, metadata, record, row, col, store) { + var val = value ? tvheadend.servicetypeStore.getById(value) : null; + return val ? val.get('str') + : 'Unset'; + } + }, { + header : "PMT PID", + dataIndex : 'pmt', + width : 50, + hidden : true + }, { + header : "PCR PID", + dataIndex : 'pcr', + width : 50, + hidden : true + }, actions ]); + + cm.defaultSortable = true; + + var rec = Ext.data.Record.create([ 'id', 'enabled', 'channelname', + 'interface', 'group', 'port', 'sid', 'pmt', 'pcr', 'stype' ]); + + var store = new Ext.data.JsonStore({ + root : 'entries', + fields : rec, + url : "iptv/services", + autoLoad : true, + id : 'id', + baseParams : { + op : "get" + }, + listeners : { + 'update' : function(s, r, o) { + d = s.getModifiedRecords().length == 0 + saveBtn.setDisabled(d); + rejectBtn.setDisabled(d); } - }) } - } - ] - }); + }); - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Channel name", - dataIndex: 'channelname', - width: 150, - renderer: function(value, metadata, record, row, col, store) { - return value ? value : - 'Unmapped'; - }, - editor: new fm.ComboBox({ - store: tvheadend.channels, - allowBlank: true, - typeAhead: true, - minChars: 2, - lazyRender: true, - triggerAction: 'all', - mode: 'local', - displayField:'name' - }) - }, - { - header: "Interface", - dataIndex: 'interface', - width: 100, - renderer: function(value, metadata, record, row, col, store) { - return value ? value : - 'Unset'; - }, - editor: new fm.TextField({allowBlank: false}) - }, - { - header: "Group", - dataIndex: 'group', - width: 100, - renderer: function(value, metadata, record, row, col, store) { - return value ? value : - 'Unset'; - }, - editor: new fm.TextField({allowBlank: false}) - }, - { - header: "UDP Port", - dataIndex: 'port', - width: 60, - editor: new fm.NumberField({ - minValue: 1, - maxValue: 65535 - }) - }, - { - header: "Service ID", - dataIndex: 'sid', - width: 50, - hidden: true - }, - { - header : 'Service Type', - width : 100, - dataIndex : 'stype', - hidden : true, - editor : new fm.ComboBox({ - valueField : 'val', - displayField : 'str', - forceSelection : false, - editable : false, - mode : 'local', - triggerAction : 'all', - store : tvheadend.servicetypeStore - }), - renderer: function(value, metadata, record, row, col, store) { - var val = value ? tvheadend.servicetypeStore.getById(value) : null; - return val ? val.get('str') : - 'Unset'; - } - }, - { - header: "PMT PID", - dataIndex: 'pmt', - width: 50, - hidden: true - }, - { - header: "PCR PID", - dataIndex: 'pcr', - width: 50, - hidden: true - }, actions - ]); + /* + var storeReloader = new Ext.util.DelayedTask(function() { + store.reload() + }); - cm.defaultSortable = true; + tvheadend.comet.on('dvbService', function(m) { + storeReloader.delay(500); + }); + */ - var rec = Ext.data.Record.create([ - 'id', 'enabled', 'channelname', 'interface', 'group', 'port', - 'sid', 'pmt', 'pcr', 'stype' - ]); + function addRecord() { + Ext.Ajax.request({ + url : "iptv/services", + params : { + op : "create" + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', + 'Unable to generate new record'); + }, + success : function(response, options) { + var responseData = Ext.util.JSON.decode(response.responseText); + var p = new rec(responseData, responseData.id); + grid.stopEditing(); + store.insert(0, p); + grid.startEditing(0, 0); + } + }) + } + ; - var store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "iptv/services", - autoLoad: true, - id: 'id', - baseParams: {op: "get"}, - listeners: { - 'update': function(s, r, o) { + function delSelected() { + var selectedKeys = grid.selModel.selections.keys; + if (selectedKeys.length > 0) { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + } + else { + Ext.MessageBox.alert('Message', + 'Please select at least one item to delete'); + } + } + ; + + function deleteRecord(btn) { + if (btn == 'yes') { + var selectedKeys = grid.selModel.selections.keys; + + Ext.Ajax.request({ + url : "iptv/services", + params : { + op : "delete", + entries : Ext.encode(selectedKeys) + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to delete'); + }, + success : function(response, options) { + store.reload(); + } + }) + } + } + + function saveChanges() { + var mr = store.getModifiedRecords(); + var out = new Array(); + for ( var x = 0; x < mr.length; x++) { + v = mr[x].getChanges(); + out[x] = v; + out[x].id = mr[x].id; + } + + Ext.Ajax.request({ + url : "iptv/services", + params : { + op : "update", + entries : Ext.encode(out) + }, + success : function(response, options) { + store.commitChanges(); + }, + failure : function(response, options) { + Ext.MessageBox.alert('Message', response.statusText); + } + }); + } + + var delButton = new Ext.Toolbar.Button({ + tooltip : 'Delete one or more selected rows', + iconCls : 'remove', + text : 'Delete selected services', + handler : delSelected, + disabled : true + }); + + var saveBtn = new Ext.Toolbar.Button({ + tooltip : 'Save any changes made (Changed cells have red borders).', + iconCls : 'save', + text : "Save changes", + handler : saveChanges, + disabled : true + }); + + var rejectBtn = new Ext.Toolbar.Button({ + tooltip : 'Revert any changes made (Changed cells have red borders).', + iconCls : 'undo', + text : "Revert changes", + handler : function() { + store.rejectChanges(); + }, + disabled : true + }); + + var selModel = new Ext.grid.RowSelectionModel({ + singleSelect : false + }); + + var grid = new Ext.grid.EditorGridPanel({ + stripeRows : true, + title : 'IPTV', + iconCls : 'iptv', + plugins : [ enabledColumn, actions ], + store : store, + clicksToEdit : 2, + cm : cm, + viewConfig : { + forceFit : true + }, + selModel : selModel, + tbar : [ + { + tooltip : 'Create a new entry on the server. ' + + 'The new entry is initially disabled so it must be enabled ' + + 'before it start taking effect.', + iconCls : 'add', + text : 'Add service', + handler : addRecord + }, '-', delButton, '-', saveBtn, rejectBtn ] + }); + + store.on('update', function(s, r, o) { d = s.getModifiedRecords().length == 0 saveBtn.setDisabled(d); rejectBtn.setDisabled(d); - } - } - }); - -/* - var storeReloader = new Ext.util.DelayedTask(function() { - store.reload() - }); - - tvheadend.comet.on('dvbService', function(m) { - storeReloader.delay(500); - }); -*/ - - function addRecord() { - Ext.Ajax.request({ - url: "iptv/services", - params: { - op:"create" - }, - failure:function(response,options){ - Ext.MessageBox.alert('Server Error', - 'Unable to generate new record'); - }, - success:function(response,options){ - var responseData = Ext.util.JSON.decode(response.responseText); - var p = new rec(responseData, responseData.id); - grid.stopEditing(); - store.insert(0, p); - grid.startEditing(0, 0); - } - }) - }; - - - function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if(selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', - deleteRecord); - } else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - }; - - function deleteRecord(btn) { - if(btn=='yes') { - var selectedKeys = grid.selModel.selections.keys; - - Ext.Ajax.request({ - url: "iptv/services", - params: { - op:"delete", - entries:Ext.encode(selectedKeys) - }, - failure:function(response,options) { - Ext.MessageBox.alert('Server Error','Unable to delete'); - }, - success:function(response,options) { - store.reload(); - } - }) - } - } - - function saveChanges() { - var mr = store.getModifiedRecords(); - var out = new Array(); - for (var x = 0; x < mr.length; x++) { - v = mr[x].getChanges(); - out[x] = v; - out[x].id = mr[x].id; - } - - Ext.Ajax.request({ - url: "iptv/services", - params: { - op:"update", - entries:Ext.encode(out) - }, - success:function(response,options) { - store.commitChanges(); - }, - failure:function(response,options) { - Ext.MessageBox.alert('Message',response.statusText); - } }); - } - var delButton = new Ext.Toolbar.Button({ - tooltip: 'Delete one or more selected rows', - iconCls:'remove', - text: 'Delete selected services', - handler: delSelected, - disabled: true - }); + selModel.on('selectionchange', function(self) { + delButton.setDisabled(self.getCount() == 0); + }); - var saveBtn = new Ext.Toolbar.Button({ - tooltip: 'Save any changes made (Changed cells have red borders).', - iconCls:'save', - text: "Save changes", - handler: saveChanges, - disabled: true - }); - - var rejectBtn = new Ext.Toolbar.Button({ - tooltip: 'Revert any changes made (Changed cells have red borders).', - iconCls:'undo', - text: "Revert changes", - handler: function() { - store.rejectChanges(); - }, - disabled: true - }); - - var selModel = new Ext.grid.RowSelectionModel({ - singleSelect:false - }); - - var grid = new Ext.grid.EditorGridPanel({ - stripeRows: true, - title: 'IPTV', - iconCls: 'iptv', - plugins: [enabledColumn, actions], - store: store, - clicksToEdit: 2, - cm: cm, - viewConfig: {forceFit:true}, - selModel: selModel, - tbar: [{ - tooltip: 'Create a new entry on the server. '+ - 'The new entry is initially disabled so it must be enabled '+ - 'before it start taking effect.', - iconCls:'add', - text: 'Add service', - handler: addRecord - }, '-', delButton, '-', saveBtn, rejectBtn] - }); - - store.on('update', function(s, r, o) { - d = s.getModifiedRecords().length == 0 - saveBtn.setDisabled(d); - rejectBtn.setDisabled(d); - }); - - selModel.on('selectionchange', function(self) { - delButton.setDisabled(self.getCount() == 0); - }); - - return grid; + return grid; } diff --git a/src/webui/static/app/tableeditor.js b/src/webui/static/app/tableeditor.js index 561154ee..a61e376a 100644 --- a/src/webui/static/app/tableeditor.js +++ b/src/webui/static/app/tableeditor.js @@ -1,157 +1,173 @@ tvheadend.tableEditor = function(title, dtable, cm, rec, plugins, store, - helpContent, icon) { - cm.defaultSortable = true; + helpContent, icon) { + cm.defaultSortable = true; - if(store == null) { - store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "tablemgr", - autoLoad: true, - id: 'id', - baseParams: {table: dtable, op: "get"} - }); - } + if (store == null) { + store = new Ext.data.JsonStore({ + root : 'entries', + fields : rec, + url : "tablemgr", + autoLoad : true, + id : 'id', + baseParams : { + table : dtable, + op : "get" + } + }); + } - function addRecord() { - Ext.Ajax.request({ - url: "tablemgr", params: {op:"create", table:dtable}, - failure:function(response,options){ - Ext.MessageBox.alert('Server Error', - 'Unable to generate new record'); - }, - success:function(response,options){ - var responseData = Ext.util.JSON.decode(response.responseText); - var p = new rec(responseData, responseData.id); - grid.stopEditing(); - store.insert(0, p); - grid.startEditing(0, 0); - } - }) - }; - - - - function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if(selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', - deleteRecord); - } else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - }; - - - function deleteRecord(btn) { - if(btn=='yes') { - var selectedKeys = grid.selModel.selections.keys; + function addRecord() { + Ext.Ajax.request({ + url : "tablemgr", + params : { + op : "create", + table : dtable + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', + 'Unable to generate new record'); + }, + success : function(response, options) { + var responseData = Ext.util.JSON.decode(response.responseText); + var p = new rec(responseData, responseData.id); + grid.stopEditing(); + store.insert(0, p); + grid.startEditing(0, 0); + } + }) + } + ; - Ext.Ajax.request({ - url: "tablemgr", params: {op:"delete", table:dtable, - entries:Ext.encode(selectedKeys)}, - failure:function(response,options) { - Ext.MessageBox.alert('Server Error','Unable to delete'); - }, - success:function(response,options) { - store.reload(); + function delSelected() { + var selectedKeys = grid.selModel.selections.keys; + if (selectedKeys.length > 0) { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + } + else { + Ext.MessageBox.alert('Message', + 'Please select at least one item to delete'); } - }) } - } - - function saveChanges() { - var mr = store.getModifiedRecords(); - var out = new Array(); - for (var x = 0; x < mr.length; x++) { - v = mr[x].getChanges(); - out[x] = v; - out[x].id = mr[x].id; + ; + + function deleteRecord(btn) { + if (btn == 'yes') { + var selectedKeys = grid.selModel.selections.keys; + + Ext.Ajax.request({ + url : "tablemgr", + params : { + op : "delete", + table : dtable, + entries : Ext.encode(selectedKeys) + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to delete'); + }, + success : function(response, options) { + store.reload(); + } + }) + } } - Ext.Ajax.request({ - url: "tablemgr", - params: {op:"update", table:dtable, entries:Ext.encode(out)}, - success:function(response,options) { - store.commitChanges(); - }, - failure:function(response,options) { - Ext.MessageBox.alert('Message',response.statusText); - } + function saveChanges() { + var mr = store.getModifiedRecords(); + var out = new Array(); + for ( var x = 0; x < mr.length; x++) { + v = mr[x].getChanges(); + out[x] = v; + out[x].id = mr[x].id; + } + + Ext.Ajax.request({ + url : "tablemgr", + params : { + op : "update", + table : dtable, + entries : Ext.encode(out) + }, + success : function(response, options) { + store.commitChanges(); + }, + failure : function(response, options) { + Ext.MessageBox.alert('Message', response.statusText); + } + }); + } + + var selModel = new Ext.grid.RowSelectionModel({ + singleSelect : false }); - } - - var selModel = new Ext.grid.RowSelectionModel({ - singleSelect:false - }); - var delButton = new Ext.Toolbar.Button({ - tooltip: 'Delete one or more selected rows', - iconCls:'remove', - text: 'Delete selected', - handler: delSelected, - disabled: true - }); + var delButton = new Ext.Toolbar.Button({ + tooltip : 'Delete one or more selected rows', + iconCls : 'remove', + text : 'Delete selected', + handler : delSelected, + disabled : true + }); - var saveBtn = new Ext.Toolbar.Button({ - tooltip: 'Save any changes made (Changed cells have red borders)', - iconCls:'save', - text: "Save changes", - handler: saveChanges, - disabled: true - }); + var saveBtn = new Ext.Toolbar.Button({ + tooltip : 'Save any changes made (Changed cells have red borders)', + iconCls : 'save', + text : "Save changes", + handler : saveChanges, + disabled : true + }); - var rejectBtn = new Ext.Toolbar.Button({ - tooltip: 'Revert any changes made (Changed cells have red borders)', - iconCls:'undo', - text: "Revert changes", - handler: function() { - store.rejectChanges(); - }, - disabled: true - }); + var rejectBtn = new Ext.Toolbar.Button({ + tooltip : 'Revert any changes made (Changed cells have red borders)', + iconCls : 'undo', + text : "Revert changes", + handler : function() { + store.rejectChanges(); + }, + disabled : true + }); - store.on('update', function(s, r, o) { - d = s.getModifiedRecords().length == 0 - saveBtn.setDisabled(d); - rejectBtn.setDisabled(d); - }); + store.on('update', function(s, r, o) { + d = s.getModifiedRecords().length == 0 + saveBtn.setDisabled(d); + rejectBtn.setDisabled(d); + }); - selModel.on('selectionchange', function(self) { - if(self.getCount() > 0) { - delButton.enable(); - } else { - delButton.disable(); - } - }); + selModel.on('selectionchange', function(self) { + if (self.getCount() > 0) { + delButton.enable(); + } + else { + delButton.disable(); + } + }); - var grid = new Ext.grid.EditorGridPanel({ - title: title, - iconCls: icon, - plugins: plugins, - store: store, - clicksToEdit: 2, - cm: cm, - viewConfig: {forceFit:true}, - selModel: selModel, - stripeRows: true, - tbar: [{ - tooltip: 'Create a new entry on the server. '+ - 'The new entry is initially disabled so it must be enabled '+ - 'before it start taking effect.', - iconCls:'add', - text: 'Add entry', - handler: addRecord - }, '-', delButton, '-', saveBtn, rejectBtn, '->', { - text: 'Help', - handler: function() { - new tvheadend.help(title, helpContent); - } - } - ] - }); - return grid; + var grid = new Ext.grid.EditorGridPanel({ + title : title, + iconCls : icon, + plugins : plugins, + store : store, + clicksToEdit : 2, + cm : cm, + viewConfig : { + forceFit : true + }, + selModel : selModel, + stripeRows : true, + tbar : [ + { + tooltip : 'Create a new entry on the server. ' + + 'The new entry is initially disabled so it must be enabled ' + + 'before it start taking effect.', + iconCls : 'add', + text : 'Add entry', + handler : addRecord + }, '-', delButton, '-', saveBtn, rejectBtn, '->', { + text : 'Help', + handler : function() { + new tvheadend.help(title, helpContent); + } + } ] + }); + return grid; } - diff --git a/src/webui/static/app/tvadapters.js b/src/webui/static/app/tvadapters.js index 5b669930..47ce1c8c 100644 --- a/src/webui/static/app/tvadapters.js +++ b/src/webui/static/app/tvadapters.js @@ -2,133 +2,111 @@ * Datastore for adapters */ tvheadend.tvAdapterStore = new Ext.data.JsonStore({ - root:'entries', - id: 'identifier', - fields: ['identifier', - 'type', - 'name', - 'path', - 'devicename', - 'hostconnection', - 'currentMux', - 'services', - 'muxes', - 'initialMuxes', - 'satConf', - 'deliverySystem', - 'freqMin', - 'freqMax', - 'freqStep', - 'symrateMin', - 'symrateMax' - ], - url:'tv/adapter' + root : 'entries', + id : 'identifier', + fields : [ 'identifier', 'type', 'name', 'path', 'devicename', + 'hostconnection', 'currentMux', 'services', 'muxes', 'initialMuxes', + 'satConf', 'deliverySystem', 'freqMin', 'freqMax', 'freqStep', + 'symrateMin', 'symrateMax' ], + url : 'tv/adapter' }); tvheadend.comet.on('tvAdapter', function(m) { - idx = tvheadend.tvAdapterStore.find('identifier', m.identifier); - if(idx == -1) - return; - r = tvheadend.tvAdapterStore.getAt(idx); - - r.beginEdit(); - for (key in m) - r.set(key, m[key]); - r.endEdit(); - tvheadend.tvAdapterStore.commitChanges(); + idx = tvheadend.tvAdapterStore.find('identifier', m.identifier); + if (idx == -1) return; + r = tvheadend.tvAdapterStore.getAt(idx); + + r.beginEdit(); + for (key in m) + r.set(key, m[key]); + r.endEdit(); + tvheadend.tvAdapterStore.commitChanges(); }); - - - /** * */ -tvheadend.tvadapters = function() -{ - var adapterSelection = new Ext.form.ComboBox({ - loadingText: 'Loading...', - width: 300, - displayField:'name', - store: tvheadend.tvAdapterStore, - mode: 'remote', - editable: false, - triggerAction: 'all', - emptyText: 'Select TV adapter...' - }); +tvheadend.tvadapters = function() { + var adapterSelection = new Ext.form.ComboBox({ + loadingText : 'Loading...', + width : 300, + displayField : 'name', + store : tvheadend.tvAdapterStore, + mode : 'remote', + editable : false, + triggerAction : 'all', + emptyText : 'Select TV adapter...' + }); - var dummyadapter = new Ext.Panel({ - region:'center', layout:'fit', - items:[{border: false}] - }); + var dummyadapter = new Ext.Panel({ + region : 'center', + layout : 'fit', + items : [ { + border : false + } ] + }); + var panel = new Ext.Panel({ + title : 'TV Adapters', + iconCls : 'hardware', + layout : 'fit', + tbar : [ adapterSelection, '->', { + text : 'Help', + handler : function() { + new tvheadend.help('DVB', 'config_dvb.html'); + } + } ], - var panel = new Ext.Panel({ - title: 'TV Adapters', - iconCls: 'hardware', - layout:'fit', - tbar: [ - adapterSelection, '->', { - text: 'Help', - handler: function() { - new tvheadend.help('DVB', 'config_dvb.html'); - } - } - ], + items : [ dummyadapter ] + }); - items: [ - dummyadapter - ] - }); + adapterSelection.on('select', + function(c, r) { + panel.remove(panel.getComponent(0)); + panel.doLayout(); - adapterSelection.on('select', function(c, r) { - panel.remove(panel.getComponent(0)); - panel.doLayout(); + if (r.data.type == 'dvb') var newPanel = new tvheadend.dvb_adapter( + r.data) + else var newPanel = new tvheadend.v4l_adapter(r.data) - if(r.data.type == 'dvb') - var newPanel = new tvheadend.dvb_adapter(r.data) - else - var newPanel = new tvheadend.v4l_adapter(r.data) + panel.add(newPanel); + panel.doLayout(); + }); - panel.add(newPanel); - panel.doLayout(); - }); - - return panel; + return panel; } - /** * */ -tvheadend.showTransportDetails = function(data) -{ - html = ''; +tvheadend.showTransportDetails = function(data) { + html = ''; - html += '
'; - html += 'PID '; - html += 'Type'; - html += 'Details'; - html += '
'; - - for(i = 0; i < data.streams.length; i++) { - s = data.streams[i]; - - html += '
'; - html += '' + s.pid + ''; - html += '' + s.type + ''; - html += '' + (s.details.length > 0 ? s.details : ' ') + ''; + html += '
'; + html += 'PID '; + html += 'Type'; + html += 'Details'; html += '
'; - } - win = new Ext.Window({ - title: 'Service details for ' + data.title, - layout: 'fit', - width: 400, - height: 400, - plain: true, - bodyStyle: 'padding: 5px', - html: html - }); - win.show(); + for (i = 0; i < data.streams.length; i++) { + s = data.streams[i]; + + html += '
'; + html += '' + s.pid + ''; + html += '' + s.type + ''; + html += '' + (s.details.length > 0 ? s.details : ' ') + + ''; + html += '
'; + } + + win = new Ext.Window({ + title : 'Service details for ' + data.title, + layout : 'fit', + width : 400, + height : 400, + plain : true, + bodyStyle : 'padding: 5px', + html : html + }); + win.show(); } diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 0d254fc3..cd94f3a5 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -1,217 +1,217 @@ - /** * Displays a help popup window */ tvheadend.help = function(title, pagename) { - Ext.Ajax.request({ - url: 'docs/' + pagename, - success: function(result, request) { + Ext.Ajax.request({ + url : 'docs/' + pagename, + success : function(result, request) { - var content = new Ext.Panel({ - autoScroll:true, - border: false, - layout:'fit', - html: result.responseText - }); + var content = new Ext.Panel({ + autoScroll : true, + border : false, + layout : 'fit', + html : result.responseText + }); - var win = new Ext.Window({ - title: 'Help for ' + title, - layout: 'fit', - width: 900, - height: 400, - constrainHeader: true, - items: [content] - }); - win.show(); + var win = new Ext.Window({ + title : 'Help for ' + title, + layout : 'fit', + width : 900, + height : 400, + constrainHeader : true, + items : [ content ] + }); + win.show(); - }}); + } + }); } /** * Displays a mediaplayer using VLC plugin */ tvheadend.VLC = function(url) { - - function randomString() { - var chars = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; - var string_length = 8; - var randomstring = ''; - for (var i=0; iM3U Playlist

'; - missingPlugin.innerHTML += '

Direct URL

'; - } - else { - vlc.playlist.stop(); - vlc.playlist.items.clear(); - vlc.playlist.add(streamurl); - vlc.playlist.playItem(0); - vlc.audio.volume = slider.getValue(); - } - } - ); - - var slider = new Ext.Slider({ - width: 135, - height: 20, - value: 90, - increment: 1, - minValue: 0, - maxValue: 100 - }); - - var sliderLabel = new Ext.form.Label(); - sliderLabel.setText("90%"); - slider.addListener('change', function() { - if(vlc.playlist && vlc.playlist.isPlaying) { - vlc.audio.volume = slider.getValue(); - sliderLabel.setText(vlc.audio.volume + '%'); - } else { - sliderLabel.setText(slider.getValue() + '%'); - } - }); - - var win = new Ext.Window({ - title: 'VLC Player', - layout:'fit', - width: 507 + 14, - height: 384 + 56, - constrainHeader: true, - iconCls: 'eye', - resizable: true, - tbar: [ - selectChannel, - '-', - { - iconCls: 'control_play', - tooltip: 'Play', - handler: function() { - if(vlc.playlist && vlc.playlist.items.count && !vlc.playlist.isPlaying) { - vlc.playlist.play(); - } - } - }, - { - iconCls: 'control_pause', - tooltip: 'Pause', - handler: function() { - if(vlc.playlist && vlc.playlist.items.count) { - vlc.playlist.togglePause(); - } - } - }, - { - iconCls: 'control_stop', - tooltip: 'Stop', - handler: function() { - if(vlc.playlist) { - vlc.playlist.stop(); - } - } - }, - '-', - { - iconCls: 'control_fullscreen', - tooltip: 'Fullscreen', - handler: function() { - if(vlc.playlist && vlc.playlist.isPlaying && (vlc.VersionInfo.substr(0,3) != '1.1')) { - vlc.video.toggleFullscreen(); - } - else if (vlc.VersionInfo.substr(0,3) == '1.1') { - alert('Fullscreen mode is broken in VLC 1.1.x'); - } - } - }, - '-', - { - iconCls: 'control_volume', - tooltip: 'Volume', - disabled: true - }, - ], - items: [vlc, missingPlugin] - }); - - win.on('beforeShow', function() { - win.getTopToolbar().add(slider); - win.getTopToolbar().add(new Ext.Toolbar.Spacer()); - win.getTopToolbar().add(new Ext.Toolbar.Spacer()); - win.getTopToolbar().add(new Ext.Toolbar.Spacer()); - win.getTopToolbar().add(sliderLabel); + var selectChannel = new Ext.form.ComboBox({ + loadingText : 'Loading...', + width : 200, + displayField : 'name', + store : tvheadend.channels, + mode : 'local', + editable : false, + triggerAction : 'all', + emptyText : 'Select channel...' + }); + + selectChannel.on('select', function(c, r) { + var streamurl = 'stream/channelid/' + r.data.chid; + var playlisturl = 'playlist/channelid/' + r.data.chid; - // check if vlc plugin wasn't initialised correctly - if(!vlc.playlist || (vlc.playlist == 'undefined')) { - vlc.style.display = 'none'; - - missingPlugin.innerHTML = '

Embedded player could not be started.
You are probably missing VLC Mozilla plugin for your browser.

'; - - if (url) { - var channelid = url.substr(url.lastIndexOf('/')); - var streamurl = 'stream/channelid/' + channelid; - var playlisturl = 'playlist/channelid/' + channelid; - missingPlugin.innerHTML += '

M3U Playlist

'; - missingPlugin.innerHTML += '

Direct URL

'; - } + // if the player was initialised, but not yet shown, make it visible + if (vlc.playlist && (vlc.style.display == 'none')) + vlc.style.display = 'block'; - missingPlugin.style.display = 'block'; - } - else { - // check if the window was opened with an url-parameter - if (url) { - vlc.playlist.items.clear(); - vlc.playlist.add(url); - vlc.playlist.playItem(0); - - //enable yadif2x deinterlacer for vlc > 1.1 - var point1 = vlc.VersionInfo.indexOf('.'); - var point2 = vlc.VersionInfo.indexOf('.', point1+1); - var majVersion = vlc.VersionInfo.substring(0,point1); - var minVersion = vlc.VersionInfo.substring(point1+1,point2); - if ((majVersion >= 1) && (minVersion >= 1)) - vlc.video.deinterlace.enable("yadif2x"); - } - } - }); + if (!vlc.playlist || vlc.playlist == 'undefined') { +// missingPlugin.innerHTML = '

Embedded player could not be started.
You are probably missing VLC Mozilla plugin for your browser.

'; +// missingPlugin.innerHTML += '

M3U Playlist

'; +// missingPlugin.innerHTML += '

Direct URL

'; + } + else { + vlc.playlist.stop(); + vlc.playlist.items.clear(); + vlc.playlist.add(streamurl); + vlc.playlist.playItem(0); + vlc.audio.volume = slider.getValue(); + } + }); - win.show(); + var slider = new Ext.Slider({ + width : 135, + height : 20, + value : 90, + increment : 1, + minValue : 0, + maxValue : 100 + }); + + var sliderLabel = new Ext.form.Label(); + sliderLabel.setText("90%"); + slider.addListener('change', function() { + if (vlc.playlist && vlc.playlist.isPlaying) { + vlc.audio.volume = slider.getValue(); + sliderLabel.setText(vlc.audio.volume + '%'); + } + else { + sliderLabel.setText(slider.getValue() + '%'); + } + }); + + var win = new Ext.Window({ + title : 'VLC Player', + layout : 'fit', + width : 507 + 14, + height : 384 + 56, + constrainHeader : true, + iconCls : 'eye', + resizable : true, + tbar : [ + selectChannel, + '-', + { + iconCls : 'control_play', + tooltip : 'Play', + handler : function() { + if (vlc.playlist && vlc.playlist.items.count + && !vlc.playlist.isPlaying) { + vlc.playlist.play(); + } + } + }, + { + iconCls : 'control_pause', + tooltip : 'Pause', + handler : function() { + if (vlc.playlist && vlc.playlist.items.count) { + vlc.playlist.togglePause(); + } + } + }, + { + iconCls : 'control_stop', + tooltip : 'Stop', + handler : function() { + if (vlc.playlist) { + vlc.playlist.stop(); + } + } + }, + '-', + { + iconCls : 'control_fullscreen', + tooltip : 'Fullscreen', + handler : function() { + if (vlc.playlist && vlc.playlist.isPlaying + && (vlc.VersionInfo.substr(0, 3) != '1.1')) { + vlc.video.toggleFullscreen(); + } + else if (vlc.VersionInfo.substr(0, 3) == '1.1') { + alert('Fullscreen mode is broken in VLC 1.1.x'); + } + } + }, '-', { + iconCls : 'control_volume', + tooltip : 'Volume', + disabled : true + }, ], + items : [ vlc /*, missingPlugin */] + }); + + win.on('beforeShow', function() { + win.getTopToolbar().add(slider); + win.getTopToolbar().add(new Ext.Toolbar.Spacer()); + win.getTopToolbar().add(new Ext.Toolbar.Spacer()); + win.getTopToolbar().add(new Ext.Toolbar.Spacer()); + win.getTopToolbar().add(sliderLabel); + + // check if vlc plugin wasn't initialised correctly + if (!vlc.playlist || (vlc.playlist == 'undefined')) { + vlc.style.display = 'none'; + +// missingPlugin.innerHTML = '

Embedded player could not be started.
You are probably missing VLC Mozilla plugin for your browser.

'; + + if (url) { + var channelid = url.substr(url.lastIndexOf('/')); + var streamurl = 'stream/channelid/' + channelid; + var playlisturl = 'playlist/channelid/' + channelid; +// missingPlugin.innerHTML += '

M3U Playlist

'; +// missingPlugin.innerHTML += '

Direct URL

'; + } + +// missingPlugin.style.display = 'block'; + } + else { + // check if the window was opened with an url-parameter + if (url) { + vlc.playlist.items.clear(); + vlc.playlist.add(url); + vlc.playlist.playItem(0); + + //enable yadif2x deinterlacer for vlc > 1.1 + var point1 = vlc.VersionInfo.indexOf('.'); + var point2 = vlc.VersionInfo.indexOf('.', point1 + 1); + var majVersion = vlc.VersionInfo.substring(0, point1); + var minVersion = vlc.VersionInfo.substring(point1 + 1, point2); + if ((majVersion >= 1) && (minVersion >= 1)) + vlc.video.deinterlace.enable("yadif2x"); + } + } + }); + + win.show(); }; /** @@ -222,134 +222,132 @@ tvheadend.VLC = function(url) { */ function accessUpdate(o) { - if(o.dvr == true && tvheadend.dvrpanel == null) { - tvheadend.dvrpanel = new tvheadend.dvr; - tvheadend.rootTabPanel.add(tvheadend.dvrpanel); - } + if (o.dvr == true && tvheadend.dvrpanel == null) { + tvheadend.dvrpanel = new tvheadend.dvr; + tvheadend.rootTabPanel.add(tvheadend.dvrpanel); + } - if(o.admin == true && tvheadend.confpanel == null) { - tvheadend.confpanel = new Ext.TabPanel({ - activeTab:0, - autoScroll:true, - title: 'Configuration', - iconCls: 'wrench', - items: [ - new tvheadend.miscconf, - new tvheadend.chconf, - new tvheadend.epggrab, - new tvheadend.cteditor, - new tvheadend.dvrsettings, - new tvheadend.tvadapters, - new tvheadend.iptv, - new tvheadend.acleditor, - new tvheadend.cwceditor, - new tvheadend.capmteditor] - }); - tvheadend.rootTabPanel.add(tvheadend.confpanel); - } + if (o.admin == true && tvheadend.confpanel == null) { + tvheadend.confpanel = new Ext.TabPanel({ + activeTab : 0, + autoScroll : true, + title : 'Configuration', + iconCls : 'wrench', + items : [ new tvheadend.miscconf, new tvheadend.chconf, + new tvheadend.epggrab, new tvheadend.cteditor, + new tvheadend.dvrsettings, new tvheadend.tvadapters, + new tvheadend.iptv, new tvheadend.acleditor, + new tvheadend.cwceditor, new tvheadend.capmteditor ] + }); + tvheadend.rootTabPanel.add(tvheadend.confpanel); + } - if(tvheadend.aboutPanel == null) { - tvheadend.aboutPanel = new Ext.Panel({ - border: false, - layout:'fit', - title:'About', - iconCls:'info', - autoLoad: 'about.html' - }); - tvheadend.rootTabPanel.add(tvheadend.aboutPanel); - } + if (tvheadend.aboutPanel == null) { + tvheadend.aboutPanel = new Ext.Panel({ + border : false, + layout : 'fit', + title : 'About', + iconCls : 'info', + autoLoad : 'about.html' + }); + tvheadend.rootTabPanel.add(tvheadend.aboutPanel); + } - tvheadend.rootTabPanel.doLayout(); + tvheadend.rootTabPanel.doLayout(); } - -/** -* - */ -function setServerIpPort(o) { - tvheadend.serverIp = o.ip; - tvheadend.serverPort = o.port; -} - -function makeRTSPprefix() { - return 'rtsp://' + tvheadend.serverIp + ':' + tvheadend.serverPort + '/'; -} - -/** -* -*/ -tvheadend.log = function(msg, style) { - s = style ? '
' : '
' - - sl = Ext.get('systemlog'); - e = Ext.DomHelper.append(sl, s + '
' + msg + '
'); - e.scrollIntoView('systemlog'); -} - - - /** * */ -// create application +function setServerIpPort(o) { + tvheadend.serverIp = o.ip; + tvheadend.serverPort = o.port; +} + +function makeRTSPprefix() { + return 'rtsp://' + tvheadend.serverIp + ':' + tvheadend.serverPort + '/'; +} + +/** + * + */ +tvheadend.log = function(msg, style) { + s = style ? '
' : '
' + + sl = Ext.get('systemlog'); + e = Ext.DomHelper.append(sl, s + '
' + msg + '
'); + e.scrollIntoView('systemlog'); +} + +/** + * + */ +//create application tvheadend.app = function() { - - // public space - return { - - // public methods - init: function() { - tvheadend.rootTabPanel = new Ext.TabPanel({ - region:'center', - activeTab:0, - items:[new tvheadend.epg] - }); + // public space + return { - var viewport = new Ext.Viewport({ - layout:'border', - items:[ - { - region:'south', - contentEl: 'systemlog', - split:true, - autoScroll:true, - height: 150, - minSize: 100, - maxSize: 400, - collapsible: true, - collapsed: true, - title:'System log', - margins:'0 0 0 0', - tools:[{ - id:'gear', - qtip: 'Enable debug output', - handler: function(event, toolEl, panel){ - Ext.Ajax.request({ - url: 'comet/debug', - params : { - boxid: tvheadend.boxid - } - }); - } - }] - },tvheadend.rootTabPanel - ] - }); + // public methods + init : function() { + var header = new Ext.Panel({ + split: true, + region: 'north', + height : 45, + boxMaxHeight : 45, + boxMinHeight : 45, + border: false, + html: '' + }); + + tvheadend.rootTabPanel = new Ext.TabPanel({ + region : 'center', + activeTab : 0, + items : [ new tvheadend.epg ] + }); - tvheadend.comet.on('accessUpdate', accessUpdate); + var viewport = new Ext.Viewport({ + layout : 'border', + items : [{ + region : 'south', + contentEl : 'systemlog', + split : true, + autoScroll : true, + height : 150, + minSize : 100, + maxSize : 400, + collapsible : true, + collapsed : true, + title : 'System log', + margins : '0 0 0 0', + tools : [ { + id : 'gear', + qtip : 'Enable debug output', + handler : function(event, toolEl, panel) { + Ext.Ajax.request({ + url : 'comet/debug', + params : { + boxid : tvheadend.boxid + } + }); + } + } ] + }, tvheadend.rootTabPanel, header ] + }); - tvheadend.comet.on('setServerIpPort', setServerIpPort); + tvheadend.comet.on('accessUpdate', accessUpdate); - tvheadend.comet.on('logmessage', function(m) { - tvheadend.log(m.logtxt); - }); + tvheadend.comet.on('setServerIpPort', setServerIpPort); - new tvheadend.cometPoller; + tvheadend.comet.on('logmessage', function(m) { + tvheadend.log(m.logtxt); + }); - Ext.QuickTips.init(); - } - - }; + new tvheadend.cometPoller; + + Ext.QuickTips.init(); + } + + }; }(); // end of app - + diff --git a/src/webui/static/app/v4l.js b/src/webui/static/app/v4l.js index 9cd4415d..ee73d19c 100644 --- a/src/webui/static/app/v4l.js +++ b/src/webui/static/app/v4l.js @@ -1,333 +1,321 @@ - /** * V4L adapter details */ tvheadend.v4l_adapter_general = function(adapterData) { - adapterId = adapterData.identifier; + adapterId = adapterData.identifier; - /* Conf panel */ + /* Conf panel */ - var confreader = new Ext.data.JsonReader({ - root: 'v4ladapters' - }, ['name', 'logging']); + var confreader = new Ext.data.JsonReader({ + root : 'v4ladapters' + }, [ 'name', 'logging' ]); - - function saveConfForm () { - confform.getForm().submit({ - url:'v4l/adapter/' + adapterId, - params:{'op':'save'}, - waitMsg:'Saving Data...' - }); - } - - var items = [ - { - fieldLabel: 'Adapter name', - name: 'name', - width: 250 - }, - new Ext.form.Checkbox({ - fieldLabel: 'Detailed logging', - name: 'logging' - }) - ]; - - var confform = new Ext.FormPanel({ - title:'Adapter configuration', - columnWidth: .40, - frame:true, - border:true, - disabled:true, - style:'margin:10px', - bodyStyle:'padding:5px', - labelAlign: 'right', - labelWidth: 110, - waitMsgTarget: true, - reader: confreader, - defaultType: 'textfield', - items: items, - buttons: [{ - text: 'Save', - handler: saveConfForm - }] - }); - - confform.getForm().load({ - url:'v4l/adapter/' + adapterId, - params:{'op':'load'}, - success:function(form, action) { - confform.enable(); + function saveConfForm() { + confform.getForm().submit({ + url : 'v4l/adapter/' + adapterId, + params : { + 'op' : 'save' + }, + waitMsg : 'Saving Data...' + }); } - }); - /** - * Information / capabilities panel - */ - - var infoTemplate = new Ext.XTemplate( - '

Hardware

' + - '

Device path:

{path}' + - '

Device name:

{devicename}' + - '

Status

' + - '

Currently tuned to:

{currentMux} ' - ); - + var items = [ { + fieldLabel : 'Adapter name', + name : 'name', + width : 250 + }, new Ext.form.Checkbox({ + fieldLabel : 'Detailed logging', + name : 'logging' + }) ]; - var infoPanel = new Ext.Panel({ - title:'Information and capabilities', - columnWidth: .35, - frame:true, - border:true, - style:'margin:10px', - bodyStyle:'padding:5px', - html: infoTemplate.applyTemplate(adapterData) - }); + var confform = new Ext.FormPanel({ + title : 'Adapter configuration', + columnWidth : .40, + frame : true, + border : true, + disabled : true, + style : 'margin:10px', + bodyStyle : 'padding:5px', + labelAlign : 'right', + labelWidth : 110, + waitMsgTarget : true, + reader : confreader, + defaultType : 'textfield', + items : items, + buttons : [ { + text : 'Save', + handler : saveConfForm + } ] + }); - /** - * Main adapter panel - */ - var panel = new Ext.Panel({ - title: 'General', - layout:'column', - items: [confform, infoPanel] - }); + confform.getForm().load({ + url : 'v4l/adapter/' + adapterId, + params : { + 'op' : 'load' + }, + success : function(form, action) { + confform.enable(); + } + }); + /** + * Information / capabilities panel + */ - /** - * Subscribe and react on updates for this adapter - */ - tvheadend.tvAdapterStore.on('update', function(s, r, o) { - if(r.data.identifier != adapterId) - return; - infoTemplate.overwrite(infoPanel.body, r.data); - }); + var infoTemplate = new Ext.XTemplate( + '

Hardware

' + + '

Device path:

{path}' + '

Device name:

{devicename}' + + '

Status

' + + '

Currently tuned to:

{currentMux} '); - return panel; + var infoPanel = new Ext.Panel({ + title : 'Information and capabilities', + columnWidth : .35, + frame : true, + border : true, + style : 'margin:10px', + bodyStyle : 'padding:5px', + html : infoTemplate.applyTemplate(adapterData) + }); + + /** + * Main adapter panel + */ + var panel = new Ext.Panel({ + title : 'General', + layout : 'column', + items : [ confform, infoPanel ] + }); + + /** + * Subscribe and react on updates for this adapter + */ + tvheadend.tvAdapterStore.on('update', function(s, r, o) { + if (r.data.identifier != adapterId) return; + infoTemplate.overwrite(infoPanel.body, r.data); + }); + + return panel; } - /** * V4L service grid */ tvheadend.v4l_services = function(adapterId) { - var fm = Ext.form; - - var enabledColumn = new Ext.grid.CheckColumn({ - header: "Enabled", - dataIndex: 'enabled', - width: 45 - }); + var fm = Ext.form; - var cm = new Ext.grid.ColumnModel([ - enabledColumn, - { - header: "Channel name", - dataIndex: 'channelname', - width: 150, - renderer: function(value, metadata, record, row, col, store) { - return value ? value : - 'Unmapped'; - }, - editor: new fm.ComboBox({ - store: tvheadend.channels, - allowBlank: true, - typeAhead: true, - minChars: 2, - lazyRender: true, - triggerAction: 'all', - mode: 'local', - displayField:'name' - }) - }, - { - header: "Frequency", - dataIndex: 'frequency', - width: 60, - editor: new fm.NumberField({ - minValue: 10000, - maxValue: 1000000000 - }) + var enabledColumn = new Ext.grid.CheckColumn({ + header : "Enabled", + dataIndex : 'enabled', + width : 45 + }); + + var cm = new Ext.grid.ColumnModel([ enabledColumn, { + header : "Channel name", + dataIndex : 'channelname', + width : 150, + renderer : function(value, metadata, record, row, col, store) { + return value ? value : 'Unmapped'; + }, + editor : new fm.ComboBox({ + store : tvheadend.channels, + allowBlank : true, + typeAhead : true, + minChars : 2, + lazyRender : true, + triggerAction : 'all', + mode : 'local', + displayField : 'name' + }) + }, { + header : "Frequency", + dataIndex : 'frequency', + width : 60, + editor : new fm.NumberField({ + minValue : 10000, + maxValue : 1000000000 + }) + } ]); + + cm.defaultSortable = true; + + var rec = Ext.data.Record.create([ 'id', 'enabled', 'channelname', + 'frequency' ]); + + var store = new Ext.data.JsonStore({ + root : 'entries', + fields : rec, + url : "v4l/services/" + adapterId, + autoLoad : true, + id : 'id', + baseParams : { + op : "get" + }, + listeners : { + 'update' : function(s, r, o) { + d = s.getModifiedRecords().length == 0 + saveBtn.setDisabled(d); + rejectBtn.setDisabled(d); + } + } + }); + + function addRecord() { + Ext.Ajax.request({ + url : "v4l/services/" + adapterId, + params : { + op : "create" + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', + 'Unable to generate new record'); + }, + success : function(response, options) { + var responseData = Ext.util.JSON.decode(response.responseText); + var p = new rec(responseData, responseData.id); + grid.stopEditing(); + store.insert(0, p); + grid.startEditing(0, 0); + } + }) } - ]); + ; - cm.defaultSortable = true; + function delSelected() { + var selectedKeys = grid.selModel.selections.keys; + if (selectedKeys.length > 0) { + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + } + else { + Ext.MessageBox.alert('Message', + 'Please select at least one item to delete'); + } + } + ; - var rec = Ext.data.Record.create([ - 'id', 'enabled', 'channelname', 'frequency' - ]); + function deleteRecord(btn) { + if (btn == 'yes') { + var selectedKeys = grid.selModel.selections.keys; - var store = new Ext.data.JsonStore({ - root: 'entries', - fields: rec, - url: "v4l/services/" + adapterId, - autoLoad: true, - id: 'id', - baseParams: {op: "get"}, - listeners: { - 'update': function(s, r, o) { + Ext.Ajax.request({ + url : "v4l/services/" + adapterId, + params : { + op : "delete", + entries : Ext.encode(selectedKeys) + }, + failure : function(response, options) { + Ext.MessageBox.alert('Server Error', 'Unable to delete'); + }, + success : function(response, options) { + store.reload(); + } + }) + } + } + + function saveChanges() { + var mr = store.getModifiedRecords(); + var out = new Array(); + for ( var x = 0; x < mr.length; x++) { + v = mr[x].getChanges(); + out[x] = v; + out[x].id = mr[x].id; + } + + Ext.Ajax.request({ + url : "v4l/services/" + adapterId, + params : { + op : "update", + entries : Ext.encode(out) + }, + success : function(response, options) { + store.commitChanges(); + }, + failure : function(response, options) { + Ext.MessageBox.alert('Message', response.statusText); + } + }); + } + + var delButton = new Ext.Toolbar.Button({ + tooltip : 'Delete one or more selected rows', + iconCls : 'remove', + text : 'Delete selected services', + handler : delSelected, + disabled : true + }); + + var saveBtn = new Ext.Toolbar.Button({ + tooltip : 'Save any changes made (Changed cells have red borders).', + iconCls : 'save', + text : "Save changes", + handler : saveChanges, + disabled : true + }); + + var rejectBtn = new Ext.Toolbar.Button({ + tooltip : 'Revert any changes made (Changed cells have red borders).', + iconCls : 'undo', + text : "Revert changes", + handler : function() { + store.rejectChanges(); + }, + disabled : true + }); + + var selModel = new Ext.grid.RowSelectionModel({ + singleSelect : false + }); + + var grid = new Ext.grid.EditorGridPanel({ + stripeRows : true, + title : 'Services', + plugins : [ enabledColumn ], + store : store, + clicksToEdit : 2, + cm : cm, + viewConfig : { + forceFit : true + }, + selModel : selModel, + tbar : [ + { + tooltip : 'Create a new entry on the server. ' + + 'The new entry is initially disabled so it must be enabled ' + + 'before it start taking effect.', + iconCls : 'add', + text : 'Add service', + handler : addRecord + }, '-', delButton, '-', saveBtn, rejectBtn ] + }); + + store.on('update', function(s, r, o) { d = s.getModifiedRecords().length == 0 saveBtn.setDisabled(d); rejectBtn.setDisabled(d); - } - } - }); - - - function addRecord() { - Ext.Ajax.request({ - url: "v4l/services/" + adapterId, - params: { - op:"create" - }, - failure:function(response,options){ - Ext.MessageBox.alert('Server Error', - 'Unable to generate new record'); - }, - success:function(response,options){ - var responseData = Ext.util.JSON.decode(response.responseText); - var p = new rec(responseData, responseData.id); - grid.stopEditing(); - store.insert(0, p); - grid.startEditing(0, 0); - } - }) - }; - - - function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if(selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', - deleteRecord); - } else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - }; - - function deleteRecord(btn) { - if(btn=='yes') { - var selectedKeys = grid.selModel.selections.keys; - - Ext.Ajax.request({ - url: "v4l/services/" + adapterId, - params: { - op:"delete", - entries:Ext.encode(selectedKeys) - }, - failure:function(response,options) { - Ext.MessageBox.alert('Server Error','Unable to delete'); - }, - success:function(response,options) { - store.reload(); - } - }) - } - } - - function saveChanges() { - var mr = store.getModifiedRecords(); - var out = new Array(); - for (var x = 0; x < mr.length; x++) { - v = mr[x].getChanges(); - out[x] = v; - out[x].id = mr[x].id; - } - - Ext.Ajax.request({ - url: "v4l/services/" + adapterId, - params: { - op:"update", - entries:Ext.encode(out) - }, - success:function(response,options) { - store.commitChanges(); - }, - failure:function(response,options) { - Ext.MessageBox.alert('Message',response.statusText); - } }); - } - var delButton = new Ext.Toolbar.Button({ - tooltip: 'Delete one or more selected rows', - iconCls:'remove', - text: 'Delete selected services', - handler: delSelected, - disabled: true - }); + selModel.on('selectionchange', function(self) { + delButton.setDisabled(self.getCount() == 0); + }); - var saveBtn = new Ext.Toolbar.Button({ - tooltip: 'Save any changes made (Changed cells have red borders).', - iconCls:'save', - text: "Save changes", - handler: saveChanges, - disabled: true - }); - - var rejectBtn = new Ext.Toolbar.Button({ - tooltip: 'Revert any changes made (Changed cells have red borders).', - iconCls:'undo', - text: "Revert changes", - handler: function() { - store.rejectChanges(); - }, - disabled: true - }); - - var selModel = new Ext.grid.RowSelectionModel({ - singleSelect:false - }); - - var grid = new Ext.grid.EditorGridPanel({ - stripeRows: true, - title: 'Services', - plugins: [enabledColumn], - store: store, - clicksToEdit: 2, - cm: cm, - viewConfig: {forceFit:true}, - selModel: selModel, - tbar: [{ - tooltip: 'Create a new entry on the server. '+ - 'The new entry is initially disabled so it must be enabled '+ - 'before it start taking effect.', - iconCls:'add', - text: 'Add service', - handler: addRecord - }, '-', delButton, '-', saveBtn, rejectBtn] - }); - - store.on('update', function(s, r, o) { - d = s.getModifiedRecords().length == 0 - saveBtn.setDisabled(d); - rejectBtn.setDisabled(d); - }); - - selModel.on('selectionchange', function(self) { - delButton.setDisabled(self.getCount() == 0); - }); - - return grid; + return grid; } - /** * */ -tvheadend.v4l_adapter = function(data) -{ - var panel = new Ext.TabPanel({ - border: false, - activeTab:0, - autoScroll:true, - items: [ - new tvheadend.v4l_adapter_general(data), - new tvheadend.v4l_services(data.identifier) - ] - }); - return panel; +tvheadend.v4l_adapter = function(data) { + var panel = new Ext.TabPanel({ + border : false, + activeTab : 0, + autoScroll : true, + items : [ new tvheadend.v4l_adapter_general(data), + new tvheadend.v4l_services(data.identifier) ] + }); + return panel; } diff --git a/src/webui/static/extjs/adapter/ext/ext-base-debug.js b/src/webui/static/extjs/adapter/ext/ext-base-debug.js new file mode 100644 index 00000000..29509529 --- /dev/null +++ b/src/webui/static/extjs/adapter/ext/ext-base-debug.js @@ -0,0 +1,2909 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +// for old browsers +window.undefined = window.undefined; + +/** + * @class Ext + * Ext core utilities and functions. + * @singleton + */ + +Ext = { + /** + * The version of the framework + * @type String + */ + version : '3.4.0', + versionDetail : { + major : 3, + minor : 4, + patch : 0 + } +}; + +/** + * Copies all the properties of config to obj. + * @param {Object} obj The receiver of the properties + * @param {Object} config The source of the properties + * @param {Object} defaults A different object that will also be applied for default values + * @return {Object} returns obj + * @member Ext apply + */ +Ext.apply = function(o, c, defaults){ + // no "this" reference for friendly out of scope calls + if(defaults){ + Ext.apply(o, defaults); + } + if(o && c && typeof c == 'object'){ + for(var p in c){ + o[p] = c[p]; + } + } + return o; +}; + +(function(){ + var idSeed = 0, + toString = Object.prototype.toString, + ua = navigator.userAgent.toLowerCase(), + check = function(r){ + return r.test(ua); + }, + DOC = document, + docMode = DOC.documentMode, + isStrict = DOC.compatMode == "CSS1Compat", + isOpera = check(/opera/), + isChrome = check(/\bchrome\b/), + isWebKit = check(/webkit/), + isSafari = !isChrome && check(/safari/), + isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2 + isSafari3 = isSafari && check(/version\/3/), + isSafari4 = isSafari && check(/version\/4/), + isIE = !isOpera && check(/msie/), + isIE7 = isIE && (check(/msie 7/) || docMode == 7), + isIE8 = isIE && (check(/msie 8/) && docMode != 7), + isIE9 = isIE && check(/msie 9/), + isIE6 = isIE && !isIE7 && !isIE8 && !isIE9, + isGecko = !isWebKit && check(/gecko/), + isGecko2 = isGecko && check(/rv:1\.8/), + isGecko3 = isGecko && check(/rv:1\.9/), + isBorderBox = isIE && !isStrict, + isWindows = check(/windows|win32/), + isMac = check(/macintosh|mac os x/), + isAir = check(/adobeair/), + isLinux = check(/linux/), + isSecure = /^https/i.test(window.location.protocol); + + // remove css image flicker + if(isIE6){ + try{ + DOC.execCommand("BackgroundImageCache", false, true); + }catch(e){} + } + + Ext.apply(Ext, { + /** + * URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent + * the IE insecure content warning ('about:blank', except for IE in secure mode, which is 'javascript:""'). + * @type String + */ + SSL_SECURE_URL : isSecure && isIE ? 'javascript:""' : 'about:blank', + /** + * True if the browser is in strict (standards-compliant) mode, as opposed to quirks mode + * @type Boolean + */ + isStrict : isStrict, + /** + * True if the page is running over SSL + * @type Boolean + */ + isSecure : isSecure, + /** + * True when the document is fully initialized and ready for action + * @type Boolean + */ + isReady : false, + + /** + * True if the {@link Ext.Fx} Class is available + * @type Boolean + * @property enableFx + */ + + /** + * HIGHLY EXPERIMENTAL + * True to force css based border-box model override and turning off javascript based adjustments. This is a + * runtime configuration and must be set before onReady. + * @type Boolean + */ + enableForcedBoxModel : false, + + /** + * True to automatically uncache orphaned Ext.Elements periodically (defaults to true) + * @type Boolean + */ + enableGarbageCollector : true, + + /** + * True to automatically purge event listeners during garbageCollection (defaults to false). + * @type Boolean + */ + enableListenerCollection : false, + + /** + * EXPERIMENTAL - True to cascade listener removal to child elements when an element is removed. + * Currently not optimized for performance. + * @type Boolean + */ + enableNestedListenerRemoval : false, + + /** + * Indicates whether to use native browser parsing for JSON methods. + * This option is ignored if the browser does not support native JSON methods. + * Note: Native JSON methods will not work with objects that have functions. + * Also, property names must be quoted, otherwise the data will not parse. (Defaults to false) + * @type Boolean + */ + USE_NATIVE_JSON : false, + + /** + * Copies all the properties of config to obj if they don't already exist. + * @param {Object} obj The receiver of the properties + * @param {Object} config The source of the properties + * @return {Object} returns obj + */ + applyIf : function(o, c){ + if(o){ + for(var p in c){ + if(!Ext.isDefined(o[p])){ + o[p] = c[p]; + } + } + } + return o; + }, + + /** + * Generates unique ids. If the element already has an id, it is unchanged + * @param {Mixed} el (optional) The element to generate an id for + * @param {String} prefix (optional) Id prefix (defaults "ext-gen") + * @return {String} The generated Id. + */ + id : function(el, prefix){ + el = Ext.getDom(el, true) || {}; + if (!el.id) { + el.id = (prefix || "ext-gen") + (++idSeed); + } + return el.id; + }, + + /** + *

Extends one class to create a subclass and optionally overrides members with the passed literal. This method + * also adds the function "override()" to the subclass that can be used to override members of the class.

+ * For example, to create a subclass of Ext GridPanel: + *

+MyGridPanel = Ext.extend(Ext.grid.GridPanel, {
+    constructor: function(config) {
+
+//      Create configuration for this Grid.
+        var store = new Ext.data.Store({...});
+        var colModel = new Ext.grid.ColumnModel({...});
+
+//      Create a new config object containing our computed properties
+//      *plus* whatever was in the config parameter.
+        config = Ext.apply({
+            store: store,
+            colModel: colModel
+        }, config);
+
+        MyGridPanel.superclass.constructor.call(this, config);
+
+//      Your postprocessing here
+    },
+
+    yourMethod: function() {
+        // etc.
+    }
+});
+
+ * + *

This function also supports a 3-argument call in which the subclass's constructor is + * passed as an argument. In this form, the parameters are as follows:

+ *
    + *
  • subclass : Function
    The subclass constructor.
  • + *
  • superclass : Function
    The constructor of class being extended
  • + *
  • overrides : Object
    A literal with members which are copied into the subclass's + * prototype, and are therefore shared among all instances of the new class.
  • + *
+ * + * @param {Function} superclass The constructor of class being extended. + * @param {Object} overrides

A literal with members which are copied into the subclass's + * prototype, and are therefore shared between all instances of the new class.

+ *

This may contain a special member named constructor. This is used + * to define the constructor of the new class, and is returned. If this property is + * not specified, a constructor is generated and returned which just calls the + * superclass's constructor passing on its parameters.

+ *

It is essential that you call the superclass constructor in any provided constructor. See example code.

+ * @return {Function} The subclass constructor from the overrides parameter, or a generated one if not provided. + */ + extend : function(){ + // inline overrides + var io = function(o){ + for(var m in o){ + this[m] = o[m]; + } + }; + var oc = Object.prototype.constructor; + + return function(sb, sp, overrides){ + if(typeof sp == 'object'){ + overrides = sp; + sp = sb; + sb = overrides.constructor != oc ? overrides.constructor : function(){sp.apply(this, arguments);}; + } + var F = function(){}, + sbp, + spp = sp.prototype; + + F.prototype = spp; + sbp = sb.prototype = new F(); + sbp.constructor=sb; + sb.superclass=spp; + if(spp.constructor == oc){ + spp.constructor=sp; + } + sb.override = function(o){ + Ext.override(sb, o); + }; + sbp.superclass = sbp.supr = (function(){ + return spp; + }); + sbp.override = io; + Ext.override(sb, overrides); + sb.extend = function(o){return Ext.extend(sb, o);}; + return sb; + }; + }(), + + /** + * Adds a list of functions to the prototype of an existing class, overwriting any existing methods with the same name. + * Usage:

+Ext.override(MyClass, {
+    newMethod1: function(){
+        // etc.
+    },
+    newMethod2: function(foo){
+        // etc.
+    }
+});
+
+ * @param {Object} origclass The class to override + * @param {Object} overrides The list of functions to add to origClass. This should be specified as an object literal + * containing one or more methods. + * @method override + */ + override : function(origclass, overrides){ + if(overrides){ + var p = origclass.prototype; + Ext.apply(p, overrides); + if(Ext.isIE && overrides.hasOwnProperty('toString')){ + p.toString = overrides.toString; + } + } + }, + + /** + * Creates namespaces to be used for scoping variables and classes so that they are not global. + * Specifying the last node of a namespace implicitly creates all other nodes. Usage: + *

+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+
+ * @param {String} namespace1 + * @param {String} namespace2 + * @param {String} etc + * @return {Object} The namespace object. (If multiple arguments are passed, this will be the last namespace created) + * @method namespace + */ + namespace : function(){ + var len1 = arguments.length, + i = 0, + len2, + j, + main, + ns, + sub, + current; + + for(; i < len1; ++i) { + main = arguments[i]; + ns = arguments[i].split('.'); + current = window[ns[0]]; + if (current === undefined) { + current = window[ns[0]] = {}; + } + sub = ns.slice(1); + len2 = sub.length; + for(j = 0; j < len2; ++j) { + current = current[sub[j]] = current[sub[j]] || {}; + } + } + return current; + }, + + /** + * Takes an object and converts it to an encoded URL. e.g. Ext.urlEncode({foo: 1, bar: 2}); would return "foo=1&bar=2". Optionally, property values can be arrays, instead of keys and the resulting string that's returned will contain a name/value pair for each array value. + * @param {Object} o + * @param {String} pre (optional) A prefix to add to the url encoded string + * @return {String} + */ + urlEncode : function(o, pre){ + var empty, + buf = [], + e = encodeURIComponent; + + Ext.iterate(o, function(key, item){ + empty = Ext.isEmpty(item); + Ext.each(empty ? key : item, function(val){ + buf.push('&', e(key), '=', (!Ext.isEmpty(val) && (val != key || !empty)) ? (Ext.isDate(val) ? Ext.encode(val).replace(/"/g, '') : e(val)) : ''); + }); + }); + if(!pre){ + buf.shift(); + pre = ''; + } + return pre + buf.join(''); + }, + + /** + * Takes an encoded URL and and converts it to an object. Example:

+Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
+Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2", "3", "4"]}
+
+ * @param {String} string + * @param {Boolean} overwrite (optional) Items of the same name will overwrite previous values instead of creating an an array (Defaults to false). + * @return {Object} A literal with members + */ + urlDecode : function(string, overwrite){ + if(Ext.isEmpty(string)){ + return {}; + } + var obj = {}, + pairs = string.split('&'), + d = decodeURIComponent, + name, + value; + Ext.each(pairs, function(pair) { + pair = pair.split('='); + name = d(pair[0]); + value = d(pair[1]); + obj[name] = overwrite || !obj[name] ? value : + [].concat(obj[name]).concat(value); + }); + return obj; + }, + + /** + * Appends content to the query string of a URL, handling logic for whether to place + * a question mark or ampersand. + * @param {String} url The URL to append to. + * @param {String} s The content to append to the URL. + * @return (String) The resulting URL + */ + urlAppend : function(url, s){ + if(!Ext.isEmpty(s)){ + return url + (url.indexOf('?') === -1 ? '?' : '&') + s; + } + return url; + }, + + /** + * Converts any iterable (numeric indices and a length property) into a true array + * Don't use this on strings. IE doesn't support "abc"[0] which this implementation depends on. + * For strings, use this instead: "abc".match(/./g) => [a,b,c]; + * @param {Iterable} the iterable object to be turned into a true Array. + * @return (Array) array + */ + toArray : function(){ + return isIE ? + function(a, i, j, res){ + res = []; + for(var x = 0, len = a.length; x < len; x++) { + res.push(a[x]); + } + return res.slice(i || 0, j || res.length); + } : + function(a, i, j){ + return Array.prototype.slice.call(a, i || 0, j || a.length); + }; + }(), + + isIterable : function(v){ + //check for array or arguments + if(Ext.isArray(v) || v.callee){ + return true; + } + //check for node list type + if(/NodeList|HTMLCollection/.test(toString.call(v))){ + return true; + } + //NodeList has an item and length property + //IXMLDOMNodeList has nextNode method, needs to be checked first. + return ((typeof v.nextNode != 'undefined' || v.item) && Ext.isNumber(v.length)); + }, + + /** + * Iterates an array calling the supplied function. + * @param {Array/NodeList/Mixed} array The array to be iterated. If this + * argument is not really an array, the supplied function is called once. + * @param {Function} fn The function to be called with each item. If the + * supplied function returns false, iteration stops and this method returns + * the current index. This function is called with + * the following arguments: + *
    + *
  • item : Mixed + *
    The item at the current index + * in the passed array
  • + *
  • index : Number + *
    The current index within the array
  • + *
  • allItems : Array + *
    The array passed as the first + * argument to Ext.each.
  • + *
+ * @param {Object} scope The scope (this reference) in which the specified function is executed. + * Defaults to the item at the current index + * within the passed array. + * @return See description for the fn parameter. + */ + each : function(array, fn, scope){ + if(Ext.isEmpty(array, true)){ + return; + } + if(!Ext.isIterable(array) || Ext.isPrimitive(array)){ + array = [array]; + } + for(var i = 0, len = array.length; i < len; i++){ + if(fn.call(scope || array[i], array[i], i, array) === false){ + return i; + }; + } + }, + + /** + * Iterates either the elements in an array, or each of the properties in an object. + * Note: If you are only iterating arrays, it is better to call {@link #each}. + * @param {Object/Array} object The object or array to be iterated + * @param {Function} fn The function to be called for each iteration. + * The iteration will stop if the supplied function returns false, or + * all array elements / object properties have been covered. The signature + * varies depending on the type of object being interated: + *
    + *
  • Arrays : (Object item, Number index, Array allItems) + *
    + * When iterating an array, the supplied function is called with each item.
  • + *
  • Objects : (String key, Object value, Object) + *
    + * When iterating an object, the supplied function is called with each key-value pair in + * the object, and the iterated object
  • + *
+ * @param {Object} scope The scope (this reference) in which the specified function is executed. Defaults to + * the object being iterated. + */ + iterate : function(obj, fn, scope){ + if(Ext.isEmpty(obj)){ + return; + } + if(Ext.isIterable(obj)){ + Ext.each(obj, fn, scope); + return; + }else if(typeof obj == 'object'){ + for(var prop in obj){ + if(obj.hasOwnProperty(prop)){ + if(fn.call(scope || obj, prop, obj[prop], obj) === false){ + return; + }; + } + } + } + }, + + /** + * Return the dom node for the passed String (id), dom node, or Ext.Element. + * Optional 'strict' flag is needed for IE since it can return 'name' and + * 'id' elements by using getElementById. + * Here are some examples: + *

+// gets dom node based on id
+var elDom = Ext.getDom('elId');
+// gets dom node based on the dom node
+var elDom1 = Ext.getDom(elDom);
+
+// If we don't know if we are working with an
+// Ext.Element or a dom node use Ext.getDom
+function(el){
+    var dom = Ext.getDom(el);
+    // do something with the dom node
+}
+         * 
+ * Note: the dom node to be found actually needs to exist (be rendered, etc) + * when this method is called to be successful. + * @param {Mixed} el + * @return HTMLElement + */ + getDom : function(el, strict){ + if(!el || !DOC){ + return null; + } + if (el.dom){ + return el.dom; + } else { + if (typeof el == 'string') { + var e = DOC.getElementById(el); + // IE returns elements with the 'name' and 'id' attribute. + // we do a strict check to return the element with only the id attribute + if (e && isIE && strict) { + if (el == e.getAttribute('id')) { + return e; + } else { + return null; + } + } + return e; + } else { + return el; + } + } + }, + + /** + * Returns the current document body as an {@link Ext.Element}. + * @return Ext.Element The document body + */ + getBody : function(){ + return Ext.get(DOC.body || DOC.documentElement); + }, + + /** + * Returns the current document body as an {@link Ext.Element}. + * @return Ext.Element The document body + */ + getHead : function() { + var head; + + return function() { + if (head == undefined) { + head = Ext.get(DOC.getElementsByTagName("head")[0]); + } + + return head; + }; + }(), + + /** + * Removes a DOM node from the document. + */ + /** + *

Removes this element from the document, removes all DOM event listeners, and deletes the cache reference. + * All DOM event listeners are removed from this element. If {@link Ext#enableNestedListenerRemoval} is + * true, then DOM event listeners are also removed from all child nodes. The body node + * will be ignored if passed in.

+ * @param {HTMLElement} node The node to remove + */ + removeNode : isIE && !isIE8 ? function(){ + var d; + return function(n){ + if(n && n.tagName != 'BODY'){ + (Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n, true) : Ext.EventManager.removeAll(n); + d = d || DOC.createElement('div'); + d.appendChild(n); + d.innerHTML = ''; + delete Ext.elCache[n.id]; + } + }; + }() : function(n){ + if(n && n.parentNode && n.tagName != 'BODY'){ + (Ext.enableNestedListenerRemoval) ? Ext.EventManager.purgeElement(n, true) : Ext.EventManager.removeAll(n); + n.parentNode.removeChild(n); + delete Ext.elCache[n.id]; + } + }, + + /** + *

Returns true if the passed value is empty.

+ *

The value is deemed to be empty if it is

    + *
  • null
  • + *
  • undefined
  • + *
  • an empty array
  • + *
  • a zero length string (Unless the allowBlank parameter is true)
  • + *
+ * @param {Mixed} value The value to test + * @param {Boolean} allowBlank (optional) true to allow empty strings (defaults to false) + * @return {Boolean} + */ + isEmpty : function(v, allowBlank){ + return v === null || v === undefined || ((Ext.isArray(v) && !v.length)) || (!allowBlank ? v === '' : false); + }, + + /** + * Returns true if the passed value is a JavaScript array, otherwise false. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isArray : function(v){ + return toString.apply(v) === '[object Array]'; + }, + + /** + * Returns true if the passed object is a JavaScript date object, otherwise false. + * @param {Object} object The object to test + * @return {Boolean} + */ + isDate : function(v){ + return toString.apply(v) === '[object Date]'; + }, + + /** + * Returns true if the passed value is a JavaScript Object, otherwise false. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isObject : function(v){ + return !!v && Object.prototype.toString.call(v) === '[object Object]'; + }, + + /** + * Returns true if the passed value is a JavaScript 'primitive', a string, number or boolean. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isPrimitive : function(v){ + return Ext.isString(v) || Ext.isNumber(v) || Ext.isBoolean(v); + }, + + /** + * Returns true if the passed value is a JavaScript Function, otherwise false. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isFunction : function(v){ + return toString.apply(v) === '[object Function]'; + }, + + /** + * Returns true if the passed value is a number. Returns false for non-finite numbers. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isNumber : function(v){ + return typeof v === 'number' && isFinite(v); + }, + + /** + * Returns true if the passed value is a string. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isString : function(v){ + return typeof v === 'string'; + }, + + /** + * Returns true if the passed value is a boolean. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isBoolean : function(v){ + return typeof v === 'boolean'; + }, + + /** + * Returns true if the passed value is an HTMLElement + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isElement : function(v) { + return v ? !!v.tagName : false; + }, + + /** + * Returns true if the passed value is not undefined. + * @param {Mixed} value The value to test + * @return {Boolean} + */ + isDefined : function(v){ + return typeof v !== 'undefined'; + }, + + /** + * True if the detected browser is Opera. + * @type Boolean + */ + isOpera : isOpera, + /** + * True if the detected browser uses WebKit. + * @type Boolean + */ + isWebKit : isWebKit, + /** + * True if the detected browser is Chrome. + * @type Boolean + */ + isChrome : isChrome, + /** + * True if the detected browser is Safari. + * @type Boolean + */ + isSafari : isSafari, + /** + * True if the detected browser is Safari 3.x. + * @type Boolean + */ + isSafari3 : isSafari3, + /** + * True if the detected browser is Safari 4.x. + * @type Boolean + */ + isSafari4 : isSafari4, + /** + * True if the detected browser is Safari 2.x. + * @type Boolean + */ + isSafari2 : isSafari2, + /** + * True if the detected browser is Internet Explorer. + * @type Boolean + */ + isIE : isIE, + /** + * True if the detected browser is Internet Explorer 6.x. + * @type Boolean + */ + isIE6 : isIE6, + /** + * True if the detected browser is Internet Explorer 7.x. + * @type Boolean + */ + isIE7 : isIE7, + /** + * True if the detected browser is Internet Explorer 8.x. + * @type Boolean + */ + isIE8 : isIE8, + /** + * True if the detected browser is Internet Explorer 9.x. + * @type Boolean + */ + isIE9 : isIE9, + /** + * True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox). + * @type Boolean + */ + isGecko : isGecko, + /** + * True if the detected browser uses a pre-Gecko 1.9 layout engine (e.g. Firefox 2.x). + * @type Boolean + */ + isGecko2 : isGecko2, + /** + * True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x). + * @type Boolean + */ + isGecko3 : isGecko3, + /** + * True if the detected browser is Internet Explorer running in non-strict mode. + * @type Boolean + */ + isBorderBox : isBorderBox, + /** + * True if the detected platform is Linux. + * @type Boolean + */ + isLinux : isLinux, + /** + * True if the detected platform is Windows. + * @type Boolean + */ + isWindows : isWindows, + /** + * True if the detected platform is Mac OS. + * @type Boolean + */ + isMac : isMac, + /** + * True if the detected platform is Adobe Air. + * @type Boolean + */ + isAir : isAir + }); + + /** + * Creates namespaces to be used for scoping variables and classes so that they are not global. + * Specifying the last node of a namespace implicitly creates all other nodes. Usage: + *

+Ext.namespace('Company', 'Company.data');
+Ext.namespace('Company.data'); // equivalent and preferable to above syntax
+Company.Widget = function() { ... }
+Company.data.CustomStore = function(config) { ... }
+
+ * @param {String} namespace1 + * @param {String} namespace2 + * @param {String} etc + * @return {Object} The namespace object. (If multiple arguments are passed, this will be the last namespace created) + * @method ns + */ + Ext.ns = Ext.namespace; +})(); + +Ext.ns('Ext.util', 'Ext.lib', 'Ext.data', 'Ext.supports'); + +Ext.elCache = {}; + +/** + * @class Function + * These functions are available on every Function object (any JavaScript function). + */ +Ext.apply(Function.prototype, { + /** + * Creates an interceptor function. The passed function is called before the original one. If it returns false, + * the original one is not called. The resulting function returns the results of the original function. + * The passed function is called with the parameters of the original function. Example usage: + *

+var sayHi = function(name){
+    alert('Hi, ' + name);
+}
+
+sayHi('Fred'); // alerts "Hi, Fred"
+
+// create a new function that validates input without
+// directly modifying the original function:
+var sayHiToFriend = sayHi.createInterceptor(function(name){
+    return name == 'Brian';
+});
+
+sayHiToFriend('Fred');  // no alert
+sayHiToFriend('Brian'); // alerts "Hi, Brian"
+
+ * @param {Function} fcn The function to call before the original + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + */ + createInterceptor : function(fcn, scope){ + var method = this; + return !Ext.isFunction(fcn) ? + this : + function() { + var me = this, + args = arguments; + fcn.target = me; + fcn.method = method; + return (fcn.apply(scope || me || window, args) !== false) ? + method.apply(me || window, args) : + null; + }; + }, + + /** + * Creates a callback that passes arguments[0], arguments[1], arguments[2], ... + * Call directly on any function. Example: myFunction.createCallback(arg1, arg2) + * Will create a function that is bound to those 2 args. If a specific scope is required in the + * callback, use {@link #createDelegate} instead. The function returned by createCallback always + * executes in the window scope. + *

This method is required when you want to pass arguments to a callback function. If no arguments + * are needed, you can simply pass a reference to the function as a callback (e.g., callback: myFn). + * However, if you tried to pass a function with arguments (e.g., callback: myFn(arg1, arg2)) the function + * would simply execute immediately when the code is parsed. Example usage: + *


+var sayHi = function(name){
+    alert('Hi, ' + name);
+}
+
+// clicking the button alerts "Hi, Fred"
+new Ext.Button({
+    text: 'Say Hi',
+    renderTo: Ext.getBody(),
+    handler: sayHi.createCallback('Fred')
+});
+
+ * @return {Function} The new function + */ + createCallback : function(/*args...*/){ + // make args available, in function below + var args = arguments, + method = this; + return function() { + return method.apply(window, args); + }; + }, + + /** + * Creates a delegate (callback) that sets the scope to obj. + * Call directly on any function. Example: this.myFunction.createDelegate(this, [arg1, arg2]) + * Will create a function that is automatically scoped to obj so that the this variable inside the + * callback points to obj. Example usage: + *

+var sayHi = function(name){
+    // Note this use of "this.text" here.  This function expects to
+    // execute within a scope that contains a text property.  In this
+    // example, the "this" variable is pointing to the btn object that
+    // was passed in createDelegate below.
+    alert('Hi, ' + name + '. You clicked the "' + this.text + '" button.');
+}
+
+var btn = new Ext.Button({
+    text: 'Say Hi',
+    renderTo: Ext.getBody()
+});
+
+// This callback will execute in the scope of the
+// button instance. Clicking the button alerts
+// "Hi, Fred. You clicked the "Say Hi" button."
+btn.on('click', sayHi.createDelegate(btn, ['Fred']));
+
+ * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Function} The new function + */ + createDelegate : function(obj, args, appendArgs){ + var method = this; + return function() { + var callArgs = args || arguments; + if (appendArgs === true){ + callArgs = Array.prototype.slice.call(arguments, 0); + callArgs = callArgs.concat(args); + }else if (Ext.isNumber(appendArgs)){ + callArgs = Array.prototype.slice.call(arguments, 0); // copy arguments first + var applyArgs = [appendArgs, 0].concat(args); // create method call params + Array.prototype.splice.apply(callArgs, applyArgs); // splice them in + } + return method.apply(obj || window, callArgs); + }; + }, + + /** + * Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage: + *

+var sayHi = function(name){
+    alert('Hi, ' + name);
+}
+
+// executes immediately:
+sayHi('Fred');
+
+// executes after 2 seconds:
+sayHi.defer(2000, this, ['Fred']);
+
+// this syntax is sometimes useful for deferring
+// execution of an anonymous function:
+(function(){
+    alert('Anonymous');
+}).defer(100);
+
+ * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Number} The timeout id that can be used with clearTimeout + */ + defer : function(millis, obj, args, appendArgs){ + var fn = this.createDelegate(obj, args, appendArgs); + if(millis > 0){ + return setTimeout(fn, millis); + } + fn(); + return 0; + } +}); + +/** + * @class String + * These functions are available on every String object. + */ +Ext.applyIf(String, { + /** + * Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each + * token must be unique, and must increment in the format {0}, {1}, etc. Example usage: + *

+var cls = 'my-class', text = 'Some text';
+var s = String.format('<div class="{0}">{1}</div>', cls, text);
+// s now contains the string: '<div class="my-class">Some text</div>'
+     * 
+ * @param {String} string The tokenized string to be formatted + * @param {String} value1 The value to replace token {0} + * @param {String} value2 Etc... + * @return {String} The formatted string + * @static + */ + format : function(format){ + var args = Ext.toArray(arguments, 1); + return format.replace(/\{(\d+)\}/g, function(m, i){ + return args[i]; + }); + } +}); + +/** + * @class Array + */ +Ext.applyIf(Array.prototype, { + /** + * Checks whether or not the specified object exists in the array. + * @param {Object} o The object to check for + * @param {Number} from (Optional) The index at which to begin the search + * @return {Number} The index of o in the array (or -1 if it is not found) + */ + indexOf : function(o, from){ + var len = this.length; + from = from || 0; + from += (from < 0) ? len : 0; + for (; from < len; ++from){ + if(this[from] === o){ + return from; + } + } + return -1; + }, + + /** + * Removes the specified object from the array. If the object is not found nothing happens. + * @param {Object} o The object to remove + * @return {Array} this array + */ + remove : function(o){ + var index = this.indexOf(o); + if(index != -1){ + this.splice(index, 1); + } + return this; + } +}); +/** + * @class Ext.util.TaskRunner + * Provides the ability to execute one or more arbitrary tasks in a multithreaded + * manner. Generally, you can use the singleton {@link Ext.TaskMgr} instead, but + * if needed, you can create separate instances of TaskRunner. Any number of + * separate tasks can be started at any time and will run independently of each + * other. Example usage: + *

+// Start a simple clock task that updates a div once per second
+var updateClock = function(){
+    Ext.fly('clock').update(new Date().format('g:i:s A'));
+} 
+var task = {
+    run: updateClock,
+    interval: 1000 //1 second
+}
+var runner = new Ext.util.TaskRunner();
+runner.start(task);
+
+// equivalent using TaskMgr
+Ext.TaskMgr.start({
+    run: updateClock,
+    interval: 1000
+});
+
+ * 
+ *

See the {@link #start} method for details about how to configure a task object.

+ * Also see {@link Ext.util.DelayedTask}. + * + * @constructor + * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance + * (defaults to 10) + */ +Ext.util.TaskRunner = function(interval){ + interval = interval || 10; + var tasks = [], + removeQueue = [], + id = 0, + running = false, + + // private + stopThread = function(){ + running = false; + clearInterval(id); + id = 0; + }, + + // private + startThread = function(){ + if(!running){ + running = true; + id = setInterval(runTasks, interval); + } + }, + + // private + removeTask = function(t){ + removeQueue.push(t); + if(t.onStop){ + t.onStop.apply(t.scope || t); + } + }, + + // private + runTasks = function(){ + var rqLen = removeQueue.length, + now = new Date().getTime(); + + if(rqLen > 0){ + for(var i = 0; i < rqLen; i++){ + tasks.remove(removeQueue[i]); + } + removeQueue = []; + if(tasks.length < 1){ + stopThread(); + return; + } + } + for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){ + t = tasks[i]; + itime = now - t.taskRunTime; + if(t.interval <= itime){ + rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]); + t.taskRunTime = now; + if(rt === false || t.taskRunCount === t.repeat){ + removeTask(t); + return; + } + } + if(t.duration && t.duration <= (now - t.taskStartTime)){ + removeTask(t); + } + } + }; + + /** + * Starts a new task. + * @method start + * @param {Object} task

A config object that supports the following properties:

    + *
  • run : Function

    The function to execute each time the task is invoked. The + * function will be called at each interval and passed the args argument if specified, and the + * current invocation count if not.

    + *

    If a particular scope (this reference) is required, be sure to specify it using the scope argument.

    + *

    Return false from this function to terminate the task.

  • + *
  • interval : Number
    The frequency in milliseconds with which the task + * should be invoked.
  • + *
  • args : Array
    (optional) An array of arguments to be passed to the function + * specified by run. If not specified, the current invocation count is passed.
  • + *
  • scope : Object
    (optional) The scope (this reference) in which to execute the + * run function. Defaults to the task config object.
  • + *
  • duration : Number
    (optional) The length of time in milliseconds to invoke + * the task before stopping automatically (defaults to indefinite).
  • + *
  • repeat : Number
    (optional) The number of times to invoke the task before + * stopping automatically (defaults to indefinite).
  • + *

+ *

Before each invocation, Ext injects the property taskRunCount into the task object so + * that calculations based on the repeat count can be performed.

+ * @return {Object} The task + */ + this.start = function(task){ + tasks.push(task); + task.taskStartTime = new Date().getTime(); + task.taskRunTime = 0; + task.taskRunCount = 0; + startThread(); + return task; + }; + + /** + * Stops an existing running task. + * @method stop + * @param {Object} task The task to stop + * @return {Object} The task + */ + this.stop = function(task){ + removeTask(task); + return task; + }; + + /** + * Stops all tasks that are currently running. + * @method stopAll + */ + this.stopAll = function(){ + stopThread(); + for(var i = 0, len = tasks.length; i < len; i++){ + if(tasks[i].onStop){ + tasks[i].onStop(); + } + } + tasks = []; + removeQueue = []; + }; +}; + +/** + * @class Ext.TaskMgr + * @extends Ext.util.TaskRunner + * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks. See + * {@link Ext.util.TaskRunner} for supported methods and task config properties. + *

+// Start a simple clock task that updates a div once per second
+var task = {
+    run: function(){
+        Ext.fly('clock').update(new Date().format('g:i:s A'));
+    },
+    interval: 1000 //1 second
+}
+Ext.TaskMgr.start(task);
+
+ *

See the {@link #start} method for details about how to configure a task object.

+ * @singleton + */ +Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ + var libFlyweight; + + function fly(el) { + if (!libFlyweight) { + libFlyweight = new Ext.Element.Flyweight(); + } + libFlyweight.dom = el; + return libFlyweight; + } + + (function(){ + var doc = document, + isCSS1 = doc.compatMode == "CSS1Compat", + MAX = Math.max, + ROUND = Math.round, + PARSEINT = parseInt; + + Ext.lib.Dom = { + isAncestor : function(p, c) { + var ret = false; + + p = Ext.getDom(p); + c = Ext.getDom(c); + if (p && c) { + if (p.contains) { + return p.contains(c); + } else if (p.compareDocumentPosition) { + return !!(p.compareDocumentPosition(c) & 16); + } else { + while (c = c.parentNode) { + ret = c == p || ret; + } + } + } + return ret; + }, + + getViewWidth : function(full) { + return full ? this.getDocumentWidth() : this.getViewportWidth(); + }, + + getViewHeight : function(full) { + return full ? this.getDocumentHeight() : this.getViewportHeight(); + }, + + getDocumentHeight: function() { + return MAX(!isCSS1 ? doc.body.scrollHeight : doc.documentElement.scrollHeight, this.getViewportHeight()); + }, + + getDocumentWidth: function() { + return MAX(!isCSS1 ? doc.body.scrollWidth : doc.documentElement.scrollWidth, this.getViewportWidth()); + }, + + getViewportHeight: function(){ + return Ext.isIE ? + (Ext.isStrict ? doc.documentElement.clientHeight : doc.body.clientHeight) : + self.innerHeight; + }, + + getViewportWidth : function() { + return !Ext.isStrict && !Ext.isOpera ? doc.body.clientWidth : + Ext.isIE ? doc.documentElement.clientWidth : self.innerWidth; + }, + + getY : function(el) { + return this.getXY(el)[1]; + }, + + getX : function(el) { + return this.getXY(el)[0]; + }, + + getXY : function(el) { + var p, + pe, + b, + bt, + bl, + dbd, + x = 0, + y = 0, + scroll, + hasAbsolute, + bd = (doc.body || doc.documentElement), + ret = [0,0]; + + el = Ext.getDom(el); + + if(el != bd){ + if (el.getBoundingClientRect) { + b = el.getBoundingClientRect(); + scroll = fly(document).getScroll(); + ret = [ROUND(b.left + scroll.left), ROUND(b.top + scroll.top)]; + } else { + p = el; + hasAbsolute = fly(el).isStyle("position", "absolute"); + + while (p) { + pe = fly(p); + x += p.offsetLeft; + y += p.offsetTop; + + hasAbsolute = hasAbsolute || pe.isStyle("position", "absolute"); + + if (Ext.isGecko) { + y += bt = PARSEINT(pe.getStyle("borderTopWidth"), 10) || 0; + x += bl = PARSEINT(pe.getStyle("borderLeftWidth"), 10) || 0; + + if (p != el && !pe.isStyle('overflow','visible')) { + x += bl; + y += bt; + } + } + p = p.offsetParent; + } + + if (Ext.isSafari && hasAbsolute) { + x -= bd.offsetLeft; + y -= bd.offsetTop; + } + + if (Ext.isGecko && !hasAbsolute) { + dbd = fly(bd); + x += PARSEINT(dbd.getStyle("borderLeftWidth"), 10) || 0; + y += PARSEINT(dbd.getStyle("borderTopWidth"), 10) || 0; + } + + p = el.parentNode; + while (p && p != bd) { + if (!Ext.isOpera || (p.tagName != 'TR' && !fly(p).isStyle("display", "inline"))) { + x -= p.scrollLeft; + y -= p.scrollTop; + } + p = p.parentNode; + } + ret = [x,y]; + } + } + return ret; + }, + + setXY : function(el, xy) { + (el = Ext.fly(el, '_setXY')).position(); + + var pts = el.translatePoints(xy), + style = el.dom.style, + pos; + + for (pos in pts) { + if (!isNaN(pts[pos])) { + style[pos] = pts[pos] + "px"; + } + } + }, + + setX : function(el, x) { + this.setXY(el, [x, false]); + }, + + setY : function(el, y) { + this.setXY(el, [false, y]); + } + }; +})();Ext.lib.Event = function() { + var loadComplete = false, + unloadListeners = {}, + retryCount = 0, + onAvailStack = [], + _interval, + locked = false, + win = window, + doc = document, + + // constants + POLL_RETRYS = 200, + POLL_INTERVAL = 20, + TYPE = 0, + FN = 1, + OBJ = 2, + ADJ_SCOPE = 3, + SCROLLLEFT = 'scrollLeft', + SCROLLTOP = 'scrollTop', + UNLOAD = 'unload', + MOUSEOVER = 'mouseover', + MOUSEOUT = 'mouseout', + // private + doAdd = function() { + var ret; + if (win.addEventListener) { + ret = function(el, eventName, fn, capture) { + if (eventName == 'mouseenter') { + fn = fn.createInterceptor(checkRelatedTarget); + el.addEventListener(MOUSEOVER, fn, (capture)); + } else if (eventName == 'mouseleave') { + fn = fn.createInterceptor(checkRelatedTarget); + el.addEventListener(MOUSEOUT, fn, (capture)); + } else { + el.addEventListener(eventName, fn, (capture)); + } + return fn; + }; + } else if (win.attachEvent) { + ret = function(el, eventName, fn, capture) { + el.attachEvent("on" + eventName, fn); + return fn; + }; + } else { + ret = function(){}; + } + return ret; + }(), + // private + doRemove = function(){ + var ret; + if (win.removeEventListener) { + ret = function (el, eventName, fn, capture) { + if (eventName == 'mouseenter') { + eventName = MOUSEOVER; + } else if (eventName == 'mouseleave') { + eventName = MOUSEOUT; + } + el.removeEventListener(eventName, fn, (capture)); + }; + } else if (win.detachEvent) { + ret = function (el, eventName, fn) { + el.detachEvent("on" + eventName, fn); + }; + } else { + ret = function(){}; + } + return ret; + }(); + + function checkRelatedTarget(e) { + return !elContains(e.currentTarget, pub.getRelatedTarget(e)); + } + + function elContains(parent, child) { + if(parent && parent.firstChild){ + while(child) { + if(child === parent) { + return true; + } + child = child.parentNode; + if(child && (child.nodeType != 1)) { + child = null; + } + } + } + return false; + } + + // private + function _tryPreloadAttach() { + var ret = false, + notAvail = [], + element, i, v, override, + tryAgain = !loadComplete || (retryCount > 0); + + if(!locked){ + locked = true; + + for(i = 0; i < onAvailStack.length; ++i){ + v = onAvailStack[i]; + if(v && (element = doc.getElementById(v.id))){ + if(!v.checkReady || loadComplete || element.nextSibling || (doc && doc.body)) { + override = v.override; + element = override ? (override === true ? v.obj : override) : element; + v.fn.call(element, v.obj); + onAvailStack.remove(v); + --i; + }else{ + notAvail.push(v); + } + } + } + + retryCount = (notAvail.length === 0) ? 0 : retryCount - 1; + + if (tryAgain) { + startInterval(); + } else { + clearInterval(_interval); + _interval = null; + } + ret = !(locked = false); + } + return ret; + } + + // private + function startInterval() { + if(!_interval){ + var callback = function() { + _tryPreloadAttach(); + }; + _interval = setInterval(callback, POLL_INTERVAL); + } + } + + // private + function getScroll() { + var dd = doc.documentElement, + db = doc.body; + if(dd && (dd[SCROLLTOP] || dd[SCROLLLEFT])){ + return [dd[SCROLLLEFT], dd[SCROLLTOP]]; + }else if(db){ + return [db[SCROLLLEFT], db[SCROLLTOP]]; + }else{ + return [0, 0]; + } + } + + // private + function getPageCoord (ev, xy) { + ev = ev.browserEvent || ev; + var coord = ev['page' + xy]; + if (!coord && coord !== 0) { + coord = ev['client' + xy] || 0; + + if (Ext.isIE) { + coord += getScroll()[xy == "X" ? 0 : 1]; + } + } + + return coord; + } + + var pub = { + extAdapter: true, + onAvailable : function(p_id, p_fn, p_obj, p_override) { + onAvailStack.push({ + id: p_id, + fn: p_fn, + obj: p_obj, + override: p_override, + checkReady: false }); + + retryCount = POLL_RETRYS; + startInterval(); + }, + + // This function should ALWAYS be called from Ext.EventManager + addListener: function(el, eventName, fn) { + el = Ext.getDom(el); + if (el && fn) { + if (eventName == UNLOAD) { + if (unloadListeners[el.id] === undefined) { + unloadListeners[el.id] = []; + } + unloadListeners[el.id].push([eventName, fn]); + return fn; + } + return doAdd(el, eventName, fn, false); + } + return false; + }, + + // This function should ALWAYS be called from Ext.EventManager + removeListener: function(el, eventName, fn) { + el = Ext.getDom(el); + var i, len, li, lis; + if (el && fn) { + if(eventName == UNLOAD){ + if((lis = unloadListeners[el.id]) !== undefined){ + for(i = 0, len = lis.length; i < len; i++){ + if((li = lis[i]) && li[TYPE] == eventName && li[FN] == fn){ + unloadListeners[el.id].splice(i, 1); + } + } + } + return; + } + doRemove(el, eventName, fn, false); + } + }, + + getTarget : function(ev) { + ev = ev.browserEvent || ev; + return this.resolveTextNode(ev.target || ev.srcElement); + }, + + resolveTextNode : Ext.isGecko ? function(node){ + if(!node){ + return; + } + // work around firefox bug, https://bugzilla.mozilla.org/show_bug.cgi?id=101197 + var s = HTMLElement.prototype.toString.call(node); + if(s == '[xpconnect wrapped native prototype]' || s == '[object XULElement]'){ + return; + } + return node.nodeType == 3 ? node.parentNode : node; + } : function(node){ + return node && node.nodeType == 3 ? node.parentNode : node; + }, + + getRelatedTarget : function(ev) { + ev = ev.browserEvent || ev; + return this.resolveTextNode(ev.relatedTarget || + (/(mouseout|mouseleave)/.test(ev.type) ? ev.toElement : + /(mouseover|mouseenter)/.test(ev.type) ? ev.fromElement : null)); + }, + + getPageX : function(ev) { + return getPageCoord(ev, "X"); + }, + + getPageY : function(ev) { + return getPageCoord(ev, "Y"); + }, + + + getXY : function(ev) { + return [this.getPageX(ev), this.getPageY(ev)]; + }, + + stopEvent : function(ev) { + this.stopPropagation(ev); + this.preventDefault(ev); + }, + + stopPropagation : function(ev) { + ev = ev.browserEvent || ev; + if (ev.stopPropagation) { + ev.stopPropagation(); + } else { + ev.cancelBubble = true; + } + }, + + preventDefault : function(ev) { + ev = ev.browserEvent || ev; + if (ev.preventDefault) { + ev.preventDefault(); + } else { + if (ev.keyCode) { + ev.keyCode = 0; + } + ev.returnValue = false; + } + }, + + getEvent : function(e) { + e = e || win.event; + if (!e) { + var c = this.getEvent.caller; + while (c) { + e = c.arguments[0]; + if (e && Event == e.constructor) { + break; + } + c = c.caller; + } + } + return e; + }, + + getCharCode : function(ev) { + ev = ev.browserEvent || ev; + return ev.charCode || ev.keyCode || 0; + }, + + //clearCache: function() {}, + // deprecated, call from EventManager + getListeners : function(el, eventName) { + Ext.EventManager.getListeners(el, eventName); + }, + + // deprecated, call from EventManager + purgeElement : function(el, recurse, eventName) { + Ext.EventManager.purgeElement(el, recurse, eventName); + }, + + _load : function(e) { + loadComplete = true; + + if (Ext.isIE && e !== true) { + // IE8 complains that _load is null or not an object + // so lets remove self via arguments.callee + doRemove(win, "load", arguments.callee); + } + }, + + _unload : function(e) { + var EU = Ext.lib.Event, + i, v, ul, id, len, scope; + + for (id in unloadListeners) { + ul = unloadListeners[id]; + for (i = 0, len = ul.length; i < len; i++) { + v = ul[i]; + if (v) { + try{ + scope = v[ADJ_SCOPE] ? (v[ADJ_SCOPE] === true ? v[OBJ] : v[ADJ_SCOPE]) : win; + v[FN].call(scope, EU.getEvent(e), v[OBJ]); + }catch(ex){} + } + } + }; + + Ext.EventManager._unload(); + + doRemove(win, UNLOAD, EU._unload); + } + }; + + // Initialize stuff. + pub.on = pub.addListener; + pub.un = pub.removeListener; + if (doc && doc.body) { + pub._load(true); + } else { + doAdd(win, "load", pub._load); + } + doAdd(win, UNLOAD, pub._unload); + _tryPreloadAttach(); + + return pub; +}(); +/* +* Portions of this file are based on pieces of Yahoo User Interface Library +* Copyright (c) 2007, Yahoo! Inc. All rights reserved. +* YUI licensed under the BSD License: +* http://developer.yahoo.net/yui/license.txt +*/ +Ext.lib.Ajax = function() { + var activeX = ['Msxml2.XMLHTTP.6.0', + 'Msxml2.XMLHTTP.3.0', + 'Msxml2.XMLHTTP'], + CONTENTTYPE = 'Content-Type'; + + // private + function setHeader(o) { + var conn = o.conn, + prop, + headers = {}; + + function setTheHeaders(conn, headers){ + for (prop in headers) { + if (headers.hasOwnProperty(prop)) { + conn.setRequestHeader(prop, headers[prop]); + } + } + } + + Ext.apply(headers, pub.headers, pub.defaultHeaders); + setTheHeaders(conn, headers); + delete pub.headers; + } + + // private + function createExceptionObject(tId, callbackArg, isAbort, isTimeout) { + return { + tId : tId, + status : isAbort ? -1 : 0, + statusText : isAbort ? 'transaction aborted' : 'communication failure', + isAbort: isAbort, + isTimeout: isTimeout, + argument : callbackArg + }; + } + + // private + function initHeader(label, value) { + (pub.headers = pub.headers || {})[label] = value; + } + + // private + function createResponseObject(o, callbackArg) { + var headerObj = {}, + headerStr, + conn = o.conn, + t, + s, + // see: https://prototype.lighthouseapp.com/projects/8886/tickets/129-ie-mangles-http-response-status-code-204-to-1223 + isBrokenStatus = conn.status == 1223; + + try { + headerStr = o.conn.getAllResponseHeaders(); + Ext.each(headerStr.replace(/\r\n/g, '\n').split('\n'), function(v){ + t = v.indexOf(':'); + if(t >= 0){ + s = v.substr(0, t).toLowerCase(); + if(v.charAt(t + 1) == ' '){ + ++t; + } + headerObj[s] = v.substr(t + 1); + } + }); + } catch(e) {} + + return { + tId : o.tId, + // Normalize the status and statusText when IE returns 1223, see the above link. + status : isBrokenStatus ? 204 : conn.status, + statusText : isBrokenStatus ? 'No Content' : conn.statusText, + getResponseHeader : function(header){return headerObj[header.toLowerCase()];}, + getAllResponseHeaders : function(){return headerStr;}, + responseText : conn.responseText, + responseXML : conn.responseXML, + argument : callbackArg + }; + } + + // private + function releaseObject(o) { + if (o.tId) { + pub.conn[o.tId] = null; + } + o.conn = null; + o = null; + } + + // private + function handleTransactionResponse(o, callback, isAbort, isTimeout) { + if (!callback) { + releaseObject(o); + return; + } + + var httpStatus, responseObject; + + try { + if (o.conn.status !== undefined && o.conn.status != 0) { + httpStatus = o.conn.status; + } + else { + httpStatus = 13030; + } + } + catch(e) { + httpStatus = 13030; + } + + if ((httpStatus >= 200 && httpStatus < 300) || (Ext.isIE && httpStatus == 1223)) { + responseObject = createResponseObject(o, callback.argument); + if (callback.success) { + if (!callback.scope) { + callback.success(responseObject); + } + else { + callback.success.apply(callback.scope, [responseObject]); + } + } + } + else { + switch (httpStatus) { + case 12002: + case 12029: + case 12030: + case 12031: + case 12152: + case 13030: + responseObject = createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false), isTimeout); + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + break; + default: + responseObject = createResponseObject(o, callback.argument); + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + } + } + + releaseObject(o); + responseObject = null; + } + + function checkResponse(o, callback, conn, tId, poll, cbTimeout){ + if (conn && conn.readyState == 4) { + clearInterval(poll[tId]); + poll[tId] = null; + + if (cbTimeout) { + clearTimeout(pub.timeout[tId]); + pub.timeout[tId] = null; + } + handleTransactionResponse(o, callback); + } + } + + function checkTimeout(o, callback){ + pub.abort(o, callback, true); + } + + + // private + function handleReadyState(o, callback){ + callback = callback || {}; + var conn = o.conn, + tId = o.tId, + poll = pub.poll, + cbTimeout = callback.timeout || null; + + if (cbTimeout) { + pub.conn[tId] = conn; + pub.timeout[tId] = setTimeout(checkTimeout.createCallback(o, callback), cbTimeout); + } + poll[tId] = setInterval(checkResponse.createCallback(o, callback, conn, tId, poll, cbTimeout), pub.pollInterval); + } + + // private + function asyncRequest(method, uri, callback, postData) { + var o = getConnectionObject() || null; + + if (o) { + o.conn.open(method, uri, true); + + if (pub.useDefaultXhrHeader) { + initHeader('X-Requested-With', pub.defaultXhrHeader); + } + + if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])){ + initHeader(CONTENTTYPE, pub.defaultPostHeader); + } + + if (pub.defaultHeaders || pub.headers) { + setHeader(o); + } + + handleReadyState(o, callback); + o.conn.send(postData || null); + } + return o; + } + + // private + function getConnectionObject() { + var o; + + try { + if (o = createXhrObject(pub.transactionId)) { + pub.transactionId++; + } + } catch(e) { + } finally { + return o; + } + } + + // private + function createXhrObject(transactionId) { + var http; + + try { + http = new XMLHttpRequest(); + } catch(e) { + for (var i = Ext.isIE6 ? 1 : 0; i < activeX.length; ++i) { + try { + http = new ActiveXObject(activeX[i]); + break; + } catch(e) {} + } + } finally { + return {conn : http, tId : transactionId}; + } + } + + var pub = { + request : function(method, uri, cb, data, options) { + if(options){ + var me = this, + xmlData = options.xmlData, + jsonData = options.jsonData, + hs; + + Ext.applyIf(me, options); + + if(xmlData || jsonData){ + hs = me.headers; + if(!hs || !hs[CONTENTTYPE]){ + initHeader(CONTENTTYPE, xmlData ? 'text/xml' : 'application/json'); + } + data = xmlData || (!Ext.isPrimitive(jsonData) ? Ext.encode(jsonData) : jsonData); + } + } + return asyncRequest(method || options.method || "POST", uri, cb, data); + }, + + serializeForm : function(form) { + var fElements = form.elements || (document.forms[form] || Ext.getDom(form)).elements, + hasSubmit = false, + encoder = encodeURIComponent, + name, + data = '', + type, + hasValue; + + Ext.each(fElements, function(element){ + name = element.name; + type = element.type; + + if (!element.disabled && name) { + if (/select-(one|multiple)/i.test(type)) { + Ext.each(element.options, function(opt){ + if (opt.selected) { + hasValue = opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified; + data += String.format("{0}={1}&", encoder(name), encoder(hasValue ? opt.value : opt.text)); + } + }); + } else if (!(/file|undefined|reset|button/i.test(type))) { + if (!(/radio|checkbox/i.test(type) && !element.checked) && !(type == 'submit' && hasSubmit)) { + data += encoder(name) + '=' + encoder(element.value) + '&'; + hasSubmit = /submit/i.test(type); + } + } + } + }); + return data.substr(0, data.length - 1); + }, + + useDefaultHeader : true, + defaultPostHeader : 'application/x-www-form-urlencoded; charset=UTF-8', + useDefaultXhrHeader : true, + defaultXhrHeader : 'XMLHttpRequest', + poll : {}, + timeout : {}, + conn: {}, + pollInterval : 50, + transactionId : 0, + +// This is never called - Is it worth exposing this? +// setProgId : function(id) { +// activeX.unshift(id); +// }, + +// This is never called - Is it worth exposing this? +// setDefaultPostHeader : function(b) { +// this.useDefaultHeader = b; +// }, + +// This is never called - Is it worth exposing this? +// setDefaultXhrHeader : function(b) { +// this.useDefaultXhrHeader = b; +// }, + +// This is never called - Is it worth exposing this? +// setPollingInterval : function(i) { +// if (typeof i == 'number' && isFinite(i)) { +// this.pollInterval = i; +// } +// }, + +// This is never called - Is it worth exposing this? +// resetDefaultHeaders : function() { +// this.defaultHeaders = null; +// }, + + abort : function(o, callback, isTimeout) { + var me = this, + tId = o.tId, + isAbort = false; + + if (me.isCallInProgress(o)) { + o.conn.abort(); + clearInterval(me.poll[tId]); + me.poll[tId] = null; + clearTimeout(pub.timeout[tId]); + me.timeout[tId] = null; + + handleTransactionResponse(o, callback, (isAbort = true), isTimeout); + } + return isAbort; + }, + + isCallInProgress : function(o) { + // if there is a connection and readyState is not 0 or 4 + return o.conn && !{0:true,4:true}[o.conn.readyState]; + } + }; + return pub; +}();(function(){ + var EXTLIB = Ext.lib, + noNegatives = /width|height|opacity|padding/i, + offsetAttribute = /^((width|height)|(top|left))$/, + defaultUnit = /width|height|top$|bottom$|left$|right$/i, + offsetUnit = /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i, + isset = function(v){ + return typeof v !== 'undefined'; + }, + now = function(){ + return new Date(); + }; + + EXTLIB.Anim = { + motion : function(el, args, duration, easing, cb, scope) { + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); + }, + + run : function(el, args, duration, easing, cb, scope, type) { + type = type || Ext.lib.AnimBase; + if (typeof easing == "string") { + easing = Ext.lib.Easing[easing]; + } + var anim = new type(el, args, duration, easing); + anim.animateX(function() { + if(Ext.isFunction(cb)){ + cb.call(scope); + } + }); + return anim; + } + }; + + EXTLIB.AnimBase = function(el, attributes, duration, method) { + if (el) { + this.init(el, attributes, duration, method); + } + }; + + EXTLIB.AnimBase.prototype = { + doMethod: function(attr, start, end) { + var me = this; + return me.method(me.curFrame, start, end - start, me.totalFrames); + }, + + + setAttr: function(attr, val, unit) { + if (noNegatives.test(attr) && val < 0) { + val = 0; + } + Ext.fly(this.el, '_anim').setStyle(attr, val + unit); + }, + + + getAttr: function(attr) { + var el = Ext.fly(this.el), + val = el.getStyle(attr), + a = offsetAttribute.exec(attr) || []; + + if (val !== 'auto' && !offsetUnit.test(val)) { + return parseFloat(val); + } + + return (!!(a[2]) || (el.getStyle('position') == 'absolute' && !!(a[3]))) ? el.dom['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)] : 0; + }, + + + getDefaultUnit: function(attr) { + return defaultUnit.test(attr) ? 'px' : ''; + }, + + animateX : function(callback, scope) { + var me = this, + f = function() { + me.onComplete.removeListener(f); + if (Ext.isFunction(callback)) { + callback.call(scope || me, me); + } + }; + me.onComplete.addListener(f, me); + me.animate(); + }, + + + setRunAttr: function(attr) { + var me = this, + a = this.attributes[attr], + to = a.to, + by = a.by, + from = a.from, + unit = a.unit, + ra = (this.runAttrs[attr] = {}), + end; + + if (!isset(to) && !isset(by)){ + return false; + } + + var start = isset(from) ? from : me.getAttr(attr); + if (isset(to)) { + end = to; + }else if(isset(by)) { + if (Ext.isArray(start)){ + end = []; + for(var i=0,len=start.length; i 0 && isFinite(tweak)){ + if(tween.curFrame + tweak >= frames){ + tweak = frames - (frame + 1); + } + tween.curFrame += tweak; + } + }; + }; + + EXTLIB.Bezier = new function() { + + this.getPosition = function(points, t) { + var n = points.length, + tmp = [], + c = 1 - t, + i, + j; + + for (i = 0; i < n; ++i) { + tmp[i] = [points[i][0], points[i][1]]; + } + + for (j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = c * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = c * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; + }; + + + EXTLIB.Easing = { + easeNone: function (t, b, c, d) { + return c * t / d + b; + }, + + + easeIn: function (t, b, c, d) { + return c * (t /= d) * t + b; + }, + + + easeOut: function (t, b, c, d) { + return -c * (t /= d) * (t - 2) + b; + } + }; + + (function() { + EXTLIB.Motion = function(el, attributes, duration, method) { + if (el) { + EXTLIB.Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Ext.extend(EXTLIB.Motion, Ext.lib.AnimBase); + + var superclass = EXTLIB.Motion.superclass, + pointsRe = /^points$/i; + + Ext.apply(EXTLIB.Motion.prototype, { + setAttr: function(attr, val, unit){ + var me = this, + setAttr = superclass.setAttr; + + if (pointsRe.test(attr)) { + unit = unit || 'px'; + setAttr.call(me, 'left', val[0], unit); + setAttr.call(me, 'top', val[1], unit); + } else { + setAttr.call(me, attr, val, unit); + } + }, + + getAttr: function(attr){ + var me = this, + getAttr = superclass.getAttr; + + return pointsRe.test(attr) ? [getAttr.call(me, 'left'), getAttr.call(me, 'top')] : getAttr.call(me, attr); + }, + + doMethod: function(attr, start, end){ + var me = this; + + return pointsRe.test(attr) + ? EXTLIB.Bezier.getPosition(me.runAttrs[attr], me.method(me.curFrame, 0, 100, me.totalFrames) / 100) + : superclass.doMethod.call(me, attr, start, end); + }, + + setRunAttr: function(attr){ + if(pointsRe.test(attr)){ + + var me = this, + el = this.el, + points = this.attributes.points, + control = points.control || [], + from = points.from, + to = points.to, + by = points.by, + DOM = EXTLIB.Dom, + start, + i, + end, + len, + ra; + + + if(control.length > 0 && !Ext.isArray(control[0])){ + control = [control]; + }else{ + /* + var tmp = []; + for (i = 0,len = control.length; i < len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + */ + } + + Ext.fly(el, '_anim').position(); + DOM.setXY(el, isset(from) ? from : DOM.getXY(el)); + start = me.getAttr('points'); + + + if(isset(to)){ + end = translateValues.call(me, to, start); + for (i = 0,len = control.length; i < len; ++i) { + control[i] = translateValues.call(me, control[i], start); + } + } else if (isset(by)) { + end = [start[0] + by[0], start[1] + by[1]]; + + for (i = 0,len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + ra = this.runAttrs[attr] = [start]; + if (control.length > 0) { + ra = ra.concat(control); + } + + ra[ra.length] = end; + }else{ + superclass.setRunAttr.call(this, attr); + } + } + }); + + var translateValues = function(val, start) { + var pageXY = EXTLIB.Dom.getXY(this.el); + return [val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1]]; + }; + })(); +})();// Easing functions +(function(){ + // shortcuts to aid compression + var abs = Math.abs, + pi = Math.PI, + asin = Math.asin, + pow = Math.pow, + sin = Math.sin, + EXTLIB = Ext.lib; + + Ext.apply(EXTLIB.Easing, { + + easeBoth: function (t, b, c, d) { + return ((t /= d / 2) < 1) ? c / 2 * t * t + b : -c / 2 * ((--t) * (t - 2) - 1) + b; + }, + + easeInStrong: function (t, b, c, d) { + return c * (t /= d) * t * t * t + b; + }, + + easeOutStrong: function (t, b, c, d) { + return -c * ((t = t / d - 1) * t * t * t - 1) + b; + }, + + easeBothStrong: function (t, b, c, d) { + return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t + b : -c / 2 * ((t -= 2) * t * t * t - 2) + b; + }, + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0 || (t /= d) == 1) { + return t == 0 ? b : b + c; + } + p = p || (d * .3); + + var s; + if (a >= abs(c)) { + s = p / (2 * pi) * asin(c / a); + } else { + a = c; + s = p / 4; + } + + return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b; + + }, + + elasticOut: function (t, b, c, d, a, p) { + if (t == 0 || (t /= d) == 1) { + return t == 0 ? b : b + c; + } + p = p || (d * .3); + + var s; + if (a >= abs(c)) { + s = p / (2 * pi) * asin(c / a); + } else { + a = c; + s = p / 4; + } + + return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b; + }, + + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0 || (t /= d / 2) == 2) { + return t == 0 ? b : b + c; + } + + p = p || (d * (.3 * 1.5)); + + var s; + if (a >= abs(c)) { + s = p / (2 * pi) * asin(c / a); + } else { + a = c; + s = p / 4; + } + + return t < 1 ? + -.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b : + a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b; + }, + + backIn: function (t, b, c, d, s) { + s = s || 1.70158; + return c * (t /= d) * t * ((s + 1) * t - s) + b; + }, + + + backOut: function (t, b, c, d, s) { + if (!s) { + s = 1.70158; + } + return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; + }, + + + backBoth: function (t, b, c, d, s) { + s = s || 1.70158; + + return ((t /= d / 2 ) < 1) ? + c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : + c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; + }, + + + bounceIn: function (t, b, c, d) { + return c - EXTLIB.Easing.bounceOut(d - t, 0, c, d) + b; + }, + + + bounceOut: function (t, b, c, d) { + if ((t /= d) < (1 / 2.75)) { + return c * (7.5625 * t * t) + b; + } else if (t < (2 / 2.75)) { + return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b; + } else if (t < (2.5 / 2.75)) { + return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b; + } + return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b; + }, + + + bounceBoth: function (t, b, c, d) { + return (t < d / 2) ? + EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b : + EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b; + } + }); +})(); + +(function() { + var EXTLIB = Ext.lib; + // Color Animation + EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) { + return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim); + }; + + EXTLIB.ColorAnim = function(el, attributes, duration, method) { + EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase); + + var superclass = EXTLIB.ColorAnim.superclass, + colorRE = /color$/i, + transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/, + rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, + hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, + hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i, + isset = function(v){ + return typeof v !== 'undefined'; + }; + + // private + function parseColor(s) { + var pi = parseInt, + base, + out = null, + c; + + if (s.length == 3) { + return s; + } + + Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){ + base = (idx % 2 == 0) ? 16 : 10; + c = re.exec(s); + if(c && c.length == 4){ + out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)]; + return false; + } + }); + return out; + } + + Ext.apply(EXTLIB.ColorAnim.prototype, { + getAttr : function(attr) { + var me = this, + el = me.el, + val; + if(colorRE.test(attr)){ + while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){ + el = el.parentNode; + val = "fff"; + } + }else{ + val = superclass.getAttr.call(me, attr); + } + return val; + }, + + doMethod : function(attr, start, end) { + var me = this, + val, + floor = Math.floor, + i, + len, + v; + + if(colorRE.test(attr)){ + val = []; + end = end || []; + + for(i = 0, len = start.length; i < len; i++) { + v = start[i]; + val[i] = superclass.doMethod.call(me, attr, v, end[i]); + } + val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')'; + }else{ + val = superclass.doMethod.call(me, attr, start, end); + } + return val; + }, + + setRunAttr : function(attr) { + var me = this, + a = me.attributes[attr], + to = a.to, + by = a.by, + ra; + + superclass.setRunAttr.call(me, attr); + ra = me.runAttrs[attr]; + if(colorRE.test(attr)){ + var start = parseColor(ra.start), + end = parseColor(ra.end); + + if(!isset(to) && isset(by)){ + end = parseColor(by); + for(var i=0,len=start.length; i-1,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isGecko3=!isSafari&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o)};return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i=0){L=G[P]}if(!S||!L){return false}this.doRemove(S,O,L[this.WFN],false);delete G[P][this.WFN];delete G[P][this.FN];G.splice(P,1);return true},getTarget:function(N,M){N=N.browserEvent||N;var L=N.target||N.srcElement;return this.resolveTextNode(L)},resolveTextNode:function(L){if(Ext.isSafari&&L&&3==L.nodeType){return L.parentNode}else{return L}},getPageX:function(M){M=M.browserEvent||M;var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(Ext.isIE){L+=this.getScroll()[1]}}return L},getPageY:function(L){L=L.browserEvent||L;var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(Ext.isIE){M+=this.getScroll()[0]}}return M},getXY:function(L){L=L.browserEvent||L;return[this.getPageX(L),this.getPageY(L)]},getRelatedTarget:function(M){M=M.browserEvent||M;var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement}else{if(M.type=="mouseover"){L=M.fromElement}}}return this.resolveTextNode(L)},getTime:function(N){N=N.browserEvent||N;if(!N.time){var M=new Date().getTime();try{N.time=M}catch(L){this.lastError=L;return M}}return N.time},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L)},stopPropagation:function(L){L=L.browserEvent||L;if(L.stopPropagation){L.stopPropagation()}else{L.cancelBubble=true}},preventDefault:function(L){L=L.browserEvent||L;if(L.preventDefault){L.preventDefault()}else{L.returnValue=false}},getEvent:function(M){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break}N=N.caller}}return L},getCharCode:function(L){L=L.browserEvent||L;return L.charCode||L.keyCode||0},_getCacheIndex:function(Q,N,P){for(var O=0,M=G.length;O0)}var Q=[];for(var M=0,L=H.length;M0){for(var Q=0,S=T.length;Q0){O=G.length;while(O){N=O-1;M=G[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N)}O=O-1}M=null;R.clearCache()}R.doRemove(window,"unload",R._unload)},getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft]}else{if(M){return[M.scrollTop,M.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(O,M,N,L){O.addEventListener(M,N,(L))}}else{if(window.attachEvent){return function(O,M,N,L){O.attachEvent("on"+M,N)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(O,M,N,L){O.removeEventListener(M,N,(L))}}else{if(window.detachEvent){return function(N,L,M){N.detachEvent("on"+L,M)}}else{return function(){}}}}()}}();var D=Ext.lib.Event;D.on=D.addListener;D.un=D.removeListener;if(document&&document.body){D._load()}else{D.doAdd(window,"load",D._load)}D.doAdd(window,"unload",D._unload);D._tryPreloadAttach();Ext.lib.Ajax={request:function(K,I,E,J,F){if(F){var G=F.headers;if(G){for(var H in G){if(G.hasOwnProperty(H)){this.initHeader(H,G[H],false)}}}if(F.xmlData){if(!G||!G["Content-Type"]){this.initHeader("Content-Type","text/xml",false)}K=(K?K:(F.method?F.method:"POST"));J=F.xmlData}else{if(F.jsonData){if(!G||!G["Content-Type"]){this.initHeader("Content-Type","application/json",false)}K=(K?K:(F.method?F.method:"POST"));J=typeof F.jsonData=="object"?Ext.encode(F.jsonData):F.jsonData}}}return this.asyncRequest(K,I,E,J)},serializeForm:function(F){if(typeof F=="string"){F=(document.getElementById(F)||document.forms[F])}var G,E,H,J,K="",M=false;for(var L=0;L=200&&G<300){F=this.createResponseObject(I,J.argument);if(J.success){if(!J.scope){J.success(F)}else{J.success.apply(J.scope,[F])}}}else{switch(G){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:F=this.createExceptionObject(I.tId,J.argument,(E?E:false));if(J.failure){if(!J.scope){J.failure(F)}else{J.failure.apply(J.scope,[F])}}break;default:F=this.createResponseObject(I,J.argument);if(J.failure){if(!J.scope){J.failure(F)}else{J.failure.apply(J.scope,[F])}}}}this.releaseObject(I);F=null},createResponseObject:function(E,K){var H={};var M={};try{var G=E.conn.getAllResponseHeaders();var J=G.split("\n");for(var I=0;I=this.left&&E.right<=this.right&&E.top>=this.top&&E.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(I){var G=Math.max(this.top,I.top);var H=Math.min(this.right,I.right);var E=Math.min(this.bottom,I.bottom);var F=Math.max(this.left,I.left);if(E>=G&&H>=F){return new Ext.lib.Region(G,H,E,F)}else{return null}},union:function(I){var G=Math.min(this.top,I.top);var H=Math.max(this.right,I.right);var E=Math.max(this.bottom,I.bottom);var F=Math.min(this.left,I.left);return new Ext.lib.Region(G,H,E,F)},constrainTo:function(E){this.top=this.top.constrain(E.top,E.bottom);this.bottom=this.bottom.constrain(E.top,E.bottom);this.left=this.left.constrain(E.left,E.right);this.right=this.right.constrain(E.left,E.right);return this},adjust:function(G,F,E,H){this.top+=G;this.left+=F;this.right+=H;this.bottom+=E;return this}};Ext.lib.Region.getRegion=function(H){var J=Ext.lib.Dom.getXY(H);var G=J[1];var I=J[0]+H.offsetWidth;var E=J[1]+H.offsetHeight;var F=J[0];return new Ext.lib.Region(G,I,E,F)};Ext.lib.Point=function(E,F){if(Ext.isArray(E)){F=E[1];E=E[0]}this.x=this.right=this.left=this[0]=E;this.y=this.top=this.bottom=this[1]=F};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(H,F,I,J,E,G){return this.run(H,F,I,J,E,G,Ext.lib.Scroll)},motion:function(H,F,I,J,E,G){return this.run(H,F,I,J,E,G,Ext.lib.Motion)},color:function(H,F,I,J,E,G){return this.run(H,F,I,J,E,G,Ext.lib.ColorAnim)},run:function(I,F,K,L,E,H,G){G=G||Ext.lib.AnimBase;if(typeof L=="string"){L=Ext.lib.Easing[L]}var J=new G(I,F,K,L);J.animateX(function(){Ext.callback(E,H)});return J}};function C(E){if(!B){B=new Ext.Element.Flyweight()}B.dom=E;return B}if(Ext.isIE){function A(){var E=Function.prototype;delete E.createSequence;delete E.defer;delete E.createDelegate;delete E.createCallback;delete E.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}Ext.lib.AnimBase=function(F,E,G,H){if(F){this.init(F,E,G,H)}};Ext.lib.AnimBase.prototype={toString:function(){var E=this.getEl();var F=E.id||E.tagName;return("Anim "+F)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(E,G,F){return this.method(this.currentFrame,G,F-G,this.totalFrames)},setAttribute:function(E,G,F){if(this.patterns.noNegatives.test(E)){G=(G>0)?G:0}Ext.fly(this.getEl(),"_anim").setStyle(E,G+F)},getAttribute:function(E){var G=this.getEl();var I=C(G).getStyle(E);if(I!=="auto"&&!this.patterns.offsetUnit.test(I)){return parseFloat(I)}var F=this.patterns.offsetAttribute.exec(E)||[];var J=!!(F[3]);var H=!!(F[2]);if(H||(C(G).getStyle("position")=="absolute"&&J)){I=G["offset"+F[0].charAt(0).toUpperCase()+F[0].substr(1)]}else{I=0}return I},getDefaultUnit:function(E){if(this.patterns.defaultUnit.test(E)){return"px"}return""},animateX:function(G,E){var F=function(){this.onComplete.removeListener(F);if(typeof G=="function"){G.call(E||this,this)}};this.onComplete.addListener(F,this);this.animate()},setRuntimeAttribute:function(F){var K;var G;var H=this.attributes;this.runtimeAttributes[F]={};var J=function(L){return(typeof L!=="undefined")};if(!J(H[F]["to"])&&!J(H[F]["by"])){return false}K=(J(H[F]["from"]))?H[F]["from"]:this.getAttribute(F);if(J(H[F]["to"])){G=H[F]["to"]}else{if(J(H[F]["by"])){if(K.constructor==Array){G=[];for(var I=0,E=K.length;I0&&isFinite(O)){if(K.currentFrame+O>=N){O=N-(M+1)}K.currentFrame+=O}}};Ext.lib.Bezier=new function(){this.getPosition=function(I,H){var J=I.length;var G=[];for(var F=0;F0&&!Ext.isArray(O[0])){O=[O]}else{var N=[];for(P=0,R=O.length;P0){this.runtimeAttributes[S]=this.runtimeAttributes[S].concat(O)}this.runtimeAttributes[S][this.runtimeAttributes[S].length]=L}else{I.setRuntimeAttribute.call(this,S)}};var E=function(J,L){var K=Ext.lib.Dom.getXY(this.getEl());J=[J[0]-K[0]+L[0],J[1]-K[1]+L[1]];return J};var G=function(J){return(typeof J!=="undefined")}})();(function(){Ext.lib.Scroll=function(I,H,J,K){if(I){Ext.lib.Scroll.superclass.constructor.call(this,I,H,J,K)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var F=Ext.lib;var G=F.Scroll.superclass;var E=F.Scroll.prototype;E.toString=function(){var H=this.getEl();var I=H.id||H.tagName;return("Scroll "+I)};E.doMethod=function(H,K,I){var J=null;if(H=="scroll"){J=[this.method(this.currentFrame,K[0],I[0]-K[0],this.totalFrames),this.method(this.currentFrame,K[1],I[1]-K[1],this.totalFrames)]}else{J=G.doMethod.call(this,H,K,I)}return J};E.getAttribute=function(H){var J=null;var I=this.getEl();if(H=="scroll"){J=[I.scrollLeft,I.scrollTop]}else{J=G.getAttribute.call(this,H)}return J};E.setAttribute=function(H,K,J){var I=this.getEl();if(H=="scroll"){I.scrollLeft=K[0];I.scrollTop=K[1]}else{G.setAttribute.call(this,H,K,J)}}})()})(); +/* + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +window.undefined=window.undefined;Ext={version:"3.4.0",versionDetail:{major:3,minor:4,patch:0}};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,u=Object.prototype.toString,v=navigator.userAgent.toLowerCase(),A=function(e){return e.test(v)},i=document,n=i.documentMode,l=i.compatMode=="CSS1Compat",C=A(/opera/),h=A(/\bchrome\b/),w=A(/webkit/),z=!h&&A(/safari/),f=z&&A(/applewebkit\/4/),b=z&&A(/version\/3/),D=z&&A(/version\/4/),t=!C&&A(/msie/),r=t&&(A(/msie 7/)||n==7),q=t&&(A(/msie 8/)&&n!=7),p=t&&A(/msie 9/),s=t&&!r&&!q&&!p,o=!w&&A(/gecko/),d=o&&A(/rv:1\.8/),a=o&&A(/rv:1\.9/),x=t&&!l,B=A(/windows|win32/),k=A(/macintosh|mac os x/),j=A(/adobeair/),m=A(/linux/),c=/^https/i.test(window.location.protocol);if(s){try{i.execCommand("BackgroundImageCache",false,true)}catch(y){}}Ext.apply(Ext,{SSL_SECURE_URL:c&&t?'javascript:""':"about:blank",isStrict:l,isSecure:c,isReady:false,enableForcedBoxModel:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(E,F){if(E){for(var e in F){if(!Ext.isDefined(E[e])){E[e]=F[e]}}}return E},id:function(e,E){e=Ext.getDom(e,true)||{};if(!e.id){e.id=(E||"ext-gen")+(++g)}return e.id},extend:function(){var E=function(G){for(var F in G){this[F]=G[F]}};var e=Object.prototype.constructor;return function(L,I,K){if(typeof I=="object"){K=I;I=L;L=K.constructor!=e?K.constructor:function(){I.apply(this,arguments)}}var H=function(){},J,G=I.prototype;H.prototype=G;J=L.prototype=new H();J.constructor=L;L.superclass=G;if(G.constructor==e){G.constructor=I}L.override=function(F){Ext.override(L,F)};J.superclass=J.supr=(function(){return G});J.override=E;Ext.override(L,K);L.extend=function(F){return Ext.extend(L,F)};return L}}(),override:function(e,F){if(F){var E=e.prototype;Ext.apply(E,F);if(Ext.isIE&&F.hasOwnProperty("toString")){E.toString=F.toString}}},namespace:function(){var G=arguments.length,H=0,E,F,e,J,I,K;for(;H0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c0){for(var p=0;p0);if(!A){A=true;for(I=0;I=0){B=s.substr(0,A).toLowerCase();if(s.charAt(A+1)==" "){++A}C[B]=s.substr(A+1)}})}catch(z){}return{tId:u.tId,status:v?204:w.status,statusText:v?"No Content":w.statusText,getResponseHeader:function(s){return C[s.toLowerCase()]},getAllResponseHeaders:function(){return x},responseText:w.responseText,responseXML:w.responseXML,argument:y}}function o(s){if(s.tId){k.conn[s.tId]=null}s.conn=null;s=null}function f(x,y,t,s){if(!y){o(x);return}var v,u;try{if(x.conn.status!==undefined&&x.conn.status!=0){v=x.conn.status}else{v=13030}}catch(w){v=13030}if((v>=200&&v<300)||(Ext.isIE&&v==1223)){u=p(x,y.argument);if(y.success){if(!y.scope){y.success(u)}else{y.success.apply(y.scope,[u])}}}else{switch(v){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:u=e(x.tId,y.argument,(t?t:false),s);if(y.failure){if(!y.scope){y.failure(u)}else{y.failure.apply(y.scope,[u])}}break;default:u=p(x,y.argument);if(y.failure){if(!y.scope){y.failure(u)}else{y.failure.apply(y.scope,[u])}}}}o(x);u=null}function m(u,x,s,w,t,v){if(s&&s.readyState==4){clearInterval(t[w]);t[w]=null;if(v){clearTimeout(k.timeout[w]);k.timeout[w]=null}f(u,x)}}function r(s,t){k.abort(s,t,true)}function n(u,x){x=x||{};var s=u.conn,w=u.tId,t=k.poll,v=x.timeout||null;if(v){k.conn[w]=s;k.timeout[w]=setTimeout(r.createCallback(u,x),v)}t[w]=setInterval(m.createCallback(u,x,s,w,t,v),k.pollInterval)}function i(w,t,v,s){var u=l()||null;if(u){u.conn.open(w,t,true);if(k.useDefaultXhrHeader){j("X-Requested-With",k.defaultXhrHeader)}if(s&&k.useDefaultHeader&&(!k.headers||!k.headers[d])){j(d,k.defaultPostHeader)}if(k.defaultHeaders||k.headers){h(u)}n(u,v);u.conn.send(s||null)}return u}function l(){var t;try{if(t=q(k.transactionId)){k.transactionId++}}catch(s){}finally{return t}}function q(v){var s;try{s=new XMLHttpRequest()}catch(u){for(var t=Ext.isIE6?1:0;t0&&isFinite(w)){if(r.curFrame+w>=v){w=v-(u+1)}r.curFrame+=w}}};g.Bezier=new function(){this.getPosition=function(p,o){var r=p.length,m=[],q=1-o,l,k;for(l=0;l0&&!Ext.isArray(s[0])){s=[s]}else{}Ext.fly(p,"_anim").position();A.setXY(p,j(x)?x:A.getXY(p));o=w.getAttr("points");if(j(y)){q=k.call(w,y,o);for(r=0,t=s.length;r0){n=n.concat(s)}n[n.length]=q}else{m.setRunAttr.call(this,u)}}});var k=function(n,p){var o=g.Dom.getXY(this.el);return[n[0]-o[0]+p[0],n[1]-o[1]+p[1]]}})()})();(function(){var d=Math.abs,i=Math.PI,h=Math.asin,g=Math.pow,e=Math.sin,f=Ext.lib;Ext.apply(f.Easing,{easeBoth:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k+j:-m/2*((--k)*(k-2)-1)+j},easeInStrong:function(k,j,m,l){return m*(k/=l)*k*k*k+j},easeOutStrong:function(k,j,m,l){return -m*((k=k/l-1)*k*k*k-1)+j},easeBothStrong:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k*k*k+j:-m/2*((k-=2)*k*k*k-2)+j},elasticIn:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return -(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j},elasticOut:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return k*g(2,-10*l)*e((l*o-m)*(2*i)/n)+q+j},elasticBoth:function(l,j,q,o,k,n){if(l==0||(l/=o/2)==2){return l==0?j:j+q}n=n||(o*(0.3*1.5));var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return l<1?-0.5*(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j:k*g(2,-10*(l-=1))*e((l*o-m)*(2*i)/n)*0.5+q+j},backIn:function(k,j,n,m,l){l=l||1.70158;return n*(k/=m)*k*((l+1)*k-l)+j},backOut:function(k,j,n,m,l){if(!l){l=1.70158}return n*((k=k/m-1)*k*((l+1)*k+l)+1)+j},backBoth:function(k,j,n,m,l){l=l||1.70158;return((k/=m/2)<1)?n/2*(k*k*(((l*=(1.525))+1)*k-l))+j:n/2*((k-=2)*k*(((l*=(1.525))+1)*k+l)+2)+j},bounceIn:function(k,j,m,l){return m-f.Easing.bounceOut(l-k,0,m,l)+j},bounceOut:function(k,j,m,l){if((k/=l)<(1/2.75)){return m*(7.5625*k*k)+j}else{if(k<(2/2.75)){return m*(7.5625*(k-=(1.5/2.75))*k+0.75)+j}else{if(k<(2.5/2.75)){return m*(7.5625*(k-=(2.25/2.75))*k+0.9375)+j}}}return m*(7.5625*(k-=(2.625/2.75))*k+0.984375)+j},bounceBoth:function(k,j,m,l){return(k 0; + }, + + + suspendEvents : function(queueSuspended){ + this.eventsSuspended = TRUE; + if(queueSuspended && !this.eventQueue){ + this.eventQueue = []; + } + }, + + + resumeEvents : function(){ + var me = this, + queued = me.eventQueue || []; + me.eventsSuspended = FALSE; + delete me.eventQueue; + EACH(queued, function(e) { + me.fireEvent.apply(me, e); + }); + } +}; + +var OBSERVABLE = EXTUTIL.Observable.prototype; + +OBSERVABLE.on = OBSERVABLE.addListener; + +OBSERVABLE.un = OBSERVABLE.removeListener; + + +EXTUTIL.Observable.releaseCapture = function(o){ + o.fireEvent = OBSERVABLE.fireEvent; +}; + +function createTargeted(h, o, scope){ + return function(){ + if(o.target == arguments[0]){ + h.apply(scope, Array.prototype.slice.call(arguments, 0)); + } + }; +}; + +function createBuffered(h, o, l, scope){ + l.task = new EXTUTIL.DelayedTask(); + return function(){ + l.task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); + }; +}; + +function createSingle(h, e, fn, scope){ + return function(){ + e.removeListener(fn, scope); + return h.apply(scope, arguments); + }; +}; + +function createDelayed(h, o, l, scope){ + return function(){ + var task = new EXTUTIL.DelayedTask(), + args = Array.prototype.slice.call(arguments, 0); + if(!l.tasks) { + l.tasks = []; + } + l.tasks.push(task); + task.delay(o.delay || 10, function(){ + l.tasks.remove(task); + h.apply(scope, args); + }, scope); + }; +}; + +EXTUTIL.Event = function(obj, name){ + this.name = name; + this.obj = obj; + this.listeners = []; +}; + +EXTUTIL.Event.prototype = { + addListener : function(fn, scope, options){ + var me = this, + l; + scope = scope || me.obj; + if(!me.isListening(fn, scope)){ + l = me.createListener(fn, scope, options); + if(me.firing){ + me.listeners = me.listeners.slice(0); + } + me.listeners.push(l); + } + }, + + createListener: function(fn, scope, o){ + o = o || {}; + scope = scope || this.obj; + var l = { + fn: fn, + scope: scope, + options: o + }, h = fn; + if(o.target){ + h = createTargeted(h, o, scope); + } + if(o.delay){ + h = createDelayed(h, o, l, scope); + } + if(o.single){ + h = createSingle(h, this, fn, scope); + } + if(o.buffer){ + h = createBuffered(h, o, l, scope); + } + l.fireFn = h; + return l; + }, + + findListener : function(fn, scope){ + var list = this.listeners, + i = list.length, + l; + + scope = scope || this.obj; + while(i--){ + l = list[i]; + if(l){ + if(l.fn == fn && l.scope == scope){ + return i; + } + } + } + return -1; + }, + + isListening : function(fn, scope){ + return this.findListener(fn, scope) != -1; + }, + + removeListener : function(fn, scope){ + var index, + l, + k, + me = this, + ret = FALSE; + if((index = me.findListener(fn, scope)) != -1){ + if (me.firing) { + me.listeners = me.listeners.slice(0); + } + l = me.listeners[index]; + if(l.task) { + l.task.cancel(); + delete l.task; + } + k = l.tasks && l.tasks.length; + if(k) { + while(k--) { + l.tasks[k].cancel(); + } + delete l.tasks; + } + me.listeners.splice(index, 1); + ret = TRUE; + } + return ret; + }, + + + clearListeners : function(){ + var me = this, + l = me.listeners, + i = l.length; + while(i--) { + me.removeListener(l[i].fn, l[i].scope); + } + }, + + fire : function(){ + var me = this, + listeners = me.listeners, + len = listeners.length, + i = 0, + l; + + if(len > 0){ + me.firing = TRUE; + var args = Array.prototype.slice.call(arguments, 0); + for (; i < len; i++) { + l = listeners[i]; + if(l && l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) { + return (me.firing = FALSE); + } + } + } + me.firing = FALSE; + return TRUE; + } + +}; +})(); Ext.DomHelper = function(){ - var tempTableEl = null; - var emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i; - var tableRe = /^table|tbody|tr|td$/i; - - var createHtml = function(o){ - if(typeof o == 'string'){ - return o; - } - var b = ""; - if (Ext.isArray(o)) { - for (var i = 0, l = o.length; i < l; i++) { - b += createHtml(o[i]); - } - return b; - } - if(!o.tag){ - o.tag = "div"; - } - b += "<" + o.tag; - for(var attr in o){ - if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || typeof o[attr] == "function") continue; - if(attr == "style"){ - var s = o["style"]; - if(typeof s == "function"){ - s = s.call(); - } - if(typeof s == "string"){ - b += ' style="' + s + '"'; - }else if(typeof s == "object"){ - b += ' style="'; - for(var key in s){ - if(typeof s[key] != "function"){ - b += key + ":" + s[key] + ";"; - } - } - b += '"'; - } - }else{ - if(attr == "cls"){ - b += ' class="' + o["cls"] + '"'; - }else if(attr == "htmlFor"){ - b += ' for="' + o["htmlFor"] + '"'; - }else{ - b += " " + attr + '="' + o[attr] + '"'; - } - } - } - if(emptyTags.test(o.tag)){ - b += "/>"; - }else{ - b += ">"; - var cn = o.children || o.cn; - if(cn){ - b += createHtml(cn); - } else if(o.html){ - b += o.html; - } - b += ""; - } - return b; - }; - + var tempTableEl = null, + emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i, + tableRe = /^table|tbody|tr|td$/i, + confRe = /tag|children|cn|html$/i, + tableElRe = /td|tr|tbody/i, + cssRe = /([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi, + endRe = /end/i, + pub, - var createDom = function(o, parentNode){ - var el; - if (Ext.isArray(o)) { el = document.createDocumentFragment(); for(var i = 0, l = o.length; i < l; i++) { - createDom(o[i], el); - } - } else if (typeof o == "string") { el = document.createTextNode(o); - } else { - el = document.createElement(o.tag||'div'); - var useSet = !!el.setAttribute; for(var attr in o){ - if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue; - if(attr=="cls"){ - el.className = o["cls"]; - }else{ - if(useSet) el.setAttribute(attr, o[attr]); - else el[attr] = o[attr]; - } - } - Ext.DomHelper.applyStyles(el, o.style); - var cn = o.children || o.cn; - if(cn){ - createDom(cn, el); - } else if(o.html){ - el.innerHTML = o.html; - } - } - if(parentNode){ - parentNode.appendChild(el); - } - return el; - }; - - var ieTable = function(depth, s, h, e){ - tempTableEl.innerHTML = [s, h, e].join(''); - var i = -1, el = tempTableEl; - while(++i < depth){ - el = el.firstChild; - } - return el; - }; - - var ts = '', + afterbegin = 'afterbegin', + afterend = 'afterend', + beforebegin = 'beforebegin', + beforeend = 'beforeend', + ts = '
', te = '
', tbs = ts+'', tbe = ''+te, @@ -119,320 +341,315 @@ Ext.DomHelper = function(){ tre = ''+tbe; - var insertIntoTable = function(tag, where, el, html){ - if(!tempTableEl){ - tempTableEl = document.createElement('div'); + function doInsert(el, o, returnElement, pos, sibling, append){ + var newNode = pub.insertHtml(pos, Ext.getDom(el), createHtml(o)); + return returnElement ? Ext.get(newNode, true) : newNode; + } + + + function createHtml(o){ + var b = '', + attr, + val, + key, + cn; + + if(typeof o == "string"){ + b = o; + } else if (Ext.isArray(o)) { + for (var i=0; i < o.length; i++) { + if(o[i]) { + b += createHtml(o[i]); + } + }; + } else { + b += '<' + (o.tag = o.tag || 'div'); + for (attr in o) { + val = o[attr]; + if(!confRe.test(attr)){ + if (typeof val == "object") { + b += ' ' + attr + '="'; + for (key in val) { + b += key + ':' + val[key] + ';'; + }; + b += '"'; + }else{ + b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '="' + val + '"'; + } + } + }; + + if (emptyTags.test(o.tag)) { + b += '/>'; + } else { + b += '>'; + if ((cn = o.children || o.cn)) { + b += createHtml(cn); + } else if(o.html){ + b += o.html; + } + b += ''; + } } - var node; - var before = null; - if(tag == 'td'){ - if(where == 'afterbegin' || where == 'beforeend'){ return; - } - if(where == 'beforebegin'){ - before = el; - el = el.parentNode; - } else{ - before = el.nextSibling; - el = el.parentNode; + return b; + } + + function ieTable(depth, s, h, e){ + tempTableEl.innerHTML = [s, h, e].join(''); + var i = -1, + el = tempTableEl, + ns; + while(++i < depth){ + el = el.firstChild; + } + + if(ns = el.nextSibling){ + var df = document.createDocumentFragment(); + while(el){ + ns = el.nextSibling; + df.appendChild(el); + el = ns; } + el = df; + } + return el; + } + + + function insertIntoTable(tag, where, el, html) { + var node, + before; + + tempTableEl = tempTableEl || document.createElement('div'); + + if(tag == 'td' && (where == afterbegin || where == beforeend) || + !tableElRe.test(tag) && (where == beforebegin || where == afterend)) { + return; + } + before = where == beforebegin ? el : + where == afterend ? el.nextSibling : + where == afterbegin ? el.firstChild : null; + + if (where == beforebegin || where == afterend) { + el = el.parentNode; + } + + if (tag == 'td' || (tag == 'tr' && (where == beforeend || where == afterbegin))) { node = ieTable(4, trs, html, tre); - } - else if(tag == 'tr'){ - if(where == 'beforebegin'){ - before = el; - el = el.parentNode; - node = ieTable(3, tbs, html, tbe); - } else if(where == 'afterend'){ - before = el.nextSibling; - el = el.parentNode; - node = ieTable(3, tbs, html, tbe); - } else{ if(where == 'afterbegin'){ - before = el.firstChild; - } - node = ieTable(4, trs, html, tre); - } - } else if(tag == 'tbody'){ - if(where == 'beforebegin'){ - before = el; - el = el.parentNode; - node = ieTable(2, ts, html, te); - } else if(where == 'afterend'){ - before = el.nextSibling; - el = el.parentNode; - node = ieTable(2, ts, html, te); - } else{ - if(where == 'afterbegin'){ - before = el.firstChild; - } - node = ieTable(3, tbs, html, tbe); - } - } else{ if(where == 'beforebegin' || where == 'afterend'){ return; - } - if(where == 'afterbegin'){ - before = el.firstChild; - } + } else if ((tag == 'tbody' && (where == beforeend || where == afterbegin)) || + (tag == 'tr' && (where == beforebegin || where == afterend))) { + node = ieTable(3, tbs, html, tbe); + } else { node = ieTable(2, ts, html, te); } el.insertBefore(node, before); return node; - }; + } - - return { - - useDom : false, - - - markup : function(o){ - return createHtml(o); - }, - - - applyStyles : function(el, styles){ - if(styles){ - el = Ext.fly(el); - if(typeof styles == "string"){ - var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi; - var matches; - while ((matches = re.exec(styles)) != null){ - el.setStyle(matches[1], matches[2]); - } - }else if (typeof styles == "object"){ - for (var style in styles){ - el.setStyle(style, styles[style]); - } - }else if (typeof styles == "function"){ - Ext.DomHelper.applyStyles(el, styles.call()); - } + + function createContextualFragment(html){ + var div = document.createElement("div"), + fragment = document.createDocumentFragment(), + i = 0, + length, childNodes; + + div.innerHTML = html; + childNodes = div.childNodes; + length = childNodes.length; + + for (; i < length; i++) { + fragment.appendChild(childNodes[i].cloneNode(true)); } - }, - + + return fragment; + } - insertHtml : function(where, el, html){ - where = where.toLowerCase(); - if(el.insertAdjacentHTML){ - if(tableRe.test(el.tagName)){ - var rs; - if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){ + pub = { + + markup : function(o){ + return createHtml(o); + }, + + + applyStyles : function(el, styles){ + if (styles) { + var matches; + + el = Ext.fly(el); + if (typeof styles == "function") { + styles = styles.call(); + } + if (typeof styles == "string") { + + cssRe.lastIndex = 0; + while ((matches = cssRe.exec(styles))) { + el.setStyle(matches[1], matches[2]); + } + } else if (typeof styles == "object") { + el.setStyle(styles); + } + } + }, + + insertHtml : function(where, el, html){ + var hash = {}, + hashVal, + range, + rangeEl, + setStart, + frag, + rs; + + where = where.toLowerCase(); + + hash[beforebegin] = ['BeforeBegin', 'previousSibling']; + hash[afterend] = ['AfterEnd', 'nextSibling']; + + if (el.insertAdjacentHTML) { + if(tableRe.test(el.tagName) && (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){ return rs; } - } - switch(where){ - case "beforebegin": - el.insertAdjacentHTML('BeforeBegin', html); - return el.previousSibling; - case "afterbegin": - el.insertAdjacentHTML('AfterBegin', html); - return el.firstChild; - case "beforeend": - el.insertAdjacentHTML('BeforeEnd', html); - return el.lastChild; - case "afterend": - el.insertAdjacentHTML('AfterEnd', html); - return el.nextSibling; + + hash[afterbegin] = ['AfterBegin', 'firstChild']; + hash[beforeend] = ['BeforeEnd', 'lastChild']; + if ((hashVal = hash[where])) { + el.insertAdjacentHTML(hashVal[0], html); + return el[hashVal[1]]; + } + } else { + range = el.ownerDocument.createRange(); + setStart = 'setStart' + (endRe.test(where) ? 'After' : 'Before'); + if (hash[where]) { + range[setStart](el); + if (!range.createContextualFragment) { + frag = createContextualFragment(html); + } + else { + frag = range.createContextualFragment(html); + } + el.parentNode.insertBefore(frag, where == beforebegin ? el : el.nextSibling); + return el[(where == beforebegin ? 'previous' : 'next') + 'Sibling']; + } else { + rangeEl = (where == afterbegin ? 'first' : 'last') + 'Child'; + if (el.firstChild) { + range[setStart](el[rangeEl]); + if (!range.createContextualFragment) { + frag = createContextualFragment(html); + } + else { + frag = range.createContextualFragment(html); + } + if(where == afterbegin){ + el.insertBefore(frag, el.firstChild); + }else{ + el.appendChild(frag); + } + } else { + el.innerHTML = html; + } + return el[rangeEl]; + } } throw 'Illegal insertion point -> "' + where + '"'; - } - var range = el.ownerDocument.createRange(); - var frag; - switch(where){ - case "beforebegin": - range.setStartBefore(el); - frag = range.createContextualFragment(html); - el.parentNode.insertBefore(frag, el); - return el.previousSibling; - case "afterbegin": - if(el.firstChild){ - range.setStartBefore(el.firstChild); - frag = range.createContextualFragment(html); - el.insertBefore(frag, el.firstChild); - return el.firstChild; - }else{ - el.innerHTML = html; - return el.firstChild; - } - case "beforeend": - if(el.lastChild){ - range.setStartAfter(el.lastChild); - frag = range.createContextualFragment(html); - el.appendChild(frag); - return el.lastChild; - }else{ - el.innerHTML = html; - return el.lastChild; - } - case "afterend": - range.setStartAfter(el); - frag = range.createContextualFragment(html); - el.parentNode.insertBefore(frag, el.nextSibling); - return el.nextSibling; - } - throw 'Illegal insertion point -> "' + where + '"'; - }, + }, - - insertBefore : function(el, o, returnElement){ - return this.doInsert(el, o, returnElement, "beforeBegin"); - }, + + insertBefore : function(el, o, returnElement){ + return doInsert(el, o, returnElement, beforebegin); + }, - - insertAfter : function(el, o, returnElement){ - return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); - }, + + insertAfter : function(el, o, returnElement){ + return doInsert(el, o, returnElement, afterend, 'nextSibling'); + }, - - insertFirst : function(el, o, returnElement){ - return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); - }, + + insertFirst : function(el, o, returnElement){ + return doInsert(el, o, returnElement, afterbegin, 'firstChild'); + }, - doInsert : function(el, o, returnElement, pos, sibling){ - el = Ext.getDom(el); - var newNode; - if(this.useDom){ - newNode = createDom(o, null); - (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el); - }else{ - var html = createHtml(o); - newNode = this.insertHtml(pos, el, html); - } - return returnElement ? Ext.get(newNode, true) : newNode; - }, + + append : function(el, o, returnElement){ + return doInsert(el, o, returnElement, beforeend, '', true); + }, - - append : function(el, o, returnElement){ - el = Ext.getDom(el); - var newNode; - if(this.useDom){ - newNode = createDom(o, null); - el.appendChild(newNode); - }else{ - var html = createHtml(o); - newNode = this.insertHtml("beforeEnd", el, html); - } - return returnElement ? Ext.get(newNode, true) : newNode; - }, + + overwrite : function(el, o, returnElement){ + el = Ext.getDom(el); + el.innerHTML = createHtml(o); + return returnElement ? Ext.get(el.firstChild) : el.firstChild; + }, - - overwrite : function(el, o, returnElement){ - el = Ext.getDom(el); - el.innerHTML = createHtml(o); - return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; - }, - - - createTemplate : function(o){ - var html = createHtml(o); - return new Ext.Template(html); - } + createHtml : createHtml }; + return pub; }(); - Ext.Template = function(html){ - var a = arguments; - if(Ext.isArray(html)){ + var me = this, + a = arguments, + buf = [], + v; + + if (Ext.isArray(html)) { html = html.join(""); - }else if(a.length > 1){ - var buf = []; + } else if (a.length > 1) { for(var i = 0, len = a.length; i < len; i++){ - if(typeof a[i] == 'object'){ - Ext.apply(this, a[i]); - }else{ - buf[buf.length] = a[i]; + v = a[i]; + if(typeof v == 'object'){ + Ext.apply(me, v); + } else { + buf.push(v); } - } + }; html = buf.join(''); } + - this.html = html; - if(this.compiled){ - this.compile(); + me.html = html; + + if (me.compiled) { + me.compile(); } }; Ext.Template.prototype = { + re : /\{([\w\-]+)\}/g, + + + applyTemplate : function(values){ - if(this.compiled){ - return this.compiled(values); - } - var useF = this.disableFormats !== true; - var fm = Ext.util.Format, tpl = this; - var fn = function(m, name, format, args){ - if(format && useF){ - if(format.substr(0, 5) == "this."){ - return tpl.call(format.substr(5), values[name], values); - }else{ - if(args){ - var re = /^\s*['"](.*)["']\s*$/; - args = args.split(','); - for(var i = 0, len = args.length; i < len; i++){ - args[i] = args[i].replace(re, "$1"); - } - args = [values[name]].concat(args); - }else{ - args = [values[name]]; - } - return fm[format].apply(fm, args); - } - }else{ - return values[name] !== undefined ? values[name] : ""; - } - }; - return this.html.replace(this.re, fn); + var me = this; + + return me.compiled ? + me.compiled(values) : + me.html.replace(me.re, function(m, name){ + return values[name] !== undefined ? values[name] : ""; + }); }, set : function(html, compile){ - this.html = html; - this.compiled = null; - if(compile){ - this.compile(); - } - return this; + var me = this; + me.html = html; + me.compiled = null; + return compile ? me.compile() : me; }, - disableFormats : false, - - - re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, - - compile : function(){ - var fm = Ext.util.Format; - var useF = this.disableFormats !== true; - var sep = Ext.isGecko ? "+" : ","; - var fn = function(m, name, format, args){ - if(format && useF){ - args = args ? ',' + args : ""; - if(format.substr(0, 5) != "this."){ - format = "fm." + format + '('; - }else{ - format = 'this.call("'+ format.substr(5) + '", '; - args = ", values"; - } - }else{ - args= ''; format = "(values['" + name + "'] == undefined ? '' : "; - } - return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; - }; - var body; - if(Ext.isGecko){ - body = "this.compiled = function(values){ return '" + - this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + - "';};"; - }else{ - body = ["this.compiled = function(values){ return ['"]; - body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); - body.push("'].join('');};"); - body = body.join(''); - } - eval(body); - return this; - }, + var me = this, + sep = Ext.isGecko ? "+" : ","; - call : function(fnName, value, allValues){ - return this[fnName](value, allValues); + function fn(m, name){ + name = "values['" + name + "']"; + return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'"; + } + + eval("this.compiled = function(values){ return " + (Ext.isGecko ? "'" : "['") + + me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + + (Ext.isGecko ? "';};" : "'].join('');};")); + return me; }, @@ -471,2059 +688,1317 @@ Ext.Template.prototype = { Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; -Ext.DomHelper.Template = Ext.Template; - Ext.Template.from = function(el, config){ el = Ext.getDom(el); return new Ext.Template(el.value || el.innerHTML, config || ''); }; - - -Ext.DomQuery = function(){ - var cache = {}, simpleCache = {}, valueCache = {}; - var nonSpace = /\S/; - var trimRe = /^\s+|\s+$/g; - var tplRe = /\{(\d+)\}/g; - var modeRe = /^(\s?[\/>+~]\s?|\s|$)/; - var tagTokenRe = /^(#)?([\w-\*]+)/; - var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/; - - function child(p, index){ - var i = 0; - var n = p.firstChild; - while(n){ - if(n.nodeType == 1){ - if(++i == index){ - return n; - } - } - n = n.nextSibling; - } - return null; - }; - - function next(n){ - while((n = n.nextSibling) && n.nodeType != 1); - return n; - }; - - function prev(n){ - while((n = n.previousSibling) && n.nodeType != 1); - return n; - }; - - function children(d){ - var n = d.firstChild, ni = -1; - while(n){ - var nx = n.nextSibling; - if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ - d.removeChild(n); - }else{ - n.nodeIndex = ++ni; - } - n = nx; - } - return this; - }; - - function byClassName(c, a, v){ - if(!v){ - return c; - } - var r = [], ri = -1, cn; - for(var i = 0, ci; ci = c[i]; i++){ - if((' '+ci.className+' ').indexOf(v) != -1){ - r[++ri] = ci; - } - } - return r; - }; - - function attrValue(n, attr){ - if(!n.tagName && typeof n.length != "undefined"){ - n = n[0]; - } - if(!n){ - return null; - } - if(attr == "for"){ - return n.htmlFor; - } - if(attr == "class" || attr == "className"){ - return n.className; - } - return n.getAttribute(attr) || n[attr]; - - }; - - function getNodes(ns, mode, tagName){ - var result = [], ri = -1, cs; - if(!ns){ - return result; - } - tagName = tagName || "*"; - if(typeof ns.getElementsByTagName != "undefined"){ - ns = [ns]; - } - if(!mode){ - for(var i = 0, ni; ni = ns[i]; i++){ - cs = ni.getElementsByTagName(tagName); - for(var j = 0, ci; ci = cs[j]; j++){ - result[++ri] = ci; - } - } - }else if(mode == "/" || mode == ">"){ - var utag = tagName.toUpperCase(); - for(var i = 0, ni, cn; ni = ns[i]; i++){ - cn = ni.children || ni.childNodes; - for(var j = 0, cj; cj = cn[j]; j++){ - if(cj.nodeName == utag || cj.nodeName == tagName || tagName == '*'){ - result[++ri] = cj; - } - } - } - }else if(mode == "+"){ - var utag = tagName.toUpperCase(); - for(var i = 0, n; n = ns[i]; i++){ - while((n = n.nextSibling) && n.nodeType != 1); - if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){ - result[++ri] = n; - } - } - }else if(mode == "~"){ - for(var i = 0, n; n = ns[i]; i++){ - while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName))); - if(n){ - result[++ri] = n; - } - } - } - return result; - }; - - function concat(a, b){ - if(b.slice){ - return a.concat(b); - } - for(var i = 0, l = b.length; i < l; i++){ - a[a.length] = b[i]; - } - return a; - } - - function byTag(cs, tagName){ - if(cs.tagName || cs == document){ - cs = [cs]; - } - if(!tagName){ - return cs; - } - var r = [], ri = -1; - tagName = tagName.toLowerCase(); - for(var i = 0, ci; ci = cs[i]; i++){ - if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ - r[++ri] = ci; - } - } - return r; - }; - - function byId(cs, attr, id){ - if(cs.tagName || cs == document){ - cs = [cs]; - } - if(!id){ - return cs; - } - var r = [], ri = -1; - for(var i = 0,ci; ci = cs[i]; i++){ - if(ci && ci.id == id){ - r[++ri] = ci; - return r; - } - } - return r; - }; - - function byAttribute(cs, attr, value, op, custom){ - var r = [], ri = -1, st = custom=="{"; - var f = Ext.DomQuery.operators[op]; - for(var i = 0, ci; ci = cs[i]; i++){ - var a; - if(st){ - a = Ext.DomQuery.getStyle(ci, attr); - } - else if(attr == "class" || attr == "className"){ - a = ci.className; - }else if(attr == "for"){ - a = ci.htmlFor; - }else if(attr == "href"){ - a = ci.getAttribute("href", 2); - }else{ - a = ci.getAttribute(attr); - } - if((f && f(a, value)) || (!f && a)){ - r[++ri] = ci; - } - } - return r; - }; - - function byPseudo(cs, name, value){ - return Ext.DomQuery.pseudos[name](cs, value); - }; - - - - - var isIE = window.ActiveXObject ? true : false; - - - - eval("var batch = 30803;"); - - var key = 30803; - - function nodupIEXml(cs){ - var d = ++key; - cs[0].setAttribute("_nodup", d); - var r = [cs[0]]; - for(var i = 1, len = cs.length; i < len; i++){ - var c = cs[i]; - if(!c.getAttribute("_nodup") != d){ - c.setAttribute("_nodup", d); - r[r.length] = c; - } - } - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].removeAttribute("_nodup"); - } - return r; - } - - function nodup(cs){ - if(!cs){ - return []; - } - var len = cs.length, c, i, r = cs, cj, ri = -1; - if(!len || typeof cs.nodeType != "undefined" || len == 1){ - return cs; - } - if(isIE && typeof cs[0].selectSingleNode != "undefined"){ - return nodupIEXml(cs); - } - var d = ++key; - cs[0]._nodup = d; - for(i = 1; c = cs[i]; i++){ - if(c._nodup != d){ - c._nodup = d; - }else{ - r = []; - for(var j = 0; j < i; j++){ - r[++ri] = cs[j]; - } - for(j = i+1; cj = cs[j]; j++){ - if(cj._nodup != d){ - cj._nodup = d; - r[++ri] = cj; - } - } - return r; - } - } - return r; - } - - function quickDiffIEXml(c1, c2){ - var d = ++key; - for(var i = 0, len = c1.length; i < len; i++){ - c1[i].setAttribute("_qdiff", d); - } - var r = []; - for(var i = 0, len = c2.length; i < len; i++){ - if(c2[i].getAttribute("_qdiff") != d){ - r[r.length] = c2[i]; - } - } - for(var i = 0, len = c1.length; i < len; i++){ - c1[i].removeAttribute("_qdiff"); - } - return r; - } - - function quickDiff(c1, c2){ - var len1 = c1.length; - if(!len1){ - return c2; - } - if(isIE && c1[0].selectSingleNode){ - return quickDiffIEXml(c1, c2); - } - var d = ++key; - for(var i = 0; i < len1; i++){ - c1[i]._qdiff = d; - } - var r = []; - for(var i = 0, len = c2.length; i < len; i++){ - if(c2[i]._qdiff != d){ - r[r.length] = c2[i]; - } - } - return r; - } - - function quickId(ns, mode, root, id){ - if(ns == root){ - var d = root.ownerDocument || root; - return d.getElementById(id); - } - ns = getNodes(ns, mode, "*"); - return byId(ns, null, id); - } - - return { - getStyle : function(el, name){ - return Ext.fly(el).getStyle(name); - }, - - compile : function(path, type){ - type = type || "select"; - - var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"]; - var q = path, mode, lq; - var tk = Ext.DomQuery.matchers; - var tklen = tk.length; - var mm; - - - var lmode = q.match(modeRe); - if(lmode && lmode[1]){ - fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; - q = q.replace(lmode[1], ""); - } - - while(path.substr(0, 1)=="/"){ - path = path.substr(1); - } - - while(q && lq != q){ - lq = q; - var tm = q.match(tagTokenRe); - if(type == "select"){ - if(tm){ - if(tm[1] == "#"){ - fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; - }else{ - fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; - } - q = q.replace(tm[0], ""); - }else if(q.substr(0, 1) != '@'){ - fn[fn.length] = 'n = getNodes(n, mode, "*");'; - } - }else{ - if(tm){ - if(tm[1] == "#"){ - fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; - }else{ - fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; - } - q = q.replace(tm[0], ""); - } - } - while(!(mm = q.match(modeRe))){ - var matched = false; - for(var j = 0; j < tklen; j++){ - var t = tk[j]; - var m = q.match(t.re); - if(m){ - fn[fn.length] = t.select.replace(tplRe, function(x, i){ - return m[i]; - }); - q = q.replace(m[0], ""); - matched = true; - break; - } - } - - if(!matched){ - throw 'Error parsing selector, parsing failed at "' + q + '"'; - } - } - if(mm[1]){ - fn[fn.length] = 'mode="'+mm[1].replace(trimRe, "")+'";'; - q = q.replace(mm[1], ""); - } - } - fn[fn.length] = "return nodup(n);\n}"; - eval(fn.join("")); - return f; - }, - - - select : function(path, root, type){ - if(!root || root == document){ - root = document; - } - if(typeof root == "string"){ - root = document.getElementById(root); - } - var paths = path.split(","); - var results = []; - for(var i = 0, len = paths.length; i < len; i++){ - var p = paths[i].replace(trimRe, ""); - if(!cache[p]){ - cache[p] = Ext.DomQuery.compile(p); - if(!cache[p]){ - throw p + " is not a valid selector"; - } - } - var result = cache[p](root); - if(result && result != document){ - results = results.concat(result); - } - } - if(paths.length > 1){ - return nodup(results); - } - return results; - }, - - - selectNode : function(path, root){ - return Ext.DomQuery.select(path, root)[0]; - }, - - - selectValue : function(path, root, defaultValue){ - path = path.replace(trimRe, ""); - if(!valueCache[path]){ - valueCache[path] = Ext.DomQuery.compile(path, "select"); - } - var n = valueCache[path](root); - n = n[0] ? n[0] : n; - var v = (n && n.firstChild ? n.firstChild.nodeValue : null); - return ((v === null||v === undefined||v==='') ? defaultValue : v); - }, - - - selectNumber : function(path, root, defaultValue){ - var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0); - return parseFloat(v); - }, - - - is : function(el, ss){ - if(typeof el == "string"){ - el = document.getElementById(el); - } - var isArray = Ext.isArray(el); - var result = Ext.DomQuery.filter(isArray ? el : [el], ss); - return isArray ? (result.length == el.length) : (result.length > 0); - }, - - - filter : function(els, ss, nonMatches){ - ss = ss.replace(trimRe, ""); - if(!simpleCache[ss]){ - simpleCache[ss] = Ext.DomQuery.compile(ss, "simple"); - } - var result = simpleCache[ss](els); - return nonMatches ? quickDiff(result, els) : result; - }, - - - matchers : [{ - re: /^\.([\w-]+)/, - select: 'n = byClassName(n, null, " {1} ");' - }, { - re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, - select: 'n = byPseudo(n, "{1}", "{2}");' - },{ - re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/, - select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");' - }, { - re: /^#([\w-]+)/, - select: 'n = byId(n, null, "{1}");' - },{ - re: /^@([\w-]+)/, - select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};' - } - ], - - - operators : { - "=" : function(a, v){ - return a == v; - }, - "!=" : function(a, v){ - return a != v; - }, - "^=" : function(a, v){ - return a && a.substr(0, v.length) == v; - }, - "$=" : function(a, v){ - return a && a.substr(a.length-v.length) == v; - }, - "*=" : function(a, v){ - return a && a.indexOf(v) !== -1; - }, - "%=" : function(a, v){ - return (a % v) == 0; - }, - "|=" : function(a, v){ - return a && (a == v || a.substr(0, v.length+1) == v+'-'); - }, - "~=" : function(a, v){ - return a && (' '+a+' ').indexOf(' '+v+' ') != -1; - } - }, - - - pseudos : { - "first-child" : function(c){ - var r = [], ri = -1, n; - for(var i = 0, ci; ci = n = c[i]; i++){ - while((n = n.previousSibling) && n.nodeType != 1); - if(!n){ - r[++ri] = ci; - } - } - return r; - }, - - "last-child" : function(c){ - var r = [], ri = -1, n; - for(var i = 0, ci; ci = n = c[i]; i++){ - while((n = n.nextSibling) && n.nodeType != 1); - if(!n){ - r[++ri] = ci; - } - } - return r; - }, - - "nth-child" : function(c, a) { - var r = [], ri = -1; - var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a); - var f = (m[1] || 1) - 0, l = m[2] - 0; - for(var i = 0, n; n = c[i]; i++){ - var pn = n.parentNode; - if (batch != pn._batch) { - var j = 0; - for(var cn = pn.firstChild; cn; cn = cn.nextSibling){ - if(cn.nodeType == 1){ - cn.nodeIndex = ++j; - } - } - pn._batch = batch; - } - if (f == 1) { - if (l == 0 || n.nodeIndex == l){ - r[++ri] = n; - } - } else if ((n.nodeIndex + l) % f == 0){ - r[++ri] = n; - } - } - - return r; - }, - - "only-child" : function(c){ - var r = [], ri = -1;; - for(var i = 0, ci; ci = c[i]; i++){ - if(!prev(ci) && !next(ci)){ - r[++ri] = ci; - } - } - return r; - }, - - "empty" : function(c){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var cns = ci.childNodes, j = 0, cn, empty = true; - while(cn = cns[j]){ - ++j; - if(cn.nodeType == 1 || cn.nodeType == 3){ - empty = false; - break; - } - } - if(empty){ - r[++ri] = ci; - } - } - return r; - }, - - "contains" : function(c, v){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if((ci.textContent||ci.innerText||'').indexOf(v) != -1){ - r[++ri] = ci; - } - } - return r; - }, - - "nodeValue" : function(c, v){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(ci.firstChild && ci.firstChild.nodeValue == v){ - r[++ri] = ci; - } - } - return r; - }, - - "checked" : function(c){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(ci.checked == true){ - r[++ri] = ci; - } - } - return r; - }, - - "not" : function(c, ss){ - return Ext.DomQuery.filter(c, ss, true); - }, - - "any" : function(c, selectors){ - var ss = selectors.split('|'); - var r = [], ri = -1, s; - for(var i = 0, ci; ci = c[i]; i++){ - for(var j = 0; s = ss[j]; j++){ - if(Ext.DomQuery.is(ci, s)){ - r[++ri] = ci; - break; - } - } - } - return r; - }, - - "odd" : function(c){ - return this["nth-child"](c, "odd"); - }, - - "even" : function(c){ - return this["nth-child"](c, "even"); - }, - - "nth" : function(c, a){ - return c[a-1] || []; - }, - - "first" : function(c){ - return c[0] || []; - }, - - "last" : function(c){ - return c[c.length-1] || []; - }, - - "has" : function(c, ss){ - var s = Ext.DomQuery.select; - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(s(ss, ci).length > 0){ - r[++ri] = ci; - } - } - return r; - }, - - "next" : function(c, ss){ - var is = Ext.DomQuery.is; - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var n = next(ci); - if(n && is(n, ss)){ - r[++ri] = ci; - } - } - return r; - }, - - "prev" : function(c, ss){ - var is = Ext.DomQuery.is; - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var n = prev(ci); - if(n && is(n, ss)){ - r[++ri] = ci; - } - } - return r; - } - } - }; -}(); - - -Ext.query = Ext.DomQuery.select; -Ext.util.Observable = function(){ +Ext.DomQuery = function(){ + var cache = {}, + simpleCache = {}, + valueCache = {}, + nonSpace = /\S/, + trimRe = /^\s+|\s+$/g, + tplRe = /\{(\d+)\}/g, + modeRe = /^(\s?[\/>+~]\s?|\s|$)/, + tagTokenRe = /^(#)?([\w\-\*]+)/, + nthRe = /(\d*)n\+?(\d*)/, + nthRe2 = /\D/, + + + + isIE = window.ActiveXObject ? true : false, + key = 30803; - if(this.listeners){ - this.on(this.listeners); - delete this.listeners; + + + eval("var batch = 30803;"); + + + + function child(parent, index){ + var i = 0, + n = parent.firstChild; + while(n){ + if(n.nodeType == 1){ + if(++i == index){ + return n; + } + } + n = n.nextSibling; + } + return null; } -}; -Ext.util.Observable.prototype = { + - fireEvent : function(){ - if(this.eventsSuspended !== true){ - var ce = this.events[arguments[0].toLowerCase()]; - if(typeof ce == "object"){ - return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); + function next(n){ + while((n = n.nextSibling) && n.nodeType != 1); + return n; + } + + + function prev(n){ + while((n = n.previousSibling) && n.nodeType != 1); + return n; + } + + + + function children(parent){ + var n = parent.firstChild, + nodeIndex = -1, + nextNode; + while(n){ + nextNode = n.nextSibling; + + if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ + parent.removeChild(n); + }else{ + + n.nodeIndex = ++nodeIndex; + } + n = nextNode; + } + return this; + } + + + + + function byClassName(nodeSet, cls){ + if(!cls){ + return nodeSet; + } + var result = [], ri = -1; + for(var i = 0, ci; ci = nodeSet[i]; i++){ + if((' '+ci.className+' ').indexOf(cls) != -1){ + result[++ri] = ci; } } - return true; - }, + return result; + }; + + function attrValue(n, attr){ + + if(!n.tagName && typeof n.length != "undefined"){ + n = n[0]; + } + if(!n){ + return null; + } + + if(attr == "for"){ + return n.htmlFor; + } + if(attr == "class" || attr == "className"){ + return n.className; + } + return n.getAttribute(attr) || n[attr]; + + }; - filterOptRe : /^(?:scope|delay|buffer|single)$/, - addListener : function(eventName, fn, scope, o){ - if(typeof eventName == "object"){ - o = eventName; - for(var e in o){ - if(this.filterOptRe.test(e)){ - continue; - } - if(typeof o[e] == "function"){ - this.addListener(e, o[e], o.scope, o); - }else{ - this.addListener(e, o[e].fn, o[e].scope, o[e]); + + + function getNodes(ns, mode, tagName){ + var result = [], ri = -1, cs; + if(!ns){ + return result; + } + tagName = tagName || "*"; + + if(typeof ns.getElementsByTagName != "undefined"){ + ns = [ns]; + } + + + + if(!mode){ + for(var i = 0, ni; ni = ns[i]; i++){ + cs = ni.getElementsByTagName(tagName); + for(var j = 0, ci; ci = cs[j]; j++){ + result[++ri] = ci; } } - return; - } - o = (!o || typeof o == "boolean") ? {} : o; - eventName = eventName.toLowerCase(); - var ce = this.events[eventName] || true; - if(typeof ce == "boolean"){ - ce = new Ext.util.Event(this, eventName); - this.events[eventName] = ce; - } - ce.addListener(fn, scope, o); - }, - - - removeListener : function(eventName, fn, scope){ - var ce = this.events[eventName.toLowerCase()]; - if(typeof ce == "object"){ - ce.removeListener(fn, scope); - } - }, - - - purgeListeners : function(){ - for(var evt in this.events){ - if(typeof this.events[evt] == "object"){ - this.events[evt].clearListeners(); - } - } - }, - - - relayEvents : function(o, events){ - var createHandler = function(ename){ - return function(){ - return this.fireEvent.apply(this, Ext.combine(ename, Array.prototype.slice.call(arguments, 0))); - }; - }; - for(var i = 0, len = events.length; i < len; i++){ - var ename = events[i]; - if(!this.events[ename]){ this.events[ename] = true; }; - o.on(ename, createHandler(ename), this); - } - }, - - - addEvents : function(o){ - if(!this.events){ - this.events = {}; - } - if(typeof o == 'string'){ - for(var i = 0, a = arguments, v; v = a[i]; i++){ - if(!this.events[a[i]]){ - this.events[a[i]] = true; + + + } else if(mode == "/" || mode == ">"){ + var utag = tagName.toUpperCase(); + for(var i = 0, ni, cn; ni = ns[i]; i++){ + cn = ni.childNodes; + for(var j = 0, cj; cj = cn[j]; j++){ + if(cj.nodeName == utag || cj.nodeName == tagName || tagName == '*'){ + result[++ri] = cj; + } + } + } + + + }else if(mode == "+"){ + var utag = tagName.toUpperCase(); + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling) && n.nodeType != 1); + if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){ + result[++ri] = n; + } + } + + + }else if(mode == "~"){ + var utag = tagName.toUpperCase(); + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling)){ + if (n.nodeName == utag || n.nodeName == tagName || tagName == '*'){ + result[++ri] = n; + } } } - }else{ - Ext.applyIf(this.events, o); } - }, + return result; + } - - hasListener : function(eventName){ - var e = this.events[eventName]; - return typeof e == "object" && e.listeners.length > 0; - }, - - - suspendEvents : function(){ - this.eventsSuspended = true; - }, - - - resumeEvents : function(){ - this.eventsSuspended = false; - }, - - getMethodEvent : function(method){ - if(!this.methodEvents){ - this.methodEvents = {}; + function concat(a, b){ + if(b.slice){ + return a.concat(b); } - var e = this.methodEvents[method]; - if(!e){ - e = {}; - this.methodEvents[method] = e; + for(var i = 0, l = b.length; i < l; i++){ + a[a.length] = b[i]; + } + return a; + } - e.originalFn = this[method]; - e.methodName = method; - e.before = []; - e.after = []; + function byTag(cs, tagName){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!tagName){ + return cs; + } + var result = [], ri = -1; + tagName = tagName.toLowerCase(); + for(var i = 0, ci; ci = cs[i]; i++){ + if(ci.nodeType == 1 && ci.tagName.toLowerCase() == tagName){ + result[++ri] = ci; + } + } + return result; + } + function byId(cs, id){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!id){ + return cs; + } + var result = [], ri = -1; + for(var i = 0, ci; ci = cs[i]; i++){ + if(ci && ci.id == id){ + result[++ri] = ci; + return result; + } + } + return result; + } - var returnValue, v, cancel; - var obj = this; + + + function byAttribute(cs, attr, value, op, custom){ + var result = [], + ri = -1, + useGetStyle = custom == "{", + fn = Ext.DomQuery.operators[op], + a, + xml, + hasXml; + + for(var i = 0, ci; ci = cs[i]; i++){ + + if(ci.nodeType != 1){ + continue; + } + + if(!hasXml){ + xml = Ext.DomQuery.isXml(ci); + hasXml = true; + } + + + if(!xml){ + if(useGetStyle){ + a = Ext.DomQuery.getStyle(ci, attr); + } else if (attr == "class" || attr == "className"){ + a = ci.className; + } else if (attr == "for"){ + a = ci.htmlFor; + } else if (attr == "href"){ + + + a = ci.getAttribute("href", 2); + } else{ + a = ci.getAttribute(attr); + } + }else{ + a = ci.getAttribute(attr); + } + if((fn && fn(a, value)) || (!fn && a)){ + result[++ri] = ci; + } + } + return result; + } - var makeCall = function(fn, scope, args){ - if((v = fn.apply(scope || obj, args)) !== undefined){ - if(typeof v === 'object'){ - if(v.returnValue !== undefined){ - returnValue = v.returnValue; + function byPseudo(cs, name, value){ + return Ext.DomQuery.pseudos[name](cs, value); + } + + function nodupIEXml(cs){ + var d = ++key, + r; + cs[0].setAttribute("_nodup", d); + r = [cs[0]]; + for(var i = 1, len = cs.length; i < len; i++){ + var c = cs[i]; + if(!c.getAttribute("_nodup") != d){ + c.setAttribute("_nodup", d); + r[r.length] = c; + } + } + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].removeAttribute("_nodup"); + } + return r; + } + + function nodup(cs){ + if(!cs){ + return []; + } + var len = cs.length, c, i, r = cs, cj, ri = -1; + if(!len || typeof cs.nodeType != "undefined" || len == 1){ + return cs; + } + if(isIE && typeof cs[0].selectSingleNode != "undefined"){ + return nodupIEXml(cs); + } + var d = ++key; + cs[0]._nodup = d; + for(i = 1; c = cs[i]; i++){ + if(c._nodup != d){ + c._nodup = d; + }else{ + r = []; + for(var j = 0; j < i; j++){ + r[++ri] = cs[j]; + } + for(j = i+1; cj = cs[j]; j++){ + if(cj._nodup != d){ + cj._nodup = d; + r[++ri] = cj; + } + } + return r; + } + } + return r; + } + + function quickDiffIEXml(c1, c2){ + var d = ++key, + r = []; + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].setAttribute("_qdiff", d); + } + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i].getAttribute("_qdiff") != d){ + r[r.length] = c2[i]; + } + } + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].removeAttribute("_qdiff"); + } + return r; + } + + function quickDiff(c1, c2){ + var len1 = c1.length, + d = ++key, + r = []; + if(!len1){ + return c2; + } + if(isIE && typeof c1[0].selectSingleNode != "undefined"){ + return quickDiffIEXml(c1, c2); + } + for(var i = 0; i < len1; i++){ + c1[i]._qdiff = d; + } + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i]._qdiff != d){ + r[r.length] = c2[i]; + } + } + return r; + } + + function quickId(ns, mode, root, id){ + if(ns == root){ + var d = root.ownerDocument || root; + return d.getElementById(id); + } + ns = getNodes(ns, mode, "*"); + return byId(ns, id); + } + + return { + getStyle : function(el, name){ + return Ext.fly(el).getStyle(name); + }, + + compile : function(path, type){ + type = type || "select"; + + + var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"], + mode, + lastPath, + matchers = Ext.DomQuery.matchers, + matchersLn = matchers.length, + modeMatch, + + lmode = path.match(modeRe); + + if(lmode && lmode[1]){ + fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; + path = path.replace(lmode[1], ""); + } + + + while(path.substr(0, 1)=="/"){ + path = path.substr(1); + } + + while(path && lastPath != path){ + lastPath = path; + var tokenMatch = path.match(tagTokenRe); + if(type == "select"){ + if(tokenMatch){ + + if(tokenMatch[1] == "#"){ + fn[fn.length] = 'n = quickId(n, mode, root, "'+tokenMatch[2]+'");'; }else{ - returnValue = v; + fn[fn.length] = 'n = getNodes(n, mode, "'+tokenMatch[2]+'");'; } - if(v.cancel === true){ - cancel = true; + path = path.replace(tokenMatch[0], ""); + }else if(path.substr(0, 1) != '@'){ + fn[fn.length] = 'n = getNodes(n, mode, "*");'; + } + + }else{ + if(tokenMatch){ + if(tokenMatch[1] == "#"){ + fn[fn.length] = 'n = byId(n, "'+tokenMatch[2]+'");'; + }else{ + fn[fn.length] = 'n = byTag(n, "'+tokenMatch[2]+'");'; } - }else if(v === false){ - cancel = true; - }else { - returnValue = v; + path = path.replace(tokenMatch[0], ""); } } - } - - this[method] = function(){ - returnValue = v = undefined; cancel = false; - var args = Array.prototype.slice.call(arguments, 0); - for(var i = 0, len = e.before.length; i < len; i++){ - makeCall(e.before[i].fn, e.before[i].scope, args); - if(cancel){ - return returnValue; + while(!(modeMatch = path.match(modeRe))){ + var matched = false; + for(var j = 0; j < matchersLn; j++){ + var t = matchers[j]; + var m = path.match(t.re); + if(m){ + fn[fn.length] = t.select.replace(tplRe, function(x, i){ + return m[i]; + }); + path = path.replace(m[0], ""); + matched = true; + break; + } + } + + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + path + '"'; } } - - if((v = e.originalFn.apply(obj, args)) !== undefined){ - returnValue = v; + if(modeMatch[1]){ + fn[fn.length] = 'mode="'+modeMatch[1].replace(trimRe, "")+'";'; + path = path.replace(modeMatch[1], ""); } + } + + fn[fn.length] = "return nodup(n);\n}"; + + + eval(fn.join("")); + return f; + }, - for(var i = 0, len = e.after.length; i < len; i++){ - makeCall(e.after[i].fn, e.after[i].scope, args); - if(cancel){ - return returnValue; + + jsSelect: function(path, root, type){ + + root = root || document; + + if(typeof root == "string"){ + root = document.getElementById(root); + } + var paths = path.split(","), + results = []; + + + for(var i = 0, len = paths.length; i < len; i++){ + var subPath = paths[i].replace(trimRe, ""); + + if(!cache[subPath]){ + cache[subPath] = Ext.DomQuery.compile(subPath); + if(!cache[subPath]){ + throw subPath + " is not a valid selector"; } } - return returnValue; - }; - } - return e; - }, - - beforeMethod : function(method, fn, scope){ - var e = this.getMethodEvent(method); - e.before.push({fn: fn, scope: scope}); - }, - - afterMethod : function(method, fn, scope){ - var e = this.getMethodEvent(method); - e.after.push({fn: fn, scope: scope}); - }, - - removeMethodListener : function(method, fn, scope){ - var e = this.getMethodEvent(method); - for(var i = 0, len = e.before.length; i < len; i++){ - if(e.before[i].fn == fn && e.before[i].scope == scope){ - e.before.splice(i, 1); - return; + var result = cache[subPath](root); + if(result && result != document){ + results = results.concat(result); + } } - } - for(var i = 0, len = e.after.length; i < len; i++){ - if(e.after[i].fn == fn && e.after[i].scope == scope){ - e.after.splice(i, 1); - return; + + + + if(paths.length > 1){ + return nodup(results); } + return results; + }, + isXml: function(el) { + var docEl = (el ? el.ownerDocument || el : 0).documentElement; + return docEl ? docEl.nodeName !== "HTML" : false; + }, + select : document.querySelectorAll ? function(path, root, type) { + root = root || document; + if (!Ext.DomQuery.isXml(root)) { + try { + var cs = root.querySelectorAll(path); + return Ext.toArray(cs); + } + catch (ex) {} + } + return Ext.DomQuery.jsSelect.call(this, path, root, type); + } : function(path, root, type) { + return Ext.DomQuery.jsSelect.call(this, path, root, type); + }, + + + selectNode : function(path, root){ + return Ext.DomQuery.select(path, root)[0]; + }, + + + selectValue : function(path, root, defaultValue){ + path = path.replace(trimRe, ""); + if(!valueCache[path]){ + valueCache[path] = Ext.DomQuery.compile(path, "select"); + } + var n = valueCache[path](root), v; + n = n[0] ? n[0] : n; + + + + + + if (typeof n.normalize == 'function') n.normalize(); + + v = (n && n.firstChild ? n.firstChild.nodeValue : null); + return ((v === null||v === undefined||v==='') ? defaultValue : v); + }, + + + selectNumber : function(path, root, defaultValue){ + var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0); + return parseFloat(v); + }, + + + is : function(el, ss){ + if(typeof el == "string"){ + el = document.getElementById(el); + } + var isArray = Ext.isArray(el), + result = Ext.DomQuery.filter(isArray ? el : [el], ss); + return isArray ? (result.length == el.length) : (result.length > 0); + }, + + + filter : function(els, ss, nonMatches){ + ss = ss.replace(trimRe, ""); + if(!simpleCache[ss]){ + simpleCache[ss] = Ext.DomQuery.compile(ss, "simple"); + } + var result = simpleCache[ss](els); + return nonMatches ? quickDiff(result, els) : result; + }, + + + matchers : [{ + re: /^\.([\w\-]+)/, + select: 'n = byClassName(n, " {1} ");' + }, { + re: /^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, + select: 'n = byPseudo(n, "{1}", "{2}");' + },{ + re: /^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/, + select: 'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");' + }, { + re: /^#([\w\-]+)/, + select: 'n = byId(n, "{1}");' + },{ + re: /^@([\w\-]+)/, + select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};' + } + ], + + /** + * Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=. + * New operators can be added as long as the match the format c= where c is any character other than space, > <. + */ + operators : { + "=" : function(a, v){ + return a == v; + }, + "!=" : function(a, v){ + return a != v; + }, + "^=" : function(a, v){ + return a && a.substr(0, v.length) == v; + }, + "$=" : function(a, v){ + return a && a.substr(a.length-v.length) == v; + }, + "*=" : function(a, v){ + return a && a.indexOf(v) !== -1; + }, + "%=" : function(a, v){ + return (a % v) == 0; + }, + "|=" : function(a, v){ + return a && (a == v || a.substr(0, v.length+1) == v+'-'); + }, + "~=" : function(a, v){ + return a && (' '+a+' ').indexOf(' '+v+' ') != -1; + } + }, + + /** + *

Object hash of "pseudo class" filter functions which are used when filtering selections. Each function is passed + * two parameters:

    + *
  • c : Array
    An Array of DOM elements to filter.
  • + *
  • v : String
    The argument (if any) supplied in the selector.
  • + *
+ *

A filter function returns an Array of DOM elements which conform to the pseudo class.

+ *

In addition to the provided pseudo classes listed above such as first-child and nth-child, + * developers may add additional, custom psuedo class filters to select elements according to application-specific requirements.

+ *

For example, to filter <a> elements to only return links to external resources:

+ *
+Ext.DomQuery.pseudos.external = function(c, v){
+    var r = [], ri = -1;
+    for(var i = 0, ci; ci = c[i]; i++){
+//      Include in result set only if it's a link to an external resource
+        if(ci.hostname != location.hostname){
+            r[++ri] = ci;
         }
     }
-};
-
-Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener;
-
-Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener;
-
-
-Ext.util.Observable.capture = function(o, fn, scope){
-    o.fireEvent = o.fireEvent.createInterceptor(fn, scope);
-};
-
-
-Ext.util.Observable.releaseCapture = function(o){
-    o.fireEvent = Ext.util.Observable.prototype.fireEvent;
-};
-
-(function(){
-
-    var createBuffered = function(h, o, scope){
-        var task = new Ext.util.DelayedTask();
-        return function(){
-            task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0));
-        };
-    };
-
-    var createSingle = function(h, e, fn, scope){
-        return function(){
-            e.removeListener(fn, scope);
-            return h.apply(scope, arguments);
-        };
-    };
-
-    var createDelayed = function(h, o, scope){
-        return function(){
-            var args = Array.prototype.slice.call(arguments, 0);
-            setTimeout(function(){
-                h.apply(scope, args);
-            }, o.delay || 10);
-        };
-    };
-
-    Ext.util.Event = function(obj, name){
-        this.name = name;
-        this.obj = obj;
-        this.listeners = [];
-    };
-
-    Ext.util.Event.prototype = {
-        addListener : function(fn, scope, options){
-            scope = scope || this.obj;
-            if(!this.isListening(fn, scope)){
-                var l = this.createListener(fn, scope, options);
-                if(!this.firing){
-                    this.listeners.push(l);
-                }else{                     this.listeners = this.listeners.slice(0);
-                    this.listeners.push(l);
-                }
-            }
-        },
-
-        createListener : function(fn, scope, o){
-            o = o || {};
-            scope = scope || this.obj;
-            var l = {fn: fn, scope: scope, options: o};
-            var h = fn;
-            if(o.delay){
-                h = createDelayed(h, o, scope);
-            }
-            if(o.single){
-                h = createSingle(h, this, fn, scope);
-            }
-            if(o.buffer){
-                h = createBuffered(h, o, scope);
-            }
-            l.fireFn = h;
-            return l;
-        },
-
-        findListener : function(fn, scope){
-            scope = scope || this.obj;
-            var ls = this.listeners;
-            for(var i = 0, len = ls.length; i < len; i++){
-                var l = ls[i];
-                if(l.fn == fn && l.scope == scope){
-                    return i;
-                }
-            }
-            return -1;
-        },
-
-        isListening : function(fn, scope){
-            return this.findListener(fn, scope) != -1;
-        },
-
-        removeListener : function(fn, scope){
-            var index;
-            if((index = this.findListener(fn, scope)) != -1){
-                if(!this.firing){
-                    this.listeners.splice(index, 1);
-                }else{
-                    this.listeners = this.listeners.slice(0);
-                    this.listeners.splice(index, 1);
-                }
-                return true;
-            }
-            return false;
-        },
-
-        clearListeners : function(){
-            this.listeners = [];
-        },
-
-        fire : function(){
-            var ls = this.listeners, scope, len = ls.length;
-            if(len > 0){
-                this.firing = true;
-                var args = Array.prototype.slice.call(arguments, 0);
-                for(var i = 0; i < len; i++){
-                    var l = ls[i];
-                    if(l.fireFn.apply(l.scope||this.obj||window, arguments) === false){
-                        this.firing = false;
-                        return false;
+    return r;
+};
+ * Then external links could be gathered with the following statement:
+var externalLinks = Ext.select("a:external");
+
+ */ + pseudos : { + "first-child" : function(c){ + var r = [], ri = -1, n; + for(var i = 0, ci; ci = n = c[i]; i++){ + while((n = n.previousSibling) && n.nodeType != 1); + if(!n){ + r[++ri] = ci; } } - this.firing = false; - } - return true; - } - }; -})(); + return r; + }, -Ext.EventManager = function(){ - var docReadyEvent, docReadyProcId, docReadyState = false; - var resizeEvent, resizeTask, textEvent, textSize; - var E = Ext.lib.Event; - var D = Ext.lib.Dom; - var xname = 'Ex' + 't'; - - var elHash = {}; - - var addListener = function(el, ename, fn, wrap, scope){ - var id = Ext.id(el); - if(!elHash[id]){ - elHash[id] = {}; - } - var es = elHash[id]; - if(!es[ename]){ - es[ename] = []; - } - var ls = es[ename]; - ls.push({ - id: id, - ename: ename, - fn: fn, - wrap: wrap, - scope: scope - }); - - E.on(el, ename, wrap); - - if(ename == "mousewheel" && el.addEventListener){ el.addEventListener("DOMMouseScroll", wrap, false); - E.on(window, 'unload', function(){ - el.removeEventListener("DOMMouseScroll", wrap, false); - }); - } - if(ename == "mousedown" && el == document){ Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); - } - } - - var removeListener = function(el, ename, fn, scope){ - el = Ext.getDom(el); - var id = Ext.id(el), es = elHash[id], wrap; - if(es){ - var ls = es[ename], l; - if(ls){ - for(var i = 0, len = ls.length; i < len; i++){ - l = ls[i]; - if(l.fn == fn && (!scope || l.scope == scope)){ - wrap = l.wrap; - E.un(el, ename, wrap); - ls.splice(i, 1); - break; + "last-child" : function(c){ + var r = [], ri = -1, n; + for(var i = 0, ci; ci = n = c[i]; i++){ + while((n = n.nextSibling) && n.nodeType != 1); + if(!n){ + r[++ri] = ci; } } - } - } - if(ename == "mousewheel" && el.addEventListener && wrap){ - el.removeEventListener("DOMMouseScroll", wrap, false); - } - if(ename == "mousedown" && el == document && wrap){ Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); - } - } + return r; + }, - var removeAll = function(el){ - el = Ext.getDom(el); - var id = Ext.id(el), es = elHash[id], ls; - if(es){ - for(var ename in es){ - if(es.hasOwnProperty(ename)){ - ls = es[ename]; - for(var i = 0, len = ls.length; i < len; i++){ - E.un(el, ename, ls[i].wrap); - ls[i] = null; + "nth-child" : function(c, a) { + var r = [], ri = -1, + m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a), + f = (m[1] || 1) - 0, l = m[2] - 0; + for(var i = 0, n; n = c[i]; i++){ + var pn = n.parentNode; + if (batch != pn._batch) { + var j = 0; + for(var cn = pn.firstChild; cn; cn = cn.nextSibling){ + if(cn.nodeType == 1){ + cn.nodeIndex = ++j; + } + } + pn._batch = batch; + } + if (f == 1) { + if (l == 0 || n.nodeIndex == l){ + r[++ri] = n; + } + } else if ((n.nodeIndex + l) % f == 0){ + r[++ri] = n; } } - es[ename] = null; - } - delete elHash[id]; - } - } - var fireDocReady = function(){ - if(!docReadyState){ - docReadyState = Ext.isReady = true; - if(Ext.isGecko || Ext.isOpera) { - document.removeEventListener("DOMContentLoaded", fireDocReady, false); - } - } - if(docReadyProcId){ - clearInterval(docReadyProcId); - docReadyProcId = null; - } - if(docReadyEvent){ - docReadyEvent.fire(); - docReadyEvent.clearListeners(); - } - }; + return r; + }, - var initDocReady = function(){ - docReadyEvent = new Ext.util.Event(); - - if(Ext.isReady){ - return; - } - - E.on(window, 'load', fireDocReady); - - if(Ext.isGecko || Ext.isOpera) { - document.addEventListener('DOMContentLoaded', fireDocReady, false); - } - else if(Ext.isIE){ - docReadyProcId = setInterval(function(){ - try{ - Ext.isReady || (document.documentElement.doScroll('left')); - }catch(e){ - return; - } - fireDocReady(); }, 5); - - document.onreadystatechange = function(){ - if(document.readyState == 'complete'){ - document.onreadystatechange = null; - fireDocReady(); - } - }; - } - else if(Ext.isSafari){ - docReadyProcId = setInterval(function(){ - var rs = document.readyState; - if(rs == 'complete') { - fireDocReady(); - } - }, 10); - } - }; - - var createBuffered = function(h, o){ - var task = new Ext.util.DelayedTask(h); - return function(e){ - e = new Ext.EventObjectImpl(e); - task.delay(o.buffer, h, null, [e]); - }; - }; - - var createSingle = function(h, el, ename, fn, scope){ - return function(e){ - Ext.EventManager.removeListener(el, ename, fn, scope); - h(e); - }; - }; - - var createDelayed = function(h, o){ - return function(e){ - e = new Ext.EventObjectImpl(e); - setTimeout(function(){ - h(e); - }, o.delay || 10); - }; - }; - - var listen = function(element, ename, opt, fn, scope){ - var o = (!opt || typeof opt == "boolean") ? {} : opt; - fn = fn || o.fn; scope = scope || o.scope; - var el = Ext.getDom(element); - if(!el){ - throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; - } - var h = function(e){ - if(!window[xname]){ - return; - } - e = Ext.EventObject.setEvent(e); - var t; - if(o.delegate){ - t = e.getTarget(o.delegate, el); - if(!t){ - return; - } - }else{ - t = e.target; - } - if(o.stopEvent === true){ - e.stopEvent(); - } - if(o.preventDefault === true){ - e.preventDefault(); - } - if(o.stopPropagation === true){ - e.stopPropagation(); - } - - if(o.normalized === false){ - e = e.browserEvent; - } - - fn.call(scope || el, e, t, o); - }; - if(o.delay){ - h = createDelayed(h, o); - } - if(o.single){ - h = createSingle(h, el, ename, fn, scope); - } - if(o.buffer){ - h = createBuffered(h, o); - } - - addListener(el, ename, fn, h, scope); - return h; - }; - - var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; - var pub = { - - - addListener : function(element, eventName, fn, scope, options){ - if(typeof eventName == "object"){ - var o = eventName; - for(var e in o){ - if(propRe.test(e)){ - continue; - } - if(typeof o[e] == "function"){ - listen(element, e, o, o[e], o.scope); - }else{ - listen(element, e, o[e]); + "only-child" : function(c){ + var r = [], ri = -1;; + for(var i = 0, ci; ci = c[i]; i++){ + if(!prev(ci) && !next(ci)){ + r[++ri] = ci; } } - return; - } - return listen(element, eventName, options, fn, scope); - }, + return r; + }, - - removeListener : function(element, eventName, fn, scope){ - return removeListener(element, eventName, fn, scope); - }, - - - removeAll : function(element){ - return removeAll(element); - }, - - - onDocumentReady : function(fn, scope, options){ - if(!docReadyEvent){ - initDocReady(); - } - if(docReadyState || Ext.isReady){ options || (options = {}); - fn.defer(options.delay||0, scope); - }else{ - docReadyEvent.addListener(fn, scope, options); - } - }, - - - onWindowResize : function(fn, scope, options){ - if(!resizeEvent){ - resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(function(){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - }); - E.on(window, "resize", this.fireWindowResize, this); - } - resizeEvent.addListener(fn, scope, options); - }, - - fireWindowResize : function(){ - if(resizeEvent){ - if((Ext.isIE||Ext.isAir) && resizeTask){ - resizeTask.delay(50); - }else{ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - } - } - }, - - - onTextResize : function(fn, scope, options){ - if(!textEvent){ - textEvent = new Ext.util.Event(); - var textEl = new Ext.Element(document.createElement('div')); - textEl.dom.className = 'x-text-resize'; - textEl.dom.innerHTML = 'X'; - textEl.appendTo(document.body); - textSize = textEl.dom.offsetHeight; - setInterval(function(){ - if(textEl.dom.offsetHeight != textSize){ - textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); + "empty" : function(c){ + var r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + var cns = ci.childNodes, j = 0, cn, empty = true; + while(cn = cns[j]){ + ++j; + if(cn.nodeType == 1 || cn.nodeType == 3){ + empty = false; + break; + } } - }, this.textResizeInterval); - } - textEvent.addListener(fn, scope, options); - }, + if(empty){ + r[++ri] = ci; + } + } + return r; + }, - - removeResizeListener : function(fn, scope){ - if(resizeEvent){ - resizeEvent.removeListener(fn, scope); - } - }, + "contains" : function(c, v){ + var r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + if((ci.textContent||ci.innerText||'').indexOf(v) != -1){ + r[++ri] = ci; + } + } + return r; + }, - fireResize : function(){ - if(resizeEvent){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + "nodeValue" : function(c, v){ + var r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + if(ci.firstChild && ci.firstChild.nodeValue == v){ + r[++ri] = ci; + } + } + return r; + }, + + "checked" : function(c){ + var r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + if(ci.checked == true){ + r[++ri] = ci; + } + } + return r; + }, + + "not" : function(c, ss){ + return Ext.DomQuery.filter(c, ss, true); + }, + + "any" : function(c, selectors){ + var ss = selectors.split('|'), + r = [], ri = -1, s; + for(var i = 0, ci; ci = c[i]; i++){ + for(var j = 0; s = ss[j]; j++){ + if(Ext.DomQuery.is(ci, s)){ + r[++ri] = ci; + break; + } + } + } + return r; + }, + + "odd" : function(c){ + return this["nth-child"](c, "odd"); + }, + + "even" : function(c){ + return this["nth-child"](c, "even"); + }, + + "nth" : function(c, a){ + return c[a-1] || []; + }, + + "first" : function(c){ + return c[0] || []; + }, + + "last" : function(c){ + return c[c.length-1] || []; + }, + + "has" : function(c, ss){ + var s = Ext.DomQuery.select, + r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + if(s(ss, ci).length > 0){ + r[++ri] = ci; + } + } + return r; + }, + + "next" : function(c, ss){ + var is = Ext.DomQuery.is, + r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + var n = next(ci); + if(n && is(n, ss)){ + r[++ri] = ci; + } + } + return r; + }, + + "prev" : function(c, ss){ + var is = Ext.DomQuery.is, + r = [], ri = -1; + for(var i = 0, ci; ci = c[i]; i++){ + var n = prev(ci); + if(n && is(n, ss)){ + r[++ri] = ci; + } + } + return r; } - }, - - ieDeferSrc : false, - - textResizeInterval : 50 + } }; - - pub.on = pub.addListener; - - pub.un = pub.removeListener; - - pub.stoppedMouseDownEvent = new Ext.util.Event(); - return pub; }(); -Ext.onReady = Ext.EventManager.onDocumentReady; - - -(function(){ - var initExtCss = function(){ - var bd = document.body || document.getElementsByTagName('body')[0]; - if(!bd){ return false; } - var cls = [' ', - Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') - : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') - : Ext.isOpera ? "ext-opera" - : Ext.isSafari ? "ext-safari" : ""]; - - if(Ext.isMac){ - cls.push("ext-mac"); - } - if(Ext.isLinux){ - cls.push("ext-linux"); - } - if(Ext.isBorderBox){ - cls.push('ext-border-box'); - } - if(Ext.isStrict){ var p = bd.parentNode; - if(p){ - p.className += ' ext-strict'; - } - } - bd.className += cls.join(' '); - return true; - } - - if(!initExtCss()){ - Ext.onReady(initExtCss); - } -})(); - - -Ext.EventObject = function(){ - - var E = Ext.lib.Event; - - var safariKeys = { - 3 : 13, 63234 : 37, 63235 : 39, 63232 : 38, 63233 : 40, 63276 : 33, 63277 : 34, 63272 : 46, 63273 : 36, 63275 : 35 }; - - var btnMap = Ext.isIE ? {1:0,4:1,2:2} : - (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2}); - - Ext.EventObjectImpl = function(e){ - if(e){ - this.setEvent(e.browserEvent || e); - } +/** + * Selects an array of DOM nodes by CSS/XPath selector. Shorthand of {@link Ext.DomQuery#select} + * @param {String} path The selector/xpath query + * @param {Node} root (optional) The start of the query (defaults to document). + * @return {Array} + * @member Ext + * @method query + */ +Ext.query = Ext.DomQuery.select; +/** + * @class Ext.util.DelayedTask + *

The DelayedTask class provides a convenient way to "buffer" the execution of a method, + * performing setTimeout where a new timeout cancels the old timeout. When called, the + * task will wait the specified time period before executing. If durng that time period, + * the task is called again, the original call will be cancelled. This continues so that + * the function is only called a single time for each iteration.

+ *

This method is especially useful for things like detecting whether a user has finished + * typing in a text field. An example would be performing validation on a keypress. You can + * use this class to buffer the keypress events for a certain number of milliseconds, and + * perform only if they stop for that amount of time. Usage:


+var task = new Ext.util.DelayedTask(function(){
+    alert(Ext.getDom('myInputField').value.length);
+});
+// Wait 500ms before calling our function. If the user presses another key 
+// during that 500ms, it will be cancelled and we'll wait another 500ms.
+Ext.get('myInputField').on('keypress', function(){
+    task.{@link #delay}(500); 
+});
+ * 
+ *

Note that we are using a DelayedTask here to illustrate a point. The configuration + * option buffer for {@link Ext.util.Observable#addListener addListener/on} will + * also setup a delayed task for you to buffer events.

+ * @constructor The parameters to this constructor serve as defaults and are not required. + * @param {Function} fn (optional) The default function to call. + * @param {Object} scope The default scope (The this reference) in which the + * function is called. If not specified, this will refer to the browser window. + * @param {Array} args (optional) The default Array of arguments. + */ +Ext.util.DelayedTask = function(fn, scope, args){ + var me = this, + id, + call = function(){ + clearInterval(id); + id = null; + fn.apply(scope, args || []); + }; + + /** + * Cancels any pending timeout and queues a new one + * @param {Number} delay The milliseconds to delay + * @param {Function} newFn (optional) Overrides function passed to constructor + * @param {Object} newScope (optional) Overrides scope passed to constructor. Remember that if no scope + * is specified, this will refer to the browser window. + * @param {Array} newArgs (optional) Overrides args passed to constructor + */ + me.delay = function(delay, newFn, newScope, newArgs){ + me.cancel(); + fn = newFn || fn; + scope = newScope || scope; + args = newArgs || args; + id = setInterval(call, delay); }; - Ext.EventObjectImpl.prototype = { - - browserEvent : null, - - button : -1, - - shiftKey : false, - - ctrlKey : false, - - altKey : false, - - - BACKSPACE: 8, - - TAB: 9, - - NUM_CENTER: 12, - - ENTER: 13, - - RETURN: 13, - - SHIFT: 16, - - CTRL: 17, - CONTROL : 17, - ALT: 18, - - PAUSE: 19, - - CAPS_LOCK: 20, - - ESC: 27, - - SPACE: 32, - - PAGE_UP: 33, - PAGEUP : 33, - PAGE_DOWN: 34, - PAGEDOWN : 34, - END: 35, - - HOME: 36, - - LEFT: 37, - - UP: 38, - - RIGHT: 39, - - DOWN: 40, - - PRINT_SCREEN: 44, - - INSERT: 45, - - DELETE: 46, - - ZERO: 48, - - ONE: 49, - - TWO: 50, - - THREE: 51, - - FOUR: 52, - - FIVE: 53, - - SIX: 54, - - SEVEN: 55, - - EIGHT: 56, - - NINE: 57, - - A: 65, - - B: 66, - - C: 67, - - D: 68, - - E: 69, - - F: 70, - - G: 71, - - H: 72, - - I: 73, - - J: 74, - - K: 75, - - L: 76, - - M: 77, - - N: 78, - - O: 79, - - P: 80, - - Q: 81, - - R: 82, - - S: 83, - - T: 84, - - U: 85, - - V: 86, - - W: 87, - - X: 88, - - Y: 89, - - Z: 90, - - CONTEXT_MENU: 93, - - NUM_ZERO: 96, - - NUM_ONE: 97, - - NUM_TWO: 98, - - NUM_THREE: 99, - - NUM_FOUR: 100, - - NUM_FIVE: 101, - - NUM_SIX: 102, - - NUM_SEVEN: 103, - - NUM_EIGHT: 104, - - NUM_NINE: 105, - - NUM_MULTIPLY: 106, - - NUM_PLUS: 107, - - NUM_MINUS: 109, - - NUM_PERIOD: 110, - - NUM_DIVISION: 111, - - F1: 112, - - F2: 113, - - F3: 114, - - F4: 115, - - F5: 116, - - F6: 117, - - F7: 118, - - F8: 119, - - F9: 120, - - F10: 121, - - F11: 122, - - F12: 123, - - - setEvent : function(e){ - if(e == this || (e && e.browserEvent)){ return e; - } - this.browserEvent = e; - if(e){ - this.button = e.button ? btnMap[e.button] : (e.which ? e.which-1 : -1); - if(e.type == 'click' && this.button == -1){ - this.button = 0; - } - this.type = e.type; - this.shiftKey = e.shiftKey; - this.ctrlKey = e.ctrlKey || e.metaKey; - this.altKey = e.altKey; - this.keyCode = e.keyCode; - this.charCode = e.charCode; - this.target = E.getTarget(e); - this.xy = E.getXY(e); - }else{ - this.button = -1; - this.shiftKey = false; - this.ctrlKey = false; - this.altKey = false; - this.keyCode = 0; - this.charCode = 0; - this.target = null; - this.xy = [0, 0]; - } - return this; - }, - - - stopEvent : function(){ - if(this.browserEvent){ - if(this.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(this); - } - E.stopEvent(this.browserEvent); - } - }, - - - preventDefault : function(){ - if(this.browserEvent){ - E.preventDefault(this.browserEvent); - } - }, - - - isNavKeyPress : function(){ - var k = this.keyCode; - k = Ext.isSafari ? (safariKeys[k] || k) : k; - return (k >= 33 && k <= 40) || k == this.RETURN || k == this.TAB || k == this.ESC; - }, - - isSpecialKey : function(){ - var k = this.keyCode; - return (this.type == 'keypress' && this.ctrlKey) || k == 9 || k == 13 || k == 40 || k == 27 || - (k == 16) || (k == 17) || - (k >= 18 && k <= 20) || - (k >= 33 && k <= 35) || - (k >= 36 && k <= 39) || - (k >= 44 && k <= 45); - }, - - - stopPropagation : function(){ - if(this.browserEvent){ - if(this.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(this); - } - E.stopPropagation(this.browserEvent); - } - }, - - - getCharCode : function(){ - return this.charCode || this.keyCode; - }, - - - getKey : function(){ - var k = this.keyCode || this.charCode; - return Ext.isSafari ? (safariKeys[k] || k) : k; - }, - - - getPageX : function(){ - return this.xy[0]; - }, - - - getPageY : function(){ - return this.xy[1]; - }, - - - getTime : function(){ - if(this.browserEvent){ - return E.getTime(this.browserEvent); - } - return null; - }, - - - getXY : function(){ - return this.xy; - }, - - - getTarget : function(selector, maxDepth, returnEl){ - return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target); - }, - - - getRelatedTarget : function(){ - if(this.browserEvent){ - return E.getRelatedTarget(this.browserEvent); - } - return null; - }, - - - getWheelDelta : function(){ - var e = this.browserEvent; - var delta = 0; - if(e.wheelDelta){ - delta = e.wheelDelta/120; - }else if(e.detail){ - delta = -e.detail/3; - } - return delta; - }, - - - hasModifier : function(){ - return ((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false; - }, - - - within : function(el, related){ - var t = this[related ? "getRelatedTarget" : "getTarget"](); - return t && Ext.fly(el).contains(t); - }, - - getPoint : function(){ - return new Ext.lib.Point(this.xy[0], this.xy[1]); + /** + * Cancel the last queued timeout + */ + me.cancel = function(){ + if(id){ + clearInterval(id); + id = null; } }; +};/** + * @class Ext.Element + *

Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.

+ *

All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.

+ *

Note that the events documented in this class are not Ext events, they encapsulate browser events. To + * access the underlying browser event, see {@link Ext.EventObject#browserEvent}. Some older + * browsers may not support the full range of events. Which events are supported is beyond the control of ExtJs.

+ * Usage:
+

+// by id
+var el = Ext.get("my-div");
 
-    return new Ext.EventObjectImpl();
-}();
+// by DOM element reference
+var el = Ext.get(myDivElement);
+
+ * Animations
+ *

When an element is manipulated, by default there is no animation.

+ *

+var el = Ext.get("my-div");
 
+// no animation
+el.setWidth(100);
+ * 
+ *

Many of the functions for manipulating an element have an optional "animate" parameter. This + * parameter can be specified as boolean (true) for default animation effects.

+ *

+// default animation
+el.setWidth(100, true);
+ * 
+ * + *

To configure the effects, an object literal with animation options to use as the Element animation + * configuration object can also be specified. Note that the supported Element animation configuration + * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects. The supported + * Element animation configuration options are:

+
+Option    Default   Description
+--------- --------  ---------------------------------------------
+{@link Ext.Fx#duration duration}  .35       The duration of the animation in seconds
+{@link Ext.Fx#easing easing}    easeOut   The easing method
+{@link Ext.Fx#callback callback}  none      A function to execute when the anim completes
+{@link Ext.Fx#scope scope}     this      The scope (this) of the callback function
+
+ * + *

+// Element animation options object
+var opt = {
+    {@link Ext.Fx#duration duration}: 1,
+    {@link Ext.Fx#easing easing}: 'elasticIn',
+    {@link Ext.Fx#callback callback}: this.foo,
+    {@link Ext.Fx#scope scope}: this
+};
+// animation with some options set
+el.setWidth(100, opt);
+ * 
+ *

The Element animation object being used for the animation will be set on the options + * object as "anim", which allows you to stop or manipulate the animation. Here is an example:

+ *

+// using the "anim" property to get the Anim object
+if(opt.anim.isAnimated()){
+    opt.anim.stop();
+}
+ * 
+ *

Also see the {@link #animate} method for another animation technique.

+ *

Composite (Collections of) Elements

+ *

For working with collections of Elements, see {@link Ext.CompositeElement}

+ * @constructor Create a new Element directly. + * @param {String/HTMLElement} element + * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class). + */ (function(){ -var D = Ext.lib.Dom; -var E = Ext.lib.Event; -var A = Ext.lib.Anim; - -var propCache = {}; -var camelRe = /(-[a-z])/gi; -var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; -var view = document.defaultView; +var DOC = document; Ext.Element = function(element, forceNew){ var dom = typeof element == "string" ? - document.getElementById(element) : element; - if(!dom){ return null; - } - var id = dom.id; - if(forceNew !== true && id && Ext.Element.cache[id]){ return Ext.Element.cache[id]; + DOC.getElementById(element) : element, + id; + + if(!dom) return null; + + id = dom.id; + + if(!forceNew && id && Ext.elCache[id]){ // element object already exists + return Ext.elCache[id].el; } - + /** + * The DOM element + * @type HTMLElement + */ this.dom = dom; - + /** + * The DOM element ID + * @type String + */ this.id = id || Ext.id(dom); }; -var El = Ext.Element; +var DH = Ext.DomHelper, + El = Ext.Element, + EC = Ext.elCache; El.prototype = { - - originalDisplay : "", + /** + * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function) + * @param {Object} o The object with the attributes + * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos. + * @return {Ext.Element} this + */ + set : function(o, useSet){ + var el = this.dom, + attr, + val, + useSet = (useSet !== false) && !!el.setAttribute; - visibilityMode : 1, - - defaultUnit : "px", - - setVisibilityMode : function(visMode){ - this.visibilityMode = visMode; - return this; - }, - - enableDisplayMode : function(display){ - this.setVisibilityMode(El.DISPLAY); - if(typeof display != "undefined") this.originalDisplay = display; - return this; - }, - - - findParent : function(simpleSelector, maxDepth, returnEl){ - var p = this.dom, b = document.body, depth = 0, dq = Ext.DomQuery, stopEl; - maxDepth = maxDepth || 50; - if(typeof maxDepth != "number"){ - stopEl = Ext.getDom(maxDepth); - maxDepth = 10; - } - while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ - if(dq.is(p, simpleSelector)){ - return returnEl ? Ext.get(p) : p; + for (attr in o) { + if (o.hasOwnProperty(attr)) { + val = o[attr]; + if (attr == 'style') { + DH.applyStyles(el, val); + } else if (attr == 'cls') { + el.className = val; + } else if (useSet) { + el.setAttribute(attr, val); + } else { + el[attr] = val; + } } - depth++; - p = p.parentNode; } - return null; + return this; }, +// Mouse events + /** + * @event click + * Fires when a mouse click is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event contextmenu + * Fires when a right click is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event dblclick + * Fires when a mouse double click is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mousedown + * Fires when a mousedown is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mouseup + * Fires when a mouseup is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mouseover + * Fires when a mouseover is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mousemove + * Fires when a mousemove is detected with the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mouseout + * Fires when a mouseout is detected with the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mouseenter + * Fires when the mouse enters the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event mouseleave + * Fires when the mouse leaves the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ - - findParentNode : function(simpleSelector, maxDepth, returnEl){ - var p = Ext.fly(this.dom.parentNode, '_internal'); - return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null; - }, - - - up : function(simpleSelector, maxDepth){ - return this.findParentNode(simpleSelector, maxDepth, true); - }, +// Keyboard events + /** + * @event keypress + * Fires when a keypress is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event keydown + * Fires when a keydown is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event keyup + * Fires when a keyup is detected within the element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ +// HTML frame/object events + /** + * @event load + * Fires when the user agent finishes loading all content within the element. Only supported by window, frames, objects and images. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event unload + * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target element or any of its content has been removed. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event abort + * Fires when an object/image is stopped from loading before completely loaded. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event error + * Fires when an object/image/frame cannot be loaded properly. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event resize + * Fires when a document view is resized. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event scroll + * Fires when a document view is scrolled. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ - +// Form events + /** + * @event select + * Fires when a user selects some text in a text field, including input and textarea. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event change + * Fires when a control loses the input focus and its value has been modified since gaining focus. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event submit + * Fires when a form is submitted. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event reset + * Fires when a form is reset. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event focus + * Fires when an element receives focus either via the pointing device or by tab navigation. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event blur + * Fires when an element loses focus either via the pointing device or by tabbing navigation. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + +// User Interface events + /** + * @event DOMFocusIn + * Where supported. Similar to HTML focus event, but can be applied to any focusable element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMFocusOut + * Where supported. Similar to HTML blur event, but can be applied to any focusable element. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMActivate + * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + +// DOM Mutation events + /** + * @event DOMSubtreeModified + * Where supported. Fires when the subtree is modified. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMNodeInserted + * Where supported. Fires when a node has been added as a child of another node. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMNodeRemoved + * Where supported. Fires when a descendant node of the element is removed. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMNodeRemovedFromDocument + * Where supported. Fires when a node is being removed from a document. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMNodeInsertedIntoDocument + * Where supported. Fires when a node is being inserted into a document. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMAttrModified + * Where supported. Fires when an attribute has been modified. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + /** + * @event DOMCharacterDataModified + * Where supported. Fires when the character data has been modified. + * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event. + * @param {HtmlElement} t The target of the event. + * @param {Object} o The options configuration passed to the {@link #addListener} call. + */ + + /** + * The default unit to append to CSS values where a unit isn't provided (defaults to px). + * @type String + */ + defaultUnit : "px", + + /** + * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child) + * @param {String} selector The simple selector to test + * @return {Boolean} True if this element matches the selector, else false + */ is : function(simpleSelector){ return Ext.DomQuery.is(this.dom, simpleSelector); }, - - animate : function(args, duration, onComplete, easing, animType){ - this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType); - return this; - }, - - - anim : function(args, opt, animType, defaultDur, defaultEase, cb){ - animType = animType || 'run'; - opt = opt || {}; - var anim = Ext.lib.Anim[animType]( - this.dom, args, - (opt.duration || defaultDur) || .35, - (opt.easing || defaultEase) || 'easeOut', - function(){ - Ext.callback(cb, this); - Ext.callback(opt.callback, opt.scope || this, [this, opt]); - }, - this - ); - opt.anim = anim; - return anim; - }, - - preanim : function(a, i){ - return !a[i] ? false : (typeof a[i] == "object" ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]}); - }, - - - clean : function(forceReclean){ - if(this.isCleaned && forceReclean !== true){ - return this; - } - var ns = /\S/; - var d = this.dom, n = d.firstChild, ni = -1; - while(n){ - var nx = n.nextSibling; - if(n.nodeType == 3 && !ns.test(n.nodeValue)){ - d.removeChild(n); - }else{ - n.nodeIndex = ++ni; - } - n = nx; - } - this.isCleaned = true; - return this; - }, - - - scrollIntoView : function(container, hscroll){ - var c = Ext.getDom(container) || Ext.getBody().dom; - var el = this.dom; - - var o = this.getOffsetsTo(c), - l = o[0] + c.scrollLeft, - t = o[1] + c.scrollTop, - b = t+el.offsetHeight, - r = l+el.offsetWidth; - - var ch = c.clientHeight; - var ct = parseInt(c.scrollTop, 10); - var cl = parseInt(c.scrollLeft, 10); - var cb = ct + ch; - var cr = cl + c.clientWidth; - - if(el.offsetHeight > ch || t < ct){ - c.scrollTop = t; - }else if(b > cb){ - c.scrollTop = b-ch; - } - c.scrollTop = c.scrollTop; - if(hscroll !== false){ - if(el.offsetWidth > c.clientWidth || l < cl){ - c.scrollLeft = l; - }else if(r > cr){ - c.scrollLeft = r-c.clientWidth; - } - c.scrollLeft = c.scrollLeft; - } - return this; - }, - - scrollChildIntoView : function(child, hscroll){ - Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); - }, - - - autoHeight : function(animate, duration, onComplete, easing){ - var oldHeight = this.getHeight(); - this.clip(); - this.setHeight(1); setTimeout(function(){ - var height = parseInt(this.dom.scrollHeight, 10); if(!animate){ - this.setHeight(height); - this.unclip(); - if(typeof onComplete == "function"){ - onComplete(); - } - }else{ - this.setHeight(oldHeight); this.setHeight(height, animate, duration, function(){ - this.unclip(); - if(typeof onComplete == "function") onComplete(); - }.createDelegate(this), easing); - } - }.createDelegate(this), 0); - return this; - }, - - - contains : function(el){ - if(!el){return false;} - return D.isAncestor(this.dom, el.dom ? el.dom : el); - }, - - - isVisible : function(deep) { - var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none"); - if(deep !== true || !vis){ - return vis; - } - var p = this.dom.parentNode; - while(p && p.tagName.toLowerCase() != "body"){ - if(!Ext.fly(p, '_isVisible').isVisible()){ - return false; - } - p = p.parentNode; - } - return true; - }, - - - select : function(selector, unique){ - return El.select(selector, unique, this.dom); - }, - - - query : function(selector){ - return Ext.DomQuery.select(selector, this.dom); - }, - - - child : function(selector, returnDom){ - var n = Ext.DomQuery.selectNode(selector, this.dom); - return returnDom ? n : Ext.get(n); - }, - - - down : function(selector, returnDom){ - var n = Ext.DomQuery.selectNode(" > " + selector, this.dom); - return returnDom ? n : Ext.get(n); - }, - - - initDD : function(group, config, overrides){ - var dd = new Ext.dd.DD(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - - initDDProxy : function(group, config, overrides){ - var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - - initDDTarget : function(group, config, overrides){ - var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - - setVisible : function(visible, animate){ - if(!animate || !A){ - if(this.visibilityMode == El.DISPLAY){ - this.setDisplayed(visible); - }else{ - this.fixDisplay(); - this.dom.style.visibility = visible ? "visible" : "hidden"; - } - }else{ - var dom = this.dom; - var visMode = this.visibilityMode; - if(visible){ - this.setOpacity(.01); - this.setVisible(true); - } - this.anim({opacity: { to: (visible?1:0) }}, - this.preanim(arguments, 1), - null, .35, 'easeIn', function(){ - if(!visible){ - if(visMode == El.DISPLAY){ - dom.style.display = "none"; - }else{ - dom.style.visibility = "hidden"; - } - Ext.get(dom).setOpacity(1); - } - }); - } - return this; - }, - - - isDisplayed : function() { - return this.getStyle("display") != "none"; - }, - - - toggle : function(animate){ - this.setVisible(!this.isVisible(), this.preanim(arguments, 0)); - return this; - }, - - - setDisplayed : function(value) { - if(typeof value == "boolean"){ - value = value ? this.originalDisplay : "none"; - } - this.setStyle("display", value); - return this; - }, - - - focus : function() { + /** + * Tries to focus the element. Any exceptions are caught and ignored. + * @param {Number} defer (optional) Milliseconds to defer the focus + * @return {Ext.Element} this + */ + focus : function(defer, /* private */ dom) { + var me = this, + dom = dom || me.dom; try{ - this.dom.focus(); + if(Number(defer)){ + me.focus.defer(defer, null, [null, dom]); + }else{ + dom.focus(); + } }catch(e){} - return this; + return me; }, - + /** + * Tries to blur the element. Any exceptions are caught and ignored. + * @return {Ext.Element} this + */ blur : function() { try{ this.dom.blur(); @@ -2531,166 +2006,1097 @@ El.prototype = { return this; }, + /** + * Returns the value of the "value" attribute + * @param {Boolean} asNumber true to parse the value as a number + * @return {String/Number} + */ + getValue : function(asNumber){ + var val = this.dom.value; + return asNumber ? parseInt(val, 10) : val; + }, + + /** + * Appends an event handler to this element. The shorthand version {@link #on} is equivalent. + * @param {String} eventName The name of event to handle. + * @param {Function} fn The handler function the event invokes. This function is passed + * the following parameters:
    + *
  • evt : EventObject
    The {@link Ext.EventObject EventObject} describing the event.
  • + *
  • el : HtmlElement
    The DOM element which was the target of the event. + * Note that this may be filtered by using the delegate option.
  • + *
  • o : Object
    The options object from the addListener call.
  • + *
+ * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. + * If omitted, defaults to this Element.. + * @param {Object} options (optional) An object containing handler configuration properties. + * This may contain any of the following properties:
    + *
  • scope Object :
    The scope (this reference) in which the handler function is executed. + * If omitted, defaults to this Element.
  • + *
  • delegate String:
    A simple selector to filter the target or look for a descendant of the target. See below for additional details.
  • + *
  • stopEvent Boolean:
    True to stop the event. That is stop propagation, and prevent the default action.
  • + *
  • preventDefault Boolean:
    True to prevent the default action
  • + *
  • stopPropagation Boolean:
    True to prevent event propagation
  • + *
  • normalized Boolean:
    False to pass a browser event to the handler function instead of an Ext.EventObject
  • + *
  • target Ext.Element:
    Only call the handler if the event was fired on the target Element, not if the event was bubbled up from a child node.
  • + *
  • delay Number:
    The number of milliseconds to delay the invocation of the handler after the event fires.
  • + *
  • single Boolean:
    True to add a handler to handle just the next firing of the event, and then remove itself.
  • + *
  • buffer Number:
    Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed + * by the specified number of milliseconds. If the event fires again within that time, the original + * handler is not invoked, but the new handler is scheduled in its place.
  • + *

+ *

+ * Combining Options
+ * In the following examples, the shorthand form {@link #on} is used rather than the more verbose + * addListener. The two are equivalent. Using the options argument, it is possible to combine different + * types of listeners:
+ *
+ * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the + * options object. The options object is available as the third parameter in the handler function.

+ * Code:

+el.on('click', this.onClick, this, {
+    single: true,
+    delay: 100,
+    stopEvent : true,
+    forumId: 4
+});

+ *

+ * Attaching multiple handlers in 1 call
+ * The method also allows for a single argument to be passed which is a config object containing properties + * which specify multiple handlers.

+ *

+ * Code:


+el.on({
+    'click' : {
+        fn: this.onClick,
+        scope: this,
+        delay: 100
+    },
+    'mouseover' : {
+        fn: this.onMouseOver,
+        scope: this
+    },
+    'mouseout' : {
+        fn: this.onMouseOut,
+        scope: this
+    }
+});
+ *

+ * Or a shorthand syntax:
+ * Code:

+el.on({ + 'click' : this.onClick, + 'mouseover' : this.onMouseOver, + 'mouseout' : this.onMouseOut, + scope: this +}); + *

+ *

delegate

+ *

This is a configuration option that you can pass along when registering a handler for + * an event to assist with event delegation. Event delegation is a technique that is used to + * reduce memory consumption and prevent exposure to memory-leaks. By registering an event + * for a container element as opposed to each element within a container. By setting this + * configuration option to a simple selector, the target element will be filtered to look for + * a descendant of the target. + * For example:


+// using this markup:
+<div id='elId'>
+    <p id='p1'>paragraph one</p>
+    <p id='p2' class='clickable'>paragraph two</p>
+    <p id='p3'>paragraph three</p>
+</div>
+// utilize event delegation to registering just one handler on the container element:
+el = Ext.get('elId');
+el.on(
+    'click',
+    function(e,t) {
+        // handle click
+        console.info(t.id); // 'p2'
+    },
+    this,
+    {
+        // filter the target element to be a descendant with the class 'clickable'
+        delegate: '.clickable'
+    }
+);
+     * 

+ * @return {Ext.Element} this + */ + addListener : function(eventName, fn, scope, options){ + Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); + return this; + }, + + /** + * Removes an event handler from this element. The shorthand version {@link #un} is equivalent. + * Note: if a scope was explicitly specified when {@link #addListener adding} the + * listener, the same scope must be specified here. + * Example: + *

+el.removeListener('click', this.handlerFn);
+// or
+el.un('click', this.handlerFn);
+
+ * @param {String} eventName The name of the event from which to remove the handler. + * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. + * @param {Object} scope If a scope (this reference) was specified when the listener was added, + * then this must refer to the same object. + * @return {Ext.Element} this + */ + removeListener : function(eventName, fn, scope){ + Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this); + return this; + }, + + /** + * Removes all previous added listeners from this element + * @return {Ext.Element} this + */ + removeAllListeners : function(){ + Ext.EventManager.removeAll(this.dom); + return this; + }, + + /** + * Recursively removes all previous added listeners from this element and its children + * @return {Ext.Element} this + */ + purgeAllListeners : function() { + Ext.EventManager.purgeElement(this, true); + return this; + }, + /** + * @private Test if size has a unit, otherwise appends the default + */ + addUnits : function(size){ + if(size === "" || size == "auto" || size === undefined){ + size = size || ''; + } else if(!isNaN(size) || !unitPattern.test(size)){ + size = size + (this.defaultUnit || 'px'); + } + return size; + }, + + /** + *

Updates the Same Origin Policy

+ *

Updating innerHTML of an element will not execute embedded <script> elements. This is a browser restriction.

+ * @param {Mixed} options. Either a sring containing the URL from which to load the HTML, or an {@link Ext.Ajax#request} options object specifying + * exactly how to request the HTML. + * @return {Ext.Element} this + */ + load : function(url, params, cb){ + Ext.Ajax.request(Ext.apply({ + params: params, + url: url.url || url, + callback: cb, + el: this.dom, + indicatorText: url.indicatorText || '' + }, Ext.isObject(url) ? url : {})); + return this; + }, + - addClass : function(className){ - if(Ext.isArray(className)){ - for(var i = 0, len = className.length; i < len; i++) { - this.addClass(className[i]); + isBorderBox : function(){ + return Ext.isBorderBox || Ext.isForcedBorderBox || noBoxAdjust[(this.dom.tagName || "").toLowerCase()]; + }, + + + remove : function(){ + var me = this, + dom = me.dom; + + if (dom) { + delete me.dom; + Ext.removeNode(dom); + } + }, + + + hover : function(overFn, outFn, scope, options){ + var me = this; + me.on('mouseenter', overFn, scope || me.dom, options); + me.on('mouseleave', outFn, scope || me.dom, options); + return me; + }, + + + contains : function(el){ + return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el); + }, + + + getAttributeNS : function(ns, name){ + return this.getAttribute(name, ns); + }, + + + getAttribute: (function(){ + var test = document.createElement('table'), + isBrokenOnTable = false, + hasGetAttribute = 'getAttribute' in test, + unknownRe = /undefined|unknown/; + + if (hasGetAttribute) { + + try { + test.getAttribute('ext:qtip'); + } catch (e) { + isBrokenOnTable = true; } - }else{ - if(className && !this.hasClass(className)){ - this.dom.className = this.dom.className + " " + className; - } - } - return this; - }, - - - radioClass : function(className){ - var siblings = this.dom.parentNode.childNodes; - for(var i = 0; i < siblings.length; i++) { - var s = siblings[i]; - if(s.nodeType == 1){ - Ext.get(s).removeClass(className); - } - } - this.addClass(className); - return this; - }, - - - removeClass : function(className){ - if(!className || !this.dom.className){ - return this; - } - if(Ext.isArray(className)){ - for(var i = 0, len = className.length; i < len; i++) { - this.removeClass(className[i]); - } - }else{ - if(this.hasClass(className)){ - var re = this.classReCache[className]; - if (!re) { - re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', "g"); - this.classReCache[className] = re; + + return function(name, ns) { + var el = this.dom, + value; + + if (el.getAttributeNS) { + value = el.getAttributeNS(ns, name) || null; } - this.dom.className = - this.dom.className.replace(re, " "); - } - } - return this; - }, - - classReCache: {}, - - - toggleClass : function(className){ - if(this.hasClass(className)){ - this.removeClass(className); - }else{ - this.addClass(className); - } - return this; - }, - - - hasClass : function(className){ - return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; - }, - - - replaceClass : function(oldClassName, newClassName){ - this.removeClass(oldClassName); - this.addClass(newClassName); - return this; - }, - - - getStyles : function(){ - var a = arguments, len = a.length, r = {}; - for(var i = 0; i < len; i++){ - r[a[i]] = this.getStyle(a[i]); - } - return r; - }, - - - getStyle : function(){ - return view && view.getComputedStyle ? - function(prop){ - var el = this.dom, v, cs, camel; - if(prop == 'float'){ - prop = "cssFloat"; - } - if(v = el.style[prop]){ - return v; - } - if(cs = view.getComputedStyle(el, "")){ - if(!(camel = propCache[prop])){ - camel = propCache[prop] = prop.replace(camelRe, camelFn); - } - return cs[camel]; - } - return null; - } : - function(prop){ - var el = this.dom, v, cs, camel; - if(prop == 'opacity'){ - if(typeof el.style.filter == 'string'){ - var m = el.style.filter.match(/alpha\(opacity=(.*)\)/i); - if(m){ - var fv = parseFloat(m[1]); - if(!isNaN(fv)){ - return fv ? fv / 100 : 0; + + if (value == null) { + if (ns) { + if (isBrokenOnTable && el.tagName.toUpperCase() == 'TABLE') { + try { + value = el.getAttribute(ns + ':' + name); + } catch (e) { + value = ''; } + } else { + value = el.getAttribute(ns + ':' + name); + } + } else { + value = el.getAttribute(name) || el[name]; + } + } + return value || ''; + }; + } else { + return function(name, ns) { + var el = this.om, + value, + attribute; + + if (ns) { + attribute = el[ns + ':' + name]; + value = unknownRe.test(typeof attribute) ? undefined : attribute; + } else { + value = el[name]; + } + return value || ''; + }; + } + test = null; + })(), + + + update : function(html) { + if (this.dom) { + this.dom.innerHTML = html; + } + return this; + } +}; + +var ep = El.prototype; + +El.addMethods = function(o){ + Ext.apply(ep, o); +}; + + +ep.on = ep.addListener; + + +ep.un = ep.removeListener; + + +ep.autoBoxAdjust = true; + + +var unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i, + docEl; + + + + +El.get = function(el){ + var ex, + elm, + id; + if(!el){ return null; } + if (typeof el == "string") { + if (!(elm = DOC.getElementById(el))) { + return null; + } + if (EC[el] && EC[el].el) { + ex = EC[el].el; + ex.dom = elm; + } else { + ex = El.addToCache(new El(elm)); + } + return ex; + } else if (el.tagName) { + if(!(id = el.id)){ + id = Ext.id(el); + } + if (EC[id] && EC[id].el) { + ex = EC[id].el; + ex.dom = el; + } else { + ex = El.addToCache(new El(el)); + } + return ex; + } else if (el instanceof El) { + if(el != docEl){ + + + + + if (Ext.isIE && (el.id == undefined || el.id == '')) { + el.dom = el.dom; + } else { + el.dom = DOC.getElementById(el.id) || el.dom; + } + } + return el; + } else if(el.isComposite) { + return el; + } else if(Ext.isArray(el)) { + return El.select(el); + } else if(el == DOC) { + + if(!docEl){ + var f = function(){}; + f.prototype = El.prototype; + docEl = new f(); + docEl.dom = DOC; + } + return docEl; + } + return null; +}; + +El.addToCache = function(el, id){ + id = id || el.id; + EC[id] = { + el: el, + data: {}, + events: {} + }; + return el; +}; + + +El.data = function(el, key, value){ + el = El.get(el); + if (!el) { + return null; + } + var c = EC[el.id].data; + if(arguments.length == 2){ + return c[key]; + }else{ + return (c[key] = value); + } +}; + + + + +function garbageCollect(){ + if(!Ext.enableGarbageCollector){ + clearInterval(El.collectorThreadId); + } else { + var eid, + el, + d, + o; + + for(eid in EC){ + o = EC[eid]; + if(o.skipGC){ + continue; + } + el = o.el; + d = el.dom; + + + + + + + + + + + + + + + + + + if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){ + if(Ext.enableListenerCollection){ + Ext.EventManager.removeAll(d); + } + delete EC[eid]; + } + } + + if (Ext.isIE) { + var t = {}; + for (eid in EC) { + t[eid] = EC[eid]; + } + EC = Ext.elCache = t; + } + } +} +El.collectorThreadId = setInterval(garbageCollect, 30000); + +var flyFn = function(){}; +flyFn.prototype = El.prototype; + + +El.Flyweight = function(dom){ + this.dom = dom; +}; + +El.Flyweight.prototype = new flyFn(); +El.Flyweight.prototype.isFlyweight = true; +El._flyweights = {}; + + +El.fly = function(el, named){ + var ret = null; + named = named || '_global'; + + if (el = Ext.getDom(el)) { + (El._flyweights[named] = El._flyweights[named] || new El.Flyweight()).dom = el; + ret = El._flyweights[named]; + } + return ret; +}; + + +Ext.get = El.get; + + +Ext.fly = El.fly; + + +var noBoxAdjust = Ext.isStrict ? { + select:1 +} : { + input:1, select:1, textarea:1 +}; +if(Ext.isIE || Ext.isGecko){ + noBoxAdjust['button'] = 1; +} + +})(); + +Ext.Element.addMethods(function(){ + var PARENTNODE = 'parentNode', + NEXTSIBLING = 'nextSibling', + PREVIOUSSIBLING = 'previousSibling', + DQ = Ext.DomQuery, + GET = Ext.get; + + return { + + findParent : function(simpleSelector, maxDepth, returnEl){ + var p = this.dom, + b = document.body, + depth = 0, + stopEl; + if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') { + return null; + } + maxDepth = maxDepth || 50; + if (isNaN(maxDepth)) { + stopEl = Ext.getDom(maxDepth); + maxDepth = Number.MAX_VALUE; + } + while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ + if(DQ.is(p, simpleSelector)){ + return returnEl ? GET(p) : p; + } + depth++; + p = p.parentNode; + } + return null; + }, + + + findParentNode : function(simpleSelector, maxDepth, returnEl){ + var p = Ext.fly(this.dom.parentNode, '_internal'); + return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null; + }, + + + up : function(simpleSelector, maxDepth){ + return this.findParentNode(simpleSelector, maxDepth, true); + }, + + + select : function(selector){ + return Ext.Element.select(selector, this.dom); + }, + + + query : function(selector){ + return DQ.select(selector, this.dom); + }, + + + child : function(selector, returnDom){ + var n = DQ.selectNode(selector, this.dom); + return returnDom ? n : GET(n); + }, + + + down : function(selector, returnDom){ + var n = DQ.selectNode(" > " + selector, this.dom); + return returnDom ? n : GET(n); + }, + + + parent : function(selector, returnDom){ + return this.matchNode(PARENTNODE, PARENTNODE, selector, returnDom); + }, + + + next : function(selector, returnDom){ + return this.matchNode(NEXTSIBLING, NEXTSIBLING, selector, returnDom); + }, + + + prev : function(selector, returnDom){ + return this.matchNode(PREVIOUSSIBLING, PREVIOUSSIBLING, selector, returnDom); + }, + + + + first : function(selector, returnDom){ + return this.matchNode(NEXTSIBLING, 'firstChild', selector, returnDom); + }, + + + last : function(selector, returnDom){ + return this.matchNode(PREVIOUSSIBLING, 'lastChild', selector, returnDom); + }, + + matchNode : function(dir, start, selector, returnDom){ + var n = this.dom[start]; + while(n){ + if(n.nodeType == 1 && (!selector || DQ.is(n, selector))){ + return !returnDom ? GET(n) : n; + } + n = n[dir]; + } + return null; + } + }; +}()); +Ext.Element.addMethods( +function() { + var GETDOM = Ext.getDom, + GET = Ext.get, + DH = Ext.DomHelper; + + return { + + appendChild: function(el){ + return GET(el).appendTo(this); + }, + + + appendTo: function(el){ + GETDOM(el).appendChild(this.dom); + return this; + }, + + + insertBefore: function(el){ + (el = GETDOM(el)).parentNode.insertBefore(this.dom, el); + return this; + }, + + + insertAfter: function(el){ + (el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling); + return this; + }, + + + insertFirst: function(el, returnDom){ + el = el || {}; + if(el.nodeType || el.dom || typeof el == 'string'){ + el = GETDOM(el); + this.dom.insertBefore(el, this.dom.firstChild); + return !returnDom ? GET(el) : el; + }else{ + return this.createChild(el, this.dom.firstChild, returnDom); + } + }, + + + replace: function(el){ + el = GET(el); + this.insertBefore(el); + el.remove(); + return this; + }, + + + replaceWith: function(el){ + var me = this; + + if(el.nodeType || el.dom || typeof el == 'string'){ + el = GETDOM(el); + me.dom.parentNode.insertBefore(el, me.dom); + }else{ + el = DH.insertBefore(me.dom, el); + } + + delete Ext.elCache[me.id]; + Ext.removeNode(me.dom); + me.id = Ext.id(me.dom = el); + Ext.Element.addToCache(me.isFlyweight ? new Ext.Element(me.dom) : me); + return me; + }, + + + createChild: function(config, insertBefore, returnDom){ + config = config || {tag:'div'}; + return insertBefore ? + DH.insertBefore(insertBefore, config, returnDom !== true) : + DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); + }, + + + wrap: function(config, returnDom){ + var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom); + newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); + return newEl; + }, + + + insertHtml : function(where, html, returnEl){ + var el = DH.insertHtml(where, this.dom, html); + return returnEl ? Ext.get(el) : el; + } + }; +}()); +Ext.Element.addMethods(function(){ + + var supports = Ext.supports, + propCache = {}, + camelRe = /(-[a-z])/gi, + view = document.defaultView, + opacityRe = /alpha\(opacity=(.*)\)/i, + trimRe = /^\s+|\s+$/g, + EL = Ext.Element, + spacesRe = /\s+/, + wordsRe = /\w/g, + PADDING = "padding", + MARGIN = "margin", + BORDER = "border", + LEFT = "-left", + RIGHT = "-right", + TOP = "-top", + BOTTOM = "-bottom", + WIDTH = "-width", + MATH = Math, + HIDDEN = 'hidden', + ISCLIPPED = 'isClipped', + OVERFLOW = 'overflow', + OVERFLOWX = 'overflow-x', + OVERFLOWY = 'overflow-y', + ORIGINALCLIP = 'originalClip', + + borders = {l: BORDER + LEFT + WIDTH, r: BORDER + RIGHT + WIDTH, t: BORDER + TOP + WIDTH, b: BORDER + BOTTOM + WIDTH}, + paddings = {l: PADDING + LEFT, r: PADDING + RIGHT, t: PADDING + TOP, b: PADDING + BOTTOM}, + margins = {l: MARGIN + LEFT, r: MARGIN + RIGHT, t: MARGIN + TOP, b: MARGIN + BOTTOM}, + data = Ext.Element.data; + + + + function camelFn(m, a) { + return a.charAt(1).toUpperCase(); + } + + function chkCache(prop) { + return propCache[prop] || (propCache[prop] = prop == 'float' ? (supports.cssFloat ? 'cssFloat' : 'styleFloat') : prop.replace(camelRe, camelFn)); + } + + return { + + adjustWidth : function(width) { + var me = this; + var isNum = (typeof width == "number"); + if(isNum && me.autoBoxAdjust && !me.isBorderBox()){ + width -= (me.getBorderWidth("lr") + me.getPadding("lr")); + } + return (isNum && width < 0) ? 0 : width; + }, + + + adjustHeight : function(height) { + var me = this; + var isNum = (typeof height == "number"); + if(isNum && me.autoBoxAdjust && !me.isBorderBox()){ + height -= (me.getBorderWidth("tb") + me.getPadding("tb")); + } + return (isNum && height < 0) ? 0 : height; + }, + + + + addClass : function(className){ + var me = this, + i, + len, + v, + cls = []; + + if (!Ext.isArray(className)) { + if (typeof className == 'string' && !this.hasClass(className)) { + me.dom.className += " " + className; + } + } + else { + for (i = 0, len = className.length; i < len; i++) { + v = className[i]; + if (typeof v == 'string' && (' ' + me.dom.className + ' ').indexOf(' ' + v + ' ') == -1) { + cls.push(v); + } + } + if (cls.length) { + me.dom.className += " " + cls.join(" "); + } + } + return me; + }, + + + removeClass : function(className){ + var me = this, + i, + idx, + len, + cls, + elClasses; + if (!Ext.isArray(className)){ + className = [className]; + } + if (me.dom && me.dom.className) { + elClasses = me.dom.className.replace(trimRe, '').split(spacesRe); + for (i = 0, len = className.length; i < len; i++) { + cls = className[i]; + if (typeof cls == 'string') { + cls = cls.replace(trimRe, ''); + idx = elClasses.indexOf(cls); + if (idx != -1) { + elClasses.splice(idx, 1); } } - return 1; - }else if(prop == 'float'){ - prop = "styleFloat"; } - if(!(camel = propCache[prop])){ - camel = propCache[prop] = prop.replace(camelRe, camelFn); + me.dom.className = elClasses.join(" "); + } + return me; + }, + + + radioClass : function(className){ + var cn = this.dom.parentNode.childNodes, + v, + i, + len; + className = Ext.isArray(className) ? className : [className]; + for (i = 0, len = cn.length; i < len; i++) { + v = cn[i]; + if (v && v.nodeType == 1) { + Ext.fly(v, '_internal').removeClass(className); } - if(v = el.style[camel]){ - return v; - } - if(cs = el.currentStyle){ - return cs[camel]; - } - return null; }; - }(), + return this.addClass(className); + }, - - setStyle : function(prop, value){ - if(typeof prop == "string"){ - var camel; - if(!(camel = propCache[prop])){ - camel = propCache[prop] = prop.replace(camelRe, camelFn); + + toggleClass : function(className){ + return this.hasClass(className) ? this.removeClass(className) : this.addClass(className); + }, + + + hasClass : function(className){ + return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; + }, + + + replaceClass : function(oldClassName, newClassName){ + return this.removeClass(oldClassName).addClass(newClassName); + }, + + isStyle : function(style, val) { + return this.getStyle(style) == val; + }, + + + getStyle : function(){ + return view && view.getComputedStyle ? + function(prop){ + var el = this.dom, + v, + cs, + out, + display; + + if(el == document){ + return null; + } + prop = chkCache(prop); + out = (v = el.style[prop]) ? v : + (cs = view.getComputedStyle(el, "")) ? cs[prop] : null; + + + + if(prop == 'marginRight' && out != '0px' && !supports.correctRightMargin){ + display = el.style.display; + el.style.display = 'inline-block'; + out = view.getComputedStyle(el, '').marginRight; + el.style.display = display; + } + + if(prop == 'backgroundColor' && out == 'rgba(0, 0, 0, 0)' && !supports.correctTransparentColor){ + out = 'transparent'; + } + return out; + } : + function(prop){ + var el = this.dom, + m, + cs; + + if(el == document) return null; + if (prop == 'opacity') { + if (el.style.filter.match) { + if(m = el.style.filter.match(opacityRe)){ + var fv = parseFloat(m[1]); + if(!isNaN(fv)){ + return fv ? fv / 100 : 0; + } + } + } + return 1; + } + prop = chkCache(prop); + return el.style[prop] || ((cs = el.currentStyle) ? cs[prop] : null); + }; + }(), + + + getColor : function(attr, defaultValue, prefix){ + var v = this.getStyle(attr), + color = (typeof prefix != 'undefined') ? prefix : '#', + h; + + if(!v || (/transparent|inherit/.test(v))) { + return defaultValue; } - if(camel == 'opacity') { - this.setOpacity(value); + if(/^r/.test(v)){ + Ext.each(v.slice(4, v.length -1).split(','), function(s){ + h = parseInt(s, 10); + color += (h < 16 ? '0' : '') + h.toString(16); + }); }else{ - this.dom.style[camel] = value; + v = v.replace('#', ''); + color += v.length == 3 ? v.replace(/^(\w)(\w)(\w)$/, '$1$1$2$2$3$3') : v; } - }else{ - for(var style in prop){ - if(typeof prop[style] != "function"){ - this.setStyle(style, prop[style]); + return(color.length > 5 ? color.toLowerCase() : defaultValue); + }, + + + setStyle : function(prop, value){ + var tmp, style; + + if (typeof prop != 'object') { + tmp = {}; + tmp[prop] = value; + prop = tmp; + } + for (style in prop) { + value = prop[style]; + style == 'opacity' ? + this.setOpacity(value) : + this.dom.style[chkCache(style)] = value; + } + return this; + }, + + + setOpacity : function(opacity, animate){ + var me = this, + s = me.dom.style; + + if(!animate || !me.anim){ + if(Ext.isIE){ + var opac = opacity < 1 ? 'alpha(opacity=' + opacity * 100 + ')' : '', + val = s.filter.replace(opacityRe, '').replace(trimRe, ''); + + s.zoom = 1; + s.filter = val + (val.length > 0 ? ' ' : '') + opac; + }else{ + s.opacity = opacity; + } + }else{ + me.anim({opacity: {to: opacity}}, me.preanim(arguments, 1), null, .35, 'easeIn'); + } + return me; + }, + + + clearOpacity : function(){ + var style = this.dom.style; + if(Ext.isIE){ + if(!Ext.isEmpty(style.filter)){ + style.filter = style.filter.replace(opacityRe, '').replace(trimRe, ''); + } + }else{ + style.opacity = style['-moz-opacity'] = style['-khtml-opacity'] = ''; + } + return this; + }, + + + getHeight : function(contentHeight){ + var me = this, + dom = me.dom, + hidden = Ext.isIE && me.isStyle('display', 'none'), + h = MATH.max(dom.offsetHeight, hidden ? 0 : dom.clientHeight) || 0; + + h = !contentHeight ? h : h - me.getBorderWidth("tb") - me.getPadding("tb"); + return h < 0 ? 0 : h; + }, + + + getWidth : function(contentWidth){ + var me = this, + dom = me.dom, + hidden = Ext.isIE && me.isStyle('display', 'none'), + w = MATH.max(dom.offsetWidth, hidden ? 0 : dom.clientWidth) || 0; + w = !contentWidth ? w : w - me.getBorderWidth("lr") - me.getPadding("lr"); + return w < 0 ? 0 : w; + }, + + + setWidth : function(width, animate){ + var me = this; + width = me.adjustWidth(width); + !animate || !me.anim ? + me.dom.style.width = me.addUnits(width) : + me.anim({width : {to : width}}, me.preanim(arguments, 1)); + return me; + }, + + + setHeight : function(height, animate){ + var me = this; + height = me.adjustHeight(height); + !animate || !me.anim ? + me.dom.style.height = me.addUnits(height) : + me.anim({height : {to : height}}, me.preanim(arguments, 1)); + return me; + }, + + + getBorderWidth : function(side){ + return this.addStyles(side, borders); + }, + + + getPadding : function(side){ + return this.addStyles(side, paddings); + }, + + + clip : function(){ + var me = this, + dom = me.dom; + + if(!data(dom, ISCLIPPED)){ + data(dom, ISCLIPPED, true); + data(dom, ORIGINALCLIP, { + o: me.getStyle(OVERFLOW), + x: me.getStyle(OVERFLOWX), + y: me.getStyle(OVERFLOWY) + }); + me.setStyle(OVERFLOW, HIDDEN); + me.setStyle(OVERFLOWX, HIDDEN); + me.setStyle(OVERFLOWY, HIDDEN); + } + return me; + }, + + + unclip : function(){ + var me = this, + dom = me.dom; + + if(data(dom, ISCLIPPED)){ + data(dom, ISCLIPPED, false); + var o = data(dom, ORIGINALCLIP); + if(o.o){ + me.setStyle(OVERFLOW, o.o); + } + if(o.x){ + me.setStyle(OVERFLOWX, o.x); + } + if(o.y){ + me.setStyle(OVERFLOWY, o.y); } } - } - return this; - }, + return me; + }, - - applyStyles : function(style){ - Ext.DomHelper.applyStyles(this.dom, style); - return this; - }, + + addStyles : function(sides, styles){ + var ttlSize = 0, + sidesArr = sides.match(wordsRe), + side, + size, + i, + len = sidesArr.length; + for (i = 0; i < len; i++) { + side = sidesArr[i]; + size = side && parseInt(this.getStyle(styles[side]), 10); + if (size) { + ttlSize += MATH.abs(size); + } + } + return ttlSize; + }, - + margins : margins + }; +}() +); + +(function(){ +var D = Ext.lib.Dom, + LEFT = "left", + RIGHT = "right", + TOP = "top", + BOTTOM = "bottom", + POSITION = "position", + STATIC = "static", + RELATIVE = "relative", + AUTO = "auto", + ZINDEX = "z-index"; + +Ext.Element.addMethods({ + getX : function(){ return D.getX(this.dom); }, @@ -2707,1943 +3113,925 @@ El.prototype = { getOffsetsTo : function(el){ - var o = this.getXY(); - var e = Ext.fly(el, '_internal').getXY(); + var o = this.getXY(), + e = Ext.fly(el, '_internal').getXY(); return [o[0]-e[0],o[1]-e[1]]; }, - setX : function(x, animate){ - if(!animate || !A){ - D.setX(this.dom, x); - }else{ - this.setXY([x, this.getY()], this.preanim(arguments, 1)); - } - return this; + setX : function(x, animate){ + return this.setXY([x, this.getY()], this.animTest(arguments, animate, 1)); }, - setY : function(y, animate){ - if(!animate || !A){ - D.setY(this.dom, y); - }else{ - this.setXY([this.getX(), y], this.preanim(arguments, 1)); - } - return this; + setY : function(y, animate){ + return this.setXY([this.getX(), y], this.animTest(arguments, animate, 1)); }, setLeft : function(left){ - this.setStyle("left", this.addUnits(left)); + this.setStyle(LEFT, this.addUnits(left)); return this; }, setTop : function(top){ - this.setStyle("top", this.addUnits(top)); + this.setStyle(TOP, this.addUnits(top)); return this; }, setRight : function(right){ - this.setStyle("right", this.addUnits(right)); + this.setStyle(RIGHT, this.addUnits(right)); return this; }, setBottom : function(bottom){ - this.setStyle("bottom", this.addUnits(bottom)); + this.setStyle(BOTTOM, this.addUnits(bottom)); return this; }, setXY : function(pos, animate){ - if(!animate || !A){ - D.setXY(this.dom, pos); + var me = this; + if(!animate || !me.anim){ + D.setXY(me.dom, pos); }else{ - this.anim({points: {to: pos}}, this.preanim(arguments, 1), 'motion'); + me.anim({points: {to: pos}}, me.preanim(arguments, 1), 'motion'); } - return this; + return me; }, setLocation : function(x, y, animate){ - this.setXY([x, y], this.preanim(arguments, 2)); - return this; + return this.setXY([x, y], this.animTest(arguments, animate, 2)); }, moveTo : function(x, y, animate){ - this.setXY([x, y], this.preanim(arguments, 2)); - return this; - }, - + return this.setXY([x, y], this.animTest(arguments, animate, 2)); + }, - getRegion : function(){ - return D.getRegion(this.dom); - }, - - - getHeight : function(contentHeight){ - var h = this.dom.offsetHeight || 0; - h = contentHeight !== true ? h : h-this.getBorderWidth("tb")-this.getPadding("tb"); - return h < 0 ? 0 : h; - }, - - - getWidth : function(contentWidth){ - var w = this.dom.offsetWidth || 0; - w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr"); - return w < 0 ? 0 : w; - }, - - - getComputedHeight : function(){ - var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight); - if(!h){ - h = parseInt(this.getStyle('height'), 10) || 0; - if(!this.isBorderBox()){ - h += this.getFrameWidth('tb'); - } - } - return h; - }, - - - getComputedWidth : function(){ - var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); - if(!w){ - w = parseInt(this.getStyle('width'), 10) || 0; - if(!this.isBorderBox()){ - w += this.getFrameWidth('lr'); - } - } - return w; - }, - - - getSize : function(contentSize){ - return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; - }, - - getStyleSize : function(){ - var w, h, d = this.dom, s = d.style; - if(s.width && s.width != 'auto'){ - w = parseInt(s.width, 10); - if(Ext.isBorderBox){ - w -= this.getFrameWidth('lr'); - } - } - if(s.height && s.height != 'auto'){ - h = parseInt(s.height, 10); - if(Ext.isBorderBox){ - h -= this.getFrameWidth('tb'); - } - } - return {width: w || this.getWidth(true), height: h || this.getHeight(true)}; - - }, - - - getViewSize : function(){ - var d = this.dom, doc = document, aw = 0, ah = 0; - if(d == doc || d == doc.body){ - return {width : D.getViewWidth(), height: D.getViewHeight()}; - }else{ - return { - width : d.clientWidth, - height: d.clientHeight - }; - } - }, - - - getValue : function(asNumber){ - return asNumber ? parseInt(this.dom.value, 10) : this.dom.value; - }, - - adjustWidth : function(width){ - if(typeof width == "number"){ - if(this.autoBoxAdjust && !this.isBorderBox()){ - width -= (this.getBorderWidth("lr") + this.getPadding("lr")); - } - if(width < 0){ - width = 0; - } - } - return width; - }, - - adjustHeight : function(height){ - if(typeof height == "number"){ - if(this.autoBoxAdjust && !this.isBorderBox()){ - height -= (this.getBorderWidth("tb") + this.getPadding("tb")); - } - if(height < 0){ - height = 0; - } - } - return height; - }, - - - setWidth : function(width, animate){ - width = this.adjustWidth(width); - if(!animate || !A){ - this.dom.style.width = this.addUnits(width); - }else{ - this.anim({width: {to: width}}, this.preanim(arguments, 1)); - } - return this; - }, - - - setHeight : function(height, animate){ - height = this.adjustHeight(height); - if(!animate || !A){ - this.dom.style.height = this.addUnits(height); - }else{ - this.anim({height: {to: height}}, this.preanim(arguments, 1)); - } - return this; - }, - - - setSize : function(width, height, animate){ - if(typeof width == "object"){ height = width.height; width = width.width; - } - width = this.adjustWidth(width); height = this.adjustHeight(height); - if(!animate || !A){ - this.dom.style.width = this.addUnits(width); - this.dom.style.height = this.addUnits(height); - }else{ - this.anim({width: {to: width}, height: {to: height}}, this.preanim(arguments, 2)); - } - return this; - }, - - - setBounds : function(x, y, width, height, animate){ - if(!animate || !A){ - this.setSize(width, height); - this.setLocation(x, y); - }else{ - width = this.adjustWidth(width); height = this.adjustHeight(height); - this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, - this.preanim(arguments, 4), 'motion'); - } - return this; - }, - - - setRegion : function(region, animate){ - this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.preanim(arguments, 1)); - return this; - }, - - - addListener : function(eventName, fn, scope, options){ - Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); - }, - - - removeListener : function(eventName, fn, scope){ - Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this); - return this; - }, - - - removeAllListeners : function(){ - Ext.EventManager.removeAll(this.dom); - return this; - }, - - - relayEvent : function(eventName, observable){ - this.on(eventName, function(e){ - observable.fireEvent(eventName, e); - }); - }, - - - setOpacity : function(opacity, animate){ - if(!animate || !A){ - var s = this.dom.style; - if(Ext.isIE){ - s.zoom = 1; - s.filter = (s.filter || '').replace(/alpha\([^\)]*\)/gi,"") + - (opacity == 1 ? "" : " alpha(opacity=" + opacity * 100 + ")"); - }else{ - s.opacity = opacity; - } - }else{ - this.anim({opacity: {to: opacity}}, this.preanim(arguments, 1), null, .35, 'easeIn'); - } - return this; - }, - getLeft : function(local){ - if(!local){ - return this.getX(); - }else{ - return parseInt(this.getStyle("left"), 10) || 0; - } + return !local ? this.getX() : parseInt(this.getStyle(LEFT), 10) || 0; }, getRight : function(local){ - if(!local){ - return this.getX() + this.getWidth(); - }else{ - return (this.getLeft(true) + this.getWidth()) || 0; - } + var me = this; + return !local ? me.getX() + me.getWidth() : (me.getLeft(true) + me.getWidth()) || 0; }, getTop : function(local) { - if(!local){ - return this.getY(); - }else{ - return parseInt(this.getStyle("top"), 10) || 0; - } + return !local ? this.getY() : parseInt(this.getStyle(TOP), 10) || 0; }, getBottom : function(local){ - if(!local){ - return this.getY() + this.getHeight(); - }else{ - return (this.getTop(true) + this.getHeight()) || 0; - } + var me = this; + return !local ? me.getY() + me.getHeight() : (me.getTop(true) + me.getHeight()) || 0; }, position : function(pos, zIndex, x, y){ - if(!pos){ - if(this.getStyle('position') == 'static'){ - this.setStyle('position', 'relative'); - } - }else{ - this.setStyle("position", pos); + var me = this; + + if(!pos && me.isStyle(POSITION, STATIC)){ + me.setStyle(POSITION, RELATIVE); + } else if(pos) { + me.setStyle(POSITION, pos); } if(zIndex){ - this.setStyle("z-index", zIndex); - } - if(x !== undefined && y !== undefined){ - this.setXY([x, y]); - }else if(x !== undefined){ - this.setX(x); - }else if(y !== undefined){ - this.setY(y); + me.setStyle(ZINDEX, zIndex); } + if(x || y) me.setXY([x || false, y || false]); }, clearPositioning : function(value){ - value = value ||''; + value = value || ''; this.setStyle({ - "left": value, - "right": value, - "top": value, - "bottom": value, - "z-index": "", - "position" : "static" + left : value, + right : value, + top : value, + bottom : value, + "z-index" : "", + position : STATIC }); return this; }, getPositioning : function(){ - var l = this.getStyle("left"); - var t = this.getStyle("top"); + var l = this.getStyle(LEFT); + var t = this.getStyle(TOP); return { - "position" : this.getStyle("position"), + "position" : this.getStyle(POSITION), "left" : l, - "right" : l ? "" : this.getStyle("right"), + "right" : l ? "" : this.getStyle(RIGHT), "top" : t, - "bottom" : t ? "" : this.getStyle("bottom"), - "z-index" : this.getStyle("z-index") + "bottom" : t ? "" : this.getStyle(BOTTOM), + "z-index" : this.getStyle(ZINDEX) }; }, - - getBorderWidth : function(side){ - return this.addStyles(side, El.borders); - }, - - - getPadding : function(side){ - return this.addStyles(side, El.paddings); - }, - setPositioning : function(pc){ - this.applyStyles(pc); - if(pc.right == "auto"){ - this.dom.style.right = ""; + var me = this, + style = me.dom.style; + + me.setStyle(pc); + + if(pc.right == AUTO){ + style.right = ""; } - if(pc.bottom == "auto"){ - this.dom.style.bottom = ""; + if(pc.bottom == AUTO){ + style.bottom = ""; } - return this; - }, - - fixDisplay : function(){ - if(this.getStyle("display") == "none"){ - this.setStyle("visibility", "hidden"); - this.setStyle("display", this.originalDisplay); if(this.getStyle("display") == "none"){ this.setStyle("display", "block"); - } - } - }, - - setOverflow : function(v){ - if(v=='auto' && Ext.isMac && Ext.isGecko2){ this.dom.style.overflow = 'hidden'; - (function(){this.dom.style.overflow = 'auto';}).defer(1, this); - }else{ - this.dom.style.overflow = v; - } - }, - + + return me; + }, + - setLeftTop : function(left, top){ - this.dom.style.left = this.addUnits(left); - this.dom.style.top = this.addUnits(top); - return this; - }, + translatePoints : function(x, y){ + y = isNaN(x[1]) ? y : x[1]; + x = isNaN(x[0]) ? x : x[0]; + var me = this, + relative = me.isStyle(POSITION, RELATIVE), + o = me.getXY(), + l = parseInt(me.getStyle(LEFT), 10), + t = parseInt(me.getStyle(TOP), 10); + + l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft); + t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop); - - move : function(direction, distance, animate){ - var xy = this.getXY(); - direction = direction.toLowerCase(); - switch(direction){ - case "l": - case "left": - this.moveTo(xy[0]-distance, xy[1], this.preanim(arguments, 2)); - break; - case "r": - case "right": - this.moveTo(xy[0]+distance, xy[1], this.preanim(arguments, 2)); - break; - case "t": - case "top": - case "up": - this.moveTo(xy[0], xy[1]-distance, this.preanim(arguments, 2)); - break; - case "b": - case "bottom": - case "down": - this.moveTo(xy[0], xy[1]+distance, this.preanim(arguments, 2)); - break; - } - return this; - }, - - - clip : function(){ - if(!this.isClipped){ - this.isClipped = true; - this.originalClip = { - "o": this.getStyle("overflow"), - "x": this.getStyle("overflow-x"), - "y": this.getStyle("overflow-y") - }; - this.setStyle("overflow", "hidden"); - this.setStyle("overflow-x", "hidden"); - this.setStyle("overflow-y", "hidden"); - } - return this; - }, - - - unclip : function(){ - if(this.isClipped){ - this.isClipped = false; - var o = this.originalClip; - if(o.o){this.setStyle("overflow", o.o);} - if(o.x){this.setStyle("overflow-x", o.x);} - if(o.y){this.setStyle("overflow-y", o.y);} - } - return this; - }, - - - - getAnchorXY : function(anchor, local, s){ - - var w, h, vp = false; - if(!s){ - var d = this.dom; - if(d == document.body || d == document){ - vp = true; - w = D.getViewWidth(); h = D.getViewHeight(); - }else{ - w = this.getWidth(); h = this.getHeight(); - } - }else{ - w = s.width; h = s.height; - } - var x = 0, y = 0, r = Math.round; - switch((anchor || "tl").toLowerCase()){ - case "c": - x = r(w*.5); - y = r(h*.5); - break; - case "t": - x = r(w*.5); - y = 0; - break; - case "l": - x = 0; - y = r(h*.5); - break; - case "r": - x = w; - y = r(h*.5); - break; - case "b": - x = r(w*.5); - y = h; - break; - case "tl": - x = 0; - y = 0; - break; - case "bl": - x = 0; - y = h; - break; - case "br": - x = w; - y = h; - break; - case "tr": - x = w; - y = 0; - break; - } - if(local === true){ - return [x, y]; - } - if(vp){ - var sc = this.getScroll(); - return [x + sc.left, y + sc.top]; - } - var o = this.getXY(); - return [x+o[0], y+o[1]]; - }, - - - getAlignToXY : function(el, p, o){ - el = Ext.get(el); - if(!el || !el.dom){ - throw "Element.alignToXY with an element that doesn't exist"; - } - var d = this.dom; - var c = false; var p1 = "", p2 = ""; - o = o || [0,0]; - - if(!p){ - p = "tl-bl"; - }else if(p == "?"){ - p = "tl-bl?"; - }else if(p.indexOf("-") == -1){ - p = "tl-" + p; - } - p = p.toLowerCase(); - var m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); - if(!m){ - throw "Element.alignTo with an invalid alignment " + p; - } - p1 = m[1]; p2 = m[2]; c = !!m[3]; - - var a1 = this.getAnchorXY(p1, true); - var a2 = el.getAnchorXY(p2, false); - - var x = a2[0] - a1[0] + o[0]; - var y = a2[1] - a1[1] + o[1]; - - if(c){ - var w = this.getWidth(), h = this.getHeight(), r = el.getRegion(); - var dw = D.getViewWidth()-5, dh = D.getViewHeight()-5; - - var p1y = p1.charAt(0), p1x = p1.charAt(p1.length-1); - var p2y = p2.charAt(0), p2x = p2.charAt(p2.length-1); - var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); - var swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); - - var doc = document; - var scrollX = (doc.documentElement.scrollLeft || doc.body.scrollLeft || 0)+5; - var scrollY = (doc.documentElement.scrollTop || doc.body.scrollTop || 0)+5; - - if((x+w) > dw + scrollX){ - x = swapX ? r.left-w : dw+scrollX-w; - } - if(x < scrollX){ - x = swapX ? r.right : scrollX; - } - if((y+h) > dh + scrollY){ - y = swapY ? r.top-h : dh+scrollY-h; - } - if (y < scrollY){ - y = swapY ? r.bottom : scrollY; - } - } - return [x,y]; - }, - - getConstrainToXY : function(){ - var os = {top:0, left:0, bottom:0, right: 0}; - - return function(el, local, offsets, proposedXY){ - el = Ext.get(el); - offsets = offsets ? Ext.applyIf(offsets, os) : os; - - var vw, vh, vx = 0, vy = 0; - if(el.dom == document.body || el.dom == document){ - vw = Ext.lib.Dom.getViewWidth(); - vh = Ext.lib.Dom.getViewHeight(); - }else{ - vw = el.dom.clientWidth; - vh = el.dom.clientHeight; - if(!local){ - var vxy = el.getXY(); - vx = vxy[0]; - vy = vxy[1]; - } - } - - var s = el.getScroll(); - - vx += offsets.left + s.left; - vy += offsets.top + s.top; - - vw -= offsets.right; - vh -= offsets.bottom; - - var vr = vx+vw; - var vb = vy+vh; - - var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]); - var x = xy[0], y = xy[1]; - var w = this.dom.offsetWidth, h = this.dom.offsetHeight; - - var moved = false; - - if((x + w) > vr){ - x = vr - w; - moved = true; - } - if((y + h) > vb){ - y = vb - h; - moved = true; - } - if(x < vx){ - x = vx; - moved = true; - } - if(y < vy){ - y = vy; - moved = true; - } - return moved ? [x, y] : false; - }; - }(), - - adjustForConstraints : function(xy, parent, offsets){ - return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; - }, - - - alignTo : function(element, position, offsets, animate){ - var xy = this.getAlignToXY(element, position, offsets); - this.setXY(xy, this.preanim(arguments, 3)); - return this; - }, - - - anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ - var action = function(){ - this.alignTo(el, alignment, offsets, animate); - Ext.callback(callback, this); - }; - Ext.EventManager.onWindowResize(action, this); - var tm = typeof monitorScroll; - if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', action, this, - {buffer: tm == 'number' ? monitorScroll : 50}); - } - action.call(this); return this; + return {left: (x - o[0] + l), top: (y - o[1] + t)}; }, - clearOpacity : function(){ - if (window.ActiveXObject) { - if(typeof this.dom.style.filter == 'string' && (/alpha/i).test(this.dom.style.filter)){ - this.dom.style.filter = ""; - } - } else { - this.dom.style.opacity = ""; - this.dom.style["-moz-opacity"] = ""; - this.dom.style["-khtml-opacity"] = ""; - } - return this; - }, - + animTest : function(args, animate, i) { + return !!animate && this.preanim ? this.preanim(args, i) : false; + } +}); +})(); +Ext.Element.addMethods({ - hide : function(animate){ - this.setVisible(false, this.preanim(arguments, 0)); - return this; - }, - - - show : function(animate){ - this.setVisible(true, this.preanim(arguments, 0)); - return this; - }, - - - addUnits : function(size){ - return Ext.Element.addUnits(size, this.defaultUnit); - }, - - - update : function(html, loadScripts, callback){ - if(typeof html == "undefined"){ - html = ""; - } - if(loadScripts !== true){ - this.dom.innerHTML = html; - if(typeof callback == "function"){ - callback(); - } - return this; - } - var id = Ext.id(); - var dom = this.dom; - - html += ''; - - E.onAvailable(id, function(){ - var hd = document.getElementsByTagName("head")[0]; - var re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig; - var srcRe = /\ssrc=([\'\"])(.*?)\1/i; - var typeRe = /\stype=([\'\"])(.*?)\1/i; - - var match; - while(match = re.exec(html)){ - var attrs = match[1]; - var srcMatch = attrs ? attrs.match(srcRe) : false; - if(srcMatch && srcMatch[2]){ - var s = document.createElement("script"); - s.src = srcMatch[2]; - var typeMatch = attrs.match(typeRe); - if(typeMatch && typeMatch[2]){ - s.type = typeMatch[2]; - } - hd.appendChild(s); - }else if(match[2] && match[2].length > 0){ - if(window.execScript) { - window.execScript(match[2]); - } else { - window.eval(match[2]); - } - } - } - var el = document.getElementById(id); - if(el){Ext.removeNode(el);} - if(typeof callback == "function"){ - callback(); - } - }); - dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); - return this; - }, - - - load : function(){ - var um = this.getUpdater(); - um.update.apply(um, arguments); - return this; - }, - - - getUpdater : function(){ - if(!this.updateManager){ - this.updateManager = new Ext.Updater(this); - } - return this.updateManager; - }, - - - unselectable : function(){ - this.dom.unselectable = "on"; - this.swallowEvent("selectstart", true); - this.applyStyles("-moz-user-select:none;-khtml-user-select:none;"); - this.addClass("x-unselectable"); - return this; - }, - - - getCenterXY : function(){ - return this.getAlignToXY(document, 'c-c'); - }, - - - center : function(centerIn){ - this.alignTo(centerIn || document, 'c-c'); - return this; - }, - - - isBorderBox : function(){ - return noBoxAdjust[this.dom.tagName.toLowerCase()] || Ext.isBorderBox; - }, - - - getBox : function(contentBox, local){ - var xy; - if(!local){ - xy = this.getXY(); - }else{ - var left = parseInt(this.getStyle("left"), 10) || 0; - var top = parseInt(this.getStyle("top"), 10) || 0; - xy = [left, top]; - } - var el = this.dom, w = el.offsetWidth, h = el.offsetHeight, bx; - if(!contentBox){ - bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; - }else{ - var l = this.getBorderWidth("l")+this.getPadding("l"); - var r = this.getBorderWidth("r")+this.getPadding("r"); - var t = this.getBorderWidth("t")+this.getPadding("t"); - var b = this.getBorderWidth("b")+this.getPadding("b"); - bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; - } - bx.right = bx.x + bx.width; - bx.bottom = bx.y + bx.height; - return bx; - }, - - - getFrameWidth : function(sides, onlyContentBox){ - return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); - }, - - - setBox : function(box, adjust, animate){ - var w = box.width, h = box.height; - if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){ - w -= (this.getBorderWidth("lr") + this.getPadding("lr")); - h -= (this.getBorderWidth("tb") + this.getPadding("tb")); - } - this.setBounds(box.x, box.y, w, h, this.preanim(arguments, 2)); - return this; - }, - - - repaint : function(){ - var dom = this.dom; - this.addClass("x-repaint"); - setTimeout(function(){ - Ext.get(dom).removeClass("x-repaint"); - }, 1); - return this; - }, - - - getMargins : function(side){ - if(!side){ - return { - top: parseInt(this.getStyle("margin-top"), 10) || 0, - left: parseInt(this.getStyle("margin-left"), 10) || 0, - bottom: parseInt(this.getStyle("margin-bottom"), 10) || 0, - right: parseInt(this.getStyle("margin-right"), 10) || 0 - }; - }else{ - return this.addStyles(side, El.margins); - } - }, - - addStyles : function(sides, styles){ - var val = 0, v, w; - for(var i = 0, len = sides.length; i < len; i++){ - v = this.getStyle(styles[sides.charAt(i)]); - if(v){ - w = parseInt(v, 10); - if(w){ val += (w >= 0 ? w : -1 * w); } - } - } - return val; - }, - - - createProxy : function(config, renderTo, matchBox){ - config = typeof config == "object" ? - config : {tag : "div", cls: config}; - - var proxy; - if(renderTo){ - proxy = Ext.DomHelper.append(renderTo, config, true); - }else { - proxy = Ext.DomHelper.insertBefore(this.dom, config, true); - } - if(matchBox){ - proxy.setBox(this.getBox()); - } - return proxy; - }, - - - mask : function(msg, msgCls){ - if(this.getStyle("position") == "static"){ - this.setStyle("position", "relative"); - } - if(this._maskMsg){ - this._maskMsg.remove(); - } - if(this._mask){ - this._mask.remove(); - } - - this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true); - - this.addClass("x-masked"); - this._mask.setDisplayed(true); - if(typeof msg == 'string'){ - this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg", cn:{tag:'div'}}, true); - var mm = this._maskMsg; - mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg"; - mm.dom.firstChild.innerHTML = msg; - mm.setDisplayed(true); - mm.center(this); - } - if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle('height') == 'auto'){ this._mask.setSize(this.dom.clientWidth, this.getHeight()); - } - return this._mask; - }, - - - unmask : function(){ - if(this._mask){ - if(this._maskMsg){ - this._maskMsg.remove(); - delete this._maskMsg; - } - this._mask.remove(); - delete this._mask; - } - this.removeClass("x-masked"); - }, - - - isMasked : function(){ - return this._mask && this._mask.isVisible(); - }, - - - createShim : function(){ - var el = document.createElement('iframe'); - el.frameBorder = '0'; - el.className = 'ext-shim'; - if(Ext.isIE && Ext.isSecure){ - el.src = Ext.SSL_SECURE_URL; - } - var shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); - shim.autoBoxAdjust = false; - return shim; - }, - - - remove : function(){ - Ext.removeNode(this.dom); - delete El.cache[this.dom.id]; - }, - - - hover : function(overFn, outFn, scope){ - var preOverFn = function(e){ - if(!e.within(this, true)){ - overFn.apply(scope || this, arguments); - } - }; - var preOutFn = function(e){ - if(!e.within(this, true)){ - outFn.apply(scope || this, arguments); - } - }; - this.on("mouseover", preOverFn, this.dom); - this.on("mouseout", preOutFn, this.dom); - return this; - }, - - - addClassOnOver : function(className){ - this.hover( - function(){ - Ext.fly(this, '_internal').addClass(className); - }, - function(){ - Ext.fly(this, '_internal').removeClass(className); - } - ); - return this; - }, - - - addClassOnFocus : function(className){ - this.on("focus", function(){ - Ext.fly(this, '_internal').addClass(className); - }, this.dom); - this.on("blur", function(){ - Ext.fly(this, '_internal').removeClass(className); - }, this.dom); - return this; - }, - - addClassOnClick : function(className){ - var dom = this.dom; - this.on("mousedown", function(){ - Ext.fly(dom, '_internal').addClass(className); - var d = Ext.getDoc(); - var fn = function(){ - Ext.fly(dom, '_internal').removeClass(className); - d.removeListener("mouseup", fn); - }; - d.on("mouseup", fn); - }); - return this; - }, - - - swallowEvent : function(eventName, preventDefault){ - var fn = function(e){ - e.stopPropagation(); - if(preventDefault){ - e.preventDefault(); - } - }; - if(Ext.isArray(eventName)){ - for(var i = 0, len = eventName.length; i < len; i++){ - this.on(eventName[i], fn); - } - return this; - } - this.on(eventName, fn); - return this; - }, - - - parent : function(selector, returnDom){ - return this.matchNode('parentNode', 'parentNode', selector, returnDom); - }, - - - next : function(selector, returnDom){ - return this.matchNode('nextSibling', 'nextSibling', selector, returnDom); - }, - - - prev : function(selector, returnDom){ - return this.matchNode('previousSibling', 'previousSibling', selector, returnDom); - }, - - - - first : function(selector, returnDom){ - return this.matchNode('nextSibling', 'firstChild', selector, returnDom); - }, - - - last : function(selector, returnDom){ - return this.matchNode('previousSibling', 'lastChild', selector, returnDom); - }, - - matchNode : function(dir, start, selector, returnDom){ - var n = this.dom[start]; - while(n){ - if(n.nodeType == 1 && (!selector || Ext.DomQuery.is(n, selector))){ - return !returnDom ? Ext.get(n) : n; - } - n = n[dir]; - } - return null; - }, - - - appendChild: function(el){ - el = Ext.get(el); - el.appendTo(this); - return this; - }, - - - createChild: function(config, insertBefore, returnDom){ - config = config || {tag:'div'}; - if(insertBefore){ - return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true); - } - return Ext.DomHelper[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); - }, - - - appendTo: function(el){ - el = Ext.getDom(el); - el.appendChild(this.dom); - return this; - }, - - - insertBefore: function(el){ - el = Ext.getDom(el); - el.parentNode.insertBefore(this.dom, el); - return this; - }, - - - insertAfter: function(el){ - el = Ext.getDom(el); - el.parentNode.insertBefore(this.dom, el.nextSibling); - return this; - }, - - - insertFirst: function(el, returnDom){ - el = el || {}; - if(typeof el == 'object' && !el.nodeType && !el.dom){ return this.createChild(el, this.dom.firstChild, returnDom); - }else{ - el = Ext.getDom(el); - this.dom.insertBefore(el, this.dom.firstChild); - return !returnDom ? Ext.get(el) : el; - } - }, - - - insertSibling: function(el, where, returnDom){ - var rt; - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++){ - rt = this.insertSibling(el[i], where, returnDom); - } - return rt; - } - where = where ? where.toLowerCase() : 'before'; - el = el || {}; - var refNode = where == 'before' ? this.dom : this.dom.nextSibling; - - if(typeof el == 'object' && !el.nodeType && !el.dom){ if(where == 'after' && !this.dom.nextSibling){ - rt = Ext.DomHelper.append(this.dom.parentNode, el, !returnDom); - }else{ - rt = Ext.DomHelper[where == 'after' ? 'insertAfter' : 'insertBefore'](this.dom, el, !returnDom); - } - - }else{ - rt = this.dom.parentNode.insertBefore(Ext.getDom(el), refNode); - if(!returnDom){ - rt = Ext.get(rt); - } - } - return rt; - }, - - - wrap: function(config, returnDom){ - if(!config){ - config = {tag: "div"}; - } - var newEl = Ext.DomHelper.insertBefore(this.dom, config, !returnDom); - newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); - return newEl; - }, - - - replace: function(el){ - el = Ext.get(el); - this.insertBefore(el); - el.remove(); - return this; - }, - - - replaceWith: function(el){ - if(typeof el == 'object' && !el.nodeType && !el.dom){ el = this.insertSibling(el, 'before'); - }else{ - el = Ext.getDom(el); - this.dom.parentNode.insertBefore(el, this.dom); - } - El.uncache(this.id); - this.dom.parentNode.removeChild(this.dom); - this.dom = el; - this.id = Ext.id(el); - El.cache[this.id] = this; - return this; - }, - - - insertHtml : function(where, html, returnEl){ - var el = Ext.DomHelper.insertHtml(where, this.dom, html); - return returnEl ? Ext.get(el) : el; - }, - - - set : function(o, useSet){ - var el = this.dom; - useSet = typeof useSet == 'undefined' ? (el.setAttribute ? true : false) : useSet; - for(var attr in o){ - if(attr == "style" || typeof o[attr] == "function") continue; - if(attr=="cls"){ - el.className = o["cls"]; - }else if(o.hasOwnProperty(attr)){ - if(useSet) el.setAttribute(attr, o[attr]); - else el[attr] = o[attr]; - } - } - if(o.style){ - Ext.DomHelper.applyStyles(el, o.style); - } - return this; - }, - - - addKeyListener : function(key, fn, scope){ - var config; - if(typeof key != "object" || Ext.isArray(key)){ - config = { - key: key, - fn: fn, - scope: scope - }; - }else{ - config = { - key : key.key, - shift : key.shift, - ctrl : key.ctrl, - alt : key.alt, - fn: fn, - scope: scope - }; - } - return new Ext.KeyMap(this, config); - }, - - - addKeyMap : function(config){ - return new Ext.KeyMap(this, config); - }, - - - isScrollable : function(){ + isScrollable : function(){ var dom = this.dom; return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth; }, - scrollTo : function(side, value, animate){ - var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; - if(!animate || !A){ - this.dom[prop] = value; - }else{ - var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; - this.anim({scroll: {"to": to}}, this.preanim(arguments, 2), 'scroll'); - } + scrollTo : function(side, value){ + this.dom["scroll" + (/top/i.test(side) ? "Top" : "Left")] = value; return this; }, - scroll : function(direction, distance, animate){ - if(!this.isScrollable()){ - return; - } - var el = this.dom; - var l = el.scrollLeft, t = el.scrollTop; - var w = el.scrollWidth, h = el.scrollHeight; - var cw = el.clientWidth, ch = el.clientHeight; - direction = direction.toLowerCase(); - var scrolled = false; - var a = this.preanim(arguments, 2); - switch(direction){ - case "l": - case "left": - if(w - l > cw){ - var v = Math.min(l + distance, w-cw); - this.scrollTo("left", v, a); - scrolled = true; - } - break; - case "r": - case "right": - if(l > 0){ - var v = Math.max(l - distance, 0); - this.scrollTo("left", v, a); - scrolled = true; - } - break; - case "t": - case "top": - case "up": - if(t > 0){ - var v = Math.max(t - distance, 0); - this.scrollTo("top", v, a); - scrolled = true; - } - break; - case "b": - case "bottom": - case "down": - if(h - t > ch){ - var v = Math.min(t + distance, h-ch); - this.scrollTo("top", v, a); - scrolled = true; - } - break; - } - return scrolled; - }, - - - translatePoints : function(x, y){ - if(typeof x == 'object' || Ext.isArray(x)){ - y = x[1]; x = x[0]; - } - var p = this.getStyle('position'); - var o = this.getXY(); - - var l = parseInt(this.getStyle('left'), 10); - var t = parseInt(this.getStyle('top'), 10); - - if(isNaN(l)){ - l = (p == "relative") ? 0 : this.dom.offsetLeft; - } - if(isNaN(t)){ - t = (p == "relative") ? 0 : this.dom.offsetTop; - } - - return {left: (x - o[0] + l), top: (y - o[1] + t)}; - }, - - getScroll : function(){ - var d = this.dom, doc = document; - if(d == doc || d == doc.body){ - var l, t; + var d = this.dom, + doc = document, + body = doc.body, + docElement = doc.documentElement, + l, + t, + ret; + + if(d == doc || d == body){ if(Ext.isIE && Ext.isStrict){ - l = doc.documentElement.scrollLeft || (doc.body.scrollLeft || 0); - t = doc.documentElement.scrollTop || (doc.body.scrollTop || 0); + l = docElement.scrollLeft; + t = docElement.scrollTop; }else{ - l = window.pageXOffset || (doc.body.scrollLeft || 0); - t = window.pageYOffset || (doc.body.scrollTop || 0); + l = window.pageXOffset; + t = window.pageYOffset; } - return {left: l, top: t}; + ret = {left: l || (body ? body.scrollLeft : 0), top: t || (body ? body.scrollTop : 0)}; }else{ - return {left: d.scrollLeft, top: d.scrollTop}; + ret = {left: d.scrollLeft, top: d.scrollTop}; } - }, - - - getColor : function(attr, defaultValue, prefix){ - var v = this.getStyle(attr); - if(!v || v == "transparent" || v == "inherit") { - return defaultValue; - } - var color = typeof prefix == "undefined" ? "#" : prefix; - if(v.substr(0, 4) == "rgb("){ - var rvs = v.slice(4, v.length -1).split(","); - for(var i = 0; i < 3; i++){ - var h = parseInt(rvs[i]); - var s = h.toString(16); - if(h < 16){ - s = "0" + s; - } - color += s; - } - } else { - if(v.substr(0, 1) == "#"){ - if(v.length == 4) { - for(var i = 1; i < 4; i++){ - var c = v.charAt(i); - color += c + c; - } - }else if(v.length == 7){ - color += v.substr(1); - } - } - } - return(color.length > 5 ? color.toLowerCase() : defaultValue); - }, - - - boxWrap : function(cls){ - cls = cls || 'x-box'; - var el = Ext.get(this.insertHtml('beforeBegin', String.format('
'+El.boxMarkup+'
', cls))); - el.child('.'+cls+'-mc').dom.appendChild(this.dom); - return el; - }, - - - getAttributeNS : Ext.isIE ? function(ns, name){ - var d = this.dom; - var type = typeof d[ns+":"+name]; - if(type != 'undefined' && type != 'unknown'){ - return d[ns+":"+name]; - } - return d[name]; - } : function(ns, name){ - var d = this.dom; - return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; - }, - - - getTextWidth : function(text, min, max){ - return (Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width).constrain(min || 0, max || 1000000); + return ret; } -}; - -var ep = El.prototype; - - -ep.on = ep.addListener; - ep.mon = ep.addListener; - -ep.getUpdateManager = ep.getUpdater; - - -ep.un = ep.removeListener; - - -ep.autoBoxAdjust = true; - -El.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i; - -El.addUnits = function(v, defaultUnit){ - if(v === "" || v == "auto"){ - return v; - } - if(v === undefined){ - return ''; - } - if(typeof v == "number" || !El.unitPattern.test(v)){ - return v + (defaultUnit || 'px'); - } - return v; -}; - -El.boxMarkup = '
'; - -El.VISIBILITY = 1; - -El.DISPLAY = 2; - -El.borders = {l: "border-left-width", r: "border-right-width", t: "border-top-width", b: "border-bottom-width"}; -El.paddings = {l: "padding-left", r: "padding-right", t: "padding-top", b: "padding-bottom"}; -El.margins = {l: "margin-left", r: "margin-right", t: "margin-top", b: "margin-bottom"}; - - - - -El.cache = {}; - -var docEl; - - -El.get = function(el){ - var ex, elm, id; - if(!el){ return null; } - if(typeof el == "string"){ if(!(elm = document.getElementById(el))){ - return null; - } - if(ex = El.cache[el]){ - ex.dom = elm; - }else{ - ex = El.cache[el] = new El(elm); - } - return ex; - }else if(el.tagName){ if(!(id = el.id)){ - id = Ext.id(el); - } - if(ex = El.cache[id]){ - ex.dom = el; - }else{ - ex = El.cache[id] = new El(el); - } - return ex; - }else if(el instanceof El){ - if(el != docEl){ - el.dom = document.getElementById(el.id) || el.dom; El.cache[el.id] = el; } - return el; - }else if(el.isComposite){ - return el; - }else if(Ext.isArray(el)){ - return El.select(el); - }else if(el == document){ - if(!docEl){ - var f = function(){}; - f.prototype = El.prototype; - docEl = new f(); - docEl.dom = document; - } - return docEl; - } - return null; -}; - -El.uncache = function(el){ - for(var i = 0, a = arguments, len = a.length; i < len; i++) { - if(a[i]){ - delete El.cache[a[i].id || a[i]]; - } - } -}; - -El.garbageCollect = function(){ - if(!Ext.enableGarbageCollector){ - clearInterval(El.collectorThread); - return; - } - for(var eid in El.cache){ - var el = El.cache[eid], d = el.dom; - if(!d || !d.parentNode || (!d.offsetParent && !document.getElementById(eid))){ - delete El.cache[eid]; - if(d && Ext.enableListenerCollection){ - Ext.EventManager.removeAll(d); - } - } - } -} -El.collectorThreadId = setInterval(El.garbageCollect, 30000); - -var flyFn = function(){}; -flyFn.prototype = El.prototype; -var _cls = new flyFn(); - -El.Flyweight = function(dom){ - this.dom = dom; -}; - -El.Flyweight.prototype = _cls; -El.Flyweight.prototype.isFlyweight = true; - -El._flyweights = {}; - -El.fly = function(el, named){ - named = named || '_global'; - el = Ext.getDom(el); - if(!el){ - return null; - } - if(!El._flyweights[named]){ - El._flyweights[named] = new El.Flyweight(); - } - El._flyweights[named].dom = el; - return El._flyweights[named]; -}; - - -Ext.get = El.get; - -Ext.fly = El.fly; - -var noBoxAdjust = Ext.isStrict ? { - select:1 -} : { - input:1, select:1, textarea:1 -}; -if(Ext.isIE || Ext.isGecko){ - noBoxAdjust['button'] = 1; -} - - -Ext.EventManager.on(window, 'unload', function(){ - delete El.cache; - delete El._flyweights; }); -})(); -Ext.enableFx = true; +Ext.Element.VISIBILITY = 1; + +Ext.Element.DISPLAY = 2; + + +Ext.Element.OFFSETS = 3; + + +Ext.Element.ASCLASS = 4; + + +Ext.Element.visibilityCls = 'x-hide-nosize'; + +Ext.Element.addMethods(function(){ + var El = Ext.Element, + OPACITY = "opacity", + VISIBILITY = "visibility", + DISPLAY = "display", + HIDDEN = "hidden", + OFFSETS = "offsets", + ASCLASS = "asclass", + NONE = "none", + NOSIZE = 'nosize', + ORIGINALDISPLAY = 'originalDisplay', + VISMODE = 'visibilityMode', + ISVISIBLE = 'isVisible', + data = El.data, + getDisplay = function(dom){ + var d = data(dom, ORIGINALDISPLAY); + if(d === undefined){ + data(dom, ORIGINALDISPLAY, d = ''); + } + return d; + }, + getVisMode = function(dom){ + var m = data(dom, VISMODE); + if(m === undefined){ + data(dom, VISMODE, m = 1); + } + return m; + }; + + return { + + originalDisplay : "", + visibilityMode : 1, + + + setVisibilityMode : function(visMode){ + data(this.dom, VISMODE, visMode); + return this; + }, + + + animate : function(args, duration, onComplete, easing, animType){ + this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType); + return this; + }, + + + anim : function(args, opt, animType, defaultDur, defaultEase, cb){ + animType = animType || 'run'; + opt = opt || {}; + var me = this, + anim = Ext.lib.Anim[animType]( + me.dom, + args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + if(cb) cb.call(me); + if(opt.callback) opt.callback.call(opt.scope || me, me, opt); + }, + me + ); + opt.anim = anim; + return anim; + }, + + + preanim : function(a, i){ + return !a[i] ? false : (typeof a[i] == 'object' ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]}); + }, + + + isVisible : function() { + var me = this, + dom = me.dom, + visible = data(dom, ISVISIBLE); + + if(typeof visible == 'boolean'){ + return visible; + } + + visible = !me.isStyle(VISIBILITY, HIDDEN) && + !me.isStyle(DISPLAY, NONE) && + !((getVisMode(dom) == El.ASCLASS) && me.hasClass(me.visibilityCls || El.visibilityCls)); + + data(dom, ISVISIBLE, visible); + return visible; + }, + + + setVisible : function(visible, animate){ + var me = this, isDisplay, isVisibility, isOffsets, isNosize, + dom = me.dom, + visMode = getVisMode(dom); + + + + if (typeof animate == 'string'){ + switch (animate) { + case DISPLAY: + visMode = El.DISPLAY; + break; + case VISIBILITY: + visMode = El.VISIBILITY; + break; + case OFFSETS: + visMode = El.OFFSETS; + break; + case NOSIZE: + case ASCLASS: + visMode = El.ASCLASS; + break; + } + me.setVisibilityMode(visMode); + animate = false; + } + + if (!animate || !me.anim) { + if(visMode == El.ASCLASS ){ + + me[visible?'removeClass':'addClass'](me.visibilityCls || El.visibilityCls); + + } else if (visMode == El.DISPLAY){ + + return me.setDisplayed(visible); + + } else if (visMode == El.OFFSETS){ + + if (!visible){ + me.hideModeStyles = { + position: me.getStyle('position'), + top: me.getStyle('top'), + left: me.getStyle('left') + }; + me.applyStyles({position: 'absolute', top: '-10000px', left: '-10000px'}); + } else { + me.applyStyles(me.hideModeStyles || {position: '', top: '', left: ''}); + delete me.hideModeStyles; + } + + }else{ + me.fixDisplay(); + dom.style.visibility = visible ? "visible" : HIDDEN; + } + }else{ + + if(visible){ + me.setOpacity(.01); + me.setVisible(true); + } + me.anim({opacity: { to: (visible?1:0) }}, + me.preanim(arguments, 1), + null, + .35, + 'easeIn', + function(){ + visible || me.setVisible(false).setOpacity(1); + }); + } + data(dom, ISVISIBLE, visible); + return me; + }, + + + + hasMetrics : function(){ + var dom = this.dom; + return this.isVisible() || (getVisMode(dom) == El.VISIBILITY); + }, + + + toggle : function(animate){ + var me = this; + me.setVisible(!me.isVisible(), me.preanim(arguments, 0)); + return me; + }, + + + setDisplayed : function(value) { + if(typeof value == "boolean"){ + value = value ? getDisplay(this.dom) : NONE; + } + this.setStyle(DISPLAY, value); + return this; + }, + + + fixDisplay : function(){ + var me = this; + if(me.isStyle(DISPLAY, NONE)){ + me.setStyle(VISIBILITY, HIDDEN); + me.setStyle(DISPLAY, getDisplay(this.dom)); + if(me.isStyle(DISPLAY, NONE)){ + me.setStyle(DISPLAY, "block"); + } + } + }, + + + hide : function(animate){ + + if (typeof animate == 'string'){ + this.setVisible(false, animate); + return this; + } + this.setVisible(false, this.preanim(arguments, 0)); + return this; + }, + + + show : function(animate){ + + if (typeof animate == 'string'){ + this.setVisible(true, animate); + return this; + } + this.setVisible(true, this.preanim(arguments, 0)); + return this; + } + }; +}());(function(){ + + var NULL = null, + UNDEFINED = undefined, + TRUE = true, + FALSE = false, + SETX = "setX", + SETY = "setY", + SETXY = "setXY", + LEFT = "left", + BOTTOM = "bottom", + TOP = "top", + RIGHT = "right", + HEIGHT = "height", + WIDTH = "width", + POINTS = "points", + HIDDEN = "hidden", + ABSOLUTE = "absolute", + VISIBLE = "visible", + MOTION = "motion", + POSITION = "position", + EASEOUT = "easeOut", + + flyEl = new Ext.Element.Flyweight(), + queues = {}, + getObject = function(o){ + return o || {}; + }, + fly = function(dom){ + flyEl.dom = dom; + flyEl.id = Ext.id(dom); + return flyEl; + }, + + getQueue = function(id){ + if(!queues[id]){ + queues[id] = []; + } + return queues[id]; + }, + setQueue = function(id, value){ + queues[id] = value; + }; + + +Ext.enableFx = TRUE; Ext.Fx = { - - slideIn : function(anchor, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - - anchor = anchor || "t"; - - this.fixDisplay(); - - var r = this.getFxRestore(); - var b = this.getBox(); - this.setSize(b); - - var wrap = this.fxWrap(r.pos, o, "hidden"); - - var st = this.dom.style; - st.visibility = "visible"; - st.position = "absolute"; - - var after = function(){ - el.fxUnwrap(wrap, r.pos, o); - st.width = r.width; - st.height = r.height; - el.afterFx(o); - }; - var a, pt = {to: [b.x, b.y]}, bw = {to: b.width}, bh = {to: b.height}; - - switch(anchor.toLowerCase()){ - case "t": - wrap.setSize(b.width, 0); - st.left = st.bottom = "0"; - a = {height: bh}; - break; - case "l": - wrap.setSize(0, b.height); - st.right = st.top = "0"; - a = {width: bw}; - break; - case "r": - wrap.setSize(0, b.height); - wrap.setX(b.right); - st.left = st.top = "0"; - a = {width: bw, points: pt}; - break; - case "b": - wrap.setSize(b.width, 0); - wrap.setY(b.bottom); - st.left = st.top = "0"; - a = {height: bh, points: pt}; - break; - case "tl": - wrap.setSize(0, 0); - st.right = st.bottom = "0"; - a = {width: bw, height: bh}; - break; - case "bl": - wrap.setSize(0, 0); - wrap.setY(b.y+b.height); - st.right = st.top = "0"; - a = {width: bw, height: bh, points: pt}; - break; - case "br": - wrap.setSize(0, 0); - wrap.setXY([b.right, b.bottom]); - st.left = st.top = "0"; - a = {width: bw, height: bh, points: pt}; - break; - case "tr": - wrap.setSize(0, 0); - wrap.setX(b.x+b.width); - st.left = st.bottom = "0"; - a = {width: bw, height: bh, points: pt}; - break; - } - this.dom.style.visibility = "visible"; - wrap.show(); - - arguments.callee.anim = wrap.fxanim(a, - o, - 'motion', - .5, - 'easeOut', after); - }); - return this; + + + + switchStatements : function(key, fn, argHash){ + return fn.apply(this, argHash[key]); }, - - slideOut : function(anchor, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - - anchor = anchor || "t"; - - var r = this.getFxRestore(); + + slideIn : function(anchor, o){ + o = getObject(o); + var me = this, + dom = me.dom, + st = dom.style, + xy, + r, + b, + wrap, + after, + st, + args, + pt, + bw, + bh; - var b = this.getBox(); - this.setSize(b); + anchor = anchor || "t"; - var wrap = this.fxWrap(r.pos, o, "visible"); - - var st = this.dom.style; - st.visibility = "visible"; - st.position = "absolute"; - - wrap.setSize(b); - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); + me.queueFx(o, function(){ + xy = fly(dom).getXY(); + + fly(dom).fixDisplay(); + + + r = fly(dom).getFxRestore(); + b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}; + b.right = b.x + b.width; + b.bottom = b.y + b.height; + + + fly(dom).setWidth(b.width).setHeight(b.height); + + + wrap = fly(dom).fxWrap(r.pos, o, HIDDEN); + + st.visibility = VISIBLE; + st.position = ABSOLUTE; + + + function after(){ + fly(dom).fxUnwrap(wrap, r.pos, o); + st.width = r.width; + st.height = r.height; + fly(dom).afterFx(o); + } + + + pt = {to: [b.x, b.y]}; + bw = {to: b.width}; + bh = {to: b.height}; + + function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){ + var ret = {}; + fly(wrap).setWidth(ww).setHeight(wh); + if(fly(wrap)[sXY]){ + fly(wrap)[sXY](sXYval); } - - el.fxUnwrap(wrap, r.pos, o); - - st.width = r.width; - st.height = r.height; - - el.afterFx(o); + style[s1] = style[s2] = "0"; + if(w){ + ret.width = w; + } + if(h){ + ret.height = h; + } + if(p){ + ret.points = p; + } + return ret; }; - var a, zero = {to: 0}; - switch(anchor.toLowerCase()){ - case "t": - st.left = st.bottom = "0"; - a = {height: zero}; - break; - case "l": - st.right = st.top = "0"; - a = {width: zero}; - break; - case "r": - st.left = st.top = "0"; - a = {width: zero, points: {to:[b.right, b.y]}}; - break; - case "b": - st.left = st.top = "0"; - a = {height: zero, points: {to:[b.x, b.bottom]}}; - break; - case "tl": - st.right = st.bottom = "0"; - a = {width: zero, height: zero}; - break; - case "bl": - st.right = st.top = "0"; - a = {width: zero, height: zero, points: {to:[b.x, b.bottom]}}; - break; - case "br": - st.left = st.top = "0"; - a = {width: zero, height: zero, points: {to:[b.x+b.width, b.bottom]}}; - break; - case "tr": - st.left = st.bottom = "0"; - a = {width: zero, height: zero, points: {to:[b.right, b.y]}}; - break; - } + args = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, { + t : [wrap, st, b.width, 0, NULL, NULL, LEFT, BOTTOM, NULL, bh, NULL], + l : [wrap, st, 0, b.height, NULL, NULL, RIGHT, TOP, bw, NULL, NULL], + r : [wrap, st, b.width, b.height, SETX, b.right, LEFT, TOP, NULL, NULL, pt], + b : [wrap, st, b.width, b.height, SETY, b.bottom, LEFT, TOP, NULL, bh, pt], + tl : [wrap, st, 0, 0, NULL, NULL, RIGHT, BOTTOM, bw, bh, pt], + bl : [wrap, st, 0, 0, SETY, b.y + b.height, RIGHT, TOP, bw, bh, pt], + br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt], + tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt] + }); + + st.visibility = VISIBLE; + fly(wrap).show(); - arguments.callee.anim = wrap.fxanim(a, + arguments.callee.anim = fly(wrap).fxanim(args, o, - 'motion', + MOTION, .5, - "easeOut", after); + EASEOUT, + after); }); - return this; + return me; + }, + + + slideOut : function(anchor, o){ + o = getObject(o); + var me = this, + dom = me.dom, + st = dom.style, + xy = me.getXY(), + wrap, + r, + b, + a, + zero = {to: 0}; + + anchor = anchor || "t"; + + me.queueFx(o, function(){ + + + r = fly(dom).getFxRestore(); + b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}; + b.right = b.x + b.width; + b.bottom = b.y + b.height; + + + fly(dom).setWidth(b.width).setHeight(b.height); + + + wrap = fly(dom).fxWrap(r.pos, o, VISIBLE); + + st.visibility = VISIBLE; + st.position = ABSOLUTE; + fly(wrap).setWidth(b.width).setHeight(b.height); + + function after(){ + o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); + fly(dom).fxUnwrap(wrap, r.pos, o); + st.width = r.width; + st.height = r.height; + fly(dom).afterFx(o); + } + + function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){ + var ret = {}; + + style[s1] = style[s2] = "0"; + ret[p1] = v1; + if(p2){ + ret[p2] = v2; + } + if(p3){ + ret[p3] = v3; + } + + return ret; + }; + + a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, { + t : [st, LEFT, BOTTOM, HEIGHT, zero], + l : [st, RIGHT, TOP, WIDTH, zero], + r : [st, LEFT, TOP, WIDTH, zero, POINTS, {to : [b.right, b.y]}], + b : [st, LEFT, TOP, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}], + tl : [st, RIGHT, BOTTOM, WIDTH, zero, HEIGHT, zero], + bl : [st, RIGHT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x, b.bottom]}], + br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}], + tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}] + }); + + arguments.callee.anim = fly(wrap).fxanim(a, + o, + MOTION, + .5, + EASEOUT, + after); + }); + return me; }, - + puff : function(o){ - var el = this.getFxEl(); - o = o || {}; + o = getObject(o); + var me = this, + dom = me.dom, + st = dom.style, + width, + height, + r; - el.queueFx(o, function(){ - this.clearOpacity(); - this.show(); + me.queueFx(o, function(){ + width = fly(dom).getWidth(); + height = fly(dom).getHeight(); + fly(dom).clearOpacity(); + fly(dom).show(); - var r = this.getFxRestore(); - var st = this.dom.style; - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.clearOpacity(); - - el.setPositioning(r.pos); + + r = fly(dom).getFxRestore(); + + function after(){ + o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); + fly(dom).clearOpacity(); + fly(dom).setPositioning(r.pos); st.width = r.width; st.height = r.height; st.fontSize = ''; - el.afterFx(o); - }; + fly(dom).afterFx(o); + } - var width = this.getWidth(); - var height = this.getHeight(); - - arguments.callee.anim = this.fxanim({ - width : {to: this.adjustWidth(width * 2)}, - height : {to: this.adjustHeight(height * 2)}, - points : {by: [-(width * .5), -(height * .5)]}, - opacity : {to: 0}, - fontSize: {to:200, unit: "%"} + arguments.callee.anim = fly(dom).fxanim({ + width : {to : fly(dom).adjustWidth(width * 2)}, + height : {to : fly(dom).adjustHeight(height * 2)}, + points : {by : [-width * .5, -height * .5]}, + opacity : {to : 0}, + fontSize: {to : 200, unit: "%"} }, o, - 'motion', + MOTION, .5, - "easeOut", after); + EASEOUT, + after); }); - return this; + return me; }, - + switchOff : function(o){ - var el = this.getFxEl(); - o = o || {}; + o = getObject(o); + var me = this, + dom = me.dom, + st = dom.style, + r; - el.queueFx(o, function(){ - this.clearOpacity(); - this.clip(); + me.queueFx(o, function(){ + fly(dom).clearOpacity(); + fly(dom).clip(); - var r = this.getFxRestore(); - var st = this.dom.style; - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.clearOpacity(); - el.setPositioning(r.pos); + + r = fly(dom).getFxRestore(); + + function after(){ + o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); + fly(dom).clearOpacity(); + fly(dom).setPositioning(r.pos); st.width = r.width; - st.height = r.height; - - el.afterFx(o); + st.height = r.height; + fly(dom).afterFx(o); }; - this.fxanim({opacity:{to:0.3}}, null, null, .1, null, function(){ - this.clearOpacity(); - (function(){ - this.fxanim({ - height:{to:1}, - points:{by:[0, this.getHeight() * .5]} - }, o, 'motion', 0.3, 'easeIn', after); - }).defer(100, this); - }); + fly(dom).fxanim({opacity : {to : 0.3}}, + NULL, + NULL, + .1, + NULL, + function(){ + fly(dom).clearOpacity(); + (function(){ + fly(dom).fxanim({ + height : {to : 1}, + points : {by : [0, fly(dom).getHeight() * .5]} + }, + o, + MOTION, + 0.3, + 'easeIn', + after); + }).defer(100); + }); }); - return this; + return me; }, - + highlight : function(color, o){ - var el = this.getFxEl(); - o = o || {}; + o = getObject(o); + var me = this, + dom = me.dom, + attr = o.attr || "backgroundColor", + a = {}, + restore; - el.queueFx(o, function(){ - color = color || "ffff9c"; - var attr = o.attr || "backgroundColor"; + me.queueFx(o, function(){ + fly(dom).clearOpacity(); + fly(dom).show(); - this.clearOpacity(); - this.show(); - - var origColor = this.getColor(attr); - var restoreColor = this.dom.style[attr]; - var endColor = (o.endColor || origColor) || "ffffff"; - - var after = function(){ - el.dom.style[attr] = restoreColor; - el.afterFx(o); - }; - - var a = {}; - a[attr] = {from: color, to: endColor}; - arguments.callee.anim = this.fxanim(a, + function after(){ + dom.style[attr] = restore; + fly(dom).afterFx(o); + } + restore = dom.style[attr]; + a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"}; + arguments.callee.anim = fly(dom).fxanim(a, o, 'color', 1, - 'easeIn', after); + 'easeIn', + after); }); - return this; + return me; }, frame : function(color, count, o){ - var el = this.getFxEl(); - o = o || {}; + o = getObject(o); + var me = this, + dom = me.dom, + proxy, + active; - el.queueFx(o, function(){ - color = color || "#C3DAF9"; + me.queueFx(o, function(){ + color = color || '#C3DAF9'; if(color.length == 6){ - color = "#" + color; - } + color = '#' + color; + } count = count || 1; - var duration = o.duration || 1; - this.show(); + fly(dom).show(); - var b = this.getBox(); - var animFn = function(){ - var proxy = Ext.getBody().createChild({ - style:{ - visbility:"hidden", - position:"absolute", - "z-index":"35000", border:"0px solid " + color - } - }); + var xy = fly(dom).getXY(), + b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}, + queue = function(){ + proxy = fly(document.body || document.documentElement).createChild({ + style:{ + position : ABSOLUTE, + 'z-index': 35000, + border : '0px solid ' + color + } + }); + return proxy.queueFx({}, animFn); + }; + + + arguments.callee.anim = { + isAnimated: true, + stop: function() { + count = 0; + proxy.stopFx(); + } + }; + + function animFn(){ var scale = Ext.isBorderBox ? 2 : 1; - proxy.animate({ - top:{from:b.y, to:b.y - 20}, - left:{from:b.x, to:b.x - 20}, - borderWidth:{from:0, to:10}, - opacity:{from:1, to:0}, - height:{from:b.height, to:(b.height + (20*scale))}, - width:{from:b.width, to:(b.width + (20*scale))} - }, duration, function(){ - proxy.remove(); - if(--count > 0){ - animFn(); - }else{ - el.afterFx(o); + active = proxy.anim({ + top : {from : b.y, to : b.y - 20}, + left : {from : b.x, to : b.x - 20}, + borderWidth : {from : 0, to : 10}, + opacity : {from : 1, to : 0}, + height : {from : b.height, to : b.height + 20 * scale}, + width : {from : b.width, to : b.width + 20 * scale} + },{ + duration: o.duration || 1, + callback: function() { + proxy.remove(); + --count > 0 ? queue() : fly(dom).afterFx(o); } }); + arguments.callee.anim = { + isAnimated: true, + stop: function(){ + active.stop(); + } + }; }; - animFn.call(this); + queue(); }); - return this; + return me; }, - pause : function(seconds){ - var el = this.getFxEl(); - var o = {}; + pause : function(seconds){ + var dom = this.dom, + t; - el.queueFx(o, function(){ - setTimeout(function(){ - el.afterFx(o); + this.queueFx({}, function(){ + t = setTimeout(function(){ + fly(dom).afterFx({}); }, seconds * 1000); + arguments.callee.anim = { + isAnimated: true, + stop: function(){ + clearTimeout(t); + fly(dom).afterFx({}); + } + }; }); return this; }, fadeIn : function(o){ - var el = this.getFxEl(); - o = o || {}; - el.queueFx(o, function(){ - this.setOpacity(0); - this.fixDisplay(); - this.dom.style.visibility = 'visible'; - var to = o.endOpacity || 1; - arguments.callee.anim = this.fxanim({opacity:{to:to}}, - o, null, .5, "easeOut", function(){ + o = getObject(o); + var me = this, + dom = me.dom, + to = o.endOpacity || 1; + + me.queueFx(o, function(){ + fly(dom).setOpacity(0); + fly(dom).fixDisplay(); + dom.style.visibility = VISIBLE; + arguments.callee.anim = fly(dom).fxanim({opacity:{to:to}}, + o, NULL, .5, EASEOUT, function(){ if(to == 1){ - this.clearOpacity(); + fly(dom).clearOpacity(); } - el.afterFx(o); + fly(dom).afterFx(o); }); }); - return this; + return me; }, fadeOut : function(o){ - var el = this.getFxEl(); - o = o || {}; - el.queueFx(o, function(){ - arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, - o, null, .5, "easeOut", function(){ - if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ - this.dom.style.display = "none"; - }else{ - this.dom.style.visibility = "hidden"; - } - this.clearOpacity(); - el.afterFx(o); + o = getObject(o); + var me = this, + dom = me.dom, + style = dom.style, + to = o.endOpacity || 0; + + me.queueFx(o, function(){ + arguments.callee.anim = fly(dom).fxanim({ + opacity : {to : to}}, + o, + NULL, + .5, + EASEOUT, + function(){ + if(to == 0){ + Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ? + style.display = "none" : + style.visibility = HIDDEN; + + fly(dom).clearOpacity(); + } + fly(dom).afterFx(o); }); }); - return this; + return me; }, @@ -4657,758 +4045,728 @@ Ext.Fx = { shift : function(o){ - var el = this.getFxEl(); - o = o || {}; - el.queueFx(o, function(){ - var a = {}, w = o.width, h = o.height, x = o.x, y = o.y, op = o.opacity; - if(w !== undefined){ - a.width = {to: this.adjustWidth(w)}; + o = getObject(o); + var dom = this.dom, + a = {}; + + this.queueFx(o, function(){ + for (var prop in o) { + if (o[prop] != UNDEFINED) { + a[prop] = {to : o[prop]}; + } + } + + a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a; + a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a; + + if (a.x || a.y || a.xy) { + a.points = a.xy || + {to : [ a.x ? a.x.to : fly(dom).getX(), + a.y ? a.y.to : fly(dom).getY()]}; } - if(h !== undefined){ - a.height = {to: this.adjustHeight(h)}; - } - if(o.left !== undefined){ - a.left = {to: o.left}; - } - if(o.top !== undefined){ - a.top = {to: o.top}; - } - if(o.right !== undefined){ - a.right = {to: o.right}; - } - if(o.bottom !== undefined){ - a.bottom = {to: o.bottom}; - } - if(x !== undefined || y !== undefined){ - a.points = {to: [ - x !== undefined ? x : this.getX(), - y !== undefined ? y : this.getY() - ]}; - } - if(op !== undefined){ - a.opacity = {to: op}; - } - if(o.xy !== undefined){ - a.points = {to: o.xy}; - } - arguments.callee.anim = this.fxanim(a, - o, 'motion', .35, "easeOut", function(){ - el.afterFx(o); - }); + + arguments.callee.anim = fly(dom).fxanim(a, + o, + MOTION, + .35, + EASEOUT, + function(){ + fly(dom).afterFx(o); + }); }); return this; }, - + ghost : function(anchor, o){ - var el = this.getFxEl(); - o = o || {}; + o = getObject(o); + var me = this, + dom = me.dom, + st = dom.style, + a = {opacity: {to: 0}, points: {}}, + pt = a.points, + r, + w, + h; + + anchor = anchor || "b"; - el.queueFx(o, function(){ - anchor = anchor || "b"; - - var r = this.getFxRestore(); - var w = this.getWidth(), - h = this.getHeight(); - - var st = this.dom.style; - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.clearOpacity(); - el.setPositioning(r.pos); + me.queueFx(o, function(){ + + r = fly(dom).getFxRestore(); + w = fly(dom).getWidth(); + h = fly(dom).getHeight(); + + function after(){ + o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide(); + fly(dom).clearOpacity(); + fly(dom).setPositioning(r.pos); st.width = r.width; st.height = r.height; - - el.afterFx(o); - }; - - var a = {opacity: {to: 0}, points: {}}, pt = a.points; - switch(anchor.toLowerCase()){ - case "t": - pt.by = [0, -h]; - break; - case "l": - pt.by = [-w, 0]; - break; - case "r": - pt.by = [w, 0]; - break; - case "b": - pt.by = [0, h]; - break; - case "tl": - pt.by = [-w, -h]; - break; - case "bl": - pt.by = [-w, h]; - break; - case "br": - pt.by = [w, h]; - break; - case "tr": - pt.by = [w, -h]; - break; + fly(dom).afterFx(o); } - - arguments.callee.anim = this.fxanim(a, + + pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, { + t : [0, -h], + l : [-w, 0], + r : [w, 0], + b : [0, h], + tl : [-w, -h], + bl : [-w, h], + br : [w, h], + tr : [w, -h] + }); + + arguments.callee.anim = fly(dom).fxanim(a, o, - 'motion', + MOTION, .5, - "easeOut", after); + EASEOUT, after); }); - return this; + return me; }, - + syncFx : function(){ - this.fxDefaults = Ext.apply(this.fxDefaults || {}, { - block : false, - concurrent : true, - stopFx : false + var me = this; + me.fxDefaults = Ext.apply(me.fxDefaults || {}, { + block : FALSE, + concurrent : TRUE, + stopFx : FALSE }); - return this; + return me; }, - + sequenceFx : function(){ - this.fxDefaults = Ext.apply(this.fxDefaults || {}, { - block : false, - concurrent : false, - stopFx : false + var me = this; + me.fxDefaults = Ext.apply(me.fxDefaults || {}, { + block : FALSE, + concurrent : FALSE, + stopFx : FALSE }); - return this; + return me; }, - - nextFx : function(){ - var ef = this.fxQueue[0]; + + nextFx : function(){ + var ef = getQueue(this.dom.id)[0]; if(ef){ ef.call(this); } }, - + hasActiveFx : function(){ - return this.fxQueue && this.fxQueue[0]; + return getQueue(this.dom.id)[0]; }, - - stopFx : function(){ - if(this.hasActiveFx()){ - var cur = this.fxQueue[0]; - if(cur && cur.anim && cur.anim.isAnimated()){ - this.fxQueue = [cur]; cur.anim.stop(true); + + stopFx : function(finish){ + var me = this, + id = me.dom.id; + if(me.hasActiveFx()){ + var cur = getQueue(id)[0]; + if(cur && cur.anim){ + if(cur.anim.isAnimated){ + setQueue(id, [cur]); + cur.anim.stop(finish !== undefined ? finish : TRUE); + }else{ + setQueue(id, []); + } } } - return this; + return me; }, - + beforeFx : function(o){ if(this.hasActiveFx() && !o.concurrent){ if(o.stopFx){ this.stopFx(); - return true; + return TRUE; } - return false; + return FALSE; } - return true; + return TRUE; }, - + hasFxBlock : function(){ - var q = this.fxQueue; + var q = getQueue(this.dom.id); return q && q[0] && q[0].block; }, - + queueFx : function(o, fn){ - if(!this.fxQueue){ - this.fxQueue = []; - } - if(!this.hasFxBlock()){ - Ext.applyIf(o, this.fxDefaults); + var me = fly(this.dom); + if(!me.hasFxBlock()){ + Ext.applyIf(o, me.fxDefaults); if(!o.concurrent){ - var run = this.beforeFx(o); + var run = me.beforeFx(o); fn.block = o.block; - this.fxQueue.push(fn); + getQueue(me.dom.id).push(fn); if(run){ - this.nextFx(); + me.nextFx(); } }else{ - fn.call(this); + fn.call(me); } } - return this; + return me; }, - - fxWrap : function(pos, o, vis){ - var wrap; - if(!o.wrap || !(wrap = Ext.get(o.wrap))){ - var wrapXY; + + fxWrap : function(pos, o, vis){ + var dom = this.dom, + wrap, + wrapXY; + if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){ if(o.fixPosition){ - wrapXY = this.getXY(); + wrapXY = fly(dom).getXY(); } var div = document.createElement("div"); div.style.visibility = vis; - wrap = Ext.get(this.dom.parentNode.insertBefore(div, this.dom)); - wrap.setPositioning(pos); - if(wrap.getStyle("position") == "static"){ - wrap.position("relative"); + wrap = dom.parentNode.insertBefore(div, dom); + fly(wrap).setPositioning(pos); + if(fly(wrap).isStyle(POSITION, "static")){ + fly(wrap).position("relative"); } - this.clearPositioning('auto'); - wrap.clip(); - wrap.dom.appendChild(this.dom); + fly(dom).clearPositioning('auto'); + fly(wrap).clip(); + wrap.appendChild(dom); if(wrapXY){ - wrap.setXY(wrapXY); + fly(wrap).setXY(wrapXY); } } return wrap; }, - - fxUnwrap : function(wrap, pos, o){ - this.clearPositioning(); - this.setPositioning(pos); + + fxUnwrap : function(wrap, pos, o){ + var dom = this.dom; + fly(dom).clearPositioning(); + fly(dom).setPositioning(pos); if(!o.wrap){ - wrap.dom.parentNode.insertBefore(this.dom, wrap.dom); - wrap.remove(); + var pn = fly(wrap).dom.parentNode; + pn.insertBefore(dom, wrap); + fly(wrap).remove(); } }, - + getFxRestore : function(){ var st = this.dom.style; return {pos: this.getPositioning(), width: st.width, height : st.height}; }, - + afterFx : function(o){ + var dom = this.dom, + id = dom.id; if(o.afterStyle){ - this.applyStyles(o.afterStyle); + fly(dom).setStyle(o.afterStyle); } if(o.afterCls){ - this.addClass(o.afterCls); + fly(dom).addClass(o.afterCls); } - if(o.remove === true){ - this.remove(); + if(o.remove == TRUE){ + fly(dom).remove(); + } + if(o.callback){ + o.callback.call(o.scope, fly(dom)); } - Ext.callback(o.callback, o.scope, [this]); if(!o.concurrent){ - this.fxQueue.shift(); - this.nextFx(); + getQueue(id).shift(); + fly(dom).nextFx(); } }, - - getFxEl : function(){ return Ext.get(this.dom); - }, - - + fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ animType = animType || 'run'; opt = opt || {}; var anim = Ext.lib.Anim[animType]( - this.dom, args, - (opt.duration || defaultDur) || .35, - (opt.easing || defaultEase) || 'easeOut', - function(){ - Ext.callback(cb, this); - }, - this - ); + this.dom, + args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || EASEOUT, + cb, + this + ); opt.anim = anim; return anim; } }; + Ext.Fx.resize = Ext.Fx.scale; -Ext.apply(Ext.Element.prototype, Ext.Fx); - -Ext.CompositeElement = function(els){ - this.elements = []; - this.addElements(els); -}; -Ext.CompositeElement.prototype = { - isComposite: true, - addElements : function(els){ - if(!els) return this; - if(typeof els == "string"){ - els = Ext.Element.selectorFunction(els); - } - var yels = this.elements; - var index = yels.length-1; - for(var i = 0, len = els.length; i < len; i++) { - yels[++index] = Ext.get(els[i]); - } - return this; - }, - - - fill : function(els){ - this.elements = []; - this.add(els); - return this; - }, - - - filter : function(selector){ - var els = []; - this.each(function(el){ - if(el.is(selector)){ - els[els.length] = el.dom; - } - }); - this.fill(els); - return this; - }, - - invoke : function(fn, args){ - var els = this.elements; - for(var i = 0, len = els.length; i < len; i++) { - Ext.Element.prototype[fn].apply(els[i], args); - } - return this; - }, - - add : function(els){ - if(typeof els == "string"){ - this.addElements(Ext.Element.selectorFunction(els)); - }else if(els.length !== undefined){ - this.addElements(els); - }else{ - this.addElements([els]); - } - return this; - }, - - each : function(fn, scope){ - var els = this.elements; - for(var i = 0, len = els.length; i < len; i++){ - if(fn.call(scope || els[i], els[i], this, i) === false) { - break; - } - } - return this; - }, - - - item : function(index){ - return this.elements[index] || null; - }, - - - first : function(){ - return this.item(0); - }, - - - last : function(){ - return this.item(this.elements.length-1); - }, - - - getCount : function(){ - return this.elements.length; - }, - - - contains : function(el){ - return this.indexOf(el) !== -1; - }, - - - indexOf : function(el){ - return this.elements.indexOf(Ext.get(el)); - }, - - - - removeElement : function(el, removeDom){ - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++){ - this.removeElement(el[i]); - } - return this; - } - var index = typeof el == 'number' ? el : this.indexOf(el); - if(index !== -1 && this.elements[index]){ - if(removeDom){ - var d = this.elements[index]; - if(d.dom){ - d.remove(); - }else{ - Ext.removeNode(d); - } - } - this.elements.splice(index, 1); - } - return this; - }, - - - replaceElement : function(el, replacement, domReplace){ - var index = typeof el == 'number' ? el : this.indexOf(el); - if(index !== -1){ - if(domReplace){ - this.elements[index].replaceWith(replacement); - }else{ - this.elements.splice(index, 1, Ext.get(replacement)) - } - } - return this; - }, - - - clear : function(){ - this.elements = []; - } -}; -(function(){ -Ext.CompositeElement.createCall = function(proto, fnName){ - if(!proto[fnName]){ - proto[fnName] = function(){ - return this.invoke(fnName, arguments); - }; - } -}; -for(var fnName in Ext.Element.prototype){ - if(typeof Ext.Element.prototype[fnName] == "function"){ - Ext.CompositeElement.createCall(Ext.CompositeElement.prototype, fnName); - } -}; -})(); - - -Ext.CompositeElementLite = function(els){ - Ext.CompositeElementLite.superclass.constructor.call(this, els); - this.el = new Ext.Element.Flyweight(); -}; -Ext.extend(Ext.CompositeElementLite, Ext.CompositeElement, { - addElements : function(els){ - if(els){ - if(Ext.isArray(els)){ - this.elements = this.elements.concat(els); - }else{ - var yels = this.elements; - var index = yels.length-1; - for(var i = 0, len = els.length; i < len; i++) { - yels[++index] = els[i]; - } - } - } - return this; - }, - invoke : function(fn, args){ - var els = this.elements; - var el = this.el; - for(var i = 0, len = els.length; i < len; i++) { - el.dom = els[i]; - Ext.Element.prototype[fn].apply(el, args); - } - return this; - }, - - item : function(index){ - if(!this.elements[index]){ - return null; - } - this.el.dom = this.elements[index]; - return this.el; - }, - + +Ext.Element.addMethods(Ext.Fx); +})(); + +Ext.CompositeElementLite = function(els, root){ - addListener : function(eventName, handler, scope, opt){ - var els = this.elements; - for(var i = 0, len = els.length; i < len; i++) { - Ext.EventManager.on(els[i], eventName, handler, scope || els[i], opt); - } - return this; - }, - - - each : function(fn, scope){ - var els = this.elements; - var el = this.el; - for(var i = 0, len = els.length; i < len; i++){ - el.dom = els[i]; - if(fn.call(scope || el, el, this, i) === false){ - break; - } - } - return this; - }, - - indexOf : function(el){ - return this.elements.indexOf(Ext.getDom(el)); - }, - - replaceElement : function(el, replacement, domReplace){ - var index = typeof el == 'number' ? el : this.indexOf(el); - if(index !== -1){ - replacement = Ext.getDom(replacement); - if(domReplace){ - var d = this.elements[index]; - d.parentNode.insertBefore(replacement, d); - Ext.removeNode(d); - } - this.elements.splice(index, 1, replacement); - } - return this; - } -}); -Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; -if(Ext.DomQuery){ - Ext.Element.selectorFunction = Ext.DomQuery.select; -} - -Ext.Element.select = function(selector, unique, root){ - var els; - if(typeof selector == "string"){ - els = Ext.Element.selectorFunction(selector, root); - }else if(selector.length !== undefined){ - els = selector; - }else{ - throw "Invalid selector"; - } - if(unique === true){ - return new Ext.CompositeElement(els); - }else{ - return new Ext.CompositeElementLite(els); - } -}; - -Ext.select = Ext.Element.select; - -Ext.data.Connection = function(config){ - Ext.apply(this, config); - this.addEvents( - - "beforerequest", - - "requestcomplete", - - "requestexception" - ); - Ext.data.Connection.superclass.constructor.call(this); + this.elements = []; + this.add(els, root); + this.el = new Ext.Element.Flyweight(); }; -Ext.extend(Ext.data.Connection, Ext.util.Observable, { - - - - - - timeout : 30000, - - autoAbort:false, +Ext.CompositeElementLite.prototype = { + isComposite: true, - disableCaching: true, - - - disableCachingParam: '_dc', - - - - request : function(o){ - if(this.fireEvent("beforerequest", this, o) !== false){ - var p = o.params; - - if(typeof p == "function"){ - p = p.call(o.scope||window, o); - } - if(typeof p == "object"){ - p = Ext.urlEncode(p); - } - if(this.extraParams){ - var extras = Ext.urlEncode(this.extraParams); - p = p ? (p + '&' + extras) : extras; - } - - var url = o.url || this.url; - if(typeof url == 'function'){ - url = url.call(o.scope||window, o); - } - - if(o.form){ - var form = Ext.getDom(o.form); - url = url || form.action; - - var enctype = form.getAttribute("enctype"); - if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){ - return this.doFormUpload(o, p, url); - } - var f = Ext.lib.Ajax.serializeForm(form); - p = p ? (p + '&' + f) : f; - } - - var hs = o.headers; - if(this.defaultHeaders){ - hs = Ext.apply(hs || {}, this.defaultHeaders); - if(!o.headers){ - o.headers = hs; - } - } - - var cb = { - success: this.handleResponse, - failure: this.handleFailure, - scope: this, - argument: {options: o}, - timeout : o.timeout || this.timeout - }; - - var method = o.method||this.method||((p || o.xmlData || o.jsonData) ? "POST" : "GET"); - - if(method == 'GET' && (this.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ - var dcp = o.disableCachingParam || this.disableCachingParam; - url += (url.indexOf('?') != -1 ? '&' : '?') + dcp + '=' + (new Date().getTime()); - } - - if(typeof o.autoAbort == 'boolean'){ if(o.autoAbort){ - this.abort(); - } - }else if(this.autoAbort !== false){ - this.abort(); - } - if((method == 'GET' || o.xmlData || o.jsonData) && p){ - url += (url.indexOf('?') != -1 ? '&' : '?') + p; - p = ''; - } - this.transId = Ext.lib.Ajax.request(method, url, cb, p, o); - return this.transId; - }else{ - Ext.callback(o.callback, o.scope, [o, null, null]); - return null; - } + getElement : function(el){ + + var e = this.el; + e.dom = el; + e.id = el.id; + return e; }, - isLoading : function(transId){ - if(transId){ - return Ext.lib.Ajax.isCallInProgress(transId); - }else{ - return this.transId ? true : false; - } + transformElement : function(el){ + return Ext.getDom(el); }, - abort : function(transId){ - if(transId || this.isLoading()){ - Ext.lib.Ajax.abort(transId || this.transId); + getCount : function(){ + return this.elements.length; + }, + + add : function(els, root){ + var me = this, + elements = me.elements; + if(!els){ + return this; } + if(typeof els == "string"){ + els = Ext.Element.selectorFunction(els, root); + }else if(els.isComposite){ + els = els.elements; + }else if(!Ext.isIterable(els)){ + els = [els]; + } + + for(var i = 0, len = els.length; i < len; ++i){ + elements.push(me.transformElement(els[i])); + } + return me; }, - handleResponse : function(response){ - this.transId = false; - var options = response.argument.options; - response.argument = options ? options.argument : null; - this.fireEvent("requestcomplete", this, response, options); - Ext.callback(options.success, options.scope, [response, options]); - Ext.callback(options.callback, options.scope, [options, true, response]); + invoke : function(fn, args){ + var me = this, + els = me.elements, + len = els.length, + e, + i; + + for(i = 0; i < len; i++) { + e = els[i]; + if(e){ + Ext.Element.prototype[fn].apply(me.getElement(e), args); + } + } + return me; + }, + + item : function(index){ + var me = this, + el = me.elements[index], + out = null; + + if(el){ + out = me.getElement(el); + } + return out; }, - handleFailure : function(response, e){ - this.transId = false; - var options = response.argument.options; - response.argument = options ? options.argument : null; - this.fireEvent("requestexception", this, response, options, e); - Ext.callback(options.failure, options.scope, [response, options]); - Ext.callback(options.callback, options.scope, [options, false, response]); + + addListener : function(eventName, handler, scope, opt){ + var els = this.elements, + len = els.length, + i, e; + + for(i = 0; i -1){ + replacement = Ext.getDom(replacement); + if(domReplace){ + d = this.elements[index]; + d.parentNode.insertBefore(replacement, d); + Ext.removeNode(d); + } + this.elements.splice(index, 1, replacement); } + return this; + }, - Ext.EventManager.on(frame, 'load', cb, this); - form.submit(); + + clear : function(){ + this.elements = []; + } +}; + +Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; + + +Ext.CompositeElementLite.importElementMethods = function() { + var fnName, + ElProto = Ext.Element.prototype, + CelProto = Ext.CompositeElementLite.prototype; + + for (fnName in ElProto) { + if (typeof ElProto[fnName] == 'function'){ + (function(fnName) { + CelProto[fnName] = CelProto[fnName] || function() { + return this.invoke(fnName, arguments); + }; + }).call(CelProto, fnName); - if(hiddens){ for(var i = 0, len = hiddens.length; i < len; i++){ - Ext.removeNode(hiddens[i]); - } } } -}); +}; + +Ext.CompositeElementLite.importElementMethods(); + +if(Ext.DomQuery){ + Ext.Element.selectorFunction = Ext.DomQuery.select; +} + + +Ext.Element.select = function(selector, root){ + var els; + if(typeof selector == "string"){ + els = Ext.Element.selectorFunction(selector, root); + }else if(selector.length !== undefined){ + els = selector; + }else{ + throw "Invalid selector"; + } + return new Ext.CompositeElementLite(els); +}; + +Ext.select = Ext.Element.select; +(function(){ + var BEFOREREQUEST = "beforerequest", + REQUESTCOMPLETE = "requestcomplete", + REQUESTEXCEPTION = "requestexception", + UNDEFINED = undefined, + LOAD = 'load', + POST = 'POST', + GET = 'GET', + WINDOW = window; + + + Ext.data.Connection = function(config){ + Ext.apply(this, config); + this.addEvents( + + BEFOREREQUEST, + + REQUESTCOMPLETE, + + REQUESTEXCEPTION + ); + Ext.data.Connection.superclass.constructor.call(this); + }; + + Ext.extend(Ext.data.Connection, Ext.util.Observable, { + + + + + + timeout : 30000, + + autoAbort:false, + + + disableCaching: true, + + + disableCachingParam: '_dc', + + + request : function(o){ + var me = this; + if(me.fireEvent(BEFOREREQUEST, me, o)){ + if (o.el) { + if(!Ext.isEmpty(o.indicatorText)){ + me.indicatorText = '
'+o.indicatorText+"
"; + } + if(me.indicatorText) { + Ext.getDom(o.el).innerHTML = me.indicatorText; + } + o.success = (Ext.isFunction(o.success) ? o.success : function(){}).createInterceptor(function(response) { + Ext.getDom(o.el).innerHTML = response.responseText; + }); + } + + var p = o.params, + url = o.url || me.url, + method, + cb = {success: me.handleResponse, + failure: me.handleFailure, + scope: me, + argument: {options: o}, + timeout : Ext.num(o.timeout, me.timeout) + }, + form, + serForm; + + + if (Ext.isFunction(p)) { + p = p.call(o.scope||WINDOW, o); + } + + p = Ext.urlEncode(me.extraParams, Ext.isObject(p) ? Ext.urlEncode(p) : p); + + if (Ext.isFunction(url)) { + url = url.call(o.scope || WINDOW, o); + } + + if((form = Ext.getDom(o.form))){ + url = url || form.action; + if(o.isUpload || (/multipart\/form-data/i.test(form.getAttribute("enctype")))) { + return me.doFormUpload.call(me, o, p, url); + } + serForm = Ext.lib.Ajax.serializeForm(form); + p = p ? (p + '&' + serForm) : serForm; + } + + method = o.method || me.method || ((p || o.xmlData || o.jsonData) ? POST : GET); + + if(method === GET && (me.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ + var dcp = o.disableCachingParam || me.disableCachingParam; + url = Ext.urlAppend(url, dcp + '=' + (new Date().getTime())); + } + + o.headers = Ext.applyIf(o.headers || {}, me.defaultHeaders || {}); + + if(o.autoAbort === true || me.autoAbort) { + me.abort(); + } + + if((method == GET || o.xmlData || o.jsonData) && p){ + url = Ext.urlAppend(url, p); + p = ''; + } + return (me.transId = Ext.lib.Ajax.request(method, url, cb, p, o)); + }else{ + return o.callback ? o.callback.apply(o.scope, [o,UNDEFINED,UNDEFINED]) : null; + } + }, + + + isLoading : function(transId){ + return transId ? Ext.lib.Ajax.isCallInProgress(transId) : !! this.transId; + }, + + + abort : function(transId){ + if(transId || this.isLoading()){ + Ext.lib.Ajax.abort(transId || this.transId); + } + }, + + + handleResponse : function(response){ + this.transId = false; + var options = response.argument.options; + response.argument = options ? options.argument : null; + this.fireEvent(REQUESTCOMPLETE, this, response, options); + if(options.success){ + options.success.call(options.scope, response, options); + } + if(options.callback){ + options.callback.call(options.scope, options, true, response); + } + }, + + + handleFailure : function(response, e){ + this.transId = false; + var options = response.argument.options; + response.argument = options ? options.argument : null; + this.fireEvent(REQUESTEXCEPTION, this, response, options, e); + if(options.failure){ + options.failure.call(options.scope, response, options); + } + if(options.callback){ + options.callback.call(options.scope, options, false, response); + } + }, + + + doFormUpload : function(o, ps, url){ + var id = Ext.id(), + doc = document, + frame = doc.createElement('iframe'), + form = Ext.getDom(o.form), + hiddens = [], + hd, + encoding = 'multipart/form-data', + buf = { + target: form.target, + method: form.method, + encoding: form.encoding, + enctype: form.enctype, + action: form.action + }; + + + Ext.fly(frame).set({ + id: id, + name: id, + cls: 'x-hidden', + src: Ext.SSL_SECURE_URL + }); + + doc.body.appendChild(frame); + + + if(Ext.isIE){ + document.frames[id].name = id; + } + + + Ext.fly(form).set({ + target: id, + method: POST, + enctype: encoding, + encoding: encoding, + action: url || buf.action + }); + + + Ext.iterate(Ext.urlDecode(ps, false), function(k, v){ + hd = doc.createElement('input'); + Ext.fly(hd).set({ + type: 'hidden', + value: v, + name: k + }); + form.appendChild(hd); + hiddens.push(hd); + }); + + function cb(){ + var me = this, + + r = {responseText : '', + responseXML : null, + argument : o.argument}, + doc, + firstChild; + + try{ + doc = frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document; + if(doc){ + if(doc.body){ + if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){ + r.responseText = firstChild.value; + }else{ + r.responseText = doc.body.innerHTML; + } + } + + r.responseXML = doc.XMLDocument || doc; + } + } + catch(e) {} + + Ext.EventManager.removeListener(frame, LOAD, cb, me); + + me.fireEvent(REQUESTCOMPLETE, me, r, o); + + function runCallback(fn, scope, args){ + if(Ext.isFunction(fn)){ + fn.apply(scope, args); + } + } + + runCallback(o.success, o.scope, [r, o]); + runCallback(o.callback, o.scope, [o, true, r]); + + if(!me.debugUploads){ + setTimeout(function(){Ext.removeNode(frame);}, 100); + } + } + + Ext.EventManager.on(frame, LOAD, cb, this); + form.submit(); + + Ext.fly(form).set(buf); + Ext.each(hiddens, function(h) { + Ext.removeNode(h); + }); + } + }); +})(); Ext.Ajax = new Ext.data.Connection({ @@ -5437,249 +4795,3846 @@ Ext.Ajax = new Ext.data.Connection({ } }); -Ext.Updater = Ext.extend(Ext.util.Observable, { - constructor: function(el, forceNew){ - el = Ext.get(el); - if(!forceNew && el.updateManager){ - return el.updateManager; - } - - this.el = el; - - this.defaultUrl = null; +Ext.util.JSON = new (function(){ + var useHasOwn = !!{}.hasOwnProperty, + isNative = function() { + var useNative = null; - this.addEvents( - - "beforeupdate", - - "update", - - "failure" - ); - var d = Ext.Updater.defaults; - - this.sslBlankUrl = d.sslBlankUrl; - - this.disableCaching = d.disableCaching; - - this.indicatorText = d.indicatorText; - - this.showLoadIndicator = d.showLoadIndicator; - - this.timeout = d.timeout; - - this.loadScripts = d.loadScripts; - - this.transaction = null; - - this.refreshDelegate = this.refresh.createDelegate(this); - - this.updateDelegate = this.update.createDelegate(this); - - this.formUpdateDelegate = this.formUpdate.createDelegate(this); - - if(!this.renderer){ - - this.renderer = this.getDefaultRenderer(); - } - Ext.Updater.superclass.constructor.call(this); - }, - - getDefaultRenderer: function() { - return new Ext.Updater.BasicRenderer(); - }, - - getEl : function(){ - return this.el; - }, - - - update : function(url, params, callback, discardUrl){ - if(this.fireEvent("beforeupdate", this.el, url, params) !== false){ - var cfg, callerScope; - if(typeof url == "object"){ cfg = url; - url = cfg.url; - params = params || cfg.params; - callback = callback || cfg.callback; - discardUrl = discardUrl || cfg.discardUrl; - callerScope = cfg.scope; - if(typeof cfg.nocache != "undefined"){this.disableCaching = cfg.nocache;}; - if(typeof cfg.text != "undefined"){this.indicatorText = '
'+cfg.text+"
";}; - if(typeof cfg.scripts != "undefined"){this.loadScripts = cfg.scripts;}; - if(typeof cfg.timeout != "undefined"){this.timeout = cfg.timeout;}; - } - this.showLoading(); - - if(!discardUrl){ - this.defaultUrl = url; - } - if(typeof url == "function"){ - url = url.call(this); - } - - var o = Ext.apply({}, { - url : url, - params: (typeof params == "function" && callerScope) ? params.createDelegate(callerScope) : params, - success: this.processSuccess, - failure: this.processFailure, - scope: this, - callback: undefined, - timeout: (this.timeout*1000), - disableCaching: this.disableCaching, - argument: { - "options": cfg, - "url": url, - "form": null, - "callback": callback, - "scope": callerScope || window, - "params": params + return function() { + if (useNative === null) { + useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]'; } - }, cfg); - - this.transaction = Ext.Ajax.request(o); - } - }, + + return useNative; + }; + }(), + pad = function(n) { + return n < 10 ? "0" + n : n; + }, + doDecode = function(json){ + return json ? eval("(" + json + ")") : ""; + }, + doEncode = function(o){ + if(!Ext.isDefined(o) || o === null){ + return "null"; + }else if(Ext.isArray(o)){ + return encodeArray(o); + }else if(Ext.isDate(o)){ + return Ext.util.JSON.encodeDate(o); + }else if(Ext.isString(o)){ + return encodeString(o); + }else if(typeof o == "number"){ + + return isFinite(o) ? String(o) : "null"; + }else if(Ext.isBoolean(o)){ + return String(o); + }else { + var a = ["{"], b, i, v; + for (i in o) { + + if(!o.getElementsByTagName){ + if(!useHasOwn || o.hasOwnProperty(i)) { + v = o[i]; + switch (typeof v) { + case "undefined": + case "function": + case "unknown": + break; + default: + if(b){ + a.push(','); + } + a.push(doEncode(i), ":", + v === null ? "null" : doEncode(v)); + b = true; + } + } + } + } + a.push("}"); + return a.join(""); + } + }, + m = { + "\b": '\\b', + "\t": '\\t', + "\n": '\\n', + "\f": '\\f', + "\r": '\\r', + '"' : '\\"', + "\\": '\\\\' + }, + encodeString = function(s){ + if (/["\\\x00-\x1f]/.test(s)) { + return '"' + s.replace(/([\x00-\x1f\\"])/g, function(a, b) { + var c = m[b]; + if(c){ + return c; + } + c = b.charCodeAt(); + return "\\u00" + + Math.floor(c / 16).toString(16) + + (c % 16).toString(16); + }) + '"'; + } + return '"' + s + '"'; + }, + encodeArray = function(o){ + var a = ["["], b, i, l = o.length, v; + for (i = 0; i < l; i += 1) { + v = o[i]; + switch (typeof v) { + case "undefined": + case "function": + case "unknown": + break; + default: + if (b) { + a.push(','); + } + a.push(v === null ? "null" : Ext.util.JSON.encode(v)); + b = true; + } + } + a.push("]"); + return a.join(""); + }; - formUpdate : function(form, url, reset, callback){ - if(this.fireEvent("beforeupdate", this.el, form, url) !== false){ - if(typeof url == "function"){ - url = url.call(this); + this.encodeDate = function(o){ + return '"' + o.getFullYear() + "-" + + pad(o.getMonth() + 1) + "-" + + pad(o.getDate()) + "T" + + pad(o.getHours()) + ":" + + pad(o.getMinutes()) + ":" + + pad(o.getSeconds()) + '"'; + }; + + + this.encode = function() { + var ec; + return function(o) { + if (!ec) { + + ec = isNative() ? JSON.stringify : doEncode; } - form = Ext.getDom(form) - this.transaction = Ext.Ajax.request({ - form: form, - url:url, - success: this.processSuccess, - failure: this.processFailure, - scope: this, - timeout: (this.timeout*1000), - argument: { - "url": url, - "form": form, - "callback": callback, - "reset": reset + return ec(o); + }; + }(); + + + + this.decode = function() { + var dc; + return function(json) { + if (!dc) { + + dc = isNative() ? JSON.parse : doDecode; + } + return dc(json); + }; + }(); + +})(); + +Ext.encode = Ext.util.JSON.encode; + +Ext.decode = Ext.util.JSON.decode; + +Ext.EventManager = function(){ + var docReadyEvent, + docReadyProcId, + docReadyState = false, + DETECT_NATIVE = Ext.isGecko || Ext.isWebKit || Ext.isSafari, + E = Ext.lib.Event, + D = Ext.lib.Dom, + DOC = document, + WINDOW = window, + DOMCONTENTLOADED = "DOMContentLoaded", + COMPLETE = 'complete', + propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, + + specialElCache = []; + + function getId(el){ + var id = false, + i = 0, + len = specialElCache.length, + skip = false, + o; + + if (el) { + if (el.getElementById || el.navigator) { + + for(; i < len; ++i){ + o = specialElCache[i]; + if(o.el === el){ + id = o.id; + break; + } } + if(!id){ + + id = Ext.id(el); + specialElCache.push({ + id: id, + el: el + }); + skip = true; + } + }else{ + id = Ext.id(el); + } + if(!Ext.elCache[id]){ + Ext.Element.addToCache(new Ext.Element(el), id); + if(skip){ + Ext.elCache[id].skipGC = true; + } + } + } + return id; + } + + + function addListener(el, ename, fn, task, wrap, scope){ + el = Ext.getDom(el); + var id = getId(el), + es = Ext.elCache[id].events, + wfn; + + wfn = E.on(el, ename, wrap); + es[ename] = es[ename] || []; + + + es[ename].push([fn, wrap, scope, wfn, task]); + + + + + + if(el.addEventListener && ename == "mousewheel"){ + var args = ["DOMMouseScroll", wrap, false]; + el.addEventListener.apply(el, args); + Ext.EventManager.addListener(WINDOW, 'unload', function(){ + el.removeEventListener.apply(el, args); }); - this.showLoading.defer(1, this); } - }, + + if(el == DOC && ename == "mousedown"){ + Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); + } + } + + function doScrollChk(){ + + if(window != top){ + return false; + } + + try{ + DOC.documentElement.doScroll('left'); + }catch(e){ + return false; + } + + fireDocReady(); + return true; + } - refresh : function(callback){ - if(this.defaultUrl == null){ - return; + function checkReadyState(e){ + + if(Ext.isIE && doScrollChk()){ + return true; } - this.update(this.defaultUrl, null, callback, true); - }, - - - startAutoRefresh : function(interval, url, params, callback, refreshNow){ - if(refreshNow){ - this.update(url || this.defaultUrl, params, callback, true); - } - if(this.autoRefreshProcId){ - clearInterval(this.autoRefreshProcId); - } - this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); - }, - - - stopAutoRefresh : function(){ - if(this.autoRefreshProcId){ - clearInterval(this.autoRefreshProcId); - delete this.autoRefreshProcId; - } - }, - - - isAutoRefreshing : function(){ - return this.autoRefreshProcId ? true : false; - }, - - - showLoading : function(){ - if(this.showLoadIndicator){ - this.el.update(this.indicatorText); - } - }, - - processSuccess : function(response){ - this.transaction = null; - if(response.argument.form && response.argument.reset){ - try{ response.argument.form.reset(); - }catch(e){} - } - if(this.loadScripts){ - this.renderer.render(this.el, response, this, - this.updateComplete.createDelegate(this, [response])); - }else{ - this.renderer.render(this.el, response, this); - this.updateComplete(response); - } - }, - - updateComplete : function(response){ - this.fireEvent("update", this.el, response); - if(typeof response.argument.callback == "function"){ - response.argument.callback.call(response.argument.scope, this.el, true, response, response.argument.options); - } - }, - - processFailure : function(response){ - this.transaction = null; - this.fireEvent("failure", this.el, response); - if(typeof response.argument.callback == "function"){ - response.argument.callback.call(response.argument.scope, this.el, false, response, response.argument.options); - } - }, - - - setRenderer : function(renderer){ - this.renderer = renderer; - }, - - - getRenderer : function(){ - return this.renderer; - }, - - - setDefaultUrl : function(defaultUrl){ - this.defaultUrl = defaultUrl; - }, - - - abort : function(){ - if(this.transaction){ - Ext.Ajax.abort(this.transaction); - } - }, - - - isUpdating : function(){ - if(this.transaction){ - return Ext.Ajax.isLoading(this.transaction); + if(DOC.readyState == COMPLETE){ + fireDocReady(); + return true; } + docReadyState || (docReadyProcId = setTimeout(arguments.callee, 2)); return false; } + + var styles; + function checkStyleSheets(e){ + styles || (styles = Ext.query('style, link[rel=stylesheet]')); + if(styles.length == DOC.styleSheets.length){ + fireDocReady(); + return true; + } + docReadyState || (docReadyProcId = setTimeout(arguments.callee, 2)); + return false; + } + + function OperaDOMContentLoaded(e){ + DOC.removeEventListener(DOMCONTENTLOADED, arguments.callee, false); + checkStyleSheets(); + } + + function fireDocReady(e){ + if(!docReadyState){ + docReadyState = true; + + if(docReadyProcId){ + clearTimeout(docReadyProcId); + } + if(DETECT_NATIVE) { + DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false); + } + if(Ext.isIE && checkReadyState.bindIE){ + DOC.detachEvent('onreadystatechange', checkReadyState); + } + E.un(WINDOW, "load", arguments.callee); + } + if(docReadyEvent && !Ext.isReady){ + Ext.isReady = true; + docReadyEvent.fire(); + docReadyEvent.listeners = []; + } + + } + + function initDocReady(){ + docReadyEvent || (docReadyEvent = new Ext.util.Event()); + if (DETECT_NATIVE) { + DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false); + } + + if (Ext.isIE){ + + + if(!checkReadyState()){ + checkReadyState.bindIE = true; + DOC.attachEvent('onreadystatechange', checkReadyState); + } + + }else if(Ext.isOpera ){ + + + + (DOC.readyState == COMPLETE && checkStyleSheets()) || + DOC.addEventListener(DOMCONTENTLOADED, OperaDOMContentLoaded, false); + + }else if (Ext.isWebKit){ + + checkReadyState(); + } + + E.on(WINDOW, "load", fireDocReady); + } + + function createTargeted(h, o){ + return function(){ + var args = Ext.toArray(arguments); + if(o.target == Ext.EventObject.setEvent(args[0]).target){ + h.apply(this, args); + } + }; + } + + function createBuffered(h, o, task){ + return function(e){ + + task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]); + }; + } + + function createSingle(h, el, ename, fn, scope){ + return function(e){ + Ext.EventManager.removeListener(el, ename, fn, scope); + h(e); + }; + } + + function createDelayed(h, o, fn){ + return function(e){ + var task = new Ext.util.DelayedTask(h); + if(!fn.tasks) { + fn.tasks = []; + } + fn.tasks.push(task); + task.delay(o.delay || 10, h, null, [new Ext.EventObjectImpl(e)]); + }; + } + + function listen(element, ename, opt, fn, scope){ + var o = (!opt || typeof opt == "boolean") ? {} : opt, + el = Ext.getDom(element), task; + + fn = fn || o.fn; + scope = scope || o.scope; + + if(!el){ + throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; + } + function h(e){ + + if(!Ext){ + return; + } + e = Ext.EventObject.setEvent(e); + var t; + if (o.delegate) { + if(!(t = e.getTarget(o.delegate, el))){ + return; + } + } else { + t = e.target; + } + if (o.stopEvent) { + e.stopEvent(); + } + if (o.preventDefault) { + e.preventDefault(); + } + if (o.stopPropagation) { + e.stopPropagation(); + } + if (o.normalized === false) { + e = e.browserEvent; + } + + fn.call(scope || el, e, t, o); + } + if(o.target){ + h = createTargeted(h, o); + } + if(o.delay){ + h = createDelayed(h, o, fn); + } + if(o.single){ + h = createSingle(h, el, ename, fn, scope); + } + if(o.buffer){ + task = new Ext.util.DelayedTask(h); + h = createBuffered(h, o, task); + } + + addListener(el, ename, fn, task, h, scope); + return h; + } + + var pub = { + + addListener : function(element, eventName, fn, scope, options){ + if(typeof eventName == 'object'){ + var o = eventName, e, val; + for(e in o){ + val = o[e]; + if(!propRe.test(e)){ + if(Ext.isFunction(val)){ + + listen(element, e, o, val, o.scope); + }else{ + + listen(element, e, val); + } + } + } + } else { + listen(element, eventName, options, fn, scope); + } + }, + + + removeListener : function(el, eventName, fn, scope){ + el = Ext.getDom(el); + var id = getId(el), + f = el && (Ext.elCache[id].events)[eventName] || [], + wrap, i, l, k, len, fnc; + + for (i = 0, len = f.length; i < len; i++) { + + + if (Ext.isArray(fnc = f[i]) && fnc[0] == fn && (!scope || fnc[2] == scope)) { + if(fnc[4]) { + fnc[4].cancel(); + } + k = fn.tasks && fn.tasks.length; + if(k) { + while(k--) { + fn.tasks[k].cancel(); + } + delete fn.tasks; + } + wrap = fnc[1]; + E.un(el, eventName, E.extAdapter ? fnc[3] : wrap); + + + if(wrap && el.addEventListener && eventName == "mousewheel"){ + el.removeEventListener("DOMMouseScroll", wrap, false); + } + + + if(wrap && el == DOC && eventName == "mousedown"){ + Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); + } + + f.splice(i, 1); + if (f.length === 0) { + delete Ext.elCache[id].events[eventName]; + } + for (k in Ext.elCache[id].events) { + return false; + } + Ext.elCache[id].events = {}; + return false; + } + } + }, + + + removeAll : function(el){ + el = Ext.getDom(el); + var id = getId(el), + ec = Ext.elCache[id] || {}, + es = ec.events || {}, + f, i, len, ename, fn, k, wrap; + + for(ename in es){ + if(es.hasOwnProperty(ename)){ + f = es[ename]; + + for (i = 0, len = f.length; i < len; i++) { + fn = f[i]; + if(fn[4]) { + fn[4].cancel(); + } + if(fn[0].tasks && (k = fn[0].tasks.length)) { + while(k--) { + fn[0].tasks[k].cancel(); + } + delete fn.tasks; + } + wrap = fn[1]; + E.un(el, ename, E.extAdapter ? fn[3] : wrap); + + + if(el.addEventListener && wrap && ename == "mousewheel"){ + el.removeEventListener("DOMMouseScroll", wrap, false); + } + + + if(wrap && el == DOC && ename == "mousedown"){ + Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); + } + } + } + } + if (Ext.elCache[id]) { + Ext.elCache[id].events = {}; + } + }, + + getListeners : function(el, eventName) { + el = Ext.getDom(el); + var id = getId(el), + ec = Ext.elCache[id] || {}, + es = ec.events || {}, + results = []; + if (es && es[eventName]) { + return es[eventName]; + } else { + return null; + } + }, + + purgeElement : function(el, recurse, eventName) { + el = Ext.getDom(el); + var id = getId(el), + ec = Ext.elCache[id] || {}, + es = ec.events || {}, + i, f, len; + if (eventName) { + if (es && es.hasOwnProperty(eventName)) { + f = es[eventName]; + for (i = 0, len = f.length; i < len; i++) { + Ext.EventManager.removeListener(el, eventName, f[i][0]); + } + } + } else { + Ext.EventManager.removeAll(el); + } + if (recurse && el && el.childNodes) { + for (i = 0, len = el.childNodes.length; i < len; i++) { + Ext.EventManager.purgeElement(el.childNodes[i], recurse, eventName); + } + } + }, + + _unload : function() { + var el; + for (el in Ext.elCache) { + Ext.EventManager.removeAll(el); + } + delete Ext.elCache; + delete Ext.Element._flyweights; + + + var c, + conn, + tid, + ajax = Ext.lib.Ajax; + (typeof ajax.conn == 'object') ? conn = ajax.conn : conn = {}; + for (tid in conn) { + c = conn[tid]; + if (c) { + ajax.abort({conn: c, tId: tid}); + } + } + }, + + onDocumentReady : function(fn, scope, options){ + if (Ext.isReady) { + docReadyEvent || (docReadyEvent = new Ext.util.Event()); + docReadyEvent.addListener(fn, scope, options); + docReadyEvent.fire(); + docReadyEvent.listeners = []; + } else { + if (!docReadyEvent) { + initDocReady(); + } + options = options || {}; + options.delay = options.delay || 1; + docReadyEvent.addListener(fn, scope, options); + } + }, + + + fireDocReady : fireDocReady + }; + + pub.on = pub.addListener; + + pub.un = pub.removeListener; + + pub.stoppedMouseDownEvent = new Ext.util.Event(); + return pub; +}(); + +Ext.onReady = Ext.EventManager.onDocumentReady; + + + +(function(){ + var initExtCss = function() { + + var bd = document.body || document.getElementsByTagName('body')[0]; + if (!bd) { + return false; + } + + var cls = [' ', + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : (Ext.isIE8 ? 'ext-ie8' : 'ext-ie9'))) + : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') + : Ext.isOpera ? "ext-opera" + : Ext.isWebKit ? "ext-webkit" : ""]; + + if (Ext.isSafari) { + cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4'))); + } else if(Ext.isChrome) { + cls.push("ext-chrome"); + } + + if (Ext.isMac) { + cls.push("ext-mac"); + } + if (Ext.isLinux) { + cls.push("ext-linux"); + } + + + if (Ext.isStrict || Ext.isBorderBox) { + var p = bd.parentNode; + if (p) { + if (!Ext.isStrict) { + Ext.fly(p, '_internal').addClass('x-quirks'); + if (Ext.isIE && !Ext.isStrict) { + Ext.isIEQuirks = true; + } + } + Ext.fly(p, '_internal').addClass(((Ext.isStrict && Ext.isIE ) || (!Ext.enableForcedBoxModel && !Ext.isIE)) ? ' ext-strict' : ' ext-border-box'); + } + } + + + if (Ext.enableForcedBoxModel && !Ext.isIE) { + Ext.isForcedBorderBox = true; + cls.push("ext-forced-border-box"); + } + + Ext.fly(bd, '_internal').addClass(cls); + return true; + }; + + if (!initExtCss()) { + Ext.onReady(initExtCss); + } +})(); + + +(function(){ + var supports = Ext.apply(Ext.supports, { + + correctRightMargin: true, + + + correctTransparentColor: true, + + + cssFloat: true + }); + + var supportTests = function(){ + var div = document.createElement('div'), + doc = document, + view, + last; + + div.innerHTML = '
'; + doc.body.appendChild(div); + last = div.lastChild; + + if((view = doc.defaultView)){ + if(view.getComputedStyle(div.firstChild.firstChild, null).marginRight != '0px'){ + supports.correctRightMargin = false; + } + if(view.getComputedStyle(last, null).backgroundColor != 'transparent'){ + supports.correctTransparentColor = false; + } + } + supports.cssFloat = !!last.style.cssFloat; + doc.body.removeChild(div); + }; + + if (Ext.isReady) { + supportTests(); + } else { + Ext.onReady(supportTests); + } +})(); + + + +Ext.EventObject = function(){ + var E = Ext.lib.Event, + clickRe = /(dbl)?click/, + + safariKeys = { + 3 : 13, + 63234 : 37, + 63235 : 39, + 63232 : 38, + 63233 : 40, + 63276 : 33, + 63277 : 34, + 63272 : 46, + 63273 : 36, + 63275 : 35 + }, + + btnMap = Ext.isIE ? {1:0,4:1,2:2} : {0:0,1:1,2:2}; + + Ext.EventObjectImpl = function(e){ + if(e){ + this.setEvent(e.browserEvent || e); + } + }; + + Ext.EventObjectImpl.prototype = { + + setEvent : function(e){ + var me = this; + if(e == me || (e && e.browserEvent)){ + return e; + } + me.browserEvent = e; + if(e){ + + me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1); + if(clickRe.test(e.type) && me.button == -1){ + me.button = 0; + } + me.type = e.type; + me.shiftKey = e.shiftKey; + + me.ctrlKey = e.ctrlKey || e.metaKey || false; + me.altKey = e.altKey; + + me.keyCode = e.keyCode; + me.charCode = e.charCode; + + me.target = E.getTarget(e); + + me.xy = E.getXY(e); + }else{ + me.button = -1; + me.shiftKey = false; + me.ctrlKey = false; + me.altKey = false; + me.keyCode = 0; + me.charCode = 0; + me.target = null; + me.xy = [0, 0]; + } + return me; + }, + + + stopEvent : function(){ + var me = this; + if(me.browserEvent){ + if(me.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(me); + } + E.stopEvent(me.browserEvent); + } + }, + + + preventDefault : function(){ + if(this.browserEvent){ + E.preventDefault(this.browserEvent); + } + }, + + + stopPropagation : function(){ + var me = this; + if(me.browserEvent){ + if(me.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(me); + } + E.stopPropagation(me.browserEvent); + } + }, + + + getCharCode : function(){ + return this.charCode || this.keyCode; + }, + + + getKey : function(){ + return this.normalizeKey(this.keyCode || this.charCode); + }, + + + normalizeKey: function(k){ + return Ext.isSafari ? (safariKeys[k] || k) : k; + }, + + + getPageX : function(){ + return this.xy[0]; + }, + + + getPageY : function(){ + return this.xy[1]; + }, + + + getXY : function(){ + return this.xy; + }, + + + getTarget : function(selector, maxDepth, returnEl){ + return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target); + }, + + + getRelatedTarget : function(){ + return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : null; + }, + + + getWheelDelta : function(){ + var e = this.browserEvent; + var delta = 0; + if(e.wheelDelta){ + delta = e.wheelDelta/120; + }else if(e.detail){ + delta = -e.detail/3; + } + return delta; + }, + + + within : function(el, related, allowEl){ + if(el){ + var t = this[related ? "getRelatedTarget" : "getTarget"](); + return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t)); + } + return false; + } + }; + + return new Ext.EventObjectImpl(); +}(); +Ext.Loader = Ext.apply({}, { + + load: function(fileList, callback, scope, preserveOrder) { + var scope = scope || this, + head = document.getElementsByTagName("head")[0], + fragment = document.createDocumentFragment(), + numFiles = fileList.length, + loadedFiles = 0, + me = this; + + + var loadFileIndex = function(index) { + head.appendChild( + me.buildScriptTag(fileList[index], onFileLoaded) + ); + }; + + + var onFileLoaded = function() { + loadedFiles ++; + + + if (numFiles == loadedFiles && typeof callback == 'function') { + callback.call(scope); + } else { + if (preserveOrder === true) { + loadFileIndex(loadedFiles); + } + } + }; + + if (preserveOrder === true) { + loadFileIndex.call(this, 0); + } else { + + Ext.each(fileList, function(file, index) { + fragment.appendChild( + this.buildScriptTag(file, onFileLoaded) + ); + }, this); + + head.appendChild(fragment); + } + }, + + + buildScriptTag: function(filename, callback) { + var script = document.createElement('script'); + script.type = "text/javascript"; + script.src = filename; + + + if (script.readyState) { + script.onreadystatechange = function() { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + callback(); + } + }; + } else { + script.onload = callback; + } + + return script; + } }); - Ext.Updater.defaults = { +Ext.ns("Ext.grid", "Ext.list", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu", + "Ext.state", "Ext.layout.boxOverflow", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct", "Ext.slider"); + + +Ext.apply(Ext, function(){ + var E = Ext, + idSeed = 0, + scrollWidth = null; + + return { + + emptyFn : function(){}, + + + BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 || Ext.isAir ? + 'http:/' + '/www.extjs.com/s.gif' : + 'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', + + extendX : function(supr, fn){ + return Ext.extend(supr, fn(supr.prototype)); + }, + + + getDoc : function(){ + return Ext.get(document); + }, + + + num : function(v, defaultValue){ + v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' && v.trim().length == 0) ? NaN : v); + return isNaN(v) ? defaultValue : v; + }, + + + value : function(v, defaultValue, allowBlank){ + return Ext.isEmpty(v, allowBlank) ? defaultValue : v; + }, + + + escapeRe : function(s) { + return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1"); + }, + + sequence : function(o, name, fn, scope){ + o[name] = o[name].createSequence(fn, scope); + }, + + + addBehaviors : function(o){ + if(!Ext.isReady){ + Ext.onReady(function(){ + Ext.addBehaviors(o); + }); + } else { + var cache = {}, + parts, + b, + s; + for (b in o) { + if ((parts = b.split('@'))[1]) { + s = parts[0]; + if(!cache[s]){ + cache[s] = Ext.select(s); + } + cache[s].on(parts[1], o[b]); + } + } + cache = null; + } + }, + + + getScrollBarWidth: function(force){ + if(!Ext.isReady){ + return 0; + } + + if(force === true || scrollWidth === null){ + + var div = Ext.getBody().createChild('
'), + child = div.child('div', true); + var w1 = child.offsetWidth; + div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll'); + var w2 = child.offsetWidth; + div.remove(); + + scrollWidth = w1 - w2 + 2; + } + return scrollWidth; + }, + + + + combine : function(){ + var as = arguments, l = as.length, r = []; + for(var i = 0; i < l; i++){ + var a = as[i]; + if(Ext.isArray(a)){ + r = r.concat(a); + }else if(a.length !== undefined && !a.substr){ + r = r.concat(Array.prototype.slice.call(a, 0)); + }else{ + r.push(a); + } + } + return r; + }, + + + copyTo : function(dest, source, names){ + if(typeof names == 'string'){ + names = names.split(/[,;\s]/); + } + Ext.each(names, function(name){ + if(source.hasOwnProperty(name)){ + dest[name] = source[name]; + } + }, this); + return dest; + }, + + + destroy : function(){ + Ext.each(arguments, function(arg){ + if(arg){ + if(Ext.isArray(arg)){ + this.destroy.apply(this, arg); + }else if(typeof arg.destroy == 'function'){ + arg.destroy(); + }else if(arg.dom){ + arg.remove(); + } + } + }, this); + }, + + + destroyMembers : function(o, arg1, arg2, etc){ + for(var i = 1, a = arguments, len = a.length; i < len; i++) { + Ext.destroy(o[a[i]]); + delete o[a[i]]; + } + }, + + + clean : function(arr){ + var ret = []; + Ext.each(arr, function(v){ + if(!!v){ + ret.push(v); + } + }); + return ret; + }, + + + unique : function(arr){ + var ret = [], + collect = {}; + + Ext.each(arr, function(v) { + if(!collect[v]){ + ret.push(v); + } + collect[v] = true; + }); + return ret; + }, + + + flatten : function(arr){ + var worker = []; + function rFlatten(a) { + Ext.each(a, function(v) { + if(Ext.isArray(v)){ + rFlatten(v); + }else{ + worker.push(v); + } + }); + return worker; + } + return rFlatten(arr); + }, + + + min : function(arr, comp){ + var ret = arr[0]; + comp = comp || function(a,b){ return a < b ? -1 : 1; }; + Ext.each(arr, function(v) { + ret = comp(ret, v) == -1 ? ret : v; + }); + return ret; + }, + + + max : function(arr, comp){ + var ret = arr[0]; + comp = comp || function(a,b){ return a > b ? 1 : -1; }; + Ext.each(arr, function(v) { + ret = comp(ret, v) == 1 ? ret : v; + }); + return ret; + }, + + + mean : function(arr){ + return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined; + }, + + + sum : function(arr){ + var ret = 0; + Ext.each(arr, function(v) { + ret += v; + }); + return ret; + }, + + + partition : function(arr, truth){ + var ret = [[],[]]; + Ext.each(arr, function(v, i, a) { + ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v); + }); + return ret; + }, + + + invoke : function(arr, methodName){ + var ret = [], + args = Array.prototype.slice.call(arguments, 2); + Ext.each(arr, function(v,i) { + if (v && typeof v[methodName] == 'function') { + ret.push(v[methodName].apply(v, args)); + } else { + ret.push(undefined); + } + }); + return ret; + }, + + + pluck : function(arr, prop){ + var ret = []; + Ext.each(arr, function(v) { + ret.push( v[prop] ); + }); + return ret; + }, + + + zip : function(){ + var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }), + arrs = parts[0], + fn = parts[1][0], + len = Ext.max(Ext.pluck(arrs, "length")), + ret = []; + + for (var i = 0; i < len; i++) { + ret[i] = []; + if(fn){ + ret[i] = fn.apply(fn, Ext.pluck(arrs, i)); + }else{ + for (var j = 0, aLen = arrs.length; j < aLen; j++){ + ret[i].push( arrs[j][i] ); + } + } + } + return ret; + }, + + + getCmp : function(id){ + return Ext.ComponentMgr.get(id); + }, + + + useShims: E.isIE6 || (E.isMac && E.isGecko2), + + + + type : function(o){ + if(o === undefined || o === null){ + return false; + } + if(o.htmlElement){ + return 'element'; + } + var t = typeof o; + if(t == 'object' && o.nodeName) { + switch(o.nodeType) { + case 1: return 'element'; + case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace'; + } + } + if(t == 'object' || t == 'function') { + switch(o.constructor) { + case Array: return 'array'; + case RegExp: return 'regexp'; + case Date: return 'date'; + } + if(typeof o.length == 'number' && typeof o.item == 'function') { + return 'nodelist'; + } + } + return t; + }, + + intercept : function(o, name, fn, scope){ + o[name] = o[name].createInterceptor(fn, scope); + }, + + + callback : function(cb, scope, args, delay){ + if(typeof cb == 'function'){ + if(delay){ + cb.defer(delay, scope, args || []); + }else{ + cb.apply(scope, args || []); + } + } + } + }; +}()); + + +Ext.apply(Function.prototype, { + + createSequence : function(fcn, scope){ + var method = this; + return (typeof fcn != 'function') ? + this : + function(){ + var retval = method.apply(this || window, arguments); + fcn.apply(scope || this || window, arguments); + return retval; + }; + } +}); + + + +Ext.applyIf(String, { + + + escape : function(string) { + return string.replace(/('|\\)/g, "\\$1"); + }, + + + leftPad : function (val, size, ch) { + var result = String(val); + if(!ch) { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result; + } +}); + + +String.prototype.toggle = function(value, other){ + return this == value ? other : value; +}; + + +String.prototype.trim = function(){ + var re = /^\s+|\s+$/g; + return function(){ return this.replace(re, ""); }; +}(); + + + +Date.prototype.getElapsed = function(date) { + return Math.abs((date || new Date()).getTime()-this.getTime()); +}; + + + +Ext.applyIf(Number.prototype, { + + constrain : function(min, max){ + return Math.min(Math.max(this, min), max); + } +}); +Ext.lib.Dom.getRegion = function(el) { + return Ext.lib.Region.getRegion(el); +}; Ext.lib.Region = function(t, r, b, l) { + var me = this; + me.top = t; + me[1] = t; + me.right = r; + me.bottom = b; + me.left = l; + me[0] = l; + }; + + Ext.lib.Region.prototype = { + contains : function(region) { + var me = this; + return ( region.left >= me.left && + region.right <= me.right && + region.top >= me.top && + region.bottom <= me.bottom ); + + }, + + getArea : function() { + var me = this; + return ( (me.bottom - me.top) * (me.right - me.left) ); + }, + + intersect : function(region) { + var me = this, + t = Math.max(me.top, region.top), + r = Math.min(me.right, region.right), + b = Math.min(me.bottom, region.bottom), + l = Math.max(me.left, region.left); + + if (b >= t && r >= l) { + return new Ext.lib.Region(t, r, b, l); + } + }, + + union : function(region) { + var me = this, + t = Math.min(me.top, region.top), + r = Math.max(me.right, region.right), + b = Math.max(me.bottom, region.bottom), + l = Math.min(me.left, region.left); + + return new Ext.lib.Region(t, r, b, l); + }, + + constrainTo : function(r) { + var me = this; + me.top = me.top.constrain(r.top, r.bottom); + me.bottom = me.bottom.constrain(r.top, r.bottom); + me.left = me.left.constrain(r.left, r.right); + me.right = me.right.constrain(r.left, r.right); + return me; + }, + + adjust : function(t, l, b, r) { + var me = this; + me.top += t; + me.left += l; + me.right += r; + me.bottom += b; + return me; + } + }; + + Ext.lib.Region.getRegion = function(el) { + var p = Ext.lib.Dom.getXY(el), + t = p[1], + r = p[0] + el.offsetWidth, + b = p[1] + el.offsetHeight, + l = p[0]; + + return new Ext.lib.Region(t, r, b, l); + }; Ext.lib.Point = function(x, y) { + if (Ext.isArray(x)) { + y = x[1]; + x = x[0]; + } + var me = this; + me.x = me.right = me.left = me[0] = x; + me.y = me.top = me.bottom = me[1] = y; + }; + + Ext.lib.Point.prototype = new Ext.lib.Region(); + +Ext.apply(Ext.DomHelper, +function(){ + var pub, + afterbegin = 'afterbegin', + afterend = 'afterend', + beforebegin = 'beforebegin', + beforeend = 'beforeend', + confRe = /tag|children|cn|html$/i; + + + function doInsert(el, o, returnElement, pos, sibling, append){ + el = Ext.getDom(el); + var newNode; + if (pub.useDom) { + newNode = createDom(o, null); + if (append) { + el.appendChild(newNode); + } else { + (sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el); + } + } else { + newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o)); + } + return returnElement ? Ext.get(newNode, true) : newNode; + } + + + + function createDom(o, parentNode){ + var el, + doc = document, + useSet, + attr, + val, + cn; + + if (Ext.isArray(o)) { + el = doc.createDocumentFragment(); + for (var i = 0, l = o.length; i < l; i++) { + createDom(o[i], el); + } + } else if (typeof o == 'string') { + el = doc.createTextNode(o); + } else { + el = doc.createElement( o.tag || 'div' ); + useSet = !!el.setAttribute; + for (var attr in o) { + if(!confRe.test(attr)){ + val = o[attr]; + if(attr == 'cls'){ + el.className = val; + }else{ + if(useSet){ + el.setAttribute(attr, val); + }else{ + el[attr] = val; + } + } + } + } + Ext.DomHelper.applyStyles(el, o.style); + + if ((cn = o.children || o.cn)) { + createDom(cn, el); + } else if (o.html) { + el.innerHTML = o.html; + } + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + } + + pub = { + + createTemplate : function(o){ + var html = Ext.DomHelper.createHtml(o); + return new Ext.Template(html); + }, + + + useDom : false, + + + insertBefore : function(el, o, returnElement){ + return doInsert(el, o, returnElement, beforebegin); + }, + + + insertAfter : function(el, o, returnElement){ + return doInsert(el, o, returnElement, afterend, 'nextSibling'); + }, + + + insertFirst : function(el, o, returnElement){ + return doInsert(el, o, returnElement, afterbegin, 'firstChild'); + }, + + + append: function(el, o, returnElement){ + return doInsert(el, o, returnElement, beforeend, '', true); + }, + + + createDom: createDom + }; + return pub; +}()); + +Ext.apply(Ext.Template.prototype, { + + disableFormats : false, + + + + re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, + argsRe : /^\s*['"](.*)["']\s*$/, + compileARe : /\\/g, + compileBRe : /(\r\n|\n)/g, + compileCRe : /'/g, + + /** + * Returns an HTML fragment of this template with the specified values applied. + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @return {String} The HTML fragment + * @hide repeat doc + */ + applyTemplate : function(values){ + var me = this, + useF = me.disableFormats !== true, + fm = Ext.util.Format, + tpl = me; + + if(me.compiled){ + return me.compiled(values); + } + function fn(m, name, format, args){ + if (format && useF) { + if (format.substr(0, 5) == "this.") { + return tpl.call(format.substr(5), values[name], values); + } else { + if (args) { + // quoted values are required for strings in compiled templates, + // but for non compiled we need to strip them + // quoted reversed for jsmin + var re = me.argsRe; + args = args.split(','); + for(var i = 0, len = args.length; i < len; i++){ + args[i] = args[i].replace(re, "$1"); + } + args = [values[name]].concat(args); + } else { + args = [values[name]]; + } + return fm[format].apply(fm, args); + } + } else { + return values[name] !== undefined ? values[name] : ""; + } + } + return me.html.replace(me.re, fn); + }, + + /** + * Compiles the template into an internal function, eliminating the RegEx overhead. + * @return {Ext.Template} this + * @hide repeat doc + */ + compile : function(){ + var me = this, + fm = Ext.util.Format, + useF = me.disableFormats !== true, + sep = Ext.isGecko ? "+" : ",", + body; + + function fn(m, name, format, args){ + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "(values['" + name + "'] == undefined ? '' : "; + } + return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; + } + + // branched to use + in gecko and [].join() in others + if(Ext.isGecko){ + body = "this.compiled = function(values){ return '" + + me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn) + + "';};"; + }else{ + body = ["this.compiled = function(values){ return ['"]; + body.push(me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return me; + }, + + // private function used to call members + call : function(fnName, value, allValues){ + return this[fnName](value, allValues); + } +}); +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; +/** + * @class Ext.util.Functions + * @singleton + */ +Ext.util.Functions = { + /** + * Creates an interceptor function. The passed function is called before the original one. If it returns false, + * the original one is not called. The resulting function returns the results of the original function. + * The passed function is called with the parameters of the original function. Example usage: + *

+var sayHi = function(name){
+    alert('Hi, ' + name);
+}
+
+sayHi('Fred'); // alerts "Hi, Fred"
+
+// create a new function that validates input without
+// directly modifying the original function:
+var sayHiToFriend = Ext.createInterceptor(sayHi, function(name){
+    return name == 'Brian';
+});
+
+sayHiToFriend('Fred');  // no alert
+sayHiToFriend('Brian'); // alerts "Hi, Brian"
+       
+ * @param {Function} origFn The original function. + * @param {Function} newFn The function to call before the original + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + */ + createInterceptor: function(origFn, newFn, scope) { + var method = origFn; + if (!Ext.isFunction(newFn)) { + return origFn; + } + else { + return function() { + var me = this, + args = arguments; + newFn.target = me; + newFn.method = origFn; + return (newFn.apply(scope || me || window, args) !== false) ? + origFn.apply(me || window, args) : + null; + }; + } + }, + + /** + * Creates a delegate (callback) that sets the scope to obj. + * Call directly on any function. Example: Ext.createDelegate(this.myFunction, this, [arg1, arg2]) + * Will create a function that is automatically scoped to obj so that the this variable inside the + * callback points to obj. Example usage: + *

+var sayHi = function(name){
+    // Note this use of "this.text" here.  This function expects to
+    // execute within a scope that contains a text property.  In this
+    // example, the "this" variable is pointing to the btn object that
+    // was passed in createDelegate below.
+    alert('Hi, ' + name + '. You clicked the "' + this.text + '" button.');
+}
+
+var btn = new Ext.Button({
+    text: 'Say Hi',
+    renderTo: Ext.getBody()
+});
+
+// This callback will execute in the scope of the
+// button instance. Clicking the button alerts
+// "Hi, Fred. You clicked the "Say Hi" button."
+btn.on('click', Ext.createDelegate(sayHi, btn, ['Fred']));
+       
+ * @param {Function} fn The function to delegate. + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Function} The new function + */ + createDelegate: function(fn, obj, args, appendArgs) { + if (!Ext.isFunction(fn)) { + return fn; + } + return function() { + var callArgs = args || arguments; + if (appendArgs === true) { + callArgs = Array.prototype.slice.call(arguments, 0); + callArgs = callArgs.concat(args); + } + else if (Ext.isNumber(appendArgs)) { + callArgs = Array.prototype.slice.call(arguments, 0); + // copy arguments first + var applyArgs = [appendArgs, 0].concat(args); + // create method call params + Array.prototype.splice.apply(callArgs, applyArgs); + // splice them in + } + return fn.apply(obj || window, callArgs); + }; + }, + + /** + * Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage: + *

+var sayHi = function(name){
+    alert('Hi, ' + name);
+}
+
+// executes immediately:
+sayHi('Fred');
+
+// executes after 2 seconds:
+Ext.defer(sayHi, 2000, this, ['Fred']);
+
+// this syntax is sometimes useful for deferring
+// execution of an anonymous function:
+Ext.defer(function(){
+    alert('Anonymous');
+}, 100);
+       
+ * @param {Function} fn The function to defer. + * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Number} The timeout id that can be used with clearTimeout + */ + defer: function(fn, millis, obj, args, appendArgs) { + fn = Ext.util.Functions.createDelegate(fn, obj, args, appendArgs); + if (millis > 0) { + return setTimeout(fn, millis); + } + fn(); + return 0; + }, + + + /** + * Create a combined function call sequence of the original function + the passed function. + * The resulting function returns the results of the original function. + * The passed fcn is called with the parameters of the original function. Example usage: + * + +var sayHi = function(name){ + alert('Hi, ' + name); +} + +sayHi('Fred'); // alerts "Hi, Fred" + +var sayGoodbye = Ext.createSequence(sayHi, function(name){ + alert('Bye, ' + name); +}); + +sayGoodbye('Fred'); // both alerts show + + * @param {Function} origFn The original function. + * @param {Function} newFn The function to sequence + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + */ + createSequence: function(origFn, newFn, scope) { + if (!Ext.isFunction(newFn)) { + return origFn; + } + else { + return function() { + var retval = origFn.apply(this || window, arguments); + newFn.apply(scope || this || window, arguments); + return retval; + }; + } + } +}; + +/** + * Shorthand for {@link Ext.util.Functions#defer} + * @param {Function} fn The function to defer. + * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Number} The timeout id that can be used with clearTimeout + * @member Ext + * @method defer + */ + +Ext.defer = Ext.util.Functions.defer; + +/** + * Shorthand for {@link Ext.util.Functions#createInterceptor} + * @param {Function} origFn The original function. + * @param {Function} newFn The function to call before the original + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + * @member Ext + * @method defer + */ + +Ext.createInterceptor = Ext.util.Functions.createInterceptor; + +/** + * Shorthand for {@link Ext.util.Functions#createSequence} + * @param {Function} origFn The original function. + * @param {Function} newFn The function to sequence + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + * @member Ext + * @method defer + */ + +Ext.createSequence = Ext.util.Functions.createSequence; + +/** + * Shorthand for {@link Ext.util.Functions#createDelegate} + * @param {Function} fn The function to delegate. + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Function} The new function + * @member Ext + * @method defer + */ +Ext.createDelegate = Ext.util.Functions.createDelegate; +/** + * @class Ext.util.Observable + */ +Ext.apply(Ext.util.Observable.prototype, function(){ + // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?) + // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call + // private + function getMethodEvent(method){ + var e = (this.methodEvents = this.methodEvents || + {})[method], returnValue, v, cancel, obj = this; + + if (!e) { + this.methodEvents[method] = e = {}; + e.originalFn = this[method]; + e.methodName = method; + e.before = []; + e.after = []; + + var makeCall = function(fn, scope, args){ + if((v = fn.apply(scope || obj, args)) !== undefined){ + if (typeof v == 'object') { + if(v.returnValue !== undefined){ + returnValue = v.returnValue; + }else{ + returnValue = v; + } + cancel = !!v.cancel; + } + else + if (v === false) { + cancel = true; + } + else { + returnValue = v; + } + } + }; + + this[method] = function(){ + var args = Array.prototype.slice.call(arguments, 0), + b; + returnValue = v = undefined; + cancel = false; + + for(var i = 0, len = e.before.length; i < len; i++){ + b = e.before[i]; + makeCall(b.fn, b.scope, args); + if (cancel) { + return returnValue; + } + } + + if((v = e.originalFn.apply(obj, args)) !== undefined){ + returnValue = v; + } + + for(var i = 0, len = e.after.length; i < len; i++){ + b = e.after[i]; + makeCall(b.fn, b.scope, args); + if (cancel) { + return returnValue; + } + } + return returnValue; + }; + } + return e; + } + + return { + // these are considered experimental + // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call + // adds an 'interceptor' called before the original method + beforeMethod : function(method, fn, scope){ + getMethodEvent.call(this, method).before.push({ + fn: fn, + scope: scope + }); + }, + + // adds a 'sequence' called after the original method + afterMethod : function(method, fn, scope){ + getMethodEvent.call(this, method).after.push({ + fn: fn, + scope: scope + }); + }, + + removeMethodListener: function(method, fn, scope){ + var e = this.getMethodEvent(method); + for(var i = 0, len = e.before.length; i < len; i++){ + if(e.before[i].fn == fn && e.before[i].scope == scope){ + e.before.splice(i, 1); + return; + } + } + for(var i = 0, len = e.after.length; i < len; i++){ + if(e.after[i].fn == fn && e.after[i].scope == scope){ + e.after.splice(i, 1); + return; + } + } + }, + + /** + * Relays selected events from the specified Observable as if the events were fired by this. + * @param {Object} o The Observable whose events this object is to relay. + * @param {Array} events Array of event names to relay. + */ + relayEvents : function(o, events){ + var me = this; + function createHandler(ename){ + return function(){ + return me.fireEvent.apply(me, [ename].concat(Array.prototype.slice.call(arguments, 0))); + }; + } + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + me.events[ename] = me.events[ename] || true; + o.on(ename, createHandler(ename), me); + } + }, + + /** + *

Enables events fired by this Observable to bubble up an owner hierarchy by calling + * this.getBubbleTarget() if present. There is no implementation in the Observable base class.

+ *

This is commonly used by Ext.Components to bubble events to owner Containers. See {@link Ext.Component.getBubbleTarget}. The default + * implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to + * access the required target more quickly.

+ *

Example:


+Ext.override(Ext.form.Field, {
+    
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+        this.enableBubble('change');
+    }),
+
+    
+    getBubbleTarget : function() {
+        if (!this.formPanel) {
+            this.formPanel = this.findParentByType('form');
+        }
+        return this.formPanel;
+    }
+});
+
+var myForm = new Ext.formPanel({
+    title: 'User Details',
+    items: [{
+        ...
+    }],
+    listeners: {
+        change: function() {
+            
+            myForm.header.setStyle('color', 'red');
+        }
+    }
+});
+
+ * @param {String/Array} events The event name to bubble, or an Array of event names. + */ + enableBubble : function(events){ + var me = this; + if(!Ext.isEmpty(events)){ + events = Ext.isArray(events) ? events : Array.prototype.slice.call(arguments, 0); + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + ename = ename.toLowerCase(); + var ce = me.events[ename] || true; + if (typeof ce == 'boolean') { + ce = new Ext.util.Event(me, ename); + me.events[ename] = ce; + } + ce.bubble = true; + } + } + } + }; +}()); + + + +Ext.util.Observable.capture = function(o, fn, scope){ + o.fireEvent = o.fireEvent.createInterceptor(fn, scope); +}; + + + +Ext.util.Observable.observeClass = function(c, listeners){ + if(c){ + if(!c.fireEvent){ + Ext.apply(c, new Ext.util.Observable()); + Ext.util.Observable.capture(c.prototype, c.fireEvent, c); + } + if(typeof listeners == 'object'){ + c.on(listeners); + } + return c; + } +}; + +Ext.apply(Ext.EventManager, function(){ + var resizeEvent, + resizeTask, + textEvent, + textSize, + D = Ext.lib.Dom, + propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, + unload = Ext.EventManager._unload, + curWidth = 0, + curHeight = 0, - timeout : 30, - - loadScripts : false, + + + useKeydown = Ext.isWebKit ? + Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]) >= 525 : + !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera); + + return { + _unload: function(){ + Ext.EventManager.un(window, "resize", this.fireWindowResize, this); + unload.call(Ext.EventManager); + }, + + + doResizeEvent: function(){ + var h = D.getViewHeight(), + w = D.getViewWidth(); + + + if(curHeight != h || curWidth != w){ + resizeEvent.fire(curWidth = w, curHeight = h); + } + }, + + + onWindowResize : function(fn, scope, options){ + if(!resizeEvent){ + resizeEvent = new Ext.util.Event(); + resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); + Ext.EventManager.on(window, "resize", this.fireWindowResize, this); + } + resizeEvent.addListener(fn, scope, options); + }, + + + fireWindowResize : function(){ + if(resizeEvent){ + resizeTask.delay(100); + } + }, + + + onTextResize : function(fn, scope, options){ + if(!textEvent){ + textEvent = new Ext.util.Event(); + var textEl = new Ext.Element(document.createElement('div')); + textEl.dom.className = 'x-text-resize'; + textEl.dom.innerHTML = 'X'; + textEl.appendTo(document.body); + textSize = textEl.dom.offsetHeight; + setInterval(function(){ + if(textEl.dom.offsetHeight != textSize){ + textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); + } + }, this.textResizeInterval); + } + textEvent.addListener(fn, scope, options); + }, + + + removeResizeListener : function(fn, scope){ + if(resizeEvent){ + resizeEvent.removeListener(fn, scope); + } + }, + + + fireResize : function(){ + if(resizeEvent){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + } + }, + - sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), - - disableCaching : false, - - showLoadIndicator : true, - - indicatorText : '
Loading...
' + textResizeInterval : 50, + + + ieDeferSrc : false, + + + getKeyEvent : function(){ + return useKeydown ? 'keydown' : 'keypress'; + }, + + + + useKeydown: useKeydown }; +}()); + +Ext.EventManager.on = Ext.EventManager.addListener; + + +Ext.apply(Ext.EventObjectImpl.prototype, { + + BACKSPACE: 8, + + TAB: 9, + + NUM_CENTER: 12, + + ENTER: 13, + + RETURN: 13, + + SHIFT: 16, + + CTRL: 17, + CONTROL : 17, + + ALT: 18, + + PAUSE: 19, + + CAPS_LOCK: 20, + + ESC: 27, + + SPACE: 32, + + PAGE_UP: 33, + PAGEUP : 33, + + PAGE_DOWN: 34, + PAGEDOWN : 34, + + END: 35, + + HOME: 36, + + LEFT: 37, + + UP: 38, + + RIGHT: 39, + + DOWN: 40, + + PRINT_SCREEN: 44, + + INSERT: 45, + + DELETE: 46, + + ZERO: 48, + + ONE: 49, + + TWO: 50, + + THREE: 51, + + FOUR: 52, + + FIVE: 53, + + SIX: 54, + + SEVEN: 55, + + EIGHT: 56, + + NINE: 57, + + A: 65, + + B: 66, + + C: 67, + + D: 68, + + E: 69, + + F: 70, + + G: 71, + + H: 72, + + I: 73, + + J: 74, + + K: 75, + + L: 76, + + M: 77, + + N: 78, + + O: 79, + + P: 80, + + Q: 81, + + R: 82, + + S: 83, + + T: 84, + + U: 85, + + V: 86, + + W: 87, + + X: 88, + + Y: 89, + + Z: 90, + + CONTEXT_MENU: 93, + + NUM_ZERO: 96, + + NUM_ONE: 97, + + NUM_TWO: 98, + + NUM_THREE: 99, + + NUM_FOUR: 100, + + NUM_FIVE: 101, + + NUM_SIX: 102, + + NUM_SEVEN: 103, + + NUM_EIGHT: 104, + + NUM_NINE: 105, + + NUM_MULTIPLY: 106, + + NUM_PLUS: 107, + + NUM_MINUS: 109, + + NUM_PERIOD: 110, + + NUM_DIVISION: 111, + + F1: 112, + + F2: 113, + + F3: 114, + + F4: 115, + + F5: 116, + + F6: 117, + + F7: 118, + + F8: 119, + + F9: 120, + + F10: 121, + + F11: 122, + + F12: 123, + + + isNavKeyPress : function(){ + var me = this, + k = this.normalizeKey(me.keyCode); + return (k >= 33 && k <= 40) || + k == me.RETURN || + k == me.TAB || + k == me.ESC; + }, + + isSpecialKey : function(){ + var k = this.normalizeKey(this.keyCode); + return (this.type == 'keypress' && this.ctrlKey) || + this.isNavKeyPress() || + (k == this.BACKSPACE) || + (k >= 16 && k <= 20) || + (k >= 44 && k <= 46); + }, + + getPoint : function(){ + return new Ext.lib.Point(this.xy[0], this.xy[1]); + }, + + + hasModifier : function(){ + return ((this.ctrlKey || this.altKey) || this.shiftKey); + } +}); +Ext.Element.addMethods({ + + swallowEvent : function(eventName, preventDefault) { + var me = this; + function fn(e) { + e.stopPropagation(); + if (preventDefault) { + e.preventDefault(); + } + } + + if (Ext.isArray(eventName)) { + Ext.each(eventName, function(e) { + me.on(e, fn); + }); + return me; + } + me.on(eventName, fn); + return me; + }, + + + relayEvent : function(eventName, observable) { + this.on(eventName, function(e) { + observable.fireEvent(eventName, e); + }); + }, + + + clean : function(forceReclean) { + var me = this, + dom = me.dom, + n = dom.firstChild, + ni = -1; + + if (Ext.Element.data(dom, 'isCleaned') && forceReclean !== true) { + return me; + } + + while (n) { + var nx = n.nextSibling; + if (n.nodeType == 3 && !(/\S/.test(n.nodeValue))) { + dom.removeChild(n); + } else { + n.nodeIndex = ++ni; + } + n = nx; + } + + Ext.Element.data(dom, 'isCleaned', true); + return me; + }, + + + load : function() { + var updateManager = this.getUpdater(); + updateManager.update.apply(updateManager, arguments); + + return this; + }, + + + getUpdater : function() { + return this.updateManager || (this.updateManager = new Ext.Updater(this)); + }, + + + update : function(html, loadScripts, callback) { + if (!this.dom) { + return this; + } + html = html || ""; + + if (loadScripts !== true) { + this.dom.innerHTML = html; + if (typeof callback == 'function') { + callback(); + } + return this; + } + + var id = Ext.id(), + dom = this.dom; + + html += ''; + + Ext.lib.Event.onAvailable(id, function() { + var DOC = document, + hd = DOC.getElementsByTagName("head")[0], + re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig, + srcRe = /\ssrc=([\'\"])(.*?)\1/i, + typeRe = /\stype=([\'\"])(.*?)\1/i, + match, + attrs, + srcMatch, + typeMatch, + el, + s; + + while ((match = re.exec(html))) { + attrs = match[1]; + srcMatch = attrs ? attrs.match(srcRe) : false; + if (srcMatch && srcMatch[2]) { + s = DOC.createElement("script"); + s.src = srcMatch[2]; + typeMatch = attrs.match(typeRe); + if (typeMatch && typeMatch[2]) { + s.type = typeMatch[2]; + } + hd.appendChild(s); + } else if (match[2] && match[2].length > 0) { + if (window.execScript) { + window.execScript(match[2]); + } else { + window.eval(match[2]); + } + } + } + + el = DOC.getElementById(id); + if (el) { + Ext.removeNode(el); + } + + if (typeof callback == 'function') { + callback(); + } + }); + dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); + return this; + }, + + + removeAllListeners : function() { + this.removeAnchor(); + Ext.EventManager.removeAll(this.dom); + return this; + }, + + + createProxy : function(config, renderTo, matchBox) { + config = (typeof config == 'object') ? config : {tag : "div", cls: config}; + + var me = this, + proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) : + Ext.DomHelper.insertBefore(me.dom, config, true); + + if (matchBox && me.setBox && me.getBox) { + proxy.setBox(me.getBox()); + } + return proxy; + } +}); + +Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater; + +Ext.Element.addMethods({ + + getAnchorXY : function(anchor, local, s){ + + + anchor = (anchor || "tl").toLowerCase(); + s = s || {}; + + var me = this, + vp = me.dom == document.body || me.dom == document, + w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(), + h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(), + xy, + r = Math.round, + o = me.getXY(), + scroll = me.getScroll(), + extraX = vp ? scroll.left : !local ? o[0] : 0, + extraY = vp ? scroll.top : !local ? o[1] : 0, + hash = { + c : [r(w * 0.5), r(h * 0.5)], + t : [r(w * 0.5), 0], + l : [0, r(h * 0.5)], + r : [w, r(h * 0.5)], + b : [r(w * 0.5), h], + tl : [0, 0], + bl : [0, h], + br : [w, h], + tr : [w, 0] + }; + + xy = hash[anchor]; + return [xy[0] + extraX, xy[1] + extraY]; + }, + + + anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ + var me = this, + dom = me.dom, + scroll = !Ext.isEmpty(monitorScroll), + action = function(){ + Ext.fly(dom).alignTo(el, alignment, offsets, animate); + Ext.callback(callback, Ext.fly(dom)); + }, + anchor = this.getAnchor(); + + + this.removeAnchor(); + Ext.apply(anchor, { + fn: action, + scroll: scroll + }); + + Ext.EventManager.onWindowResize(action, null); + + if(scroll){ + Ext.EventManager.on(window, 'scroll', action, null, + {buffer: !isNaN(monitorScroll) ? monitorScroll : 50}); + } + action.call(me); + return me; + }, + + + removeAnchor : function(){ + var me = this, + anchor = this.getAnchor(); + + if(anchor && anchor.fn){ + Ext.EventManager.removeResizeListener(anchor.fn); + if(anchor.scroll){ + Ext.EventManager.un(window, 'scroll', anchor.fn); + } + delete anchor.fn; + } + return me; + }, + + + getAnchor : function(){ + var data = Ext.Element.data, + dom = this.dom; + if (!dom) { + return; + } + var anchor = data(dom, '_anchor'); + + if(!anchor){ + anchor = data(dom, '_anchor', {}); + } + return anchor; + }, + + + getAlignToXY : function(el, p, o){ + el = Ext.get(el); + + if(!el || !el.dom){ + throw "Element.alignToXY with an element that doesn't exist"; + } + + o = o || [0,0]; + p = (!p || p == "?" ? "tl-bl?" : (!(/-/).test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase(); + + var me = this, + d = me.dom, + a1, + a2, + x, + y, + + w, + h, + r, + dw = Ext.lib.Dom.getViewWidth() -10, + dh = Ext.lib.Dom.getViewHeight()-10, + p1y, + p1x, + p2y, + p2x, + swapY, + swapX, + doc = document, + docElement = doc.documentElement, + docBody = doc.body, + scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5, + scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5, + c = false, + p1 = "", + p2 = "", + m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); + + if(!m){ + throw "Element.alignTo with an invalid alignment " + p; + } + + p1 = m[1]; + p2 = m[2]; + c = !!m[3]; + + + + a1 = me.getAnchorXY(p1, true); + a2 = el.getAnchorXY(p2, false); + + x = a2[0] - a1[0] + o[0]; + y = a2[1] - a1[1] + o[1]; + + if(c){ + w = me.getWidth(); + h = me.getHeight(); + r = el.getRegion(); + + + + p1y = p1.charAt(0); + p1x = p1.charAt(p1.length-1); + p2y = p2.charAt(0); + p2x = p2.charAt(p2.length-1); + swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); + swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); + + + if (x + w > dw + scrollX) { + x = swapX ? r.left-w : dw+scrollX-w; + } + if (x < scrollX) { + x = swapX ? r.right : scrollX; + } + if (y + h > dh + scrollY) { + y = swapY ? r.top-h : dh+scrollY-h; + } + if (y < scrollY){ + y = swapY ? r.bottom : scrollY; + } + } + return [x,y]; + }, + + + alignTo : function(element, position, offsets, animate){ + var me = this; + return me.setXY(me.getAlignToXY(element, position, offsets), + me.preanim && !!animate ? me.preanim(arguments, 3) : false); + }, + + + adjustForConstraints : function(xy, parent, offsets){ + return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; + }, + + + getConstrainToXY : function(el, local, offsets, proposedXY){ + var os = {top:0, left:0, bottom:0, right: 0}; + + return function(el, local, offsets, proposedXY){ + el = Ext.get(el); + offsets = offsets ? Ext.applyIf(offsets, os) : os; + + var vw, vh, vx = 0, vy = 0; + if(el.dom == document.body || el.dom == document){ + vw =Ext.lib.Dom.getViewWidth(); + vh = Ext.lib.Dom.getViewHeight(); + }else{ + vw = el.dom.clientWidth; + vh = el.dom.clientHeight; + if(!local){ + var vxy = el.getXY(); + vx = vxy[0]; + vy = vxy[1]; + } + } + + var s = el.getScroll(); + + vx += offsets.left + s.left; + vy += offsets.top + s.top; + + vw -= offsets.right; + vh -= offsets.bottom; + + var vr = vx + vw, + vb = vy + vh, + xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]), + x = xy[0], y = xy[1], + offset = this.getConstrainOffset(), + w = this.dom.offsetWidth + offset, + h = this.dom.offsetHeight + offset; + + + var moved = false; + + + if((x + w) > vr){ + x = vr - w; + moved = true; + } + if((y + h) > vb){ + y = vb - h; + moved = true; + } + + if(x < vx){ + x = vx; + moved = true; + } + if(y < vy){ + y = vy; + moved = true; + } + return moved ? [x, y] : false; + }; + }(), + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + getConstrainOffset : function(){ + return 0; + }, + + + getCenterXY : function(){ + return this.getAlignToXY(document, 'c-c'); + }, + + + center : function(centerIn){ + return this.alignTo(centerIn || document, 'c-c'); + } +}); + +Ext.Element.addMethods({ + + select : function(selector, unique){ + return Ext.Element.select(selector, unique, this.dom); + } +}); +Ext.apply(Ext.Element.prototype, function() { + var GETDOM = Ext.getDom, + GET = Ext.get, + DH = Ext.DomHelper; + + return { + + insertSibling: function(el, where, returnDom){ + var me = this, + rt, + isAfter = (where || 'before').toLowerCase() == 'after', + insertEl; + + if(Ext.isArray(el)){ + insertEl = me; + Ext.each(el, function(e) { + rt = Ext.fly(insertEl, '_internal').insertSibling(e, where, returnDom); + if(isAfter){ + insertEl = rt; + } + }); + return rt; + } + + el = el || {}; + + if(el.nodeType || el.dom){ + rt = me.dom.parentNode.insertBefore(GETDOM(el), isAfter ? me.dom.nextSibling : me.dom); + if (!returnDom) { + rt = GET(rt); + } + }else{ + if (isAfter && !me.dom.nextSibling) { + rt = DH.append(me.dom.parentNode, el, !returnDom); + } else { + rt = DH[isAfter ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom); + } + } + return rt; + } + }; +}()); + + +Ext.Element.boxMarkup = '
'; + +Ext.Element.addMethods(function(){ + var INTERNAL = "_internal", + pxMatch = /(\d+\.?\d+)px/; + return { + + applyStyles : function(style){ + Ext.DomHelper.applyStyles(this.dom, style); + return this; + }, + + + getStyles : function(){ + var ret = {}; + Ext.each(arguments, function(v) { + ret[v] = this.getStyle(v); + }, + this); + return ret; + }, + + + setOverflow : function(v){ + var dom = this.dom; + if(v=='auto' && Ext.isMac && Ext.isGecko2){ + dom.style.overflow = 'hidden'; + (function(){dom.style.overflow = 'auto';}).defer(1); + }else{ + dom.style.overflow = v; + } + }, + + + boxWrap : function(cls){ + cls = cls || 'x-box'; + var el = Ext.get(this.insertHtml("beforeBegin", "
" + String.format(Ext.Element.boxMarkup, cls) + "
")); + Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom); + return el; + }, + + + setSize : function(width, height, animate){ + var me = this; + if(typeof width == 'object'){ + height = width.height; + width = width.width; + } + width = me.adjustWidth(width); + height = me.adjustHeight(height); + if(!animate || !me.anim){ + me.dom.style.width = me.addUnits(width); + me.dom.style.height = me.addUnits(height); + }else{ + me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2)); + } + return me; + }, + + + getComputedHeight : function(){ + var me = this, + h = Math.max(me.dom.offsetHeight, me.dom.clientHeight); + if(!h){ + h = parseFloat(me.getStyle('height')) || 0; + if(!me.isBorderBox()){ + h += me.getFrameWidth('tb'); + } + } + return h; + }, + + + getComputedWidth : function(){ + var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); + if(!w){ + w = parseFloat(this.getStyle('width')) || 0; + if(!this.isBorderBox()){ + w += this.getFrameWidth('lr'); + } + } + return w; + }, + + + getFrameWidth : function(sides, onlyContentBox){ + return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + }, + + + addClassOnOver : function(className){ + this.hover( + function(){ + Ext.fly(this, INTERNAL).addClass(className); + }, + function(){ + Ext.fly(this, INTERNAL).removeClass(className); + } + ); + return this; + }, + + + addClassOnFocus : function(className){ + this.on("focus", function(){ + Ext.fly(this, INTERNAL).addClass(className); + }, this.dom); + this.on("blur", function(){ + Ext.fly(this, INTERNAL).removeClass(className); + }, this.dom); + return this; + }, + + + addClassOnClick : function(className){ + var dom = this.dom; + this.on("mousedown", function(){ + Ext.fly(dom, INTERNAL).addClass(className); + var d = Ext.getDoc(), + fn = function(){ + Ext.fly(dom, INTERNAL).removeClass(className); + d.removeListener("mouseup", fn); + }; + d.on("mouseup", fn); + }); + return this; + }, + + + + getViewSize : function(){ + var doc = document, + d = this.dom, + isDoc = (d == doc || d == doc.body); + + + if (isDoc) { + var extdom = Ext.lib.Dom; + return { + width : extdom.getViewWidth(), + height : extdom.getViewHeight() + }; + + + } else { + return { + width : d.clientWidth, + height : d.clientHeight + }; + } + }, + + + + getStyleSize : function(){ + var me = this, + w, h, + doc = document, + d = this.dom, + isDoc = (d == doc || d == doc.body), + s = d.style; + + + if (isDoc) { + var extdom = Ext.lib.Dom; + return { + width : extdom.getViewWidth(), + height : extdom.getViewHeight() + }; + } + + if(s.width && s.width != 'auto'){ + w = parseFloat(s.width); + if(me.isBorderBox()){ + w -= me.getFrameWidth('lr'); + } + } + + if(s.height && s.height != 'auto'){ + h = parseFloat(s.height); + if(me.isBorderBox()){ + h -= me.getFrameWidth('tb'); + } + } + + return {width: w || me.getWidth(true), height: h || me.getHeight(true)}; + }, + + + getSize : function(contentSize){ + return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; + }, + + + repaint : function(){ + var dom = this.dom; + this.addClass("x-repaint"); + setTimeout(function(){ + Ext.fly(dom).removeClass("x-repaint"); + }, 1); + return this; + }, + + + unselectable : function(){ + this.dom.unselectable = "on"; + return this.swallowEvent("selectstart", true). + applyStyles("-moz-user-select:none;-khtml-user-select:none;"). + addClass("x-unselectable"); + }, + + + getMargins : function(side){ + var me = this, + key, + hash = {t:"top", l:"left", r:"right", b: "bottom"}, + o = {}; + + if (!side) { + for (key in me.margins){ + o[hash[key]] = parseFloat(me.getStyle(me.margins[key])) || 0; + } + return o; + } else { + return me.addStyles.call(me, side, me.margins); + } + } + }; +}()); + +Ext.Element.addMethods({ + + setBox : function(box, adjust, animate){ + var me = this, + w = box.width, + h = box.height; + if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){ + w -= (me.getBorderWidth("lr") + me.getPadding("lr")); + h -= (me.getBorderWidth("tb") + me.getPadding("tb")); + } + me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2)); + return me; + }, + + + getBox : function(contentBox, local) { + var me = this, + xy, + left, + top, + getBorderWidth = me.getBorderWidth, + getPadding = me.getPadding, + l, + r, + t, + b; + if(!local){ + xy = me.getXY(); + }else{ + left = parseInt(me.getStyle("left"), 10) || 0; + top = parseInt(me.getStyle("top"), 10) || 0; + xy = [left, top]; + } + var el = me.dom, w = el.offsetWidth, h = el.offsetHeight, bx; + if(!contentBox){ + bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; + }else{ + l = getBorderWidth.call(me, "l") + getPadding.call(me, "l"); + r = getBorderWidth.call(me, "r") + getPadding.call(me, "r"); + t = getBorderWidth.call(me, "t") + getPadding.call(me, "t"); + b = getBorderWidth.call(me, "b") + getPadding.call(me, "b"); + bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; + } + bx.right = bx.x + bx.width; + bx.bottom = bx.y + bx.height; + return bx; + }, + + + move : function(direction, distance, animate){ + var me = this, + xy = me.getXY(), + x = xy[0], + y = xy[1], + left = [x - distance, y], + right = [x + distance, y], + top = [x, y - distance], + bottom = [x, y + distance], + hash = { + l : left, + left : left, + r : right, + right : right, + t : top, + top : top, + up : top, + b : bottom, + bottom : bottom, + down : bottom + }; + + direction = direction.toLowerCase(); + me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2)); + }, + + + setLeftTop : function(left, top){ + var me = this, + style = me.dom.style; + style.left = me.addUnits(left); + style.top = me.addUnits(top); + return me; + }, + + + getRegion : function(){ + return Ext.lib.Dom.getRegion(this.dom); + }, + + + setBounds : function(x, y, width, height, animate){ + var me = this; + if (!animate || !me.anim) { + me.setSize(width, height); + me.setLocation(x, y); + } else { + me.anim({points: {to: [x, y]}, + width: {to: me.adjustWidth(width)}, + height: {to: me.adjustHeight(height)}}, + me.preanim(arguments, 4), + 'motion'); + } + return me; + }, + + + setRegion : function(region, animate) { + return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1)); + } +}); +Ext.Element.addMethods({ + + scrollTo : function(side, value, animate) { + + var top = /top/i.test(side), + me = this, + dom = me.dom, + prop; + if (!animate || !me.anim) { + + prop = 'scroll' + (top ? 'Top' : 'Left'); + dom[prop] = value; + } + else { + + prop = 'scroll' + (top ? 'Left' : 'Top'); + me.anim({scroll: {to: top ? [dom[prop], value] : [value, dom[prop]]}}, me.preanim(arguments, 2), 'scroll'); + } + return me; + }, + + + scrollIntoView : function(container, hscroll) { + var c = Ext.getDom(container) || Ext.getBody().dom, + el = this.dom, + o = this.getOffsetsTo(c), + l = o[0] + c.scrollLeft, + t = o[1] + c.scrollTop, + b = t + el.offsetHeight, + r = l + el.offsetWidth, + ch = c.clientHeight, + ct = parseInt(c.scrollTop, 10), + cl = parseInt(c.scrollLeft, 10), + cb = ct + ch, + cr = cl + c.clientWidth; + + if (el.offsetHeight > ch || t < ct) { + c.scrollTop = t; + } + else if (b > cb) { + c.scrollTop = b-ch; + } + + c.scrollTop = c.scrollTop; + + if (hscroll !== false) { + if (el.offsetWidth > c.clientWidth || l < cl) { + c.scrollLeft = l; + } + else if (r > cr) { + c.scrollLeft = r - c.clientWidth; + } + c.scrollLeft = c.scrollLeft; + } + return this; + }, + + + scrollChildIntoView : function(child, hscroll) { + Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); + }, + + + scroll : function(direction, distance, animate) { + if (!this.isScrollable()) { + return false; + } + var el = this.dom, + l = el.scrollLeft, t = el.scrollTop, + w = el.scrollWidth, h = el.scrollHeight, + cw = el.clientWidth, ch = el.clientHeight, + scrolled = false, v, + hash = { + l: Math.min(l + distance, w-cw), + r: v = Math.max(l - distance, 0), + t: Math.max(t - distance, 0), + b: Math.min(t + distance, h-ch) + }; + hash.d = hash.b; + hash.u = hash.t; + + direction = direction.substr(0, 1); + if ((v = hash[direction]) > -1) { + scrolled = true; + this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2)); + } + return scrolled; + } +}); +Ext.Element.addMethods( + function() { + var VISIBILITY = "visibility", + DISPLAY = "display", + HIDDEN = "hidden", + NONE = "none", + XMASKED = "x-masked", + XMASKEDRELATIVE = "x-masked-relative", + data = Ext.Element.data; + + return { + + isVisible : function(deep) { + var vis = !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE), + p = this.dom.parentNode; + + if (deep !== true || !vis) { + return vis; + } + + while (p && !(/^body/i.test(p.tagName))) { + if (!Ext.fly(p, '_isVisible').isVisible()) { + return false; + } + p = p.parentNode; + } + return true; + }, + + + isDisplayed : function() { + return !this.isStyle(DISPLAY, NONE); + }, + + + enableDisplayMode : function(display) { + this.setVisibilityMode(Ext.Element.DISPLAY); + + if (!Ext.isEmpty(display)) { + data(this.dom, 'originalDisplay', display); + } + + return this; + }, + + + mask : function(msg, msgCls) { + var me = this, + dom = me.dom, + dh = Ext.DomHelper, + EXTELMASKMSG = "ext-el-mask-msg", + el, + mask; + + if (!/^body/i.test(dom.tagName) && me.getStyle('position') == 'static') { + me.addClass(XMASKEDRELATIVE); + } + if (el = data(dom, 'maskMsg')) { + el.remove(); + } + if (el = data(dom, 'mask')) { + el.remove(); + } + + mask = dh.append(dom, {cls : "ext-el-mask"}, true); + data(dom, 'mask', mask); + + me.addClass(XMASKED); + mask.setDisplayed(true); + + if (typeof msg == 'string') { + var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true); + data(dom, 'maskMsg', mm); + mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG; + mm.dom.firstChild.innerHTML = msg; + mm.setDisplayed(true); + mm.center(me); + } + + + if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') { + mask.setSize(undefined, me.getHeight()); + } + + return mask; + }, + + + unmask : function() { + var me = this, + dom = me.dom, + mask = data(dom, 'mask'), + maskMsg = data(dom, 'maskMsg'); + + if (mask) { + if (maskMsg) { + maskMsg.remove(); + data(dom, 'maskMsg', undefined); + } + + mask.remove(); + data(dom, 'mask', undefined); + me.removeClass([XMASKED, XMASKEDRELATIVE]); + } + }, + + + isMasked : function() { + var m = data(this.dom, 'mask'); + return m && m.isVisible(); + }, + + + createShim : function() { + var el = document.createElement('iframe'), + shim; + + el.frameBorder = '0'; + el.className = 'ext-shim'; + el.src = Ext.SSL_SECURE_URL; + shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); + shim.autoBoxAdjust = false; + return shim; + } + }; + }() +); +Ext.Element.addMethods({ + + addKeyListener : function(key, fn, scope){ + var config; + if(typeof key != 'object' || Ext.isArray(key)){ + config = { + key: key, + fn: fn, + scope: scope + }; + }else{ + config = { + key : key.key, + shift : key.shift, + ctrl : key.ctrl, + alt : key.alt, + fn: fn, + scope: scope + }; + } + return new Ext.KeyMap(this, config); + }, + + + addKeyMap : function(config){ + return new Ext.KeyMap(this, config); + } +}); + + + +Ext.CompositeElementLite.importElementMethods(); +Ext.apply(Ext.CompositeElementLite.prototype, { + addElements : function(els, root){ + if(!els){ + return this; + } + if(typeof els == "string"){ + els = Ext.Element.selectorFunction(els, root); + } + var yels = this.elements; + Ext.each(els, function(e) { + yels.push(Ext.get(e)); + }); + return this; + }, + + + first : function(){ + return this.item(0); + }, + + + last : function(){ + return this.item(this.getCount()-1); + }, + + + contains : function(el){ + return this.indexOf(el) != -1; + }, + + + removeElement : function(keys, removeDom){ + var me = this, + els = this.elements, + el; + Ext.each(keys, function(val){ + if ((el = (els[val] || els[val = me.indexOf(val)]))) { + if(removeDom){ + if(el.dom){ + el.remove(); + }else{ + Ext.removeNode(el); + } + } + els.splice(val, 1); + } + }); + return this; + } +}); + +Ext.CompositeElement = Ext.extend(Ext.CompositeElementLite, { + + constructor : function(els, root){ + this.elements = []; + this.add(els, root); + }, + + + getElement : function(el){ + + return el; + }, + + + transformElement : function(el){ + return Ext.get(el); + } + + + + + + +}); + + +Ext.Element.select = function(selector, unique, root){ + var els; + if(typeof selector == "string"){ + els = Ext.Element.selectorFunction(selector, root); + }else if(selector.length !== undefined){ + els = selector; + }else{ + throw "Invalid selector"; + } + + return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els); +}; + + +Ext.select = Ext.Element.select; +Ext.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, +function() { + var BEFOREUPDATE = "beforeupdate", + UPDATE = "update", + FAILURE = "failure"; + + + function processSuccess(response){ + var me = this; + me.transaction = null; + if (response.argument.form && response.argument.reset) { + try { + response.argument.form.reset(); + } catch(e){} + } + if (me.loadScripts) { + me.renderer.render(me.el, response, me, + updateComplete.createDelegate(me, [response])); + } else { + me.renderer.render(me.el, response, me); + updateComplete.call(me, response); + } + } + + + function updateComplete(response, type, success){ + this.fireEvent(type || UPDATE, this.el, response); + if(Ext.isFunction(response.argument.callback)){ + response.argument.callback.call(response.argument.scope, this.el, Ext.isEmpty(success) ? true : false, response, response.argument.options); + } + } + + + function processFailure(response){ + updateComplete.call(this, response, FAILURE, !!(this.transaction = null)); + } + + return { + constructor: function(el, forceNew){ + var me = this; + el = Ext.get(el); + if(!forceNew && el.updateManager){ + return el.updateManager; + } + + me.el = el; + + me.defaultUrl = null; + + me.addEvents( + + BEFOREUPDATE, + + UPDATE, + + FAILURE + ); + + Ext.apply(me, Ext.Updater.defaults); + + + + + + + + + me.transaction = null; + + me.refreshDelegate = me.refresh.createDelegate(me); + + me.updateDelegate = me.update.createDelegate(me); + + me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me); + + + me.renderer = me.renderer || me.getDefaultRenderer(); + + Ext.Updater.superclass.constructor.call(me); + }, + + + setRenderer : function(renderer){ + this.renderer = renderer; + }, + + + getRenderer : function(){ + return this.renderer; + }, + + + getDefaultRenderer: function() { + return new Ext.Updater.BasicRenderer(); + }, + + + setDefaultUrl : function(defaultUrl){ + this.defaultUrl = defaultUrl; + }, + + + getEl : function(){ + return this.el; + }, + + + update : function(url, params, callback, discardUrl){ + var me = this, + cfg, + callerScope; + + if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){ + if(Ext.isObject(url)){ + cfg = url; + url = cfg.url; + params = params || cfg.params; + callback = callback || cfg.callback; + discardUrl = discardUrl || cfg.discardUrl; + callerScope = cfg.scope; + if(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;}; + if(!Ext.isEmpty(cfg.text)){me.indicatorText = '
'+cfg.text+"
";}; + if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;}; + if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;}; + } + me.showLoading(); + + if(!discardUrl){ + me.defaultUrl = url; + } + if(Ext.isFunction(url)){ + url = url.call(me); + } + + var o = Ext.apply({}, { + url : url, + params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params, + success: processSuccess, + failure: processFailure, + scope: me, + callback: undefined, + timeout: (me.timeout*1000), + disableCaching: me.disableCaching, + argument: { + "options": cfg, + "url": url, + "form": null, + "callback": callback, + "scope": callerScope || window, + "params": params + } + }, cfg); + + me.transaction = Ext.Ajax.request(o); + } + }, + + + formUpdate : function(form, url, reset, callback){ + var me = this; + if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){ + if(Ext.isFunction(url)){ + url = url.call(me); + } + form = Ext.getDom(form); + me.transaction = Ext.Ajax.request({ + form: form, + url:url, + success: processSuccess, + failure: processFailure, + scope: me, + timeout: (me.timeout*1000), + argument: { + "url": url, + "form": form, + "callback": callback, + "reset": reset + } + }); + me.showLoading.defer(1, me); + } + }, + + + startAutoRefresh : function(interval, url, params, callback, refreshNow){ + var me = this; + if(refreshNow){ + me.update(url || me.defaultUrl, params, callback, true); + } + if(me.autoRefreshProcId){ + clearInterval(me.autoRefreshProcId); + } + me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.defaultUrl, params, callback, true]), interval * 1000); + }, + + + stopAutoRefresh : function(){ + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + delete this.autoRefreshProcId; + } + }, + + + isAutoRefreshing : function(){ + return !!this.autoRefreshProcId; + }, + + + showLoading : function(){ + if(this.showLoadIndicator){ + this.el.dom.innerHTML = this.indicatorText; + } + }, + + + abort : function(){ + if(this.transaction){ + Ext.Ajax.abort(this.transaction); + } + }, + + + isUpdating : function(){ + return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false; + }, + + + refresh : function(callback){ + if(this.defaultUrl){ + this.update(this.defaultUrl, null, callback, true); + } + } + }; +}()); + + +Ext.Updater.defaults = { + + timeout : 30, + + disableCaching : false, + + showLoadIndicator : true, + + indicatorText : '
Loading...
', + + loadScripts : false, + + sslBlankUrl : Ext.SSL_SECURE_URL +}; + Ext.Updater.updateElement = function(el, url, params, options){ @@ -5688,6 +8643,7 @@ Ext.Updater.updateElement = function(el, url, params, options){ um.update(url, params, options ? options.callback : null); }; + Ext.Updater.BasicRenderer = function(){}; Ext.Updater.BasicRenderer.prototype = { @@ -5697,35 +8653,68 @@ Ext.Updater.BasicRenderer.prototype = { } }; -Ext.UpdateManager = Ext.Updater; - - - (function() { + + +Date.useStrict = false; + + + + + +function xf(format) { + var args = Array.prototype.slice.call(arguments, 1); + return format.replace(/\{(\d+)\}/g, function(m, i) { + return args[i]; + }); +} + + + Date.formatCodeToRegex = function(character, currentGroup) { - var p = Date.parseCodes[character]; + + var p = Date.parseCodes[character]; if (p) { - p = Ext.type(p) == 'function'? p() : p; - Date.parseCodes[character] = p; } + p = typeof p == 'function'? p() : p; + Date.parseCodes[character] = p; + } - return p? Ext.applyIf({ - c: p.c? String.format(p.c, currentGroup || "{0}") : p.c + return p ? Ext.applyIf({ + c: p.c ? xf(p.c, currentGroup || "{0}") : p.c }, p) : { g:0, c:null, - s:Ext.escapeRe(character) } -} + s:Ext.escapeRe(character) + }; +}; + var $f = Date.formatCodeToRegex; Ext.apply(Date, { - parseFunctions: {count:0}, + + parseFunctions: { + "M$": function(input, strict) { + + + var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/'); + var r = (input || '').match(re); + return r? new Date(((r[1] || '') + r[2]) * 1) : null; + } + }, parseRegexes: [], - formatFunctions: {count:0}, - daysInMonth : [31,28,31,30,31,30,31,31,30,31,30,31], + + + formatFunctions: { + "M$": function() { + + return '\\/Date(' + this.getTime() + ')\\/'; + } + }, + y2kYear : 50, @@ -5750,6 +8739,9 @@ Ext.apply(Date, { YEAR : "y", + defaults: {}, + + dayNames : [ "Sunday", "Monday", @@ -5804,13 +8796,24 @@ Ext.apply(Date, { getMonthNumber : function(name) { - return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; + + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }, + + + formatContainsHourInfo : (function(){ + var stripEscapeRe = /(\\.)/g, + hourInfoRe = /([gGhHisucUOPZ]|M\$)/; + return function(format){ + return hourInfoRe.test(format.replace(stripEscapeRe, '')); + }; + })(), formatCodes : { d: "String.leftPad(this.getDate(), 2, '0')", - D: "Date.getShortDayName(this.getDay())", j: "this.getDate()", + D: "Date.getShortDayName(this.getDay())", + j: "this.getDate()", l: "Date.dayNames[this.getDay()]", N: "(this.getDay() ? this.getDay() : 7)", S: "this.getSuffix()", @@ -5819,11 +8822,12 @@ Ext.apply(Date, { W: "String.leftPad(this.getWeekOfYear(), 2, '0')", F: "Date.monthNames[this.getMonth()]", m: "String.leftPad(this.getMonth() + 1, 2, '0')", - M: "Date.getShortMonthName(this.getMonth())", n: "(this.getMonth() + 1)", + M: "Date.getShortMonthName(this.getMonth())", + n: "(this.getMonth() + 1)", t: "this.getDaysInMonth()", L: "(this.isLeapYear() ? 1 : 0)", o: "(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))", - Y: "this.getFullYear()", + Y: "String.leftPad(this.getFullYear(), 4, '0')", y: "('' + this.getFullYear()).substring(2, 4)", a: "(this.getHours() < 12 ? 'am' : 'pm')", A: "(this.getHours() < 12 ? 'AM' : 'PM')", @@ -5838,144 +8842,218 @@ Ext.apply(Date, { P: "this.getGMTOffset(true)", T: "this.getTimezone()", Z: "(this.getTimezoneOffset() * -60)", - c: function() { for (var c = "Y-m-dTH:i:sP", code = [], i = 0, l = c.length; i < l; ++i) { + + c: function() { + for (var c = "Y-m-dTH:i:sP", code = [], i = 0, l = c.length; i < l; ++i) { var e = c.charAt(i); - code.push(e == "T" ? "'T'" : Date.getFormatCode(e)); } + code.push(e == "T" ? "'T'" : Date.getFormatCode(e)); + } return code.join(" + "); }, + U: "Math.round(this.getTime() / 1000)" }, - parseDate : function(input, format) { + isValid : function(y, m, d, h, i, s, ms) { + + h = h || 0; + i = i || 0; + s = s || 0; + ms = ms || 0; + + + var dt = new Date(y < 100 ? 100 : y, m - 1, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0); + + return y == dt.getFullYear() && + m == dt.getMonth() + 1 && + d == dt.getDate() && + h == dt.getHours() && + i == dt.getMinutes() && + s == dt.getSeconds() && + ms == dt.getMilliseconds(); + }, + + + parseDate : function(input, format, strict) { var p = Date.parseFunctions; if (p[format] == null) { Date.createParser(format); } - var func = p[format]; - return Date[func](input); + return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict); }, - getFormatCode : function(character) { + + getFormatCode : function(character) { var f = Date.formatCodes[character]; if (f) { - f = Ext.type(f) == 'function'? f() : f; - Date.formatCodes[character] = f; } + f = typeof f == 'function'? f() : f; + Date.formatCodes[character] = f; + } - return f || ("'" + String.escape(character) + "'"); + + return f || ("'" + String.escape(character) + "'"); }, - createNewFormat : function(format) { - var funcName = "format" + Date.formatFunctions.count++; - Date.formatFunctions[format] = funcName; - var code = "Date.prototype." + funcName + " = function(){return "; - var special = false; - var ch = ''; + + createFormat : function(format) { + var code = [], + special = false, + ch = ''; + for (var i = 0; i < format.length; ++i) { ch = format.charAt(i); if (!special && ch == "\\") { special = true; - } - else if (special) { + } else if (special) { special = false; - code += "'" + String.escape(ch) + "' + "; - } - else { - code += Date.getFormatCode(ch) + " + "; + code.push("'" + String.escape(ch) + "'"); + } else { + code.push(Date.getFormatCode(ch)); } } - eval(code.substring(0, code.length - 3) + ";}"); + Date.formatFunctions[format] = new Function("return " + code.join('+')); }, - createParser : function(format) { - var funcName = "parse" + Date.parseFunctions.count++; - var regexNum = Date.parseRegexes.length; - var currentGroup = 1; - Date.parseFunctions[format] = funcName; + + createParser : function() { + var code = [ + "var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,", + "def = Date.defaults,", + "results = String(input).match(Date.parseRegexes[{0}]);", - var code = "Date." + funcName + " = function(input){\n" - + "var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" - + "input = String(input);\n" - + "d = new Date();\n" - + "y = d.getFullYear();\n" - + "m = d.getMonth();\n" - + "d = d.getDate();\n" - + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n" - + "if (results && results.length > 0) {"; - var regex = ""; + "if(results){", + "{1}", - var special = false; - var ch = ''; - for (var i = 0; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; - } - else if (special) { - special = false; - regex += String.escape(ch); - } - else { - var obj = Date.formatCodeToRegex(ch, currentGroup); - currentGroup += obj.g; - regex += obj.s; - if (obj.g && obj.c) { - code += obj.c; + "if(u != null){", + "v = new Date(u * 1000);", + "}else{", + + + + "dt = (new Date()).clearTime();", + + + "y = Ext.num(y, Ext.num(def.y, dt.getFullYear()));", + "m = Ext.num(m, Ext.num(def.m - 1, dt.getMonth()));", + "d = Ext.num(d, Ext.num(def.d, dt.getDate()));", + + + "h = Ext.num(h, Ext.num(def.h, dt.getHours()));", + "i = Ext.num(i, Ext.num(def.i, dt.getMinutes()));", + "s = Ext.num(s, Ext.num(def.s, dt.getSeconds()));", + "ms = Ext.num(ms, Ext.num(def.ms, dt.getMilliseconds()));", + + "if(z >= 0 && y >= 0){", + + + + + + "v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);", + + + "v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);", + "}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){", + "v = null;", + "}else{", + + + "v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);", + "}", + "}", + "}", + + "if(v){", + + "if(zz != null){", + + "v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);", + "}else if(o){", + + "v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));", + "}", + "}", + + "return v;" + ].join('\n'); + + return function(format) { + var regexNum = Date.parseRegexes.length, + currentGroup = 1, + calc = [], + regex = [], + special = false, + ch = "", + i = 0, + obj, + last; + + for (; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } else if (special) { + special = false; + regex.push(String.escape(ch)); + } else { + obj = $f(ch, currentGroup); + currentGroup += obj.g; + regex.push(obj.s); + if (obj.g && obj.c) { + if (obj.calcLast) { + last = obj.c; + } else { + calc.push(obj.c); + } + } } } - } + + if (last) { + calc.push(last); + } - code += "if (u){\n" - + "v = new Date(u * 1000);\n" + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){\n" - + "v = new Date(y, m, d, h, i, s, ms);\n" - + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){\n" - + "v = new Date(y, m, d, h, i, s);\n" - + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){\n" - + "v = new Date(y, m, d, h, i);\n" - + "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){\n" - + "v = new Date(y, m, d, h);\n" - + "}else if (y >= 0 && m >= 0 && d > 0){\n" - + "v = new Date(y, m, d);\n" - + "}else if (y >= 0 && m >= 0){\n" - + "v = new Date(y, m);\n" - + "}else if (y >= 0){\n" - + "v = new Date(y);\n" - + "}\n}\nreturn (v && (z || o))?" + " (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" + " v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" + "}"; + Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", 'i'); + Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join(''))); + }; + }(), - Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); - eval(code); - }, - - parseCodes : { + + parseCodes : { d: { g:1, c:"d = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" }, + s:"(\\d{2})" + }, j: { g:1, c:"d = parseInt(results[{0}], 10);\n", - s:"(\\d{1,2})" }, + s:"(\\d{1,2})" + }, D: function() { - for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); return { + for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); + return { g:0, c:null, s:"(?:" + a.join("|") +")" - } + }; }, l: function() { return { g:0, c:null, s:"(?:" + Date.dayNames.join("|") + ")" - } + }; }, N: { g:0, c:null, - s:"[1-7]" }, + s:"[1-7]" + }, S: { g:0, c:null, @@ -5984,38 +9062,46 @@ Ext.apply(Date, { w: { g:0, c:null, - s:"[0-6]" }, + s:"[0-6]" + }, z: { - g:0, - c:null, - s:"(?:\\d{1,3}" }, + g:1, + c:"z = parseInt(results[{0}], 10);\n", + s:"(\\d{1,3})" + }, W: { g:0, c:null, - s:"(?:\\d{2})" }, + s:"(?:\\d{2})" + }, F: function() { return { g:1, - c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", s:"(" + Date.monthNames.join("|") + ")" - } + c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", + s:"(" + Date.monthNames.join("|") + ")" + }; }, M: function() { - for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); return Ext.applyIf({ + for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); + return Ext.applyIf({ s:"(" + a.join("|") + ")" }, $f("F")); }, m: { g:1, c:"m = parseInt(results[{0}], 10) - 1;\n", - s:"(\\d{2})" }, + s:"(\\d{2})" + }, n: { g:1, c:"m = parseInt(results[{0}], 10) - 1;\n", - s:"(\\d{1,2})" }, + s:"(\\d{1,2})" + }, t: { g:0, c:null, - s:"(?:\\d{2})" }, + s:"(?:\\d{2})" + }, L: { g:0, c:null, @@ -6027,25 +9113,26 @@ Ext.apply(Date, { Y: { g:1, c:"y = parseInt(results[{0}], 10);\n", - s:"(\\d{4})" }, + s:"(\\d{4})" + }, y: { g:1, c:"var ty = parseInt(results[{0}], 10);\n" - + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", s:"(\\d{1,2})" + + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", + s:"(\\d{1,2})" }, - a: { - g:1, - c:"if (results[{0}] == 'am') {\n" - + "if (h == 12) { h = 0; }\n" - + "} else { if (h < 12) { h += 12; }}", - s:"(am|pm)" + + a: function(){ + return $f("A"); }, A: { + + calcLast: true, g:1, - c:"if (results[{0}] == 'AM') {\n" - + "if (h == 12) { h = 0; }\n" - + "} else { if (h < 12) { h += 12; }}", - s:"(AM|PM)" + c:"if (/(am)/i.test(results[{0}])) {\n" + + "if (!h || h == 12) { h = 0; }\n" + + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", + s:"(AM|PM|am|pm)" }, g: function() { return $f("G"); @@ -6053,50 +9140,87 @@ Ext.apply(Date, { G: { g:1, c:"h = parseInt(results[{0}], 10);\n", - s:"(\\d{1,2})" }, + s:"(\\d{1,2})" + }, h: function() { return $f("H"); }, H: { g:1, c:"h = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" }, + s:"(\\d{2})" + }, i: { g:1, c:"i = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" }, + s:"(\\d{2})" + }, s: { g:1, c:"s = parseInt(results[{0}], 10);\n", - s:"(\\d{2})" }, + s:"(\\d{2})" + }, u: { g:1, c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n", - s:"(\\d+)" }, + s:"(\\d+)" + }, O: { g:1, c:[ "o = results[{0}];", - "var sn = o.substring(0,1);", "var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);", "var mn = o.substring(3,5) % 60;", "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" ].join("\n"), - s: "([+\-]\\d{4})" }, + "var sn = o.substring(0,1),", + "hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),", + "mn = o.substring(3,5) % 60;", + "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" + ].join("\n"), + s: "([+\-]\\d{4})" + }, P: { g:1, c:[ "o = results[{0}];", - "var sn = o.substring(0,1);", "var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);", "var mn = o.substring(4,6) % 60;", "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" ].join("\n"), - s: "([+\-]\\d{2}:\\d{2})" }, + "var sn = o.substring(0,1),", + "hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),", + "mn = o.substring(4,6) % 60;", + "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" + ].join("\n"), + s: "([+\-]\\d{2}:\\d{2})" + }, T: { g:0, c:null, - s:"[A-Z]{1,4}" }, + s:"[A-Z]{1,4}" + }, Z: { g:1, - c:"z = results[{0}] * 1;\n" + "z = (-43200 <= z && z <= 50400)? z : null;\n", - s:"([+\-]?\\d{1,5})" }, + c:"zz = results[{0}] * 1;\n" + + "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n", + s:"([+\-]?\\d{1,5})" + }, c: function() { - var calc = []; - var arr = [ - $f("Y", 1), $f("m", 2), $f("d", 3), $f("h", 4), $f("i", 5), $f("s", 6), {c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, {c:"if(results[9] == 'Z'){\no = 0;\n}else{\n" + $f("P", 9).c + "\n}"} ]; + var calc = [], + arr = [ + $f("Y", 1), + $f("m", 2), + $f("d", 3), + $f("h", 4), + $f("i", 5), + $f("s", 6), + {c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, + {c:[ + "if(results[8]) {", + "if(results[8] == 'Z'){", + "zz = 0;", + "}else if (results[8].indexOf(':') > -1){", + $f("P", 8).c, + "}else{", + $f("O", 8).c, + "}", + "}" + ].join('\n')} + ]; + for (var i = 0, l = arr.length; i < l; ++i) { calc.push(arr[i].c); } @@ -6104,55 +9228,93 @@ Ext.apply(Date, { return { g:1, c:calc.join(""), - s:arr[0].s + "-" + arr[1].s + "-" + arr[2].s + "T" + arr[3].s + ":" + arr[4].s + ":" + arr[5].s - + "((\.|,)\\d+)?" + "(" + $f("P", null).s + "|Z)" } + s:[ + arr[0].s, + "(?:", "-", arr[1].s, + "(?:", "-", arr[2].s, + "(?:", + "(?:T| )?", + arr[3].s, ":", arr[4].s, + "(?::", arr[5].s, ")?", + "(?:(?:\\.|,)(\\d+))?", + "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", + ")?", + ")?", + ")?" + ].join("") + }; }, U: { g:1, c:"u = parseInt(results[{0}], 10);\n", - s:"(-?\\d+)" } + s:"(-?\\d+)" + } } }); }()); -Ext.override(Date, { - dateFormat : function(format) { +Ext.apply(Date.prototype, { + + dateFormat : function(format) { if (Date.formatFunctions[format] == null) { - Date.createNewFormat(format); + Date.createFormat(format); } - var func = Date.formatFunctions[format]; - return this[func](); + return Date.formatFunctions[format].call(this); }, getTimezone : function() { - return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, ""); + + + + + + + + + + + + + return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, ""); }, getGMTOffset : function(colon) { return (this.getTimezoneOffset() > 0 ? "-" : "+") - + String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset() / 60)), 2, "0") + + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0") + (colon ? ":" : "") + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0"); }, - getDayOfYear : function() { - var num = 0; - Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; - for (var i = 0; i < this.getMonth(); ++i) { - num += Date.daysInMonth[i]; + getDayOfYear: function() { + var num = 0, + d = this.clone(), + m = this.getMonth(), + i; + + for (i = 0, d.setDate(1), d.setMonth(0); i < m; d.setMonth(++i)) { + num += d.getDaysInMonth(); } return num + this.getDate() - 1; }, getWeekOfYear : function() { - var ms1d = 864e5; var ms7d = 7 * ms1d; var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d; var AWN = Math.floor(DC3 / 7); var Wyr = new Date(AWN * ms7d).getUTCFullYear(); - return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; - }, + + var ms1d = 864e5, + ms7d = 7 * ms1d; + + return function() { + var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, + AWN = Math.floor(DC3 / 7), + Wyr = new Date(AWN * ms7d).getUTCFullYear(); + + return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; + }; + }(), isLeapYear : function() { @@ -6168,8 +9330,7 @@ Ext.override(Date, { getLastDayOfMonth : function() { - var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7; - return (day < 0) ? (day + 7) : day; + return this.getLastDateOfMonth().getDay(); }, @@ -6184,10 +9345,15 @@ Ext.override(Date, { }, - getDaysInMonth : function() { - Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; - return Date.daysInMonth[this.getMonth()]; - }, + getDaysInMonth: function() { + var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + return function() { + var m = this.getMonth(); + + return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m]; + }; + }(), getSuffix : function() { @@ -6213,23 +9379,47 @@ Ext.override(Date, { }, - clearTime : function(clone){ - if(clone){ + isDST : function() { + + + return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset(); + }, + + + clearTime : function(clone) { + if (clone) { return this.clone().clearTime(); } + + + var d = this.getDate(); + + this.setHours(0); this.setMinutes(0); this.setSeconds(0); this.setMilliseconds(0); + + if (this.getDate() != d) { + + + + + for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr)); + + this.setDate(d); + this.setHours(c.getHours()); + } + return this; }, - add : function(interval, value){ + add : function(interval, value) { var d = this.clone(); if (!interval || value === 0) return d; - switch(interval.toLowerCase()){ + switch(interval.toLowerCase()) { case Date.MILLI: d.setMilliseconds(this.getMilliseconds() + value); break; @@ -6247,7 +9437,7 @@ Ext.override(Date, { break; case Date.MONTH: var day = this.getDate(); - if(day > 28){ + if (day > 28) { day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate()); } d.setDate(day); @@ -6261,7 +9451,7 @@ Ext.override(Date, { }, - between : function(start, end){ + between : function(start, end) { var t = this.getTime(); return start.getTime() <= t && t <= end.getTime(); } @@ -6272,142 +9462,42 @@ Ext.override(Date, { Date.prototype.format = Date.prototype.dateFormat; -if(Ext.isSafari){ - Date.brokenSetMonth = Date.prototype.setMonth; - Date.prototype.setMonth = function(num){ - if(num <= -1){ - var n = Math.ceil(-num); - var back_year = Math.ceil(n/12); - var month = (n % 12) ? 12 - n % 12 : 0 ; - this.setFullYear(this.getFullYear() - back_year); - return Date.brokenSetMonth.call(this, month); - } else { - return Date.brokenSetMonth.apply(this, arguments); + +if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420) { + Ext.apply(Date.prototype, { + _xMonth : Date.prototype.setMonth, + _xDate : Date.prototype.setDate, + + + + setMonth : function(num) { + if (num <= -1) { + var n = Math.ceil(-num), + back_year = Math.ceil(n / 12), + month = (n % 12) ? 12 - n % 12 : 0; + + this.setFullYear(this.getFullYear() - back_year); + + return this._xMonth(month); + } else { + return this._xMonth(num); + } + }, + + + + + setDate : function(d) { + + + return this.setTime(this.getTime() - (this.getDate() - d) * 864e5); } - }; + }); } -Ext.util.DelayedTask = function(fn, scope, args){ - var id = null, d, t; - - var call = function(){ - var now = new Date().getTime(); - if(now - t >= d){ - clearInterval(id); - id = null; - fn.apply(scope, args || []); - } - }; - - this.delay = function(delay, newFn, newScope, newArgs){ - if(id && delay != d){ - this.cancel(); - } - d = delay; - t = new Date().getTime(); - fn = newFn || fn; - scope = newScope || scope; - args = newArgs || args; - if(!id){ - id = setInterval(call, d); - } - }; - - - this.cancel = function(){ - if(id){ - clearInterval(id); - id = null; - } - }; -}; - -Ext.util.TaskRunner = function(interval){ - interval = interval || 10; - var tasks = [], removeQueue = []; - var id = 0; - var running = false; - - var stopThread = function(){ - running = false; - clearInterval(id); - id = 0; - }; - - var startThread = function(){ - if(!running){ - running = true; - id = setInterval(runTasks, interval); - } - }; - - var removeTask = function(t){ - removeQueue.push(t); - if(t.onStop){ - t.onStop.apply(t.scope || t); - } - }; - - var runTasks = function(){ - if(removeQueue.length > 0){ - for(var i = 0, len = removeQueue.length; i < len; i++){ - tasks.remove(removeQueue[i]); - } - removeQueue = []; - if(tasks.length < 1){ - stopThread(); - return; - } - } - var now = new Date().getTime(); - for(var i = 0, len = tasks.length; i < len; ++i){ - var t = tasks[i]; - var itime = now - t.taskRunTime; - if(t.interval <= itime){ - var rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]); - t.taskRunTime = now; - if(rt === false || t.taskRunCount === t.repeat){ - removeTask(t); - return; - } - } - if(t.duration && t.duration <= (now - t.taskStartTime)){ - removeTask(t); - } - } - }; - - - this.start = function(task){ - tasks.push(task); - task.taskStartTime = new Date().getTime(); - task.taskRunTime = 0; - task.taskRunCount = 0; - startThread(); - return task; - }; - - - this.stop = function(task){ - removeTask(task); - return task; - }; - - - this.stopAll = function(){ - stopThread(); - for(var i = 0, len = tasks.length; i < len; i++){ - if(tasks[i].onStop){ - tasks[i].onStop(); - } - } - tasks = []; - removeQueue = []; - }; -}; -Ext.TaskMgr = new Ext.util.TaskRunner(); + Ext.util.MixedCollection = function(allowFunctions, keyFn){ this.items = []; @@ -6416,14 +9506,14 @@ Ext.util.MixedCollection = function(allowFunctions, keyFn){ this.length = 0; this.addEvents( - "clear", + 'clear', - "add", + 'add', - "replace", + 'replace', - "remove", - "sort" + 'remove', + 'sort' ); this.allowFunctions = allowFunctions === true; if(keyFn){ @@ -6433,55 +9523,53 @@ Ext.util.MixedCollection = function(allowFunctions, keyFn){ }; Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { + + allowFunctions : false, - + add : function(key, o){ if(arguments.length == 1){ o = arguments[0]; key = this.getKey(o); } - if(typeof key == "undefined" || key === null){ - this.length++; - this.items.push(o); - this.keys.push(null); - }else{ + if(typeof key != 'undefined' && key !== null){ var old = this.map[key]; - if(old){ + if(typeof old != 'undefined'){ return this.replace(key, o); } - this.length++; - this.items.push(o); this.map[key] = o; - this.keys.push(key); } - this.fireEvent("add", this.length-1, o, key); + this.length++; + this.items.push(o); + this.keys.push(key); + this.fireEvent('add', this.length-1, o, key); return o; }, - + getKey : function(o){ return o.id; }, - + replace : function(key, o){ if(arguments.length == 1){ o = arguments[0]; key = this.getKey(o); } - var old = this.item(key); - if(typeof key == "undefined" || key === null || typeof old == "undefined"){ + var old = this.map[key]; + if(typeof key == 'undefined' || key === null || typeof old == 'undefined'){ return this.add(key, o); } var index = this.indexOfKey(key); this.items[index] = o; this.map[key] = o; - this.fireEvent("replace", key, old, o); + this.fireEvent('replace', key, old, o); return o; }, - + addAll : function(objs){ if(arguments.length > 1 || Ext.isArray(objs)){ var args = arguments.length > 1 ? arguments : objs; @@ -6490,23 +9578,24 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { } }else{ for(var key in objs){ - if(this.allowFunctions || typeof objs[key] != "function"){ + if(this.allowFunctions || typeof objs[key] != 'function'){ this.add(key, objs[key]); } } } }, - + each : function(fn, scope){ - var items = [].concat(this.items); for(var i = 0, len = items.length; i < len; i++){ + var items = [].concat(this.items); + for(var i = 0, len = items.length; i < len; i++){ if(fn.call(scope || items[i], items[i], i, len) === false){ break; } } }, - + eachKey : function(fn, scope){ for(var i = 0, len = this.keys.length; i < len; i++){ fn.call(scope || window, this.keys[i], this.items[i], i, len); @@ -6523,143 +9612,205 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { return null; }, - + insert : function(index, key, o){ if(arguments.length == 2){ o = arguments[1]; key = this.getKey(o); } + if(this.containsKey(key)){ + this.suspendEvents(); + this.removeKey(key); + this.resumeEvents(); + } if(index >= this.length){ return this.add(key, o); } this.length++; this.items.splice(index, 0, o); - if(typeof key != "undefined" && key != null){ + if(typeof key != 'undefined' && key !== null){ this.map[key] = o; } this.keys.splice(index, 0, key); - this.fireEvent("add", index, o, key); + this.fireEvent('add', index, o, key); return o; }, - + remove : function(o){ return this.removeAt(this.indexOf(o)); }, - + removeAt : function(index){ if(index < this.length && index >= 0){ this.length--; var o = this.items[index]; this.items.splice(index, 1); var key = this.keys[index]; - if(typeof key != "undefined"){ + if(typeof key != 'undefined'){ delete this.map[key]; } this.keys.splice(index, 1); - this.fireEvent("remove", o, key); + this.fireEvent('remove', o, key); return o; } return false; }, - + removeKey : function(key){ return this.removeAt(this.indexOfKey(key)); }, - + getCount : function(){ return this.length; }, - + indexOf : function(o){ return this.items.indexOf(o); }, - + indexOfKey : function(key){ return this.keys.indexOf(key); }, - + item : function(key){ - var item = typeof this.map[key] != "undefined" ? this.map[key] : this.items[key]; - return typeof item != 'function' || this.allowFunctions ? item : null; }, - + var mk = this.map[key], + item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined; + return typeof item != 'function' || this.allowFunctions ? item : null; + }, + itemAt : function(index){ return this.items[index]; }, - + key : function(key){ return this.map[key]; }, - + contains : function(o){ return this.indexOf(o) != -1; }, - + containsKey : function(key){ - return typeof this.map[key] != "undefined"; + return typeof this.map[key] != 'undefined'; }, - + clear : function(){ this.length = 0; this.items = []; this.keys = []; this.map = {}; - this.fireEvent("clear"); + this.fireEvent('clear'); }, - + first : function(){ return this.items[0]; }, - + last : function(){ return this.items[this.length-1]; }, - _sort : function(property, dir, fn){ - var dsc = String(dir).toUpperCase() == "DESC" ? -1 : 1; - fn = fn || function(a, b){ - return a-b; + + _sort : function(property, dir, fn){ + var i, len, + dsc = String(dir).toUpperCase() == 'DESC' ? -1 : 1, + + + c = [], + keys = this.keys, + items = this.items; + + + fn = fn || function(a, b) { + return a - b; }; - var c = [], k = this.keys, items = this.items; - for(var i = 0, len = items.length; i < len; i++){ - c[c.length] = {key: k[i], value: items[i], index: i}; + + + for(i = 0, len = items.length; i < len; i++){ + c[c.length] = { + key : keys[i], + value: items[i], + index: i + }; } + + c.sort(function(a, b){ var v = fn(a[property], b[property]) * dsc; - if(v == 0){ + if(v === 0){ v = (a.index < b.index ? -1 : 1); } return v; }); - for(var i = 0, len = c.length; i < len; i++){ + + + for(i = 0, len = c.length; i < len; i++){ items[i] = c[i].value; - k[i] = c[i].key; + keys[i] = c[i].key; } - this.fireEvent("sort", this); + + this.fireEvent('sort', this); }, sort : function(dir, fn){ - this._sort("value", dir, fn); + this._sort('value', dir, fn); + }, + + + reorder: function(mapping) { + this.suspendEvents(); + + var items = this.items, + index = 0, + length = items.length, + order = [], + remaining = [], + oldIndex; + + + for (oldIndex in mapping) { + order[mapping[oldIndex]] = items[oldIndex]; + } + + for (index = 0; index < length; index++) { + if (mapping[index] == undefined) { + remaining.push(items[index]); + } + } + + for (index = 0; index < length; index++) { + if (order[index] == undefined) { + order[index] = remaining.shift(); + } + } + + this.clear(); + this.addAll(order); + + this.resumeEvents(); + this.fireEvent('sort', this); }, keySort : function(dir, fn){ - this._sort("key", dir, fn || function(a, b){ - return String(a).toUpperCase()-String(b).toUpperCase(); + this._sort('key', dir, fn || function(a, b){ + var v1 = String(a).toUpperCase(), v2 = String(b).toUpperCase(); + return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); }); }, @@ -6670,15 +9821,15 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { return []; } start = start || 0; - end = Math.min(typeof end == "undefined" ? this.length-1 : end, this.length-1); - var r = []; + end = Math.min(typeof end == 'undefined' ? this.length-1 : end, this.length-1); + var i, r = []; if(start <= end){ - for(var i = start; i <= end; i++) { - r[r.length] = items[i]; + for(i = start; i <= end; i++) { + r[r.length] = items[i]; } }else{ - for(var i = start; i >= end; i--) { - r[r.length] = items[i]; + for(i = start; i >= end; i--) { + r[r.length] = items[i]; } } return r; @@ -6693,7 +9844,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { return this.filterBy(function(o){ return o && value.test(o[property]); }); - }, + }, filterBy : function(fn, scope){ @@ -6702,8 +9853,8 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { var k = this.keys, it = this.items; for(var i = 0, len = it.length; i < len; i++){ if(fn.call(scope||this, it[i], k[i])){ - r.add(k[i], it[i]); - } + r.add(k[i], it[i]); + } } return r; }, @@ -6717,31 +9868,36 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { return this.findIndexBy(function(o){ return o && value.test(o[property]); }, null, start); - }, + }, findIndexBy : function(fn, scope, start){ var k = this.keys, it = this.items; for(var i = (start||0), len = it.length; i < len; i++){ if(fn.call(scope||this, it[i], k[i])){ - return i; - } - } - if(typeof start == 'number' && start > 0){ - for(var i = 0; i < start; i++){ - if(fn.call(scope||this, it[i], k[i])){ - return i; - } + return i; } } return -1; }, - createValueMatcher : function(value, anyMatch, caseSensitive){ - if(!value.exec){ value = String(value); - value = new RegExp((anyMatch === true ? '' : '^') + Ext.escapeRe(value), caseSensitive ? '' : 'i'); - } - return value; + + createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) { + if (!value.exec) { + var er = Ext.escapeRe; + value = String(value); + + if (anyMatch === true) { + value = er(value); + } else { + value = '^' + er(value); + if (exactMatch === true) { + value += '$'; + } + } + value = new RegExp(value, caseSensitive ? '' : 'i'); + } + return value; }, @@ -6758,303 +9914,361 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item; -Ext.util.JSON = new (function(){ - var useHasOwn = !!{}.hasOwnProperty; - - - var pad = function(n) { - return n < 10 ? "0" + n : n; - }; - - var m = { - "\b": '\\b', - "\t": '\\t', - "\n": '\\n', - "\f": '\\f', - "\r": '\\r', - '"' : '\\"', - "\\": '\\\\' - }; - - var encodeString = function(s){ - if (/["\\\x00-\x1f]/.test(s)) { - return '"' + s.replace(/([\x00-\x1f\\"])/g, function(a, b) { - var c = m[b]; - if(c){ - return c; - } - c = b.charCodeAt(); - return "\\u00" + - Math.floor(c / 16).toString(16) + - (c % 16).toString(16); - }) + '"'; - } - return '"' + s + '"'; - }; - - var encodeArray = function(o){ - var a = ["["], b, i, l = o.length, v; - for (i = 0; i < l; i += 1) { - v = o[i]; - switch (typeof v) { - case "undefined": - case "function": - case "unknown": - break; - default: - if (b) { - a.push(','); - } - a.push(v === null ? "null" : Ext.util.JSON.encode(v)); - b = true; - } - } - a.push("]"); - return a.join(""); - }; - - this.encodeDate = function(o){ - return '"' + o.getFullYear() + "-" + - pad(o.getMonth() + 1) + "-" + - pad(o.getDate()) + "T" + - pad(o.getHours()) + ":" + - pad(o.getMinutes()) + ":" + - pad(o.getSeconds()) + '"'; - }; - +Ext.AbstractManager = Ext.extend(Object, { + typeName: 'type', - this.encode = function(o){ - if(typeof o == "undefined" || o === null){ - return "null"; - }else if(Ext.isArray(o)){ - return encodeArray(o); - }else if(Ext.isDate(o)){ - return Ext.util.JSON.encodeDate(o); - }else if(typeof o == "string"){ - return encodeString(o); - }else if(typeof o == "number"){ - return isFinite(o) ? String(o) : "null"; - }else if(typeof o == "boolean"){ - return String(o); - }else { - var a = ["{"], b, i, v; - for (i in o) { - if(!useHasOwn || o.hasOwnProperty(i)) { - v = o[i]; - switch (typeof v) { - case "undefined": - case "function": - case "unknown": - break; - default: - if(b){ - a.push(','); - } - a.push(this.encode(i), ":", - v === null ? "null" : this.encode(v)); - b = true; + constructor: function(config) { + Ext.apply(this, config || {}); + + + this.all = new Ext.util.MixedCollection(); + + this.types = {}; + }, + + + get : function(id){ + return this.all.get(id); + }, + + + register: function(item) { + this.all.add(item); + }, + + + unregister: function(item) { + this.all.remove(item); + }, + + + registerType : function(type, cls){ + this.types[type] = cls; + cls[this.typeName] = type; + }, + + + isRegistered : function(type){ + return this.types[type] !== undefined; + }, + + + create: function(config, defaultType) { + var type = config[this.typeName] || config.type || defaultType, + Constructor = this.types[type]; + + if (Constructor == undefined) { + throw new Error(String.format("The '{0}' type has not been registered with this manager", type)); + } + + return new Constructor(config); + }, + + + onAvailable : function(id, fn, scope){ + var all = this.all; + + all.on("add", function(index, o){ + if (o.id == id) { + fn.call(scope || o, o); + all.un("add", fn, scope); + } + }); + } +}); +Ext.util.Format = function() { + var trimRe = /^\s+|\s+$/g, + stripTagsRE = /<\/?[^>]+>/gi, + stripScriptsRe = /(?:)((\n|\r|.)*?)(?:<\/script>)/ig, + nl2brRe = /\r?\n/g; + + return { + + ellipsis : function(value, len, word) { + if (value && value.length > len) { + if (word) { + var vs = value.substr(0, len - 2), + index = Math.max(vs.lastIndexOf(' '), vs.lastIndexOf('.'), vs.lastIndexOf('!'), vs.lastIndexOf('?')); + if (index == -1 || index < (len - 15)) { + return value.substr(0, len - 3) + "..."; + } else { + return vs.substr(0, index) + "..."; } + } else { + return value.substr(0, len - 3) + "..."; } } - a.push("}"); - return a.join(""); + return value; + }, + + + undef : function(value) { + return value !== undefined ? value : ""; + }, + + + defaultValue : function(value, defaultValue) { + return value !== undefined && value !== '' ? value : defaultValue; + }, + + + htmlEncode : function(value) { + return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/").replace(/</g, "<").replace(/"/g, '"').replace(/&/g, "&"); + }, + + + trim : function(value) { + return String(value).replace(trimRe, ""); + }, + + + substr : function(value, start, length) { + return String(value).substr(start, length); + }, + + + lowercase : function(value) { + return String(value).toLowerCase(); + }, + + + uppercase : function(value) { + return String(value).toUpperCase(); + }, + + + capitalize : function(value) { + return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); + }, + + + call : function(value, fn) { + if (arguments.length > 2) { + var args = Array.prototype.slice.call(arguments, 2); + args.unshift(value); + return eval(fn).apply(window, args); + } else { + return eval(fn).call(window, value); + } + }, + + + usMoney : function(v) { + v = (Math.round((v-0)*100))/100; + v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v); + v = String(v); + var ps = v.split('.'), + whole = ps[0], + sub = ps[1] ? '.'+ ps[1] : '.00', + r = /(\d+)(\d{3})/; + while (r.test(whole)) { + whole = whole.replace(r, '$1' + ',' + '$2'); + } + v = whole + sub; + if (v.charAt(0) == '-') { + return '-$' + v.substr(1); + } + return "$" + v; + }, + + + date : function(v, format) { + if (!v) { + return ""; + } + if (!Ext.isDate(v)) { + v = new Date(Date.parse(v)); + } + return v.dateFormat(format || "m/d/Y"); + }, + + + dateRenderer : function(format) { + return function(v) { + return Ext.util.Format.date(v, format); + }; + }, + + + stripTags : function(v) { + return !v ? v : String(v).replace(stripTagsRE, ""); + }, + + + stripScripts : function(v) { + return !v ? v : String(v).replace(stripScriptsRe, ""); + }, + + + fileSize : function(size) { + if (size < 1024) { + return size + " bytes"; + } else if (size < 1048576) { + return (Math.round(((size*10) / 1024))/10) + " KB"; + } else { + return (Math.round(((size*10) / 1048576))/10) + " MB"; + } + }, + + + math : function(){ + var fns = {}; + + return function(v, a){ + if (!fns[a]) { + fns[a] = new Function('v', 'return v ' + a + ';'); + } + return fns[a](v); + }; + }(), + + + round : function(value, precision) { + var result = Number(value); + if (typeof precision == 'number') { + precision = Math.pow(10, precision); + result = Math.round(value * precision) / precision; + } + return result; + }, + + + number: function(v, format) { + if (!format) { + return v; + } + v = Ext.num(v, NaN); + if (isNaN(v)) { + return ''; + } + var comma = ',', + dec = '.', + i18n = false, + neg = v < 0; + + v = Math.abs(v); + if (format.substr(format.length - 2) == '/i') { + format = format.substr(0, format.length - 2); + i18n = true; + comma = '.'; + dec = ','; + } + + var hasComma = format.indexOf(comma) != -1, + psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec); + + if (1 < psplit.length) { + v = v.toFixed(psplit[1].length); + } else if(2 < psplit.length) { + throw ('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format); + } else { + v = v.toFixed(0); + } + + var fnum = v.toString(); + + psplit = fnum.split('.'); + + if (hasComma) { + var cnum = psplit[0], + parr = [], + j = cnum.length, + m = Math.floor(j / 3), + n = cnum.length % 3 || 3, + i; + + for (i = 0; i < j; i += n) { + if (i != 0) { + n = 3; + } + + parr[parr.length] = cnum.substr(i, n); + m -= 1; + } + fnum = parr.join(comma); + if (psplit[1]) { + fnum += dec + psplit[1]; + } + } else { + if (psplit[1]) { + fnum = psplit[0] + dec + psplit[1]; + } + } + + return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum); + }, + + + numberRenderer : function(format) { + return function(v) { + return Ext.util.Format.number(v, format); + }; + }, + + + plural : function(v, s, p) { + return v +' ' + (v == 1 ? s : (p ? p : s+'s')); + }, + + + nl2br : function(v) { + return Ext.isEmpty(v) ? '' : v.replace(nl2brRe, '
'); } }; - - - this.decode = function(json){ - return eval("(" + json + ')'); - }; -})(); - -Ext.encode = Ext.util.JSON.encode; - -Ext.decode = Ext.util.JSON.decode; - - -Ext.util.Format = function(){ - var trimRe = /^\s+|\s+$/g; - return { - - ellipsis : function(value, len){ - if(value && value.length > len){ - return value.substr(0, len-3)+"..."; - } - return value; - }, - - - undef : function(value){ - return value !== undefined ? value : ""; - }, - - - defaultValue : function(value, defaultValue){ - return value !== undefined && value !== '' ? value : defaultValue; - }, - - - htmlEncode : function(value){ - return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/").replace(/</g, "<").replace(/"/g, '"').replace(/&/g, "&"); - }, - - - trim : function(value){ - return String(value).replace(trimRe, ""); - }, - - - substr : function(value, start, length){ - return String(value).substr(start, length); - }, - - - lowercase : function(value){ - return String(value).toLowerCase(); - }, - - - uppercase : function(value){ - return String(value).toUpperCase(); - }, - - - capitalize : function(value){ - return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); - }, - - - call : function(value, fn){ - if(arguments.length > 2){ - var args = Array.prototype.slice.call(arguments, 2); - args.unshift(value); - return eval(fn).apply(window, args); - }else{ - return eval(fn).call(window, value); - } - }, - - - usMoney : function(v){ - v = (Math.round((v-0)*100))/100; - v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v); - v = String(v); - var ps = v.split('.'); - var whole = ps[0]; - var sub = ps[1] ? '.'+ ps[1] : '.00'; - var r = /(\d+)(\d{3})/; - while (r.test(whole)) { - whole = whole.replace(r, '$1' + ',' + '$2'); - } - v = whole + sub; - if(v.charAt(0) == '-'){ - return '-$' + v.substr(1); - } - return "$" + v; - }, - - - date : function(v, format){ - if(!v){ - return ""; - } - if(!Ext.isDate(v)){ - v = new Date(Date.parse(v)); - } - return v.dateFormat(format || "m/d/Y"); - }, - - - dateRenderer : function(format){ - return function(v){ - return Ext.util.Format.date(v, format); - }; - }, - - - stripTagsRE : /<\/?[^>]+>/gi, - - - stripTags : function(v){ - return !v ? v : String(v).replace(this.stripTagsRE, ""); - }, - - stripScriptsRe : /(?:)((\n|\r|.)*?)(?:<\/script>)/ig, - - - stripScripts : function(v){ - return !v ? v : String(v).replace(this.stripScriptsRe, ""); - }, - - - fileSize : function(size){ - if(size < 1024) { - return size + " bytes"; - } else if(size < 1048576) { - return (Math.round(((size*10) / 1024))/10) + " KB"; - } else { - return (Math.round(((size*10) / 1048576))/10) + " MB"; - } - }, - - math : function(){ - var fns = {}; - return function(v, a){ - if(!fns[a]){ - fns[a] = new Function('v', 'return v ' + a + ';'); - } - return fns[a](v); - } - }(), - - nl2br : function(v){ - return v === undefined || v === null ? '' : v.replace(/\n/g, '
'); - } - }; }(); Ext.XTemplate = function(){ Ext.XTemplate.superclass.constructor.apply(this, arguments); - var s = this.html; + + var me = this, + s = me.html, + re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/, + nameRe = /^]*?for="(.*?)"/, + ifRe = /^]*?if="(.*?)"/, + execRe = /^]*?exec="(.*?)"/, + m, + id = 0, + tpls = [], + VALUES = 'values', + PARENT = 'parent', + XINDEX = 'xindex', + XCOUNT = 'xcount', + RETURN = 'return ', + WITHVALUES = 'with(values){ '; s = ['', s, ''].join(''); - var re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/; + while((m = s.match(re))){ + var m2 = m[0].match(nameRe), + m3 = m[0].match(ifRe), + m4 = m[0].match(execRe), + exp = null, + fn = null, + exec = null, + name = m2 && m2[1] ? m2[1] : ''; - var nameRe = /^]*?for="(.*?)"/; - var ifRe = /^]*?if="(.*?)"/; - var execRe = /^]*?exec="(.*?)"/; - var m, id = 0; - var tpls = []; - - while(m = s.match(re)){ - var m2 = m[0].match(nameRe); - var m3 = m[0].match(ifRe); - var m4 = m[0].match(execRe); - var exp = null, fn = null, exec = null; - var name = m2 && m2[1] ? m2[1] : ''; - if(m3){ + if (m3) { exp = m3 && m3[1] ? m3[1] : null; if(exp){ - fn = new Function('values', 'parent', 'xindex', 'xcount', 'with(values){ return '+(Ext.util.Format.htmlDecode(exp))+'; }'); + fn = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES + RETURN +(Ext.util.Format.htmlDecode(exp))+'; }'); } } - if(m4){ + if (m4) { exp = m4 && m4[1] ? m4[1] : null; if(exp){ - exec = new Function('values', 'parent', 'xindex', 'xcount', 'with(values){ '+(Ext.util.Format.htmlDecode(exp))+'; }'); + exec = new Function(VALUES, PARENT, XINDEX, XCOUNT, WITHVALUES +(Ext.util.Format.htmlDecode(exp))+'; }'); } } if(name){ switch(name){ - case '.': name = new Function('values', 'parent', 'with(values){ return values; }'); break; - case '..': name = new Function('values', 'parent', 'with(values){ return parent; }'); break; - default: name = new Function('values', 'parent', 'with(values){ return '+name+'; }'); + case '.': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + VALUES + '; }'); break; + case '..': name = new Function(VALUES, PARENT, WITHVALUES + RETURN + PARENT + '; }'); break; + default: name = new Function(VALUES, PARENT, WITHVALUES + RETURN + name + '; }'); } } tpls.push({ @@ -7068,40 +10282,48 @@ Ext.XTemplate = function(){ ++id; } for(var i = tpls.length-1; i >= 0; --i){ - this.compileTpl(tpls[i]); + me.compileTpl(tpls[i]); } - this.master = tpls[tpls.length-1]; - this.tpls = tpls; + me.master = tpls[tpls.length-1]; + me.tpls = tpls; }; Ext.extend(Ext.XTemplate, Ext.Template, { - re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g, - codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g, + + re : /\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g, + + codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g, - applySubTemplate : function(id, values, parent, xindex, xcount){ - var t = this.tpls[id]; - if(t.test && !t.test.call(this, values, parent, xindex, xcount)){ + + applySubTemplate : function(id, values, parent, xindex, xcount){ + var me = this, + len, + t = me.tpls[id], + vs, + buf = []; + if ((t.test && !t.test.call(me, values, parent, xindex, xcount)) || + (t.exec && t.exec.call(me, values, parent, xindex, xcount))) { return ''; } - if(t.exec && t.exec.call(this, values, parent, xindex, xcount)){ - return ''; - } - var vs = t.target ? t.target.call(this, values, parent) : values; + vs = t.target ? t.target.call(me, values, parent) : values; + len = vs.length; parent = t.target ? values : parent; if(t.target && Ext.isArray(vs)){ - var buf = []; for(var i = 0, len = vs.length; i < len; i++){ - buf[buf.length] = t.compiled.call(this, vs[i], parent, i+1, len); + buf[buf.length] = t.compiled.call(me, vs[i], parent, i+1, len); } return buf.join(''); } - return t.compiled.call(this, vs, parent, xindex, xcount); + return t.compiled.call(me, vs, parent, xindex, xcount); }, - compileTpl : function(tpl){ - var fm = Ext.util.Format; - var useF = this.disableFormats !== true; - var sep = Ext.isGecko ? "+" : ","; - var fn = function(m, name, format, args, math){ + + compileTpl : function(tpl){ + var fm = Ext.util.Format, + useF = this.disableFormats !== true, + sep = Ext.isGecko ? "+" : ",", + body; + + function fn(m, name, format, args, math){ if(name.substr(0, 4) == 'xtpl'){ return "'"+ sep +'this.applySubTemplate('+name.substr(4)+', values, parent, xindex, xcount)'+sep+"'"; } @@ -7118,7 +10340,7 @@ Ext.extend(Ext.XTemplate, Ext.Template, { if(math){ v = '(' + v + math + ')'; } - if(format && useF){ + if (format && useF) { args = args ? ',' + args : ""; if(format.substr(0, 5) != "this."){ format = "fm." + format + '('; @@ -7126,17 +10348,19 @@ Ext.extend(Ext.XTemplate, Ext.Template, { format = 'this.call("'+ format.substr(5) + '", '; args = ", values"; } - }else{ + } else { args= ''; format = "("+v+" === undefined ? '' : "; } return "'"+ sep + format + v + args + ")"+sep+"'"; - }; - var codeFn = function(m, code){ - return "'"+ sep +'('+code+')'+sep+"'"; - }; + } - var body; - if(Ext.isGecko){ + function codeFn(m, code){ + + return "'" + sep + '(' + code.replace(/\\'/g, "'") + ')' + sep + "'"; + } + + + if(Ext.isGecko){ body = "tpl.compiled = function(values, parent, xindex, xcount){ return '" + tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn) + "';};"; @@ -7171,170 +10395,220 @@ Ext.XTemplate.from = function(el){ el = Ext.getDom(el); return new Ext.XTemplate(el.value || el.innerHTML); }; - -Ext.util.CSS = function(){ - var rules = null; - var doc = document; - - var camelRe = /(-[a-z])/gi; - var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; - - return { - - createStyleSheet : function(cssText, id){ - var ss; - var head = doc.getElementsByTagName("head")[0]; - var rules = doc.createElement("style"); - rules.setAttribute("type", "text/css"); - if(id){ - rules.setAttribute("id", id); - } - if(Ext.isIE){ - head.appendChild(rules); - ss = rules.styleSheet; - ss.cssText = cssText; - }else{ - try{ - rules.appendChild(doc.createTextNode(cssText)); - }catch(e){ - rules.cssText = cssText; - } - head.appendChild(rules); - ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); - } - this.cacheStyleSheet(ss); - return ss; - }, - - - removeStyleSheet : function(id){ - var existing = doc.getElementById(id); - if(existing){ - existing.parentNode.removeChild(existing); - } - }, - - - swapStyleSheet : function(id, url){ - this.removeStyleSheet(id); - var ss = doc.createElement("link"); - ss.setAttribute("rel", "stylesheet"); - ss.setAttribute("type", "text/css"); - ss.setAttribute("id", id); - ss.setAttribute("href", url); - doc.getElementsByTagName("head")[0].appendChild(ss); - }, - - - refreshCache : function(){ - return this.getRules(true); - }, - + +Ext.util.CSS = function(){ + var rules = null; + var doc = document; + + var camelRe = /(-[a-z])/gi; + var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; + + return { - cacheStyleSheet : function(ss){ - if(!rules){ - rules = {}; - } + createStyleSheet : function(cssText, id){ + var ss; + var head = doc.getElementsByTagName("head")[0]; + var rules = doc.createElement("style"); + rules.setAttribute("type", "text/css"); + if(id){ + rules.setAttribute("id", id); + } + if(Ext.isIE){ + head.appendChild(rules); + ss = rules.styleSheet; + ss.cssText = cssText; + }else{ + try{ + rules.appendChild(doc.createTextNode(cssText)); + }catch(e){ + rules.cssText = cssText; + } + head.appendChild(rules); + ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); + } + this.cacheStyleSheet(ss); + return ss; + }, + + + removeStyleSheet : function(id){ + var existing = doc.getElementById(id); + if(existing){ + existing.parentNode.removeChild(existing); + } + }, + + + swapStyleSheet : function(id, url){ + this.removeStyleSheet(id); + var ss = doc.createElement("link"); + ss.setAttribute("rel", "stylesheet"); + ss.setAttribute("type", "text/css"); + ss.setAttribute("id", id); + ss.setAttribute("href", url); + doc.getElementsByTagName("head")[0].appendChild(ss); + }, + + + refreshCache : function(){ + return this.getRules(true); + }, + + + cacheStyleSheet : function(ss){ + if(!rules){ + rules = {}; + } try{ - var ssRules = ss.cssRules || ss.rules; - for(var j = ssRules.length-1; j >= 0; --j){ - rules[ssRules[j].selectorText] = ssRules[j]; - } - }catch(e){} - }, - - - getRules : function(refreshCache){ - if(rules == null || refreshCache){ - rules = {}; - var ds = doc.styleSheets; - for(var i =0, len = ds.length; i < len; i++){ - try{ - this.cacheStyleSheet(ds[i]); - }catch(e){} - } - } - return rules; - }, - - - getRule : function(selector, refreshCache){ - var rs = this.getRules(refreshCache); - if(!Ext.isArray(selector)){ - return rs[selector]; - } - for(var i = 0; i < selector.length; i++){ - if(rs[selector[i]]){ - return rs[selector[i]]; - } - } - return null; - }, - - - - updateRule : function(selector, property, value){ - if(!Ext.isArray(selector)){ - var rule = this.getRule(selector); - if(rule){ - rule.style[property.replace(camelRe, camelFn)] = value; - return true; - } - }else{ - for(var i = 0; i < selector.length; i++){ - if(this.updateRule(selector[i], property, value)){ - return true; - } - } - } - return false; - } - }; + var ssRules = ss.cssRules || ss.rules; + for(var j = ssRules.length-1; j >= 0; --j){ + rules[ssRules[j].selectorText.toLowerCase()] = ssRules[j]; + } + }catch(e){} + }, + + + getRules : function(refreshCache){ + if(rules === null || refreshCache){ + rules = {}; + var ds = doc.styleSheets; + for(var i =0, len = ds.length; i < len; i++){ + try{ + this.cacheStyleSheet(ds[i]); + }catch(e){} + } + } + return rules; + }, + + + getRule : function(selector, refreshCache){ + var rs = this.getRules(refreshCache); + if(!Ext.isArray(selector)){ + return rs[selector.toLowerCase()]; + } + for(var i = 0; i < selector.length; i++){ + if(rs[selector[i]]){ + return rs[selector[i].toLowerCase()]; + } + } + return null; + }, + + + + updateRule : function(selector, property, value){ + if(!Ext.isArray(selector)){ + var rule = this.getRule(selector); + if(rule){ + rule.style[property.replace(camelRe, camelFn)] = value; + return true; + } + }else{ + for(var i = 0; i < selector.length; i++){ + if(this.updateRule(selector[i], property, value)){ + return true; + } + } + } + return false; + } + }; }(); - -Ext.util.ClickRepeater = function(el, config) -{ - this.el = Ext.get(el); - this.el.unselectable(); - - Ext.apply(this, config); - - this.addEvents( +Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, { + constructor : function(el, config){ + this.el = Ext.get(el); + this.el.unselectable(); + + Ext.apply(this, config); + + this.addEvents( + "mousedown", - + "click", - + "mouseup" - ); + ); - this.el.on("mousedown", this.handleMouseDown, this); - if(this.preventDefault || this.stopDefault){ - this.el.on("click", function(e){ - if(this.preventDefault){ - e.preventDefault(); - } - if(this.stopDefault){ - e.stopEvent(); - } - }, this); - } + if(!this.disabled){ + this.disabled = true; + this.enable(); + } + if(this.handler){ - this.on("click", this.handler, this.scope || this); - } + this.on("click", this.handler, this.scope || this); + } - Ext.util.ClickRepeater.superclass.constructor.call(this); -}; - -Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { + Ext.util.ClickRepeater.superclass.constructor.call(this); + }, + interval : 20, delay: 250, preventDefault : true, stopDefault : false, timer : 0, - handleMouseDown : function(){ + + enable: function(){ + if(this.disabled){ + this.el.on('mousedown', this.handleMouseDown, this); + if (Ext.isIE){ + this.el.on('dblclick', this.handleDblClick, this); + } + if(this.preventDefault || this.stopDefault){ + this.el.on('click', this.eventOptions, this); + } + } + this.disabled = false; + }, + + + disable: function( force){ + if(force || !this.disabled){ + clearTimeout(this.timer); + if(this.pressClass){ + this.el.removeClass(this.pressClass); + } + Ext.getDoc().un('mouseup', this.handleMouseUp, this); + this.el.removeAllListeners(); + } + this.disabled = true; + }, + + + setDisabled: function(disabled){ + this[disabled ? 'disable' : 'enable'](); + }, + + eventOptions: function(e){ + if(this.preventDefault){ + e.preventDefault(); + } + if(this.stopDefault){ + e.stopEvent(); + } + }, + + + destroy : function() { + this.disable(true); + Ext.destroy(this.el); + this.purgeListeners(); + }, + + handleDblClick : function(e){ + clearTimeout(this.timer); + this.el.blur(); + + this.fireEvent("mousedown", this, e); + this.fireEvent("click", this, e); + }, + + + handleMouseDown : function(e){ clearTimeout(this.timer); this.el.blur(); if(this.pressClass){ @@ -7345,30 +10619,33 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { Ext.getDoc().on("mouseup", this.handleMouseUp, this); this.el.on("mouseout", this.handleMouseOut, this); - this.fireEvent("mousedown", this); - this.fireEvent("click", this); + this.fireEvent("mousedown", this, e); + this.fireEvent("click", this, e); + if (this.accelerate) { this.delay = 400; - } - this.timer = this.click.defer(this.delay || this.interval, this); + } + this.timer = this.click.defer(this.delay || this.interval, this, [e]); }, - click : function(){ - this.fireEvent("click", this); + + click : function(e){ + this.fireEvent("click", this, e); this.timer = this.click.defer(this.accelerate ? this.easeOutExpo(this.mousedownTime.getElapsed(), 400, -390, 12000) : - this.interval, this); + this.interval, this, [e]); }, easeOutExpo : function (t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, - handleMouseOut : function(){ + + handleMouseOut : function(){ clearTimeout(this.timer); if(this.pressClass){ this.el.removeClass(this.pressClass); @@ -7376,7 +10653,8 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { this.el.on("mouseover", this.handleMouseReturn, this); }, - handleMouseReturn : function(){ + + handleMouseReturn : function(){ this.el.un("mouseover", this.handleMouseReturn, this); if(this.pressClass){ this.el.addClass(this.pressClass); @@ -7384,16 +10662,16 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { this.click(); }, - handleMouseUp : function(){ + + handleMouseUp : function(e){ clearTimeout(this.timer); this.el.un("mouseover", this.handleMouseReturn, this); this.el.un("mouseout", this.handleMouseOut, this); Ext.getDoc().un("mouseup", this.handleMouseUp, this); this.el.removeClass(this.pressClass); - this.fireEvent("mouseup", this); + this.fireEvent("mouseup", this, e); } }); - Ext.KeyNav = function(el, config){ this.el = Ext.get(el); Ext.apply(this, config); @@ -7411,17 +10689,10 @@ Ext.KeyNav.prototype = { forceKeyDown : false, - prepareEvent : function(e){ - var k = e.getKey(); - var h = this.keyToHandler[k]; - if(Ext.isSafari2 && h && k >= 37 && k <= 40){ - e.stopEvent(); - } - }, - - relay : function(e){ - var k = e.getKey(); - var h = this.keyToHandler[k]; + + relay : function(e){ + var k = e.getKey(), + h = this.keyToHandler[k]; if(h && this[h]){ if(this.doRelay(e, this[h], h) !== true){ e[this.defaultEventAction](); @@ -7429,11 +10700,13 @@ Ext.KeyNav.prototype = { } }, - doRelay : function(e, h, hname){ - return h.call(this.scope || this, e); + + doRelay : function(e, h, hname){ + return h.call(this.scope || this, e, hname); }, - enter : false, + + enter : false, left : false, right : false, up : false, @@ -7445,8 +10718,10 @@ Ext.KeyNav.prototype = { del : false, home : false, end : false, + space : false, - keyToHandler : { + + keyToHandler : { 37 : "left", 39 : "right", 38 : "up", @@ -7458,158 +10733,198 @@ Ext.KeyNav.prototype = { 35 : "end", 13 : "enter", 27 : "esc", - 9 : "tab" + 9 : "tab", + 32 : "space" + }, + + stopKeyUp: function(e) { + var k = e.getKey(); + + if (k >= 37 && k <= 40) { + + + e.stopEvent(); + } + }, + + + destroy: function(){ + this.disable(); }, - enable: function(){ - if(this.disabled){ - if(this.forceKeyDown || Ext.isIE || Ext.isSafari3 || Ext.isAir){ - this.el.on("keydown", this.relay, this); - }else{ - this.el.on("keydown", this.prepareEvent, this); - this.el.on("keypress", this.relay, this); + enable: function() { + if (this.disabled) { + if (Ext.isSafari2) { + + this.el.on('keyup', this.stopKeyUp, this); } - this.disabled = false; + + this.el.on(this.isKeydown()? 'keydown' : 'keypress', this.relay, this); + this.disabled = false; + } + }, + + + disable: function() { + if (!this.disabled) { + if (Ext.isSafari2) { + + this.el.un('keyup', this.stopKeyUp, this); + } + + this.el.un(this.isKeydown()? 'keydown' : 'keypress', this.relay, this); + this.disabled = true; + } + }, + + + setDisabled : function(disabled){ + this[disabled ? "disable" : "enable"](); + }, + + + isKeydown: function(){ + return this.forceKeyDown || Ext.EventManager.useKeydown; + } +}; + +Ext.KeyMap = function(el, config, eventName){ + this.el = Ext.get(el); + this.eventName = eventName || "keydown"; + this.bindings = []; + if(config){ + this.addBinding(config); + } + this.enable(); +}; + +Ext.KeyMap.prototype = { + + stopEvent : false, + + + addBinding : function(config){ + if(Ext.isArray(config)){ + Ext.each(config, function(c){ + this.addBinding(c); + }, this); + return; + } + var keyCode = config.key, + fn = config.fn || config.handler, + scope = config.scope; + + if (config.stopEvent) { + this.stopEvent = config.stopEvent; + } + + if(typeof keyCode == "string"){ + var ks = []; + var keyString = keyCode.toUpperCase(); + for(var j = 0, len = keyString.length; j < len; j++){ + ks.push(keyString.charCodeAt(j)); + } + keyCode = ks; + } + var keyArray = Ext.isArray(keyCode); + + var handler = function(e){ + if(this.checkModifiers(config, e)){ + var k = e.getKey(); + if(keyArray){ + for(var i = 0, len = keyCode.length; i < len; i++){ + if(keyCode[i] == k){ + if(this.stopEvent){ + e.stopEvent(); + } + fn.call(scope || window, k, e); + return; + } + } + }else{ + if(k == keyCode){ + if(this.stopEvent){ + e.stopEvent(); + } + fn.call(scope || window, k, e); + } + } + } + }; + this.bindings.push(handler); + }, + + + checkModifiers: function(config, e){ + var val, key, keys = ['shift', 'ctrl', 'alt']; + for (var i = 0, len = keys.length; i < len; ++i){ + key = keys[i]; + val = config[key]; + if(!(val === undefined || (val === e[key + 'Key']))){ + return false; + } + } + return true; + }, + + + on : function(key, fn, scope){ + var keyCode, shift, ctrl, alt; + if(typeof key == "object" && !Ext.isArray(key)){ + keyCode = key.key; + shift = key.shift; + ctrl = key.ctrl; + alt = key.alt; + }else{ + keyCode = key; + } + this.addBinding({ + key: keyCode, + shift: shift, + ctrl: ctrl, + alt: alt, + fn: fn, + scope: scope + }); + }, + + + handleKeyDown : function(e){ + if(this.enabled){ + var b = this.bindings; + for(var i = 0, len = b.length; i < len; i++){ + b[i].call(this, e); + } + } + }, + + + isEnabled : function(){ + return this.enabled; + }, + + + enable: function(){ + if(!this.enabled){ + this.el.on(this.eventName, this.handleKeyDown, this); + this.enabled = true; } }, disable: function(){ - if(!this.disabled){ - if(this.forceKeyDown || Ext.isIE || Ext.isSafari3 || Ext.isAir){ - this.el.un("keydown", this.relay); - }else{ - this.el.un("keydown", this.prepareEvent); - this.el.un("keypress", this.relay); - } - this.disabled = true; + if(this.enabled){ + this.el.removeListener(this.eventName, this.handleKeyDown, this); + this.enabled = false; } - } -}; - -Ext.KeyMap = function(el, config, eventName){ - this.el = Ext.get(el); - this.eventName = eventName || "keydown"; - this.bindings = []; - if(config){ - this.addBinding(config); - } - this.enable(); -}; - -Ext.KeyMap.prototype = { - - stopEvent : false, - - - addBinding : function(config){ - if(Ext.isArray(config)){ - for(var i = 0, len = config.length; i < len; i++){ - this.addBinding(config[i]); - } - return; - } - var keyCode = config.key, - shift = config.shift, - ctrl = config.ctrl, - alt = config.alt, - fn = config.fn || config.handler, - scope = config.scope; - - if (config.stopEvent) { - this.stopEvent = config.stopEvent; - } - - if(typeof keyCode == "string"){ - var ks = []; - var keyString = keyCode.toUpperCase(); - for(var j = 0, len = keyString.length; j < len; j++){ - ks.push(keyString.charCodeAt(j)); - } - keyCode = ks; - } - var keyArray = Ext.isArray(keyCode); - - var handler = function(e){ - if((!shift || e.shiftKey) && (!ctrl || e.ctrlKey) && (!alt || e.altKey)){ - var k = e.getKey(); - if(keyArray){ - for(var i = 0, len = keyCode.length; i < len; i++){ - if(keyCode[i] == k){ - if(this.stopEvent){ - e.stopEvent(); - } - fn.call(scope || window, k, e); - return; - } - } - }else{ - if(k == keyCode){ - if(this.stopEvent){ - e.stopEvent(); - } - fn.call(scope || window, k, e); - } - } - } - }; - this.bindings.push(handler); - }, - - - on : function(key, fn, scope){ - var keyCode, shift, ctrl, alt; - if(typeof key == "object" && !Ext.isArray(key)){ - keyCode = key.key; - shift = key.shift; - ctrl = key.ctrl; - alt = key.alt; - }else{ - keyCode = key; - } - this.addBinding({ - key: keyCode, - shift: shift, - ctrl: ctrl, - alt: alt, - fn: fn, - scope: scope - }) - }, - + }, - handleKeyDown : function(e){ - if(this.enabled){ - var b = this.bindings; - for(var i = 0, len = b.length; i < len; i++){ - b[i].call(this, e); - } - } - }, - - - isEnabled : function(){ - return this.enabled; - }, - - - enable: function(){ - if(!this.enabled){ - this.el.on(this.eventName, this.handleKeyDown, this); - this.enabled = true; - } - }, - - - disable: function(){ - if(this.enabled){ - this.el.removeListener(this.eventName, this.handleKeyDown, this); - this.enabled = false; - } - } + + setDisabled : function(disabled){ + this[disabled ? "disable" : "enable"](); + } }; - Ext.util.TextMetrics = function(){ var shared; return { @@ -7679,4582 +10994,94 @@ Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){ return instance; }; -Ext.Element.measureText = Ext.util.TextMetrics.measure; - - -(function() { - -var Event=Ext.EventManager; -var Dom=Ext.lib.Dom; - - -Ext.dd.DragDrop = function(id, sGroup, config) { - if(id) { - this.init(id, sGroup, config); - } -}; - -Ext.dd.DragDrop.prototype = { - - - id: null, - - - config: null, - - - dragElId: null, - - - handleElId: null, - - - invalidHandleTypes: null, - - - invalidHandleIds: null, - - - invalidHandleClasses: null, - - - startPageX: 0, - - - startPageY: 0, - - - groups: null, - - - locked: false, - - - lock: function() { this.locked = true; }, - - - unlock: function() { this.locked = false; }, - - - isTarget: true, - - - padding: null, - - - _domRef: null, - - - __ygDragDrop: true, - - - constrainX: false, - - - constrainY: false, - - - minX: 0, - - - maxX: 0, - - - minY: 0, - - - maxY: 0, - - - maintainOffset: false, - - - xTicks: null, - - - yTicks: null, - - - primaryButtonOnly: true, - - - available: false, - - - hasOuterHandles: false, - - - b4StartDrag: function(x, y) { }, - - - startDrag: function(x, y) { }, - - - b4Drag: function(e) { }, - - - onDrag: function(e) { }, - - - onDragEnter: function(e, id) { }, - - - b4DragOver: function(e) { }, - - - onDragOver: function(e, id) { }, - - - b4DragOut: function(e) { }, - - - onDragOut: function(e, id) { }, - - - b4DragDrop: function(e) { }, - - - onDragDrop: function(e, id) { }, - - - onInvalidDrop: function(e) { }, - - - b4EndDrag: function(e) { }, - - - endDrag: function(e) { }, - - - b4MouseDown: function(e) { }, - - - onMouseDown: function(e) { }, - - - onMouseUp: function(e) { }, - - - onAvailable: function () { - }, - - - defaultPadding : {left:0, right:0, top:0, bottom:0}, - - - constrainTo : function(constrainTo, pad, inContent){ - if(typeof pad == "number"){ - pad = {left: pad, right:pad, top:pad, bottom:pad}; - } - pad = pad || this.defaultPadding; - var b = Ext.get(this.getEl()).getBox(); - var ce = Ext.get(constrainTo); - var s = ce.getScroll(); - var c, cd = ce.dom; - if(cd == document.body){ - c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()}; - }else{ - var xy = ce.getXY(); - c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight}; - } - - - var topSpace = b.y - c.y; - var leftSpace = b.x - c.x; - - this.resetConstraints(); - this.setXConstraint(leftSpace - (pad.left||0), - c.width - leftSpace - b.width - (pad.right||0), - this.xTickSize - ); - this.setYConstraint(topSpace - (pad.top||0), - c.height - topSpace - b.height - (pad.bottom||0), - this.yTickSize - ); - }, - - - getEl: function() { - if (!this._domRef) { - this._domRef = Ext.getDom(this.id); - } - - return this._domRef; - }, - - - getDragEl: function() { - return Ext.getDom(this.dragElId); - }, - - - init: function(id, sGroup, config) { - this.initTarget(id, sGroup, config); - Event.on(this.id, "mousedown", this.handleMouseDown, this); - - }, - - - initTarget: function(id, sGroup, config) { - - - this.config = config || {}; - - - this.DDM = Ext.dd.DDM; - - this.groups = {}; - - - - if (typeof id !== "string") { - id = Ext.id(id); - } - - - this.id = id; - - - this.addToGroup((sGroup) ? sGroup : "default"); - - - - this.handleElId = id; - - - this.setDragElId(id); - - - this.invalidHandleTypes = { A: "A" }; - this.invalidHandleIds = {}; - this.invalidHandleClasses = []; - - this.applyConfig(); - - this.handleOnAvailable(); - }, - - - applyConfig: function() { - - - - this.padding = this.config.padding || [0, 0, 0, 0]; - this.isTarget = (this.config.isTarget !== false); - this.maintainOffset = (this.config.maintainOffset); - this.primaryButtonOnly = (this.config.primaryButtonOnly !== false); - - }, - - - handleOnAvailable: function() { - this.available = true; - this.resetConstraints(); - this.onAvailable(); - }, - - - setPadding: function(iTop, iRight, iBot, iLeft) { - - if (!iRight && 0 !== iRight) { - this.padding = [iTop, iTop, iTop, iTop]; - } else if (!iBot && 0 !== iBot) { - this.padding = [iTop, iRight, iTop, iRight]; - } else { - this.padding = [iTop, iRight, iBot, iLeft]; - } - }, - - - setInitPosition: function(diffX, diffY) { - var el = this.getEl(); - - if (!this.DDM.verifyEl(el)) { - return; - } - - var dx = diffX || 0; - var dy = diffY || 0; - - var p = Dom.getXY( el ); - - this.initPageX = p[0] - dx; - this.initPageY = p[1] - dy; - - this.lastPageX = p[0]; - this.lastPageY = p[1]; - - - this.setStartPosition(p); - }, - - - setStartPosition: function(pos) { - var p = pos || Dom.getXY( this.getEl() ); - this.deltaSetXY = null; - - this.startPageX = p[0]; - this.startPageY = p[1]; - }, - - - addToGroup: function(sGroup) { - this.groups[sGroup] = true; - this.DDM.regDragDrop(this, sGroup); - }, - - - removeFromGroup: function(sGroup) { - if (this.groups[sGroup]) { - delete this.groups[sGroup]; - } - - this.DDM.removeDDFromGroup(this, sGroup); - }, - - - setDragElId: function(id) { - this.dragElId = id; - }, - - - setHandleElId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - this.handleElId = id; - this.DDM.regHandle(this.id, id); - }, - - - setOuterHandleElId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - Event.on(id, "mousedown", - this.handleMouseDown, this); - this.setHandleElId(id); - - this.hasOuterHandles = true; - }, - - - unreg: function() { - Event.un(this.id, "mousedown", - this.handleMouseDown); - this._domRef = null; - this.DDM._remove(this); - }, - - destroy : function(){ - this.unreg(); - }, - - - isLocked: function() { - return (this.DDM.isLocked() || this.locked); - }, - - - handleMouseDown: function(e, oDD){ - if (this.primaryButtonOnly && e.button != 0) { - return; - } - - if (this.isLocked()) { - return; - } - - this.DDM.refreshCache(this.groups); - - var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e)); - if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) ) { - } else { - if (this.clickValidator(e)) { - - - this.setStartPosition(); - - - this.b4MouseDown(e); - this.onMouseDown(e); - - this.DDM.handleMouseDown(e, this); - - this.DDM.stopEvent(e); - } else { - - - } - } - }, - - clickValidator: function(e) { - var target = e.getTarget(); - return ( this.isValidHandleChild(target) && - (this.id == this.handleElId || - this.DDM.handleWasClicked(target, this.id)) ); - }, - - - addInvalidHandleType: function(tagName) { - var type = tagName.toUpperCase(); - this.invalidHandleTypes[type] = type; - }, - - - addInvalidHandleId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - this.invalidHandleIds[id] = id; - }, - - - addInvalidHandleClass: function(cssClass) { - this.invalidHandleClasses.push(cssClass); - }, - - - removeInvalidHandleType: function(tagName) { - var type = tagName.toUpperCase(); - - delete this.invalidHandleTypes[type]; - }, - - - removeInvalidHandleId: function(id) { - if (typeof id !== "string") { - id = Ext.id(id); - } - delete this.invalidHandleIds[id]; - }, - - - removeInvalidHandleClass: function(cssClass) { - for (var i=0, len=this.invalidHandleClasses.length; i= this.minX; i = i - iTickSize) { - if (!tickMap[i]) { - this.xTicks[this.xTicks.length] = i; - tickMap[i] = true; - } - } - - for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) { - if (!tickMap[i]) { - this.xTicks[this.xTicks.length] = i; - tickMap[i] = true; - } - } - - this.xTicks.sort(this.DDM.numericSort) ; - }, - - - setYTicks: function(iStartY, iTickSize) { - this.yTicks = []; - this.yTickSize = iTickSize; - - var tickMap = {}; - - for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) { - if (!tickMap[i]) { - this.yTicks[this.yTicks.length] = i; - tickMap[i] = true; - } - } - - for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) { - if (!tickMap[i]) { - this.yTicks[this.yTicks.length] = i; - tickMap[i] = true; - } - } - - this.yTicks.sort(this.DDM.numericSort) ; - }, - - - setXConstraint: function(iLeft, iRight, iTickSize) { - this.leftConstraint = iLeft; - this.rightConstraint = iRight; - - this.minX = this.initPageX - iLeft; - this.maxX = this.initPageX + iRight; - if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); } - - this.constrainX = true; - }, - - - clearConstraints: function() { - this.constrainX = false; - this.constrainY = false; - this.clearTicks(); - }, - - - clearTicks: function() { - this.xTicks = null; - this.yTicks = null; - this.xTickSize = 0; - this.yTickSize = 0; - }, - - - setYConstraint: function(iUp, iDown, iTickSize) { - this.topConstraint = iUp; - this.bottomConstraint = iDown; - - this.minY = this.initPageY - iUp; - this.maxY = this.initPageY + iDown; - if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); } - - this.constrainY = true; - - }, - - - resetConstraints: function() { - - - - if (this.initPageX || this.initPageX === 0) { - - var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0; - var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0; - - this.setInitPosition(dx, dy); - - - } else { - this.setInitPosition(); - } - - if (this.constrainX) { - this.setXConstraint( this.leftConstraint, - this.rightConstraint, - this.xTickSize ); - } - - if (this.constrainY) { - this.setYConstraint( this.topConstraint, - this.bottomConstraint, - this.yTickSize ); - } - }, - - - getTick: function(val, tickArray) { - - if (!tickArray) { - - - return val; - } else if (tickArray[0] >= val) { - - - return tickArray[0]; - } else { - for (var i=0, len=tickArray.length; i= val) { - var diff1 = val - tickArray[i]; - var diff2 = tickArray[next] - val; - return (diff2 > diff1) ? tickArray[i] : tickArray[next]; - } - } - - - - return tickArray[tickArray.length - 1]; - } - }, - - - toString: function() { - return ("DragDrop " + this.id); - } - -}; - -})(); - - - - -if (!Ext.dd.DragDropMgr) { - - -Ext.dd.DragDropMgr = function() { - - var Event = Ext.EventManager; - - return { - - - ids: {}, - - - handleIds: {}, - - - dragCurrent: null, - - - dragOvers: {}, - - - deltaX: 0, - - - deltaY: 0, - - - preventDefault: true, - - - stopPropagation: true, - - - initialized: false, - - - locked: false, - - - init: function() { - this.initialized = true; - }, - - - POINT: 0, - - - INTERSECT: 1, - - - mode: 0, - - - _execOnAll: function(sMethod, args) { - for (var i in this.ids) { - for (var j in this.ids[i]) { - var oDD = this.ids[i][j]; - if (! this.isTypeOfDD(oDD)) { - continue; - } - oDD[sMethod].apply(oDD, args); - } - } - }, - - - _onLoad: function() { - - this.init(); - - - Event.on(document, "mouseup", this.handleMouseUp, this, true); - Event.on(document, "mousemove", this.handleMouseMove, this, true); - Event.on(window, "unload", this._onUnload, this, true); - Event.on(window, "resize", this._onResize, this, true); - - - }, - - - _onResize: function(e) { - this._execOnAll("resetConstraints", []); - }, - - - lock: function() { this.locked = true; }, - - - unlock: function() { this.locked = false; }, - - - isLocked: function() { return this.locked; }, - - - locationCache: {}, - - - useCache: true, - - - clickPixelThresh: 3, - - - clickTimeThresh: 350, - - - dragThreshMet: false, - - - clickTimeout: null, - - - startX: 0, - - - startY: 0, - - - regDragDrop: function(oDD, sGroup) { - if (!this.initialized) { this.init(); } - - if (!this.ids[sGroup]) { - this.ids[sGroup] = {}; - } - this.ids[sGroup][oDD.id] = oDD; - }, - - - removeDDFromGroup: function(oDD, sGroup) { - if (!this.ids[sGroup]) { - this.ids[sGroup] = {}; - } - - var obj = this.ids[sGroup]; - if (obj && obj[oDD.id]) { - delete obj[oDD.id]; - } - }, - - - _remove: function(oDD) { - for (var g in oDD.groups) { - if (g && this.ids[g][oDD.id]) { - delete this.ids[g][oDD.id]; - } - } - delete this.handleIds[oDD.id]; - }, - - - regHandle: function(sDDId, sHandleId) { - if (!this.handleIds[sDDId]) { - this.handleIds[sDDId] = {}; - } - this.handleIds[sDDId][sHandleId] = sHandleId; - }, - - - isDragDrop: function(id) { - return ( this.getDDById(id) ) ? true : false; - }, - - - getRelated: function(p_oDD, bTargetsOnly) { - var oDDs = []; - for (var i in p_oDD.groups) { - for (j in this.ids[i]) { - var dd = this.ids[i][j]; - if (! this.isTypeOfDD(dd)) { - continue; - } - if (!bTargetsOnly || dd.isTarget) { - oDDs[oDDs.length] = dd; - } - } - } - - return oDDs; - }, - - - isLegalTarget: function (oDD, oTargetDD) { - var targets = this.getRelated(oDD, true); - for (var i=0, len=targets.length;i this.clickPixelThresh || - diffY > this.clickPixelThresh) { - this.startDrag(this.startX, this.startY); - } - } - - if (this.dragThreshMet) { - this.dragCurrent.b4Drag(e); - this.dragCurrent.onDrag(e); - if(!this.dragCurrent.moveOnly){ - this.fireEvents(e, false); - } - } - - this.stopEvent(e); - - return true; - }, - - - fireEvents: function(e, isDrop) { - var dc = this.dragCurrent; - - - - if (!dc || dc.isLocked()) { - return; - } - - var pt = e.getPoint(); - - - var oldOvers = []; - - var outEvts = []; - var overEvts = []; - var dropEvts = []; - var enterEvts = []; - - - - for (var i in this.dragOvers) { - - var ddo = this.dragOvers[i]; - - if (! this.isTypeOfDD(ddo)) { - continue; - } - - if (! this.isOverTarget(pt, ddo, this.mode)) { - outEvts.push( ddo ); - } - - oldOvers[i] = true; - delete this.dragOvers[i]; - } - - for (var sGroup in dc.groups) { - - if ("string" != typeof sGroup) { - continue; - } - - for (i in this.ids[sGroup]) { - var oDD = this.ids[sGroup][i]; - if (! this.isTypeOfDD(oDD)) { - continue; - } - - if (oDD.isTarget && !oDD.isLocked() && oDD != dc) { - if (this.isOverTarget(pt, oDD, this.mode)) { - - if (isDrop) { - dropEvts.push( oDD ); - - } else { - - - if (!oldOvers[oDD.id]) { - enterEvts.push( oDD ); - - } else { - overEvts.push( oDD ); - } - - this.dragOvers[oDD.id] = oDD; - } - } - } - } - } - - if (this.mode) { - if (outEvts.length) { - dc.b4DragOut(e, outEvts); - dc.onDragOut(e, outEvts); - } - - if (enterEvts.length) { - dc.onDragEnter(e, enterEvts); - } - - if (overEvts.length) { - dc.b4DragOver(e, overEvts); - dc.onDragOver(e, overEvts); - } - - if (dropEvts.length) { - dc.b4DragDrop(e, dropEvts); - dc.onDragDrop(e, dropEvts); - } - - } else { - - var len = 0; - for (i=0, len=outEvts.length; i 2000) { - } else { - setTimeout(DDM._addListeners, 10); - if (document && document.body) { - DDM._timeoutCount += 1; - } - } - } - }, - - - handleWasClicked: function(node, id) { - if (this.isHandle(id, node.id)) { - return true; - } else { - - var p = node.parentNode; - - while (p) { - if (this.isHandle(id, p.id)) { - return true; - } else { - p = p.parentNode; - } - } - } - - return false; - } - - }; - -}(); - - -Ext.dd.DDM = Ext.dd.DragDropMgr; -Ext.dd.DDM._addListeners(); - -} - - -Ext.dd.DD = function(id, sGroup, config) { - if (id) { - this.init(id, sGroup, config); - } -}; - -Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { - - - scroll: true, - - - autoOffset: function(iPageX, iPageY) { - var x = iPageX - this.startPageX; - var y = iPageY - this.startPageY; - this.setDelta(x, y); - }, - - - setDelta: function(iDeltaX, iDeltaY) { - this.deltaX = iDeltaX; - this.deltaY = iDeltaY; - }, - - - setDragElPos: function(iPageX, iPageY) { - - - - var el = this.getDragEl(); - this.alignElWithMouse(el, iPageX, iPageY); - }, - - - alignElWithMouse: function(el, iPageX, iPageY) { - var oCoord = this.getTargetCoord(iPageX, iPageY); - var fly = el.dom ? el : Ext.fly(el, '_dd'); - if (!this.deltaSetXY) { - var aCoord = [oCoord.x, oCoord.y]; - fly.setXY(aCoord); - var newLeft = fly.getLeft(true); - var newTop = fly.getTop(true); - this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ]; - } else { - fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]); - } - - this.cachePosition(oCoord.x, oCoord.y); - this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth); - return oCoord; - }, - - - cachePosition: function(iPageX, iPageY) { - if (iPageX) { - this.lastPageX = iPageX; - this.lastPageY = iPageY; - } else { - var aCoord = Ext.lib.Dom.getXY(this.getEl()); - this.lastPageX = aCoord[0]; - this.lastPageY = aCoord[1]; - } - }, - - - autoScroll: function(x, y, h, w) { - - if (this.scroll) { - - var clientH = Ext.lib.Dom.getViewHeight(); - - - var clientW = Ext.lib.Dom.getViewWidth(); - - - var st = this.DDM.getScrollTop(); - - - var sl = this.DDM.getScrollLeft(); - - - var bot = h + y; - - - var right = w + x; - - - - - var toBot = (clientH + st - y - this.deltaY); - - - var toRight = (clientW + sl - x - this.deltaX); - - - - - var thresh = 40; - - - - - var scrAmt = (document.all) ? 80 : 30; - - - - if ( bot > clientH && toBot < thresh ) { - window.scrollTo(sl, st + scrAmt); - } - - - - if ( y < st && st > 0 && y - st < thresh ) { - window.scrollTo(sl, st - scrAmt); - } - - - - if ( right > clientW && toRight < thresh ) { - window.scrollTo(sl + scrAmt, st); - } - - - - if ( x < sl && sl > 0 && x - sl < thresh ) { - window.scrollTo(sl - scrAmt, st); - } - } - }, - - - getTargetCoord: function(iPageX, iPageY) { - - - var x = iPageX - this.deltaX; - var y = iPageY - this.deltaY; - - if (this.constrainX) { - if (x < this.minX) { x = this.minX; } - if (x > this.maxX) { x = this.maxX; } - } - - if (this.constrainY) { - if (y < this.minY) { y = this.minY; } - if (y > this.maxY) { y = this.maxY; } - } - - x = this.getTick(x, this.xTicks); - y = this.getTick(y, this.yTicks); - - - return {x:x, y:y}; - }, - - - applyConfig: function() { - Ext.dd.DD.superclass.applyConfig.call(this); - this.scroll = (this.config.scroll !== false); - }, - - - b4MouseDown: function(e) { - - this.autoOffset(e.getPageX(), - e.getPageY()); - }, - - - b4Drag: function(e) { - this.setDragElPos(e.getPageX(), - e.getPageY()); - }, - - toString: function() { - return ("DD " + this.id); - } - +Ext.Element.addMethods({ - - - - -}); - -Ext.dd.DDProxy = function(id, sGroup, config) { - if (id) { - this.init(id, sGroup, config); - this.initFrame(); - } -}; - - -Ext.dd.DDProxy.dragElId = "ygddfdiv"; - -Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, { - - - resizeFrame: true, - - - centerFrame: false, - - - createFrame: function() { - var self = this; - var body = document.body; - - if (!body || !body.firstChild) { - setTimeout( function() { self.createFrame(); }, 50 ); - return; - } - - var div = this.getDragEl(); - - if (!div) { - div = document.createElement("div"); - div.id = this.dragElId; - var s = div.style; - - s.position = "absolute"; - s.visibility = "hidden"; - s.cursor = "move"; - s.border = "2px solid #aaa"; - s.zIndex = 999; - - - - - body.insertBefore(div, body.firstChild); - } - }, - - - initFrame: function() { - this.createFrame(); - }, - - applyConfig: function() { - Ext.dd.DDProxy.superclass.applyConfig.call(this); - - this.resizeFrame = (this.config.resizeFrame !== false); - this.centerFrame = (this.config.centerFrame); - this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId); - }, - - - showFrame: function(iPageX, iPageY) { - var el = this.getEl(); - var dragEl = this.getDragEl(); - var s = dragEl.style; - - this._resizeProxy(); - - if (this.centerFrame) { - this.setDelta( Math.round(parseInt(s.width, 10)/2), - Math.round(parseInt(s.height, 10)/2) ); - } - - this.setDragElPos(iPageX, iPageY); - - Ext.fly(dragEl).show(); - }, - - - _resizeProxy: function() { - if (this.resizeFrame) { - var el = this.getEl(); - Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight); - } - }, - - - b4MouseDown: function(e) { - var x = e.getPageX(); - var y = e.getPageY(); - this.autoOffset(x, y); - this.setDragElPos(x, y); - }, - - - b4StartDrag: function(x, y) { - - this.showFrame(x, y); - }, - - - b4EndDrag: function(e) { - Ext.fly(this.getDragEl()).hide(); - }, - - - - - endDrag: function(e) { - - var lel = this.getEl(); - var del = this.getDragEl(); - - - del.style.visibility = ""; - - this.beforeMove(); - - - lel.style.visibility = "hidden"; - Ext.dd.DDM.moveToEl(lel, del); - del.style.visibility = "hidden"; - lel.style.visibility = ""; - - this.afterDrag(); - }, - - beforeMove : function(){ - - }, - - afterDrag : function(){ - - }, - - toString: function() { - return ("DDProxy " + this.id); - } - -}); - -Ext.dd.DDTarget = function(id, sGroup, config) { - if (id) { - this.initTarget(id, sGroup, config); - } -}; - - -Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { - toString: function() { - return ("DDTarget " + this.id); - } -}); - -Ext.dd.DragTracker = function(config){ - Ext.apply(this, config); - this.addEvents( - 'mousedown', - 'mouseup', - 'mousemove', - 'dragstart', - 'dragend', - 'drag' - ); - - this.dragRegion = new Ext.lib.Region(0,0,0,0); - - if(this.el){ - this.initEl(this.el); - } -} - -Ext.extend(Ext.dd.DragTracker, Ext.util.Observable, { - active: false, - tolerance: 5, - autoStart: false, - - initEl: function(el){ - this.el = Ext.get(el); - el.on('mousedown', this.onMouseDown, this, - this.delegate ? {delegate: this.delegate} : undefined); - }, - - destroy : function(){ - this.el.un('mousedown', this.onMouseDown, this); - }, - - onMouseDown: function(e, target){ - if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){ - this.startXY = this.lastXY = e.getXY(); - this.dragTarget = this.delegate ? target : this.el.dom; - e.preventDefault(); - var doc = Ext.getDoc(); - doc.on('mouseup', this.onMouseUp, this); - doc.on('mousemove', this.onMouseMove, this); - doc.on('selectstart', this.stopSelect, this); - if(this.autoStart){ - this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this); - } - } - }, - - onMouseMove: function(e, target){ - e.preventDefault(); - var xy = e.getXY(), s = this.startXY; - this.lastXY = xy; - if(!this.active){ - if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){ - this.triggerStart(); - }else{ - return; - } - } - this.fireEvent('mousemove', this, e); - this.onDrag(e); - this.fireEvent('drag', this, e); - }, - - onMouseUp: function(e){ - var doc = Ext.getDoc(); - doc.un('mousemove', this.onMouseMove, this); - doc.un('mouseup', this.onMouseUp, this); - doc.un('selectstart', this.stopSelect, this); - e.preventDefault(); - this.clearStart(); - this.active = false; - delete this.elRegion; - this.fireEvent('mouseup', this, e); - this.onEnd(e); - this.fireEvent('dragend', this, e); - }, - - triggerStart: function(isTimer){ - this.clearStart(); - this.active = true; - this.onStart(this.startXY); - this.fireEvent('dragstart', this, this.startXY); - }, - - clearStart : function(){ - if(this.timer){ - clearTimeout(this.timer); - delete this.timer; - } - }, - - stopSelect : function(e){ - e.stopEvent(); - return false; - }, - - onBeforeStart : function(e){ - - }, - - onStart : function(xy){ - - }, - - onDrag : function(e){ - - }, - - onEnd : function(e){ - - }, - - getDragTarget : function(){ - return this.dragTarget; - }, - - getDragCt : function(){ - return this.el; - }, - - getXY : function(constrain){ - return constrain ? - this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY; - }, - - getOffset : function(constrain){ - var xy = this.getXY(constrain); - var s = this.startXY; - return [s[0]-xy[0], s[1]-xy[1]]; - }, - - constrainModes: { - 'point' : function(xy){ - - if(!this.elRegion){ - this.elRegion = this.getDragCt().getRegion(); - } - - var dr = this.dragRegion; - - dr.left = xy[0]; - dr.top = xy[1]; - dr.right = xy[0]; - dr.bottom = xy[1]; - - dr.constrainTo(this.elRegion); - - return [dr.left, dr.top]; - } - } -}); - -Ext.dd.ScrollManager = function(){ - var ddm = Ext.dd.DragDropMgr; - var els = {}; - var dragEl = null; - var proc = {}; - - var onStop = function(e){ - dragEl = null; - clearProc(); - }; - - var triggerRefresh = function(){ - if(ddm.dragCurrent){ - ddm.refreshCache(ddm.dragCurrent.groups); - } - }; - - var doScroll = function(){ - if(ddm.dragCurrent){ - var dds = Ext.dd.ScrollManager; - var inc = proc.el.ddScrollConfig ? - proc.el.ddScrollConfig.increment : dds.increment; - if(!dds.animate){ - if(proc.el.scroll(proc.dir, inc)){ - triggerRefresh(); - } - }else{ - proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh); - } - } - }; - - var clearProc = function(){ - if(proc.id){ - clearInterval(proc.id); - } - proc.id = 0; - proc.el = null; - proc.dir = ""; - }; - - var startProc = function(el, dir){ - clearProc(); - proc.el = el; - proc.dir = dir; - var freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) ? - el.ddScrollConfig.frequency : Ext.dd.ScrollManager.frequency; - proc.id = setInterval(doScroll, freq); - }; - - var onFire = function(e, isDrop){ - if(isDrop || !ddm.dragCurrent){ return; } - var dds = Ext.dd.ScrollManager; - if(!dragEl || dragEl != ddm.dragCurrent){ - dragEl = ddm.dragCurrent; - - dds.refreshCache(); - } - - var xy = Ext.lib.Event.getXY(e); - var pt = new Ext.lib.Point(xy[0], xy[1]); - for(var id in els){ - var el = els[id], r = el._region; - var c = el.ddScrollConfig ? el.ddScrollConfig : dds; - if(r && r.contains(pt) && el.isScrollable()){ - if(r.bottom - pt.y <= c.vthresh){ - if(proc.el != el){ - startProc(el, "down"); - } - return; - }else if(r.right - pt.x <= c.hthresh){ - if(proc.el != el){ - startProc(el, "left"); - } - return; - }else if(pt.y - r.top <= c.vthresh){ - if(proc.el != el){ - startProc(el, "up"); - } - return; - }else if(pt.x - r.left <= c.hthresh){ - if(proc.el != el){ - startProc(el, "right"); - } - return; - } - } - } - clearProc(); - }; - - ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm); - ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm); - - return { - - register : function(el){ - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++) { - this.register(el[i]); - } - }else{ - el = Ext.get(el); - els[el.id] = el; - } - }, - - - unregister : function(el){ - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++) { - this.unregister(el[i]); - } - }else{ - el = Ext.get(el); - delete els[el.id]; - } - }, - - - vthresh : 25, - - hthresh : 25, - - - increment : 100, - - - frequency : 500, - - - animate: true, - - - animDuration: .4, - - - refreshCache : function(){ - for(var id in els){ - if(typeof els[id] == 'object'){ - els[id]._region = els[id].getRegion(); - } - } - } - }; -}(); - -Ext.dd.Registry = function(){ - var elements = {}; - var handles = {}; - var autoIdSeed = 0; - - var getId = function(el, autogen){ - if(typeof el == "string"){ - return el; - } - var id = el.id; - if(!id && autogen !== false){ - id = "extdd-" + (++autoIdSeed); - el.id = id; - } - return id; - }; - - return { - - register : function(el, data){ - data = data || {}; - if(typeof el == "string"){ - el = document.getElementById(el); - } - data.ddel = el; - elements[getId(el)] = data; - if(data.isHandle !== false){ - handles[data.ddel.id] = data; - } - if(data.handles){ - var hs = data.handles; - for(var i = 0, len = hs.length; i < len; i++){ - handles[getId(hs[i])] = data; - } - } - }, - - - unregister : function(el){ - var id = getId(el, false); - var data = elements[id]; - if(data){ - delete elements[id]; - if(data.handles){ - var hs = data.handles; - for(var i = 0, len = hs.length; i < len; i++){ - delete handles[getId(hs[i], false)]; - } - } - } - }, - - - getHandle : function(id){ - if(typeof id != "string"){ - id = id.id; - } - return handles[id]; - }, - - - getHandleFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e); - return t ? handles[t.id] : null; - }, - - - getTarget : function(id){ - if(typeof id != "string"){ - id = id.id; - } - return elements[id]; - }, - - - getTargetFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e); - return t ? elements[t.id] || handles[t.id] : null; - } - }; -}(); - -Ext.dd.StatusProxy = function(config){ - Ext.apply(this, config); - this.id = this.id || Ext.id(); - this.el = new Ext.Layer({ - dh: { - id: this.id, tag: "div", cls: "x-dd-drag-proxy "+this.dropNotAllowed, children: [ - {tag: "div", cls: "x-dd-drop-icon"}, - {tag: "div", cls: "x-dd-drag-ghost"} - ] - }, - shadow: !config || config.shadow !== false - }); - this.ghost = Ext.get(this.el.dom.childNodes[1]); - this.dropStatus = this.dropNotAllowed; -}; - -Ext.dd.StatusProxy.prototype = { - - dropAllowed : "x-dd-drop-ok", - - dropNotAllowed : "x-dd-drop-nodrop", - - - setStatus : function(cssClass){ - cssClass = cssClass || this.dropNotAllowed; - if(this.dropStatus != cssClass){ - this.el.replaceClass(this.dropStatus, cssClass); - this.dropStatus = cssClass; - } - }, - - - reset : function(clearGhost){ - this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed; - this.dropStatus = this.dropNotAllowed; - if(clearGhost){ - this.ghost.update(""); - } - }, - - - update : function(html){ - if(typeof html == "string"){ - this.ghost.update(html); - }else{ - this.ghost.update(""); - html.style.margin = "0"; - this.ghost.dom.appendChild(html); - } - var el = this.ghost.dom.firstChild; - if(el){ - Ext.fly(el).setStyle(Ext.isIE ? 'styleFloat' : 'cssFloat', 'none'); - } - }, - - - getEl : function(){ - return this.el; - }, - - - getGhost : function(){ - return this.ghost; - }, - - - hide : function(clear){ - this.el.hide(); - if(clear){ - this.reset(true); - } - }, - - - stop : function(){ - if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){ - this.anim.stop(); - } - }, - - - show : function(){ - this.el.show(); - }, - - - sync : function(){ - this.el.sync(); - }, - - - repair : function(xy, callback, scope){ - this.callback = callback; - this.scope = scope; - if(xy && this.animRepair !== false){ - this.el.addClass("x-dd-drag-repair"); - this.el.hideUnders(true); - this.anim = this.el.shift({ - duration: this.repairDuration || .5, - easing: 'easeOut', - xy: xy, - stopFx: true, - callback: this.afterRepair, - scope: this - }); - }else{ - this.afterRepair(); - } - }, - - - afterRepair : function(){ - this.hide(true); - if(typeof this.callback == "function"){ - this.callback.call(this.scope || this); - } - this.callback = null; - this.scope = null; - } -}; - -Ext.dd.DragSource = function(el, config){ - this.el = Ext.get(el); - if(!this.dragData){ - this.dragData = {}; - } - - Ext.apply(this, config); - - if(!this.proxy){ - this.proxy = new Ext.dd.StatusProxy(); - } - Ext.dd.DragSource.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, - {dragElId : this.proxy.id, resizeFrame: false, isTarget: false, scroll: this.scroll === true}); - - this.dragging = false; -}; - -Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, { - - - dropAllowed : "x-dd-drop-ok", - - dropNotAllowed : "x-dd-drop-nodrop", - - - getDragData : function(e){ - return this.dragData; - }, - - - onDragEnter : function(e, id){ - var target = Ext.dd.DragDropMgr.getDDById(id); - this.cachedTarget = target; - if(this.beforeDragEnter(target, e, id) !== false){ - if(target.isNotifyTarget){ - var status = target.notifyEnter(this, e, this.dragData); - this.proxy.setStatus(status); - }else{ - this.proxy.setStatus(this.dropAllowed); - } - - if(this.afterDragEnter){ - - this.afterDragEnter(target, e, id); - } - } - }, - - - beforeDragEnter : function(target, e, id){ - return true; - }, - - - alignElWithMouse: function() { - Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments); - this.proxy.sync(); - }, - - - onDragOver : function(e, id){ - var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); - if(this.beforeDragOver(target, e, id) !== false){ - if(target.isNotifyTarget){ - var status = target.notifyOver(this, e, this.dragData); - this.proxy.setStatus(status); - } - - if(this.afterDragOver){ - - this.afterDragOver(target, e, id); - } - } - }, - - - beforeDragOver : function(target, e, id){ - return true; - }, - - - onDragOut : function(e, id){ - var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); - if(this.beforeDragOut(target, e, id) !== false){ - if(target.isNotifyTarget){ - target.notifyOut(this, e, this.dragData); - } - this.proxy.reset(); - if(this.afterDragOut){ - - this.afterDragOut(target, e, id); - } - } - this.cachedTarget = null; - }, - - - beforeDragOut : function(target, e, id){ - return true; - }, - - - onDragDrop : function(e, id){ - var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); - if(this.beforeDragDrop(target, e, id) !== false){ - if(target.isNotifyTarget){ - if(target.notifyDrop(this, e, this.dragData)){ - this.onValidDrop(target, e, id); - }else{ - this.onInvalidDrop(target, e, id); - } - }else{ - this.onValidDrop(target, e, id); - } - - if(this.afterDragDrop){ - - this.afterDragDrop(target, e, id); - } - } - delete this.cachedTarget; - }, - - - beforeDragDrop : function(target, e, id){ - return true; - }, - - - onValidDrop : function(target, e, id){ - this.hideProxy(); - if(this.afterValidDrop){ - - this.afterValidDrop(target, e, id); - } - }, - - - getRepairXY : function(e, data){ - return this.el.getXY(); - }, - - - onInvalidDrop : function(target, e, id){ - this.beforeInvalidDrop(target, e, id); - if(this.cachedTarget){ - if(this.cachedTarget.isNotifyTarget){ - this.cachedTarget.notifyOut(this, e, this.dragData); - } - this.cacheTarget = null; - } - this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this); - - if(this.afterInvalidDrop){ - - this.afterInvalidDrop(e, id); - } - }, - - - afterRepair : function(){ - if(Ext.enableFx){ - this.el.highlight(this.hlColor || "c3daf9"); - } - this.dragging = false; - }, - - - beforeInvalidDrop : function(target, e, id){ - return true; - }, - - - handleMouseDown : function(e){ - if(this.dragging) { - return; - } - var data = this.getDragData(e); - if(data && this.onBeforeDrag(data, e) !== false){ - this.dragData = data; - this.proxy.stop(); - Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments); - } - }, - - - onBeforeDrag : function(data, e){ - return true; - }, - - - onStartDrag : Ext.emptyFn, - - - startDrag : function(x, y){ - this.proxy.reset(); - this.dragging = true; - this.proxy.update(""); - this.onInitDrag(x, y); - this.proxy.show(); - }, - - - onInitDrag : function(x, y){ - var clone = this.el.dom.cloneNode(true); - clone.id = Ext.id(); - this.proxy.update(clone); - this.onStartDrag(x, y); - return true; - }, - - - getProxy : function(){ - return this.proxy; - }, - - - hideProxy : function(){ - this.proxy.hide(); - this.proxy.reset(true); - this.dragging = false; - }, - - - triggerCacheRefresh : function(){ - Ext.dd.DDM.refreshCache(this.groups); - }, - - - b4EndDrag: function(e) { - }, - - - endDrag : function(e){ - this.onEndDrag(this.dragData, e); - }, - - - onEndDrag : function(data, e){ - }, - - - autoOffset : function(x, y) { - this.setDelta(-12, -20); - } -}); - -Ext.dd.DropTarget = function(el, config){ - this.el = Ext.get(el); - - Ext.apply(this, config); - - if(this.containerScroll){ - Ext.dd.ScrollManager.register(this.el); - } - - Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, - {isTarget: true}); - -}; - -Ext.extend(Ext.dd.DropTarget, Ext.dd.DDTarget, { - - - - dropAllowed : "x-dd-drop-ok", - - dropNotAllowed : "x-dd-drop-nodrop", - - - isTarget : true, - - - isNotifyTarget : true, - - - notifyEnter : function(dd, e, data){ - if(this.overClass){ - this.el.addClass(this.overClass); - } - return this.dropAllowed; - }, - - - notifyOver : function(dd, e, data){ - return this.dropAllowed; - }, - - - notifyOut : function(dd, e, data){ - if(this.overClass){ - this.el.removeClass(this.overClass); - } - }, - - - notifyDrop : function(dd, e, data){ - return false; - } -}); - -Ext.dd.DragZone = function(el, config){ - Ext.dd.DragZone.superclass.constructor.call(this, el, config); - if(this.containerScroll){ - Ext.dd.ScrollManager.register(this.el); - } -}; - -Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, { - - - - - getDragData : function(e){ - return Ext.dd.Registry.getHandleFromEvent(e); - }, - - - onInitDrag : function(x, y){ - this.proxy.update(this.dragData.ddel.cloneNode(true)); - this.onStartDrag(x, y); - return true; - }, - - - afterRepair : function(){ - if(Ext.enableFx){ - Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); - } - this.dragging = false; - }, - - - getRepairXY : function(e){ - return Ext.Element.fly(this.dragData.ddel).getXY(); - } -}); - -Ext.dd.DropZone = function(el, config){ - Ext.dd.DropZone.superclass.constructor.call(this, el, config); -}; - -Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, { - - getTargetFromEvent : function(e){ - return Ext.dd.Registry.getTargetFromEvent(e); - }, - - - onNodeEnter : function(n, dd, e, data){ - - }, - - - onNodeOver : function(n, dd, e, data){ - return this.dropAllowed; - }, - - - onNodeOut : function(n, dd, e, data){ - - }, - - - onNodeDrop : function(n, dd, e, data){ - return false; - }, - - - onContainerOver : function(dd, e, data){ - return this.dropNotAllowed; - }, - - - onContainerDrop : function(dd, e, data){ - return false; - }, - - - notifyEnter : function(dd, e, data){ - return this.dropNotAllowed; - }, - - - notifyOver : function(dd, e, data){ - var n = this.getTargetFromEvent(e); - if(!n){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - this.lastOverNode = null; - } - return this.onContainerOver(dd, e, data); - } - if(this.lastOverNode != n){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - } - this.onNodeEnter(n, dd, e, data); - this.lastOverNode = n; - } - return this.onNodeOver(n, dd, e, data); - }, - - - notifyOut : function(dd, e, data){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - this.lastOverNode = null; - } - }, - - - notifyDrop : function(dd, e, data){ - if(this.lastOverNode){ - this.onNodeOut(this.lastOverNode, dd, e, data); - this.lastOverNode = null; - } - var n = this.getTargetFromEvent(e); - return n ? - this.onNodeDrop(n, dd, e, data) : - this.onContainerDrop(dd, e, data); - }, - - - triggerCacheRefresh : function(){ - Ext.dd.DDM.refreshCache(this.groups); - } -}); - - -Ext.data.SortTypes = { - - none : function(s){ - return s; - }, - - - stripTagsRE : /<\/?[^>]+>/gi, - - - asText : function(s){ - return String(s).replace(this.stripTagsRE, ""); - }, - - - asUCText : function(s){ - return String(s).toUpperCase().replace(this.stripTagsRE, ""); - }, - - - asUCString : function(s) { - return String(s).toUpperCase(); - }, - - - asDate : function(s) { - if(!s){ - return 0; - } - if(Ext.isDate(s)){ - return s.getTime(); - } - return Date.parse(String(s)); - }, - - - asFloat : function(s) { - var val = parseFloat(String(s).replace(/,/g, "")); - if(isNaN(val)) val = 0; - return val; - }, - - - asInt : function(s) { - var val = parseInt(String(s).replace(/,/g, "")); - if(isNaN(val)) val = 0; - return val; - } -}; - -Ext.data.Record = function(data, id){ - this.id = (id || id === 0) ? id : ++Ext.data.Record.AUTO_ID; - this.data = data; -}; - - -Ext.data.Record.create = function(o){ - var f = Ext.extend(Ext.data.Record, {}); - var p = f.prototype; - p.fields = new Ext.util.MixedCollection(false, function(field){ - return field.name; - }); - for(var i = 0, len = o.length; i < len; i++){ - p.fields.add(new Ext.data.Field(o[i])); + getTextWidth : function(text, min, max){ + return (Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width).constrain(min || 0, max || 1000000); } - f.getField = function(name){ - return p.fields.get(name); - }; - return f; -}; - -Ext.data.Record.AUTO_ID = 1000; -Ext.data.Record.EDIT = 'edit'; -Ext.data.Record.REJECT = 'reject'; -Ext.data.Record.COMMIT = 'commit'; - -Ext.data.Record.prototype = { - - - - dirty : false, - editing : false, - error: null, - - modified: null, - - join : function(store){ - this.store = store; - }, +}); +Ext.util.Cookies = { set : function(name, value){ - if(String(this.data[name]) == String(value)){ - return; - } - this.dirty = true; - if(!this.modified){ - this.modified = {}; - } - if(typeof this.modified[name] == 'undefined'){ - this.modified[name] = this.data[name]; - } - this.data[name] = value; - if(!this.editing && this.store){ - this.store.afterEdit(this); - } + var argv = arguments; + var argc = arguments.length; + var expires = (argc > 2) ? argv[2] : null; + var path = (argc > 3) ? argv[3] : '/'; + var domain = (argc > 4) ? argv[4] : null; + var secure = (argc > 5) ? argv[5] : false; + document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : ""); }, get : function(name){ - return this.data[name]; - }, - - - beginEdit : function(){ - this.editing = true; - this.modified = {}; - }, - - - cancelEdit : function(){ - this.editing = false; - delete this.modified; - }, - - - endEdit : function(){ - this.editing = false; - if(this.dirty && this.store){ - this.store.afterEdit(this); - } - }, - - - reject : function(silent){ - var m = this.modified; - for(var n in m){ - if(typeof m[n] != "function"){ - this.data[n] = m[n]; + var arg = name + "="; + var alen = arg.length; + var clen = document.cookie.length; + var i = 0; + var j = 0; + while(i < clen){ + j = i + alen; + if(document.cookie.substring(i, j) == arg){ + return Ext.util.Cookies.getCookieVal(j); + } + i = document.cookie.indexOf(" ", i) + 1; + if(i === 0){ + break; } } - this.dirty = false; - delete this.modified; - this.editing = false; - if(this.store && silent !== true){ - this.store.afterReject(this); + return null; + }, + + + clear : function(name){ + if(Ext.util.Cookies.get(name)){ + document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } }, - - commit : function(silent){ - this.dirty = false; - delete this.modified; - this.editing = false; - if(this.store && silent !== true){ - this.store.afterCommit(this); + getCookieVal : function(offset){ + var endstr = document.cookie.indexOf(";", offset); + if(endstr == -1){ + endstr = document.cookie.length; } - }, - - - getChanges : function(){ - var m = this.modified, cs = {}; - for(var n in m){ - if(m.hasOwnProperty(n)){ - cs[n] = this.data[n]; - } - } - return cs; - }, - - hasError : function(){ - return this.error != null; - }, - - clearError : function(){ - this.error = null; - }, - - - copy : function(newId) { - return new this.constructor(Ext.apply({}, this.data), newId || this.id); - }, - - - isModified : function(fieldName){ - return !!(this.modified && this.modified.hasOwnProperty(fieldName)); + return unescape(document.cookie.substring(offset, endstr)); } }; - -Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), { - - - - register : function(){ - for(var i = 0, s; s = arguments[i]; i++){ - this.add(s); - } - }, - - - unregister : function(){ - for(var i = 0, s; s = arguments[i]; i++){ - this.remove(this.lookup(s)); - } - }, - - - lookup : function(id){ - return typeof id == "object" ? id : this.get(id); - }, - - getKey : function(o){ - return o.storeId || o.id; - } -}); - -Ext.data.Store = function(config){ - this.data = new Ext.util.MixedCollection(false); - this.data.getKey = function(o){ - return o.id; - }; - - this.baseParams = {}; - this.paramNames = { - "start" : "start", - "limit" : "limit", - "sort" : "sort", - "dir" : "dir" - }; - - if(config && config.data){ - this.inlineData = config.data; - delete config.data; - } - - Ext.apply(this, config); - - if(this.url && !this.proxy){ - this.proxy = new Ext.data.HttpProxy({url: this.url}); - } - - if(this.reader){ if(!this.recordType){ - this.recordType = this.reader.recordType; - } - if(this.reader.onMetaChange){ - this.reader.onMetaChange = this.onMetaChange.createDelegate(this); - } - } - - if(this.recordType){ - this.fields = this.recordType.prototype.fields; - } - this.modified = []; - - this.addEvents( - - 'datachanged', - - 'metachange', - - 'add', - - 'remove', - - 'update', - - 'clear', - - 'beforeload', - - 'load', - - 'loadexception' - ); - - if(this.proxy){ - this.relayEvents(this.proxy, ["loadexception"]); - } - - this.sortToggle = {}; - if(this.sortInfo){ - this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); - } - - Ext.data.Store.superclass.constructor.call(this); - - if(this.storeId || this.id){ - Ext.StoreMgr.register(this); - } - if(this.inlineData){ - this.loadData(this.inlineData); - delete this.inlineData; - }else if(this.autoLoad){ - this.load.defer(10, this, [ - typeof this.autoLoad == 'object' ? - this.autoLoad : undefined]); - } +Ext.handleError = function(e) { + throw e; }; -Ext.extend(Ext.data.Store, Ext.util.Observable, { - - - - - - - - - - remoteSort : false, - - pruneModifiedRecords : false, +Ext.Error = function(message) { - lastOptions : null, + this.message = (this.lang[message]) ? this.lang[message] : message; +}; - destroy : function(){ - if(this.id){ - Ext.StoreMgr.unregister(this); - } - this.data = null; - this.purgeListeners(); +Ext.Error.prototype = new Error(); +Ext.apply(Ext.Error.prototype, { + + lang: {}, + + name: 'Ext.Error', + + getName : function() { + return this.name; }, - - add : function(records){ - records = [].concat(records); - if(records.length < 1){ - return; - } - for(var i = 0, len = records.length; i < len; i++){ - records[i].join(this); - } - var index = this.data.length; - this.data.addAll(records); - if(this.snapshot){ - this.snapshot.addAll(records); - } - this.fireEvent("add", this, records, index); + getMessage : function() { + return this.message; }, - - addSorted : function(record){ - var index = this.findInsertIndex(record); - this.insert(index, record); - }, - - - remove : function(record){ - var index = this.data.indexOf(record); - this.data.removeAt(index); - if(this.pruneModifiedRecords){ - this.modified.remove(record); - } - if(this.snapshot){ - this.snapshot.remove(record); - } - this.fireEvent("remove", this, record, index); - }, - - - removeAll : function(){ - this.data.clear(); - if(this.snapshot){ - this.snapshot.clear(); - } - if(this.pruneModifiedRecords){ - this.modified = []; - } - this.fireEvent("clear", this); - }, - - - insert : function(index, records){ - records = [].concat(records); - for(var i = 0, len = records.length; i < len; i++){ - this.data.insert(index, records[i]); - records[i].join(this); - } - this.fireEvent("add", this, records, index); - }, - - - indexOf : function(record){ - return this.data.indexOf(record); - }, - - - indexOfId : function(id){ - return this.data.indexOfKey(id); - }, - - - getById : function(id){ - return this.data.key(id); - }, - - - getAt : function(index){ - return this.data.itemAt(index); - }, - - - getRange : function(start, end){ - return this.data.getRange(start, end); - }, - - storeOptions : function(o){ - o = Ext.apply({}, o); - delete o.callback; - delete o.scope; - this.lastOptions = o; - }, - - - load : function(options){ - options = options || {}; - if(this.fireEvent("beforeload", this, options) !== false){ - this.storeOptions(options); - var p = Ext.apply(options.params || {}, this.baseParams); - if(this.sortInfo && this.remoteSort){ - var pn = this.paramNames; - p[pn["sort"]] = this.sortInfo.field; - p[pn["dir"]] = this.sortInfo.direction; - } - this.proxy.load(p, this.reader, this.loadRecords, this, options); - return true; - } else { - return false; - } - }, - - - reload : function(options){ - this.load(Ext.applyIf(options||{}, this.lastOptions)); - }, - - loadRecords : function(o, options, success){ - if(!o || success === false){ - if(success !== false){ - this.fireEvent("load", this, [], options); - } - if(options.callback){ - options.callback.call(options.scope || this, [], options, false); - } - return; - } - var r = o.records, t = o.totalRecords || r.length; - if(!options || options.add !== true){ - if(this.pruneModifiedRecords){ - this.modified = []; - } - for(var i = 0, len = r.length; i < len; i++){ - r[i].join(this); - } - if(this.snapshot){ - this.data = this.snapshot; - delete this.snapshot; - } - this.data.clear(); - this.data.addAll(r); - this.totalLength = t; - this.applySort(); - this.fireEvent("datachanged", this); - }else{ - this.totalLength = Math.max(t, this.data.length+r.length); - this.add(r); - } - this.fireEvent("load", this, r, options); - if(options.callback){ - options.callback.call(options.scope || this, r, options, true); - } - }, - - - loadData : function(o, append){ - var r = this.reader.readRecords(o); - this.loadRecords(r, {add: append}, true); - }, - - - getCount : function(){ - return this.data.length || 0; - }, - - - getTotalCount : function(){ - return this.totalLength || 0; - }, - - - getSortState : function(){ - return this.sortInfo; - }, - - applySort : function(){ - if(this.sortInfo && !this.remoteSort){ - var s = this.sortInfo, f = s.field; - this.sortData(f, s.direction); - } - }, - - sortData : function(f, direction){ - direction = direction || 'ASC'; - var st = this.fields.get(f).sortType; - var fn = function(r1, r2){ - var v1 = st(r1.data[f]), v2 = st(r2.data[f]); - return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); - }; - this.data.sort(direction, fn); - if(this.snapshot && this.snapshot != this.data){ - this.snapshot.sort(direction, fn); - } - }, - - - setDefaultSort : function(field, dir){ - dir = dir ? dir.toUpperCase() : "ASC"; - this.sortInfo = {field: field, direction: dir}; - this.sortToggle[field] = dir; - }, - - - sort : function(fieldName, dir){ - var f = this.fields.get(fieldName); - if(!f){ - return false; - } - if(!dir){ - if(this.sortInfo && this.sortInfo.field == f.name){ dir = (this.sortToggle[f.name] || "ASC").toggle("ASC", "DESC"); - }else{ - dir = f.sortDir; - } - } - var st = (this.sortToggle) ? this.sortToggle[f.name] : null; - var si = (this.sortInfo) ? this.sortInfo : null; - - this.sortToggle[f.name] = dir; - this.sortInfo = {field: f.name, direction: dir}; - if(!this.remoteSort){ - this.applySort(); - this.fireEvent("datachanged", this); - }else{ - if (!this.load(this.lastOptions)) { - if (st) { - this.sortToggle[f.name] = st; - } - if (si) { - this.sortInfo = si; - } - } - } - }, - - - each : function(fn, scope){ - this.data.each(fn, scope); - }, - - - getModifiedRecords : function(){ - return this.modified; - }, - - createFilterFn : function(property, value, anyMatch, caseSensitive){ - if(Ext.isEmpty(value, false)){ - return false; - } - value = this.data.createValueMatcher(value, anyMatch, caseSensitive); - return function(r){ - return value.test(r.data[property]); - }; - }, - - - sum : function(property, start, end){ - var rs = this.data.items, v = 0; - start = start || 0; - end = (end || end === 0) ? end : rs.length-1; - - for(var i = start; i <= end; i++){ - v += (rs[i].data[property] || 0); - } - return v; - }, - - - filter : function(property, value, anyMatch, caseSensitive){ - var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); - return fn ? this.filterBy(fn) : this.clearFilter(); - }, - - - filterBy : function(fn, scope){ - this.snapshot = this.snapshot || this.data; - this.data = this.queryBy(fn, scope||this); - this.fireEvent("datachanged", this); - }, - - - query : function(property, value, anyMatch, caseSensitive){ - var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); - return fn ? this.queryBy(fn) : this.data.clone(); - }, - - - queryBy : function(fn, scope){ - var data = this.snapshot || this.data; - return data.filterBy(fn, scope||this); - }, - - - find : function(property, value, start, anyMatch, caseSensitive){ - var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); - return fn ? this.data.findIndexBy(fn, null, start) : -1; - }, - - - findBy : function(fn, scope, start){ - return this.data.findIndexBy(fn, scope, start); - }, - - - collect : function(dataIndex, allowNull, bypassFilter){ - var d = (bypassFilter === true && this.snapshot) ? - this.snapshot.items : this.data.items; - var v, sv, r = [], l = {}; - for(var i = 0, len = d.length; i < len; i++){ - v = d[i].data[dataIndex]; - sv = String(v); - if((allowNull || !Ext.isEmpty(v)) && !l[sv]){ - l[sv] = true; - r[r.length] = v; - } - } - return r; - }, - - - clearFilter : function(suppressEvent){ - if(this.isFiltered()){ - this.data = this.snapshot; - delete this.snapshot; - if(suppressEvent !== true){ - this.fireEvent("datachanged", this); - } - } - }, - - - isFiltered : function(){ - return this.snapshot && this.snapshot != this.data; - }, - - afterEdit : function(record){ - if(this.modified.indexOf(record) == -1){ - this.modified.push(record); - } - this.fireEvent("update", this, record, Ext.data.Record.EDIT); - }, - - afterReject : function(record){ - this.modified.remove(record); - this.fireEvent("update", this, record, Ext.data.Record.REJECT); - }, - - afterCommit : function(record){ - this.modified.remove(record); - this.fireEvent("update", this, record, Ext.data.Record.COMMIT); - }, - - - commitChanges : function(){ - var m = this.modified.slice(0); - this.modified = []; - for(var i = 0, len = m.length; i < len; i++){ - m[i].commit(); - } - }, - - - rejectChanges : function(){ - var m = this.modified.slice(0); - this.modified = []; - for(var i = 0, len = m.length; i < len; i++){ - m[i].reject(); - } - }, - - onMetaChange : function(meta, rtype, o){ - this.recordType = rtype; - this.fields = rtype.prototype.fields; - delete this.snapshot; - this.sortInfo = meta.sortInfo; - this.modified = []; - this.fireEvent('metachange', this, this.reader.meta); - }, - - findInsertIndex : function(record){ - this.suspendEvents(); - var data = this.data.clone(); - this.data.add(record); - this.applySort(); - var index = this.data.indexOf(record); - this.data = data; - this.resumeEvents(); - return index; + toJson : function() { + return Ext.encode(this); } }); -Ext.data.SimpleStore = function(config){ - Ext.data.SimpleStore.superclass.constructor.call(this, Ext.apply(config, { - reader: new Ext.data.ArrayReader({ - id: config.id - }, - Ext.data.Record.create(config.fields) - ) - })); -}; -Ext.extend(Ext.data.SimpleStore, Ext.data.Store, { - loadData : function(data, append){ - if(this.expandData === true){ - var r = []; - for(var i = 0, len = data.length; i < len; i++){ - r[r.length] = [data[i]]; - } - data = r; - } - Ext.data.SimpleStore.superclass.loadData.call(this, data, append); - } -}); - -Ext.data.JsonStore = function(c){ - - - Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(c, { - proxy: c.proxy || (!c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined), - reader: new Ext.data.JsonReader(c, c.fields) - })); -}; -Ext.extend(Ext.data.JsonStore, Ext.data.Store); - - - -Ext.data.Field = function(config){ - if(typeof config == "string"){ - config = {name: config}; - } - Ext.apply(this, config); - - if(!this.type){ - this.type = "auto"; - } - - var st = Ext.data.SortTypes; - - if(typeof this.sortType == "string"){ - this.sortType = st[this.sortType]; - } - - - if(!this.sortType){ - switch(this.type){ - case "string": - this.sortType = st.asUCString; - break; - case "date": - this.sortType = st.asDate; - break; - default: - this.sortType = st.none; - } - } - - - var stripRe = /[\$,%]/g; - - - - if(!this.convert){ - var cv, dateFormat = this.dateFormat; - switch(this.type){ - case "": - case "auto": - case undefined: - cv = function(v){ return v; }; - break; - case "string": - cv = function(v){ return (v === undefined || v === null) ? '' : String(v); }; - break; - case "int": - cv = function(v){ - return v !== undefined && v !== null && v !== '' ? - parseInt(String(v).replace(stripRe, ""), 10) : ''; - }; - break; - case "float": - cv = function(v){ - return v !== undefined && v !== null && v !== '' ? - parseFloat(String(v).replace(stripRe, ""), 10) : ''; - }; - break; - case "bool": - case "boolean": - cv = function(v){ return v === true || v === "true" || v == 1; }; - break; - case "date": - cv = function(v){ - if(!v){ - return ''; - } - if(Ext.isDate(v)){ - return v; - } - if(dateFormat){ - if(dateFormat == "timestamp"){ - return new Date(v*1000); - } - if(dateFormat == "time"){ - return new Date(parseInt(v, 10)); - } - return Date.parseDate(v, dateFormat); - } - var parsed = Date.parse(v); - return parsed ? new Date(parsed) : null; - }; - break; - - } - this.convert = cv; - } -}; - -Ext.data.Field.prototype = { - dateFormat: null, - defaultValue: "", - mapping: null, - sortType : null, - sortDir : "ASC" -}; - -Ext.data.DataReader = function(meta, recordType){ - - this.meta = meta; - this.recordType = Ext.isArray(recordType) ? - Ext.data.Record.create(recordType) : recordType; -}; - -Ext.data.DataReader.prototype = { - -}; - -Ext.data.DataProxy = function(){ - this.addEvents( - - 'beforeload', - - 'load' - ); - Ext.data.DataProxy.superclass.constructor.call(this); -}; - -Ext.extend(Ext.data.DataProxy, Ext.util.Observable); - -Ext.data.MemoryProxy = function(data){ - Ext.data.MemoryProxy.superclass.constructor.call(this); - this.data = data; -}; - -Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, { - - - - load : function(params, reader, callback, scope, arg){ - params = params || {}; - var result; - try { - result = reader.readRecords(this.data); - }catch(e){ - this.fireEvent("loadexception", this, arg, null, e); - callback.call(scope, null, arg, false); - return; - } - callback.call(scope, result, arg, true); - }, - - - update : function(params, records){ - - } -}); - -Ext.data.HttpProxy = function(conn){ - Ext.data.HttpProxy.superclass.constructor.call(this); - - this.conn = conn; - this.useAjax = !conn || !conn.events; - - -}; - -Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { - - getConnection : function(){ - return this.useAjax ? Ext.Ajax : this.conn; - }, - - - load : function(params, reader, callback, scope, arg){ - if(this.fireEvent("beforeload", this, params) !== false){ - var o = { - params : params || {}, - request: { - callback : callback, - scope : scope, - arg : arg - }, - reader: reader, - callback : this.loadResponse, - scope: this - }; - if(this.useAjax){ - Ext.applyIf(o, this.conn); - if(this.activeRequest){ - Ext.Ajax.abort(this.activeRequest); - } - this.activeRequest = Ext.Ajax.request(o); - }else{ - this.conn.request(o); - } - }else{ - callback.call(scope||this, null, arg, false); - } - }, - - - loadResponse : function(o, success, response){ - delete this.activeRequest; - if(!success){ - this.fireEvent("loadexception", this, o, response); - o.request.callback.call(o.request.scope, null, o.request.arg, false); - return; - } - var result; - try { - result = o.reader.read(response); - }catch(e){ - this.fireEvent("loadexception", this, o, response, e); - o.request.callback.call(o.request.scope, null, o.request.arg, false); - return; - } - this.fireEvent("load", this, o, o.request.arg); - o.request.callback.call(o.request.scope, result, o.request.arg, true); - }, - - - update : function(dataSet){ - - }, - - - updateResponse : function(dataSet){ - - } -}); - -Ext.data.ScriptTagProxy = function(config){ - Ext.data.ScriptTagProxy.superclass.constructor.call(this); - Ext.apply(this, config); - this.head = document.getElementsByTagName("head")[0]; - - -}; - -Ext.data.ScriptTagProxy.TRANS_ID = 1000; - -Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, { - - - timeout : 30000, - - callbackParam : "callback", - - nocache : true, - - - load : function(params, reader, callback, scope, arg){ - if(this.fireEvent("beforeload", this, params) !== false){ - - var p = Ext.urlEncode(Ext.apply(params, this.extraParams)); - - var url = this.url; - url += (url.indexOf("?") != -1 ? "&" : "?") + p; - if(this.nocache){ - url += "&_dc=" + (new Date().getTime()); - } - var transId = ++Ext.data.ScriptTagProxy.TRANS_ID; - var trans = { - id : transId, - cb : "stcCallback"+transId, - scriptId : "stcScript"+transId, - params : params, - arg : arg, - url : url, - callback : callback, - scope : scope, - reader : reader - }; - var conn = this; - - window[trans.cb] = function(o){ - conn.handleResponse(o, trans); - }; - - url += String.format("&{0}={1}", this.callbackParam, trans.cb); - - if(this.autoAbort !== false){ - this.abort(); - } - - trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]); - - var script = document.createElement("script"); - script.setAttribute("src", url); - script.setAttribute("type", "text/javascript"); - script.setAttribute("id", trans.scriptId); - this.head.appendChild(script); - - this.trans = trans; - }else{ - callback.call(scope||this, null, arg, false); - } - }, - - - isLoading : function(){ - return this.trans ? true : false; - }, - - - abort : function(){ - if(this.isLoading()){ - this.destroyTrans(this.trans); - } - }, - - - destroyTrans : function(trans, isLoaded){ - this.head.removeChild(document.getElementById(trans.scriptId)); - clearTimeout(trans.timeoutId); - if(isLoaded){ - window[trans.cb] = undefined; - try{ - delete window[trans.cb]; - }catch(e){} - }else{ - - window[trans.cb] = function(){ - window[trans.cb] = undefined; - try{ - delete window[trans.cb]; - }catch(e){} - }; - } - }, - - - handleResponse : function(o, trans){ - this.trans = false; - this.destroyTrans(trans, true); - var result; - try { - result = trans.reader.readRecords(o); - }catch(e){ - this.fireEvent("loadexception", this, o, trans.arg, e); - trans.callback.call(trans.scope||window, null, trans.arg, false); - return; - } - this.fireEvent("load", this, o, trans.arg); - trans.callback.call(trans.scope||window, result, trans.arg, true); - }, - - - handleFailure : function(trans){ - this.trans = false; - this.destroyTrans(trans, false); - this.fireEvent("loadexception", this, null, trans.arg); - trans.callback.call(trans.scope||window, null, trans.arg, false); - } -}); - -Ext.data.JsonReader = function(meta, recordType){ - meta = meta || {}; - Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields); -}; -Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { - - - read : function(response){ - var json = response.responseText; - var o = eval("("+json+")"); - if(!o) { - throw {message: "JsonReader.read: Json object not found"}; - } - return this.readRecords(o); - }, - - onMetaChange : function(meta, recordType, o){ - - }, - - - simpleAccess: function(obj, subsc) { - return obj[subsc]; - }, - - - getJsonAccessor: function(){ - var re = /[\[\.]/; - return function(expr) { - try { - return(re.test(expr)) - ? new Function("obj", "return obj." + expr) - : function(obj){ - return obj[expr]; - }; - } catch(e){} - return Ext.emptyFn; - }; - }(), - - - readRecords : function(o){ - - this.jsonData = o; - if(o.metaData){ - delete this.ef; - this.meta = o.metaData; - this.recordType = Ext.data.Record.create(o.metaData.fields); - this.onMetaChange(this.meta, this.recordType, o); - } - var s = this.meta, Record = this.recordType, - f = Record.prototype.fields, fi = f.items, fl = f.length; - - if (!this.ef) { - if(s.totalProperty) { - this.getTotal = this.getJsonAccessor(s.totalProperty); - } - if(s.successProperty) { - this.getSuccess = this.getJsonAccessor(s.successProperty); - } - this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;}; - if (s.id) { - var g = this.getJsonAccessor(s.id); - this.getId = function(rec) { - var r = g(rec); - return (r === undefined || r === "") ? null : r; - }; - } else { - this.getId = function(){return null;}; - } - this.ef = []; - for(var i = 0; i < fl; i++){ - f = fi[i]; - var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; - this.ef[i] = this.getJsonAccessor(map); - } - } - - var root = this.getRoot(o), c = root.length, totalRecords = c, success = true; - if(s.totalProperty){ - var v = parseInt(this.getTotal(o), 10); - if(!isNaN(v)){ - totalRecords = v; - } - } - if(s.successProperty){ - var v = this.getSuccess(o); - if(v === false || v === 'false'){ - success = false; - } - } - var records = []; - for(var i = 0; i < c; i++){ - var n = root[i]; - var values = {}; - var id = this.getId(n); - for(var j = 0; j < fl; j++){ - f = fi[j]; - var v = this.ef[j](n); - values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, n); - } - var record = new Record(values, id); - record.json = n; - records[i] = record; - } - return { - success : success, - records : records, - totalRecords : totalRecords - }; - } -}); - -Ext.data.XmlReader = function(meta, recordType){ - meta = meta || {}; - Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields); -}; -Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { - - read : function(response){ - var doc = response.responseXML; - if(!doc) { - throw {message: "XmlReader.read: XML Document not available"}; - } - return this.readRecords(doc); - }, - - - readRecords : function(doc){ - - this.xmlData = doc; - var root = doc.documentElement || doc; - var q = Ext.DomQuery; - var recordType = this.recordType, fields = recordType.prototype.fields; - var sid = this.meta.id; - var totalRecords = 0, success = true; - if(this.meta.totalRecords){ - totalRecords = q.selectNumber(this.meta.totalRecords, root, 0); - } - - if(this.meta.success){ - var sv = q.selectValue(this.meta.success, root, true); - success = sv !== false && sv !== 'false'; - } - var records = []; - var ns = q.select(this.meta.record, root); - for(var i = 0, len = ns.length; i < len; i++) { - var n = ns[i]; - var values = {}; - var id = sid ? q.selectValue(sid, n) : undefined; - for(var j = 0, jlen = fields.length; j < jlen; j++){ - var f = fields.items[j]; - var v = q.selectValue(f.mapping || f.name, n, f.defaultValue); - v = f.convert(v, n); - values[f.name] = v; - } - var record = new recordType(values, id); - record.node = n; - records[records.length] = record; - } - - return { - success : success, - records : records, - totalRecords : totalRecords || records.length - }; - } -}); - -Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { - - readRecords : function(o){ - var sid = this.meta ? this.meta.id : null; - var recordType = this.recordType, fields = recordType.prototype.fields; - var records = []; - var root = o; - for(var i = 0; i < root.length; i++){ - var n = root[i]; - var values = {}; - var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); - for(var j = 0, jlen = fields.length; j < jlen; j++){ - var f = fields.items[j]; - var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; - var v = n[k] !== undefined ? n[k] : f.defaultValue; - v = f.convert(v, n); - values[f.name] = v; - } - var record = new recordType(values, id); - record.json = n; - records[records.length] = record; - } - return { - records : records, - totalRecords : records.length - }; - } -}); - -Ext.data.Tree = function(root){ - this.nodeHash = {}; - - this.root = null; - if(root){ - this.setRootNode(root); - } - this.addEvents( - - "append", - - "remove", - - "move", - - "insert", - - "beforeappend", - - "beforeremove", - - "beforemove", - - "beforeinsert" - ); - - Ext.data.Tree.superclass.constructor.call(this); -}; - -Ext.extend(Ext.data.Tree, Ext.util.Observable, { - - pathSeparator: "/", - - - proxyNodeEvent : function(){ - return this.fireEvent.apply(this, arguments); - }, - - - getRootNode : function(){ - return this.root; - }, - - - setRootNode : function(node){ - this.root = node; - node.ownerTree = this; - node.isRoot = true; - this.registerNode(node); - return node; - }, - - - getNodeById : function(id){ - return this.nodeHash[id]; - }, - - - registerNode : function(node){ - this.nodeHash[node.id] = node; - }, - - - unregisterNode : function(node){ - delete this.nodeHash[node.id]; - }, - - toString : function(){ - return "[Tree"+(this.id?" "+this.id:"")+"]"; - } -}); - - -Ext.data.Node = function(attributes){ - - this.attributes = attributes || {}; - this.leaf = this.attributes.leaf; - - this.id = this.attributes.id; - if(!this.id){ - this.id = Ext.id(null, "ynode-"); - this.attributes.id = this.id; - } - - this.childNodes = []; - if(!this.childNodes.indexOf){ - this.childNodes.indexOf = function(o){ - for(var i = 0, len = this.length; i < len; i++){ - if(this[i] == o) return i; - } - return -1; - }; - } - - this.parentNode = null; - - this.firstChild = null; - - this.lastChild = null; - - this.previousSibling = null; - - this.nextSibling = null; - - this.addEvents({ - - "append" : true, - - "remove" : true, - - "move" : true, - - "insert" : true, - - "beforeappend" : true, - - "beforeremove" : true, - - "beforemove" : true, - - "beforeinsert" : true - }); - this.listeners = this.attributes.listeners; - Ext.data.Node.superclass.constructor.call(this); -}; - -Ext.extend(Ext.data.Node, Ext.util.Observable, { - - fireEvent : function(evtName){ - - if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){ - return false; - } - - var ot = this.getOwnerTree(); - if(ot){ - if(ot.proxyNodeEvent.apply(ot, arguments) === false){ - return false; - } - } - return true; - }, - - - isLeaf : function(){ - return this.leaf === true; - }, - - - setFirstChild : function(node){ - this.firstChild = node; - }, - - - setLastChild : function(node){ - this.lastChild = node; - }, - - - - isLast : function(){ - return (!this.parentNode ? true : this.parentNode.lastChild == this); - }, - - - isFirst : function(){ - return (!this.parentNode ? true : this.parentNode.firstChild == this); - }, - - - hasChildNodes : function(){ - return !this.isLeaf() && this.childNodes.length > 0; - }, - - - isExpandable : function(){ - return this.attributes.expandable || this.hasChildNodes(); - }, - - - appendChild : function(node){ - var multi = false; - if(Ext.isArray(node)){ - multi = node; - }else if(arguments.length > 1){ - multi = arguments; - } - - if(multi){ - for(var i = 0, len = multi.length; i < len; i++) { - this.appendChild(multi[i]); - } - }else{ - if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){ - return false; - } - var index = this.childNodes.length; - var oldParent = node.parentNode; - - if(oldParent){ - if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){ - return false; - } - oldParent.removeChild(node); - } - index = this.childNodes.length; - if(index == 0){ - this.setFirstChild(node); - } - this.childNodes.push(node); - node.parentNode = this; - var ps = this.childNodes[index-1]; - if(ps){ - node.previousSibling = ps; - ps.nextSibling = node; - }else{ - node.previousSibling = null; - } - node.nextSibling = null; - this.setLastChild(node); - node.setOwnerTree(this.getOwnerTree()); - this.fireEvent("append", this.ownerTree, this, node, index); - if(oldParent){ - node.fireEvent("move", this.ownerTree, node, oldParent, this, index); - } - return node; - } - }, - - - removeChild : function(node){ - var index = this.childNodes.indexOf(node); - if(index == -1){ - return false; - } - if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){ - return false; - } - - - this.childNodes.splice(index, 1); - - - if(node.previousSibling){ - node.previousSibling.nextSibling = node.nextSibling; - } - if(node.nextSibling){ - node.nextSibling.previousSibling = node.previousSibling; - } - - - if(this.firstChild == node){ - this.setFirstChild(node.nextSibling); - } - if(this.lastChild == node){ - this.setLastChild(node.previousSibling); - } - - node.setOwnerTree(null); - - node.parentNode = null; - node.previousSibling = null; - node.nextSibling = null; - this.fireEvent("remove", this.ownerTree, this, node); - return node; - }, - - - insertBefore : function(node, refNode){ - if(!refNode){ - return this.appendChild(node); - } - - if(node == refNode){ - return false; - } - - if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){ - return false; - } - var index = this.childNodes.indexOf(refNode); - var oldParent = node.parentNode; - var refIndex = index; - - - if(oldParent == this && this.childNodes.indexOf(node) < index){ - refIndex--; - } - - - if(oldParent){ - if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){ - return false; - } - oldParent.removeChild(node); - } - if(refIndex == 0){ - this.setFirstChild(node); - } - this.childNodes.splice(refIndex, 0, node); - node.parentNode = this; - var ps = this.childNodes[refIndex-1]; - if(ps){ - node.previousSibling = ps; - ps.nextSibling = node; - }else{ - node.previousSibling = null; - } - node.nextSibling = refNode; - refNode.previousSibling = node; - node.setOwnerTree(this.getOwnerTree()); - this.fireEvent("insert", this.ownerTree, this, node, refNode); - if(oldParent){ - node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode); - } - return node; - }, - - - remove : function(){ - this.parentNode.removeChild(this); - return this; - }, - - - item : function(index){ - return this.childNodes[index]; - }, - - - replaceChild : function(newChild, oldChild){ - this.insertBefore(newChild, oldChild); - this.removeChild(oldChild); - return oldChild; - }, - - - indexOf : function(child){ - return this.childNodes.indexOf(child); - }, - - - getOwnerTree : function(){ - - if(!this.ownerTree){ - var p = this; - while(p){ - if(p.ownerTree){ - this.ownerTree = p.ownerTree; - break; - } - p = p.parentNode; - } - } - return this.ownerTree; - }, - - - getDepth : function(){ - var depth = 0; - var p = this; - while(p.parentNode){ - ++depth; - p = p.parentNode; - } - return depth; - }, - - - setOwnerTree : function(tree){ - - if(tree != this.ownerTree){ - if(this.ownerTree){ - this.ownerTree.unregisterNode(this); - } - this.ownerTree = tree; - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].setOwnerTree(tree); - } - if(tree){ - tree.registerNode(this); - } - } - }, - - - getPath : function(attr){ - attr = attr || "id"; - var p = this.parentNode; - var b = [this.attributes[attr]]; - while(p){ - b.unshift(p.attributes[attr]); - p = p.parentNode; - } - var sep = this.getOwnerTree().pathSeparator; - return sep + b.join(sep); - }, - - - bubble : function(fn, scope, args){ - var p = this; - while(p){ - if(fn.apply(scope || p, args || [p]) === false){ - break; - } - p = p.parentNode; - } - }, - - - cascade : function(fn, scope, args){ - if(fn.apply(scope || this, args || [this]) !== false){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].cascade(fn, scope, args); - } - } - }, - - - eachChild : function(fn, scope, args){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - if(fn.apply(scope || this, args || [cs[i]]) === false){ - break; - } - } - }, - - - findChild : function(attribute, value){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - if(cs[i].attributes[attribute] == value){ - return cs[i]; - } - } - return null; - }, - - - findChildBy : function(fn, scope){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - if(fn.call(scope||cs[i], cs[i]) === true){ - return cs[i]; - } - } - return null; - }, - - - sort : function(fn, scope){ - var cs = this.childNodes; - var len = cs.length; - if(len > 0){ - var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn; - cs.sort(sortFn); - for(var i = 0; i < len; i++){ - var n = cs[i]; - n.previousSibling = cs[i-1]; - n.nextSibling = cs[i+1]; - if(i == 0){ - this.setFirstChild(n); - } - if(i == len-1){ - this.setLastChild(n); - } - } - } - }, - - - contains : function(node){ - return node.isAncestor(this); - }, - - - isAncestor : function(node){ - var p = this.parentNode; - while(p){ - if(p == node){ - return true; - } - p = p.parentNode; - } - return false; - }, - - toString : function(){ - return "[Node"+(this.id?" "+this.id:"")+"]"; - } -}); - -Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { - - - remoteGroup : false, - - groupOnSort:false, - - - clearGrouping : function(){ - this.groupField = false; - if(this.remoteGroup){ - if(this.baseParams){ - delete this.baseParams.groupBy; - } - this.reload(); - }else{ - this.applySort(); - this.fireEvent('datachanged', this); - } - }, - - - groupBy : function(field, forceRegroup){ - if(this.groupField == field && !forceRegroup){ - return; - } - this.groupField = field; - if(this.remoteGroup){ - if(!this.baseParams){ - this.baseParams = {}; - } - this.baseParams['groupBy'] = field; - } - if(this.groupOnSort){ - this.sort(field); - return; - } - if(this.remoteGroup){ - this.reload(); - }else{ - var si = this.sortInfo || {}; - if(si.field != field){ - this.applySort(); - }else{ - this.sortData(field); - } - this.fireEvent('datachanged', this); - } - }, - - - applySort : function(){ - Ext.data.GroupingStore.superclass.applySort.call(this); - if(!this.groupOnSort && !this.remoteGroup){ - var gs = this.getGroupState(); - if(gs && gs != this.sortInfo.field){ - this.sortData(this.groupField); - } - } - }, - - - applyGrouping : function(alwaysFireChange){ - if(this.groupField !== false){ - this.groupBy(this.groupField, true); - return true; - }else{ - if(alwaysFireChange === true){ - this.fireEvent('datachanged', this); - } - return false; - } - }, - - - getGroupState : function(){ - return this.groupOnSort && this.groupField !== false ? - (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; - } -}); - Ext.ComponentMgr = function(){ var all = new Ext.util.MixedCollection(); var types = {}; + var ptypes = {}; return { @@ -12284,6 +11111,22 @@ Ext.ComponentMgr = function(){ all : all, + + + types : types, + + + ptypes: ptypes, + + + isRegistered : function(xtype){ + return types[xtype] !== undefined; + }, + + + isPluginRegistered : function(ptype){ + return ptypes[ptype] !== undefined; + }, registerType : function(xtype, cls){ @@ -12293,20 +11136,42 @@ Ext.ComponentMgr = function(){ create : function(config, defaultType){ - return new types[config.xtype || defaultType](config); + return config.render ? config : new types[config.xtype || defaultType](config); + }, + + + registerPlugin : function(ptype, cls){ + ptypes[ptype] = cls; + cls.ptype = ptype; + }, + + + createPlugin : function(config, defaultType){ + var PluginCls = ptypes[config.ptype || defaultType]; + if (PluginCls.init) { + return PluginCls; + } else { + return new PluginCls(config); + } } }; }(); -Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down +Ext.reg = Ext.ComponentMgr.registerType; +Ext.preg = Ext.ComponentMgr.registerPlugin; + +Ext.create = Ext.ComponentMgr.create; Ext.Component = function(config){ config = config || {}; if(config.initialConfig){ - if(config.isAction){ this.baseAction = config; + if(config.isAction){ + this.baseAction = config; } - config = config.initialConfig; }else if(config.tagName || config.dom || typeof config == "string"){ config = {applyTo: config, id: config.id || config}; + config = config.initialConfig; + }else if(config.tagName || config.dom || Ext.isString(config)){ + config = {applyTo: config, id: config.id || config}; } @@ -12315,6 +11180,8 @@ Ext.Component = function(config){ Ext.apply(this, config); this.addEvents( + 'added', + 'disable', 'enable', @@ -12327,10 +11194,14 @@ Ext.Component = function(config){ 'hide', + 'removed', + 'beforerender', 'render', + 'afterrender', + 'beforedestroy', 'destroy', @@ -12364,7 +11235,7 @@ Ext.Component = function(config){ } if(this.stateful !== false){ - this.initState(config); + this.initState(); } if(this.applyTo){ @@ -12376,6 +11247,7 @@ Ext.Component = function(config){ } }; + Ext.Component.AUTO_ID = 1000; Ext.extend(Ext.Component, Ext.util.Observable, { @@ -12386,54 +11258,95 @@ Ext.extend(Ext.Component, Ext.util.Observable, { - - - - - - - - disabledClass : "x-item-disabled", - - allowDomMove : true, - - autoShow : false, - - hideMode: 'display', - - hideParent: false, - - hidden : false, + + + disabled : false, + hidden : false, + + + + + + + + autoEl : 'div', + + + disabledClass : 'x-item-disabled', + + allowDomMove : true, + + autoShow : false, + + hideMode : 'display', + + hideParent : false, + + + + + rendered : false, - ctype : "Ext.Component", + + - actionMode : "el", + - getActionEl : function(){ + + tplWriteMode : 'overwrite', + + + + + bubbleEvents: [], + + + + ctype : 'Ext.Component', + + + actionMode : 'el', + + + getActionEl : function(){ return this[this.actionMode]; }, initPlugin : function(p){ + if(p.ptype && !Ext.isFunction(p.init)){ + p = Ext.ComponentMgr.createPlugin(p); + }else if(Ext.isString(p)){ + p = Ext.ComponentMgr.createPlugin({ + ptype: p + }); + } p.init(this); return p; }, - initComponent : Ext.emptyFn, + initComponent : function(){ + + if(this.listeners){ + this.on(this.listeners); + delete this.listeners; + } + this.enableBubble(this.bubbleEvents); + }, render : function(container, position){ - if(!this.rendered && this.fireEvent("beforerender", this) !== false){ + if(!this.rendered && this.fireEvent('beforerender', this) !== false){ if(!container && this.el){ this.el = Ext.get(this.el); container = this.el.dom.parentNode; @@ -12445,7 +11358,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, { } this.rendered = true; if(position !== undefined){ - if(typeof position == 'number'){ + if(Ext.isNumber(position)){ position = this.container.dom.childNodes[position]; }else{ position = Ext.getDom(position); @@ -12463,35 +11376,131 @@ Ext.extend(Ext.Component, Ext.util.Observable, { this.el.applyStyles(this.style); delete this.style; } - this.fireEvent("render", this); + if(this.overCls){ + this.el.addClassOnOver(this.overCls); + } + this.fireEvent('render', this); + + + + + var contentTarget = this.getContentTarget(); + if (this.html){ + contentTarget.update(Ext.DomHelper.markup(this.html)); + delete this.html; + } + if (this.contentEl){ + var ce = Ext.getDom(this.contentEl); + Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']); + contentTarget.appendChild(ce); + } + if (this.tpl) { + if (!this.tpl.compile) { + this.tpl = new Ext.XTemplate(this.tpl); + } + if (this.data) { + this.tpl[this.tplWriteMode](contentTarget, this.data); + delete this.data; + } + } this.afterRender(this.container); + + if(this.hidden){ - this.hide(); + + this.doHide(); } if(this.disabled){ - this.disable(); + + this.disable(true); } if(this.stateful !== false){ this.initStateEvents(); } + this.fireEvent('afterrender', this); } return this; }, - initState : function(config){ + + + update: function(htmlOrData, loadScripts, cb) { + var contentTarget = this.getContentTarget(); + if (this.tpl && typeof htmlOrData !== "string") { + this.tpl[this.tplWriteMode](contentTarget, htmlOrData || {}); + } else { + var html = Ext.isObject(htmlOrData) ? Ext.DomHelper.markup(htmlOrData) : htmlOrData; + contentTarget.update(html, loadScripts, cb); + } + }, + + + + onAdded : function(container, pos) { + this.ownerCt = container; + this.initRef(); + this.fireEvent('added', this, container, pos); + }, + + + onRemoved : function() { + this.removeRef(); + this.fireEvent('removed', this, this.ownerCt); + delete this.ownerCt; + }, + + + initRef : function() { + + if(this.ref && !this.refOwner){ + var levels = this.ref.split('/'), + last = levels.length, + i = 0, + t = this; + + while(t && i < last){ + t = t.ownerCt; + ++i; + } + if(t){ + t[this.refName = levels[--i]] = this; + + this.refOwner = t; + } + } + }, + + removeRef : function() { + if (this.refOwner && this.refName) { + delete this.refOwner[this.refName]; + delete this.refOwner; + } + }, + + + initState : function(){ if(Ext.state.Manager){ - var state = Ext.state.Manager.get(this.stateId || this.id); - if(state){ - if(this.fireEvent('beforestaterestore', this, state) !== false){ - this.applyState(state); - this.fireEvent('staterestore', this, state); + var id = this.getStateId(); + if(id){ + var state = Ext.state.Manager.get(id); + if(state){ + if(this.fireEvent('beforestaterestore', this, state) !== false){ + this.applyState(Ext.apply({}, state)); + this.fireEvent('staterestore', this, state); + } } } } }, - initStateEvents : function(){ + + getStateId : function(){ + return this.stateId || ((/^(ext-comp-|ext-gen)/).test(String(this.id)) ? null : this.id); + }, + + + initStateEvents : function(){ if(this.stateEvents){ for(var i = 0, e; e = this.stateEvents[i]; i++){ this.on(e, this.saveState, this, {delay:100}); @@ -12499,22 +11508,28 @@ Ext.extend(Ext.Component, Ext.util.Observable, { } }, - applyState : function(state, config){ + + applyState : function(state){ if(state){ Ext.apply(this, state); } }, - getState : function(){ + + getState : function(){ return null; }, - saveState : function(){ - if(Ext.state.Manager){ - var state = this.getState(); - if(this.fireEvent('beforestatesave', this, state) !== false){ - Ext.state.Manager.set(this.stateId || this.id, state); - this.fireEvent('statesave', this, state); + + saveState : function(){ + if(Ext.state.Manager && this.stateful !== false){ + var id = this.getStateId(); + if(id){ + var state = this.getState(); + if(this.fireEvent('beforestatesave', this, state) !== false){ + Ext.state.Manager.set(id, state); + this.fireEvent('statesave', this, state); + } } } }, @@ -12533,6 +11548,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, { }else{ this.cls = this.cls ? this.cls + ' ' + cls : cls; } + return this; }, @@ -12542,11 +11558,14 @@ Ext.extend(Ext.Component, Ext.util.Observable, { }else if(this.cls){ this.cls = this.cls.split(' ').remove(cls).join(' '); } + return this; }, - onRender : function(ct, position){ - if(this.autoEl){ - if(typeof this.autoEl == 'string'){ + + + onRender : function(ct, position){ + if(!this.el && this.autoEl){ + if(Ext.isString(this.autoEl)){ this.el = document.createElement(this.autoEl); }else{ var div = document.createElement('div'); @@ -12554,22 +11573,24 @@ Ext.extend(Ext.Component, Ext.util.Observable, { this.el = div.firstChild; } if (!this.el.id) { - this.el.id = this.getId(); + this.el.id = this.getId(); } } if(this.el){ this.el = Ext.get(this.el); if(this.allowDomMove !== false){ ct.dom.insertBefore(this.el.dom, position); + if (div) { + Ext.removeNode(div); + div = null; + } } - if(this.overCls) { - this.el.addClassOnOver(this.overCls); - } } }, - getAutoCreate : function(){ - var cfg = typeof this.autoCreate == "object" ? + + getAutoCreate : function(){ + var cfg = Ext.isObject(this.autoCreate) ? this.autoCreate : Ext.apply({}, this.defaultAutoCreate); if(this.id && !cfg.id){ cfg.id = this.id; @@ -12577,29 +11598,50 @@ Ext.extend(Ext.Component, Ext.util.Observable, { return cfg; }, - afterRender : Ext.emptyFn, + + afterRender : Ext.emptyFn, destroy : function(){ - if(this.fireEvent("beforedestroy", this) !== false){ - this.beforeDestroy(); - if(this.rendered){ - this.el.removeAllListeners(); - this.el.remove(); - if(this.actionMode == "container"){ - this.container.remove(); + if(!this.isDestroyed){ + if(this.fireEvent('beforedestroy', this) !== false){ + this.destroying = true; + this.beforeDestroy(); + if(this.ownerCt && this.ownerCt.remove){ + this.ownerCt.remove(this, false); } + if(this.rendered){ + this.el.remove(); + if(this.actionMode == 'container' || this.removeMode == 'container'){ + this.container.remove(); + } + } + + if(this.focusTask && this.focusTask.cancel){ + this.focusTask.cancel(); + } + this.onDestroy(); + Ext.ComponentMgr.unregister(this); + this.fireEvent('destroy', this); + this.purgeListeners(); + this.destroying = false; + this.isDestroyed = true; } - this.onDestroy(); - Ext.ComponentMgr.unregister(this); - this.fireEvent("destroy", this); - this.purgeListeners(); } }, - beforeDestroy : Ext.emptyFn, + deleteMembers : function(){ + var args = arguments; + for(var i = 0, len = args.length; i < len; ++i){ + delete this[args[i]]; + } + }, - onDestroy : Ext.emptyFn, + + beforeDestroy : Ext.emptyFn, + + + onDestroy : Ext.emptyFn, getEl : function(){ @@ -12607,8 +11649,13 @@ Ext.extend(Ext.Component, Ext.util.Observable, { }, + getContentTarget : function(){ + return this.el; + }, + + getId : function(){ - return this.id || (this.id = "ext-comp-" + (++Ext.Component.AUTO_ID)); + return this.id || (this.id = 'ext-comp-' + (++Ext.Component.AUTO_ID)); }, @@ -12619,10 +11666,11 @@ Ext.extend(Ext.Component, Ext.util.Observable, { focus : function(selectText, delay){ if(delay){ - this.focus.defer(typeof delay == 'number' ? delay : 10, this, [selectText, false]); - return; + this.focusTask = new Ext.util.DelayedTask(this.focus, this, [selectText, false]); + this.focusTask.delay(Ext.isNumber(delay) ? delay : 10); + return this; } - if(this.rendered){ + if(this.rendered && !this.isDestroyed){ this.el.focus(); if(selectText === true){ this.el.dom.select(); @@ -12631,7 +11679,8 @@ Ext.extend(Ext.Component, Ext.util.Observable, { return this; }, - blur : function(){ + + blur : function(){ if(this.rendered){ this.el.blur(); } @@ -12639,16 +11688,19 @@ Ext.extend(Ext.Component, Ext.util.Observable, { }, - disable : function(){ + disable : function( silent){ if(this.rendered){ this.onDisable(); } this.disabled = true; - this.fireEvent("disable", this); + if(silent !== true){ + this.fireEvent('disable', this); + } return this; }, - onDisable : function(){ + + onDisable : function(){ this.getActionEl().addClass(this.disabledClass); this.el.dom.disabled = true; }, @@ -12659,77 +11711,76 @@ Ext.extend(Ext.Component, Ext.util.Observable, { this.onEnable(); } this.disabled = false; - this.fireEvent("enable", this); + this.fireEvent('enable', this); return this; }, - onEnable : function(){ + + onEnable : function(){ this.getActionEl().removeClass(this.disabledClass); this.el.dom.disabled = false; }, setDisabled : function(disabled){ - this[disabled ? "disable" : "enable"](); + return this[disabled ? 'disable' : 'enable'](); }, - show: function(){ - if(this.fireEvent("beforeshow", this) !== false){ + show : function(){ + if(this.fireEvent('beforeshow', this) !== false){ this.hidden = false; if(this.autoRender){ - this.render(typeof this.autoRender == 'boolean' ? Ext.getBody() : this.autoRender); + this.render(Ext.isBoolean(this.autoRender) ? Ext.getBody() : this.autoRender); } if(this.rendered){ this.onShow(); } - this.fireEvent("show", this); + this.fireEvent('show', this); } return this; }, - onShow : function(){ - if(this.hideParent){ - this.container.removeClass('x-hide-' + this.hideMode); - }else{ - this.getActionEl().removeClass('x-hide-' + this.hideMode); - } - - }, - - hide: function(){ - if(this.fireEvent("beforehide", this) !== false){ - this.hidden = true; - if(this.rendered){ - this.onHide(); - } - this.fireEvent("hide", this); + onShow : function(){ + this.getVisibilityEl().removeClass('x-hide-' + this.hideMode); + }, + + + hide : function(){ + if(this.fireEvent('beforehide', this) !== false){ + this.doHide(); + this.fireEvent('hide', this); } return this; }, - onHide : function(){ - if(this.hideParent){ - this.container.addClass('x-hide-' + this.hideMode); - }else{ - this.getActionEl().addClass('x-hide-' + this.hideMode); + + doHide: function(){ + this.hidden = true; + if(this.rendered){ + this.onHide(); } }, - setVisible: function(visible){ - if(visible) { - this.show(); - }else{ - this.hide(); - } - return this; + onHide : function(){ + this.getVisibilityEl().addClass('x-hide-' + this.hideMode); + }, + + + getVisibilityEl : function(){ + return this.hideParent ? this.container : this.getActionEl(); + }, + + + setVisible : function(visible){ + return this[visible ? 'show' : 'hide'](); }, isVisible : function(){ - return this.rendered && this.getActionEl().isVisible(); + return this.rendered && this.getVisibilityEl().isVisible(); }, @@ -12737,7 +11788,8 @@ Ext.extend(Ext.Component, Ext.util.Observable, { overrides = overrides || {}; var id = overrides.id || Ext.id(); var cfg = Ext.applyIf(overrides, this.initialConfig); - cfg.id = id; return new this.constructor(cfg); + cfg.id = id; + return new this.constructor(cfg); }, @@ -12747,9 +11799,14 @@ Ext.extend(Ext.Component, Ext.util.Observable, { isXType : function(xtype, shallow){ - return !shallow ? - ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : - this.constructor.xtype == xtype; + + if (Ext.isFunction(xtype)){ + xtype = xtype.xtype; + }else if (Ext.isObject(xtype)){ + xtype = xtype.constructor.xtype; + } + + return !shallow ? ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : this.constructor.xtype == xtype; }, @@ -12768,593 +11825,715 @@ Ext.extend(Ext.Component, Ext.util.Observable, { }, - findParentBy: function(fn) { + findParentBy : function(fn) { for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt); return p || null; }, - findParentByType: function(xtype) { - return typeof xtype == 'function' ? - this.findParentBy(function(p){ - return p.constructor === xtype; - }) : - this.findParentBy(function(p){ - return p.constructor.xtype === xtype; - }); + findParentByType : function(xtype, shallow){ + return this.findParentBy(function(c){ + return c.isXType(xtype, shallow); + }); + }, + + + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.ownerCt; + } + return this; }, - mon : function(item, ename, fn, scope, opt){ + + getPositionEl : function(){ + return this.positionEl || this.el; + }, + + + purgeListeners : function(){ + Ext.Component.superclass.purgeListeners.call(this); + if(this.mons){ + this.on('beforedestroy', this.clearMons, this, {single: true}); + } + }, + + + clearMons : function(){ + Ext.each(this.mons, function(m){ + m.item.un(m.ename, m.fn, m.scope); + }, this); + this.mons = []; + }, + + + createMons: function(){ if(!this.mons){ this.mons = []; - this.on('beforedestroy', function(){ - for(var i= 0, len = this.mons.length; i < len; i++){ - var m = this.mons[i]; - m.item.un(m.ename, m.fn, m.scope); - } - }, this); + this.on('beforedestroy', this.clearMons, this, {single: true}); } + }, + + + mon : function(item, ename, fn, scope, opt){ + this.createMons(); + if(Ext.isObject(ename)){ + var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; + + var o = ename; + for(var e in o){ + if(propRe.test(e)){ + continue; + } + if(Ext.isFunction(o[e])){ + + this.mons.push({ + item: item, ename: e, fn: o[e], scope: o.scope + }); + item.on(e, o[e], o.scope, o); + }else{ + + this.mons.push({ + item: item, ename: e, fn: o[e], scope: o.scope + }); + item.on(e, o[e]); + } + } + return; + } + this.mons.push({ item: item, ename: ename, fn: fn, scope: scope }); item.on(ename, fn, scope, opt); + }, + + + mun : function(item, ename, fn, scope){ + var found, mon; + this.createMons(); + for(var i = 0, len = this.mons.length; i < len; ++i){ + mon = this.mons[i]; + if(item === mon.item && ename == mon.ename && fn === mon.fn && scope === mon.scope){ + this.mons.splice(i, 1); + item.un(ename, fn, scope); + found = true; + break; + } + } + return found; + }, + + + nextSibling : function(){ + if(this.ownerCt){ + var index = this.ownerCt.items.indexOf(this); + if(index != -1 && index+1 < this.ownerCt.items.getCount()){ + return this.ownerCt.items.itemAt(index+1); + } + } + return null; + }, + + + previousSibling : function(){ + if(this.ownerCt){ + var index = this.ownerCt.items.indexOf(this); + if(index > 0){ + return this.ownerCt.items.itemAt(index-1); + } + } + return null; + }, + + + getBubbleTarget : function(){ + return this.ownerCt; } }); Ext.reg('component', Ext.Component); - -Ext.Action = function(config){ - this.initialConfig = config; - this.items = []; -} - -Ext.Action.prototype = { - - - - - - - +Ext.Action = Ext.extend(Object, { + + + - isAction : true, - - - setText : function(text){ - this.initialConfig.text = text; - this.callEach('setText', [text]); - }, - - - getText : function(){ - return this.initialConfig.text; - }, - - - setIconClass : function(cls){ - this.initialConfig.iconCls = cls; - this.callEach('setIconClass', [cls]); - }, - - - getIconClass : function(){ - return this.initialConfig.iconCls; - }, - - - setDisabled : function(v){ - this.initialConfig.disabled = v; - this.callEach('setDisabled', [v]); - }, - - - enable : function(){ - this.setDisabled(false); - }, - - - disable : function(){ - this.setDisabled(true); - }, - - - isDisabled : function(){ - return this.initialConfig.disabled; - }, - - - setHidden : function(v){ - this.initialConfig.hidden = v; - this.callEach('setVisible', [!v]); - }, - - - show : function(){ - this.setHidden(false); - }, - - - hide : function(){ - this.setHidden(true); - }, - - - isHidden : function(){ - return this.initialConfig.hidden; - }, - - - setHandler : function(fn, scope){ - this.initialConfig.handler = fn; - this.initialConfig.scope = scope; - this.callEach('setHandler', [fn, scope]); - }, - - - each : function(fn, scope){ - Ext.each(this.items, fn, scope); - }, - - callEach : function(fnName, args){ - var cs = this.items; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i][fnName].apply(cs[i], args); - } - }, - - addComponent : function(comp){ - this.items.push(comp); - comp.on('destroy', this.removeComponent, this); - }, - - removeComponent : function(comp){ - this.items.remove(comp); - }, - - - execute : function(){ - this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments); - } -}; - -(function(){ -Ext.Layer = function(config, existingEl){ - config = config || {}; - var dh = Ext.DomHelper; - var cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body; - if(existingEl){ - this.dom = Ext.getDom(existingEl); - } - if(!this.dom){ - var o = config.dh || {tag: "div", cls: "x-layer"}; - this.dom = dh.append(pel, o); - } - if(config.cls){ - this.addClass(config.cls); - } - this.constrain = config.constrain !== false; - this.visibilityMode = Ext.Element.VISIBILITY; - if(config.id){ - this.id = this.dom.id = config.id; - }else{ - this.id = Ext.id(this.dom); - } - this.zindex = config.zindex || this.getZIndex(); - this.position("absolute", this.zindex); - if(config.shadow){ - this.shadowOffset = config.shadowOffset || 4; - this.shadow = new Ext.Shadow({ - offset : this.shadowOffset, - mode : config.shadow - }); - }else{ - this.shadowOffset = 0; - } - this.useShim = config.shim !== false && Ext.useShims; - this.useDisplay = config.useDisplay; - this.hide(); -}; - -var supr = Ext.Element.prototype; - -var shims = []; - -Ext.extend(Ext.Layer, Ext.Element, { - - getZIndex : function(){ - return this.zindex || parseInt(this.getStyle("z-index"), 10) || 11000; - }, - - getShim : function(){ - if(!this.useShim){ - return null; - } - if(this.shim){ - return this.shim; - } - var shim = shims.shift(); - if(!shim){ - shim = this.createShim(); - shim.enableDisplayMode('block'); - shim.dom.style.display = 'none'; - shim.dom.style.visibility = 'visible'; - } - var pn = this.dom.parentNode; - if(shim.dom.parentNode != pn){ - pn.insertBefore(shim.dom, this.dom); - } - shim.setStyle('z-index', this.getZIndex()-2); - this.shim = shim; - return shim; - }, - - hideShim : function(){ - if(this.shim){ - this.shim.setDisplayed(false); - shims.push(this.shim); - delete this.shim; - } - }, - - disableShadow : function(){ - if(this.shadow){ - this.shadowDisabled = true; - this.shadow.hide(); - this.lastShadowOffset = this.shadowOffset; - this.shadowOffset = 0; - } - }, - - enableShadow : function(show){ - if(this.shadow){ - this.shadowDisabled = false; - this.shadowOffset = this.lastShadowOffset; - delete this.lastShadowOffset; - if(show){ - this.sync(true); - } - } - }, - + constructor : function(config){ + this.initialConfig = config; + this.itemId = config.itemId = (config.itemId || config.id || Ext.id()); + this.items = []; + }, + + + isAction : true, + + + setText : function(text){ + this.initialConfig.text = text; + this.callEach('setText', [text]); + }, + + + getText : function(){ + return this.initialConfig.text; + }, + + + setIconClass : function(cls){ + this.initialConfig.iconCls = cls; + this.callEach('setIconClass', [cls]); + }, + + + getIconClass : function(){ + return this.initialConfig.iconCls; + }, + + + setDisabled : function(v){ + this.initialConfig.disabled = v; + this.callEach('setDisabled', [v]); + }, + + + enable : function(){ + this.setDisabled(false); + }, + + + disable : function(){ + this.setDisabled(true); + }, + + + isDisabled : function(){ + return this.initialConfig.disabled; + }, + + + setHidden : function(v){ + this.initialConfig.hidden = v; + this.callEach('setVisible', [!v]); + }, + + + show : function(){ + this.setHidden(false); + }, + + + hide : function(){ + this.setHidden(true); + }, + + + isHidden : function(){ + return this.initialConfig.hidden; + }, + + + setHandler : function(fn, scope){ + this.initialConfig.handler = fn; + this.initialConfig.scope = scope; + this.callEach('setHandler', [fn, scope]); + }, + + + each : function(fn, scope){ + Ext.each(this.items, fn, scope); + }, + + + callEach : function(fnName, args){ + var cs = this.items; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i][fnName].apply(cs[i], args); + } + }, + + + addComponent : function(comp){ + this.items.push(comp); + comp.on('destroy', this.removeComponent, this); + }, + + + removeComponent : function(comp){ + this.items.remove(comp); + }, + + + execute : function(){ + this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments); + } +}); + +(function(){ +Ext.Layer = function(config, existingEl){ + config = config || {}; + var dh = Ext.DomHelper, + cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body; + + if (existingEl) { + this.dom = Ext.getDom(existingEl); + } + if(!this.dom){ + var o = config.dh || {tag: 'div', cls: 'x-layer'}; + this.dom = dh.append(pel, o); + } + if(config.cls){ + this.addClass(config.cls); + } + this.constrain = config.constrain !== false; + this.setVisibilityMode(Ext.Element.VISIBILITY); + if(config.id){ + this.id = this.dom.id = config.id; + }else{ + this.id = Ext.id(this.dom); + } + this.zindex = config.zindex || this.getZIndex(); + this.position('absolute', this.zindex); + if(config.shadow){ + this.shadowOffset = config.shadowOffset || 4; + this.shadow = new Ext.Shadow({ + offset : this.shadowOffset, + mode : config.shadow + }); + }else{ + this.shadowOffset = 0; + } + this.useShim = config.shim !== false && Ext.useShims; + this.useDisplay = config.useDisplay; + this.hide(); +}; + +var supr = Ext.Element.prototype; + + +var shims = []; + +Ext.extend(Ext.Layer, Ext.Element, { + + getZIndex : function(){ + return this.zindex || parseInt((this.getShim() || this).getStyle('z-index'), 10) || 11000; + }, + + getShim : function(){ + if(!this.useShim){ + return null; + } + if(this.shim){ + return this.shim; + } + var shim = shims.shift(); + if(!shim){ + shim = this.createShim(); + shim.enableDisplayMode('block'); + shim.dom.style.display = 'none'; + shim.dom.style.visibility = 'visible'; + } + var pn = this.dom.parentNode; + if(shim.dom.parentNode != pn){ + pn.insertBefore(shim.dom, this.dom); + } + shim.setStyle('z-index', this.getZIndex()-2); + this.shim = shim; + return shim; + }, + + hideShim : function(){ + if(this.shim){ + this.shim.setDisplayed(false); + shims.push(this.shim); + delete this.shim; + } + }, + + disableShadow : function(){ + if(this.shadow){ + this.shadowDisabled = true; + this.shadow.hide(); + this.lastShadowOffset = this.shadowOffset; + this.shadowOffset = 0; + } + }, + + enableShadow : function(show){ + if(this.shadow){ + this.shadowDisabled = false; + if(Ext.isDefined(this.lastShadowOffset)) { + this.shadowOffset = this.lastShadowOffset; + delete this.lastShadowOffset; + } + if(show){ + this.sync(true); + } + } + }, + - sync : function(doShow){ - var sw = this.shadow; - if(!this.updating && this.isVisible() && (sw || this.useShim)){ - var sh = this.getShim(); - - var w = this.getWidth(), - h = this.getHeight(); - - var l = this.getLeft(true), - t = this.getTop(true); - - if(sw && !this.shadowDisabled){ - if(doShow && !sw.isVisible()){ - sw.show(this); - }else{ - sw.realign(l, t, w, h); - } - if(sh){ - if(doShow){ - sh.show(); - } + sync : function(doShow){ + var shadow = this.shadow; + if(!this.updating && this.isVisible() && (shadow || this.useShim)){ + var shim = this.getShim(), + w = this.getWidth(), + h = this.getHeight(), + l = this.getLeft(true), + t = this.getTop(true); + + if(shadow && !this.shadowDisabled){ + if(doShow && !shadow.isVisible()){ + shadow.show(this); + }else{ + shadow.realign(l, t, w, h); + } + if(shim){ + if(doShow){ + shim.show(); + } - var a = sw.adjusts, s = sh.dom.style; - s.left = (Math.min(l, l+a.l))+"px"; - s.top = (Math.min(t, t+a.t))+"px"; - s.width = (w+a.w)+"px"; - s.height = (h+a.h)+"px"; - } - }else if(sh){ - if(doShow){ - sh.show(); - } - sh.setSize(w, h); - sh.setLeftTop(l, t); - } - - } - }, - + var shadowAdj = shadow.el.getXY(), shimStyle = shim.dom.style, + shadowSize = shadow.el.getSize(); + shimStyle.left = (shadowAdj[0])+'px'; + shimStyle.top = (shadowAdj[1])+'px'; + shimStyle.width = (shadowSize.width)+'px'; + shimStyle.height = (shadowSize.height)+'px'; + } + }else if(shim){ + if(doShow){ + shim.show(); + } + shim.setSize(w, h); + shim.setLeftTop(l, t); + } + } + }, + - destroy : function(){ - this.hideShim(); - if(this.shadow){ - this.shadow.hide(); - } - this.removeAllListeners(); - Ext.removeNode(this.dom); - Ext.Element.uncache(this.id); - }, - - remove : function(){ - this.destroy(); - }, - + destroy : function(){ + this.hideShim(); + if(this.shadow){ + this.shadow.hide(); + } + this.removeAllListeners(); + Ext.removeNode(this.dom); + delete this.dom; + }, + + remove : function(){ + this.destroy(); + }, + - beginUpdate : function(){ - this.updating = true; - }, - + beginUpdate : function(){ + this.updating = true; + }, + - endUpdate : function(){ - this.updating = false; - this.sync(true); - }, - + endUpdate : function(){ + this.updating = false; + this.sync(true); + }, + - hideUnders : function(negOffset){ - if(this.shadow){ - this.shadow.hide(); - } - this.hideShim(); - }, - + hideUnders : function(negOffset){ + if(this.shadow){ + this.shadow.hide(); + } + this.hideShim(); + }, + - constrainXY : function(){ - if(this.constrain){ - var vw = Ext.lib.Dom.getViewWidth(), - vh = Ext.lib.Dom.getViewHeight(); - var s = Ext.getDoc().getScroll(); - - var xy = this.getXY(); - var x = xy[0], y = xy[1]; - var w = this.dom.offsetWidth+this.shadowOffset, h = this.dom.offsetHeight+this.shadowOffset; + constrainXY : function(){ + if(this.constrain){ + var vw = Ext.lib.Dom.getViewWidth(), + vh = Ext.lib.Dom.getViewHeight(); + var s = Ext.getDoc().getScroll(); + + var xy = this.getXY(); + var x = xy[0], y = xy[1]; + var so = this.shadowOffset; + var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; - var moved = false; + var moved = false; - if((x + w) > vw+s.left){ - x = vw - w - this.shadowOffset; - moved = true; - } - if((y + h) > vh+s.top){ - y = vh - h - this.shadowOffset; - moved = true; - } + if((x + w) > vw+s.left){ + x = vw - w - so; + moved = true; + } + if((y + h) > vh+s.top){ + y = vh - h - so; + moved = true; + } - if(x < s.left){ - x = s.left; - moved = true; - } - if(y < s.top){ - y = s.top; - moved = true; - } - if(moved){ - if(this.avoidY){ - var ay = this.avoidY; - if(y <= ay && (y+h) >= ay){ - y = ay-h-5; - } - } - xy = [x, y]; - this.storeXY(xy); - supr.setXY.call(this, xy); - this.sync(); - } - } - }, - - isVisible : function(){ - return this.visible; - }, - + if(x < s.left){ + x = s.left; + moved = true; + } + if(y < s.top){ + y = s.top; + moved = true; + } + if(moved){ + if(this.avoidY){ + var ay = this.avoidY; + if(y <= ay && (y+h) >= ay){ + y = ay-h-5; + } + } + xy = [x, y]; + this.storeXY(xy); + supr.setXY.call(this, xy); + this.sync(); + } + } + return this; + }, - showAction : function(){ + getConstrainOffset : function(){ + return this.shadowOffset; + }, + + isVisible : function(){ + return this.visible; + }, + + + showAction : function(){ this.visible = true; - if(this.useDisplay === true){ - this.setDisplayed(""); - }else if(this.lastXY){ - supr.setXY.call(this, this.lastXY); - }else if(this.lastLT){ - supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]); - } - }, - + if(this.useDisplay === true){ + this.setDisplayed(''); + }else if(this.lastXY){ + supr.setXY.call(this, this.lastXY); + }else if(this.lastLT){ + supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]); + } + }, + - hideAction : function(){ - this.visible = false; - if(this.useDisplay === true){ - this.setDisplayed(false); - }else{ - this.setLeftTop(-10000,-10000); - } - }, - + hideAction : function(){ + this.visible = false; + if(this.useDisplay === true){ + this.setDisplayed(false); + }else{ + this.setLeftTop(-10000,-10000); + } + }, + - setVisible : function(v, a, d, c, e){ - if(v){ - this.showAction(); - } - if(a && v){ - var cb = function(){ - this.sync(true); - if(c){ - c(); - } - }.createDelegate(this); - supr.setVisible.call(this, true, true, d, cb, e); - }else{ - if(!v){ - this.hideUnders(true); - } - var cb = c; - if(a){ - cb = function(){ - this.hideAction(); - if(c){ - c(); - } - }.createDelegate(this); - } - supr.setVisible.call(this, v, a, d, cb, e); - if(v){ - this.sync(true); - }else if(!a){ - this.hideAction(); - } - } - }, - - storeXY : function(xy){ - delete this.lastLT; - this.lastXY = xy; - }, - - storeLeftTop : function(left, top){ - delete this.lastXY; - this.lastLT = [left, top]; - }, - + setVisible : function(v, a, d, c, e){ + if(v){ + this.showAction(); + } + if(a && v){ + var cb = function(){ + this.sync(true); + if(c){ + c(); + } + }.createDelegate(this); + supr.setVisible.call(this, true, true, d, cb, e); + }else{ + if(!v){ + this.hideUnders(true); + } + var cb = c; + if(a){ + cb = function(){ + this.hideAction(); + if(c){ + c(); + } + }.createDelegate(this); + } + supr.setVisible.call(this, v, a, d, cb, e); + if(v){ + this.sync(true); + }else if(!a){ + this.hideAction(); + } + } + return this; + }, + + storeXY : function(xy){ + delete this.lastLT; + this.lastXY = xy; + }, + + storeLeftTop : function(left, top){ + delete this.lastXY; + this.lastLT = [left, top]; + }, + - beforeFx : function(){ - this.beforeAction(); - return Ext.Layer.superclass.beforeFx.apply(this, arguments); - }, - + beforeFx : function(){ + this.beforeAction(); + return Ext.Layer.superclass.beforeFx.apply(this, arguments); + }, + - afterFx : function(){ - Ext.Layer.superclass.afterFx.apply(this, arguments); - this.sync(this.isVisible()); - }, - + afterFx : function(){ + Ext.Layer.superclass.afterFx.apply(this, arguments); + this.sync(this.isVisible()); + }, + - beforeAction : function(){ - if(!this.updating && this.shadow){ - this.shadow.hide(); - } - }, - + beforeAction : function(){ + if(!this.updating && this.shadow){ + this.shadow.hide(); + } + }, + - setLeft : function(left){ - this.storeLeftTop(left, this.getTop(true)); - supr.setLeft.apply(this, arguments); - this.sync(); - }, - - setTop : function(top){ - this.storeLeftTop(this.getLeft(true), top); - supr.setTop.apply(this, arguments); - this.sync(); - }, - - setLeftTop : function(left, top){ - this.storeLeftTop(left, top); - supr.setLeftTop.apply(this, arguments); - this.sync(); - }, - - setXY : function(xy, a, d, c, e){ - this.fixDisplay(); - this.beforeAction(); - this.storeXY(xy); - var cb = this.createCB(c); - supr.setXY.call(this, xy, a, d, cb, e); - if(!a){ - cb(); - } - }, - + setLeft : function(left){ + this.storeLeftTop(left, this.getTop(true)); + supr.setLeft.apply(this, arguments); + this.sync(); + return this; + }, + + setTop : function(top){ + this.storeLeftTop(this.getLeft(true), top); + supr.setTop.apply(this, arguments); + this.sync(); + return this; + }, + + setLeftTop : function(left, top){ + this.storeLeftTop(left, top); + supr.setLeftTop.apply(this, arguments); + this.sync(); + return this; + }, + + setXY : function(xy, a, d, c, e){ + this.fixDisplay(); + this.beforeAction(); + this.storeXY(xy); + var cb = this.createCB(c); + supr.setXY.call(this, xy, a, d, cb, e); + if(!a){ + cb(); + } + return this; + }, + - createCB : function(c){ - var el = this; - return function(){ - el.constrainXY(); - el.sync(true); - if(c){ - c(); - } - }; - }, - + createCB : function(c){ + var el = this; + return function(){ + el.constrainXY(); + el.sync(true); + if(c){ + c(); + } + }; + }, + - setX : function(x, a, d, c, e){ - this.setXY([x, this.getY()], a, d, c, e); - }, - + setX : function(x, a, d, c, e){ + this.setXY([x, this.getY()], a, d, c, e); + return this; + }, + - setY : function(y, a, d, c, e){ - this.setXY([this.getX(), y], a, d, c, e); - }, - + setY : function(y, a, d, c, e){ + this.setXY([this.getX(), y], a, d, c, e); + return this; + }, + - setSize : function(w, h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - supr.setSize.call(this, w, h, a, d, cb, e); - if(!a){ - cb(); - } - }, - + setSize : function(w, h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setSize.call(this, w, h, a, d, cb, e); + if(!a){ + cb(); + } + return this; + }, + - setWidth : function(w, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - supr.setWidth.call(this, w, a, d, cb, e); - if(!a){ - cb(); - } - }, - + setWidth : function(w, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setWidth.call(this, w, a, d, cb, e); + if(!a){ + cb(); + } + return this; + }, + - setHeight : function(h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - supr.setHeight.call(this, h, a, d, cb, e); - if(!a){ - cb(); - } - }, - + setHeight : function(h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setHeight.call(this, h, a, d, cb, e); + if(!a){ + cb(); + } + return this; + }, + - setBounds : function(x, y, w, h, a, d, c, e){ - this.beforeAction(); - var cb = this.createCB(c); - if(!a){ - this.storeXY([x, y]); - supr.setXY.call(this, [x, y]); - supr.setSize.call(this, w, h, a, d, cb, e); - cb(); - }else{ - supr.setBounds.call(this, x, y, w, h, a, d, cb, e); - } - return this; - }, - - - setZIndex : function(zindex){ - this.zindex = zindex; - this.setStyle("z-index", zindex + 2); - if(this.shadow){ - this.shadow.setZIndex(zindex + 1); - } - if(this.shim){ - this.shim.setStyle("z-index", zindex); - } - } -}); + setBounds : function(x, y, w, h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + if(!a){ + this.storeXY([x, y]); + supr.setXY.call(this, [x, y]); + supr.setSize.call(this, w, h, a, d, cb, e); + cb(); + }else{ + supr.setBounds.call(this, x, y, w, h, a, d, cb, e); + } + return this; + }, + + + setZIndex : function(zindex){ + this.zindex = zindex; + this.setStyle('z-index', zindex + 2); + if(this.shadow){ + this.shadow.setZIndex(zindex + 1); + } + if(this.shim){ + this.shim.setStyle('z-index', zindex); + } + return this; + } +}); })(); -Ext.Shadow = function(config){ +Ext.Shadow = function(config) { Ext.apply(this, config); - if(typeof this.mode != "string"){ + if (typeof this.mode != "string") { this.mode = this.defaultMode; } - var o = this.offset, a = {h: 0}; - var rad = Math.floor(this.offset/2); - switch(this.mode.toLowerCase()){ case "drop": + var o = this.offset, + a = { + h: 0 + }, + rad = Math.floor(this.offset / 2); + switch (this.mode.toLowerCase()) { + + case "drop": a.w = 0; a.l = a.t = o; a.t -= 1; - if(Ext.isIE){ + if (Ext.isIE) { a.l -= this.offset + rad; a.t -= this.offset + rad; a.w -= rad; @@ -13363,24 +12542,24 @@ Ext.Shadow = function(config){ } break; case "sides": - a.w = (o*2); + a.w = (o * 2); a.l = -o; - a.t = o-1; - if(Ext.isIE){ + a.t = o - 1; + if (Ext.isIE) { a.l -= (this.offset - rad); a.t -= this.offset + rad; a.l += 1; - a.w -= (this.offset - rad)*2; + a.w -= (this.offset - rad) * 2; a.w -= rad + 1; a.h -= 1; } break; case "frame": - a.w = a.h = (o*2); + a.w = a.h = (o * 2); a.l = a.t = -o; a.t += 1; a.h -= 2; - if(Ext.isIE){ + if (Ext.isIE) { a.l -= (this.offset - rad); a.t -= (this.offset - rad); a.l += 1; @@ -13399,62 +12578,70 @@ Ext.Shadow.prototype = { offset: 4, - defaultMode: "drop", + + defaultMode: "drop", - show : function(target){ + show: function(target) { target = Ext.get(target); - if(!this.el){ + if (!this.el) { this.el = Ext.Shadow.Pool.pull(); - if(this.el.dom.nextSibling != target.dom){ + if (this.el.dom.nextSibling != target.dom) { this.el.insertBefore(target); } } - this.el.setStyle("z-index", this.zIndex || parseInt(target.getStyle("z-index"), 10)-1); - if(Ext.isIE){ - this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"; + this.el.setStyle("z-index", this.zIndex || parseInt(target.getStyle("z-index"), 10) - 1); + if (Ext.isIE) { + this.el.dom.style.filter = "progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (this.offset) + ")"; } this.realign( - target.getLeft(true), - target.getTop(true), - target.getWidth(), - target.getHeight() + target.getLeft(true), + target.getTop(true), + target.getWidth(), + target.getHeight() ); this.el.dom.style.display = "block"; }, - isVisible : function(){ - return this.el ? true : false; + isVisible: function() { + return this.el ? true: false; }, - realign : function(l, t, w, h){ - if(!this.el){ + realign: function(l, t, w, h) { + if (!this.el) { return; } - var a = this.adjusts, d = this.el.dom, s = d.style; - var iea = 0; - s.left = (l+a.l)+"px"; - s.top = (t+a.t)+"px"; - var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px"; - if(s.width != sws || s.height != shs){ + var a = this.adjusts, + d = this.el.dom, + s = d.style, + iea = 0, + sw = (w + a.w), + sh = (h + a.h), + sws = sw + "px", + shs = sh + "px", + cn, + sww; + s.left = (l + a.l) + "px"; + s.top = (t + a.t) + "px"; + if (s.width != sws || s.height != shs) { s.width = sws; s.height = shs; - if(!Ext.isIE){ - var cn = d.childNodes; - var sww = Math.max(0, (sw-12))+"px"; + if (!Ext.isIE) { + cn = d.childNodes; + sww = Math.max(0, (sw - 12)) + "px"; cn[0].childNodes[1].style.width = sww; cn[1].childNodes[1].style.width = sww; cn[2].childNodes[1].style.width = sww; - cn[1].style.height = Math.max(0, (sh-12))+"px"; + cn[1].style.height = Math.max(0, (sh - 12)) + "px"; } } }, - hide : function(){ - if(this.el){ + hide: function() { + if (this.el) { this.el.dom.style.display = "none"; Ext.Shadow.Pool.push(this.el); delete this.el; @@ -13462,36 +12649,52 @@ Ext.Shadow.prototype = { }, - setZIndex : function(z){ + setZIndex: function(z) { this.zIndex = z; - if(this.el){ + if (this.el) { this.el.setStyle("z-index", z); } } }; -Ext.Shadow.Pool = function(){ - var p = []; - var markup = Ext.isIE ? - '
' : - '
'; + +Ext.Shadow.Pool = function() { + var p = [], + markup = Ext.isIE ? + '
': + '
'; return { - pull : function(){ + pull: function() { var sh = p.shift(); - if(!sh){ + if (!sh) { sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup)); sh.autoBoxAdjust = false; } return sh; }, - push : function(sh){ + push: function(sh) { p.push(sh); } }; }(); - Ext.BoxComponent = Ext.extend(Ext.Component, { + + + + + + + + + + + + + + + + @@ -13503,7 +12706,8 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { - initComponent : function(){ + + initComponent : function(){ Ext.BoxComponent.superclass.initComponent.call(this); this.addEvents( @@ -13513,28 +12717,49 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { ); }, - boxReady : false, - deferHeight: false, + + boxReady : false, + + deferHeight: false, setSize : function(w, h){ - if(typeof w == 'object'){ + + + if(typeof w == 'object'){ h = w.height; w = w.width; } - if(!this.boxReady){ - this.width = w; + if (Ext.isDefined(w) && Ext.isDefined(this.boxMinWidth) && (w < this.boxMinWidth)) { + w = this.boxMinWidth; + } + if (Ext.isDefined(h) && Ext.isDefined(this.boxMinHeight) && (h < this.boxMinHeight)) { + h = this.boxMinHeight; + } + if (Ext.isDefined(w) && Ext.isDefined(this.boxMaxWidth) && (w > this.boxMaxWidth)) { + w = this.boxMaxWidth; + } + if (Ext.isDefined(h) && Ext.isDefined(this.boxMaxHeight) && (h > this.boxMaxHeight)) { + h = this.boxMaxHeight; + } + + if(!this.boxReady){ + this.width = w; this.height = h; return this; } - if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ + + if(this.cacheSizes !== false && this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ return this; } this.lastSize = {width: w, height: h}; - var adj = this.adjustSize(w, h); - var aw = adj.width, ah = adj.height; - if(aw !== undefined || ah !== undefined){ var rz = this.getResizeEl(); + var adj = this.adjustSize(w, h), + aw = adj.width, + ah = adj.height, + rz; + if(aw !== undefined || ah !== undefined){ + rz = this.getResizeEl(); if(!this.deferHeight && aw !== undefined && ah !== undefined){ rz.setSize(aw, ah); }else if(!this.deferHeight && ah !== undefined){ @@ -13560,28 +12785,41 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { getSize : function(){ - return this.el.getSize(); + return this.getResizeEl().getSize(); + }, + + + getWidth : function(){ + return this.getResizeEl().getWidth(); + }, + + + getHeight : function(){ + return this.getResizeEl().getHeight(); + }, + + + getOuterSize : function(){ + var el = this.getResizeEl(); + return {width: el.getWidth() + el.getMargins('lr'), + height: el.getHeight() + el.getMargins('tb')}; }, getPosition : function(local){ + var el = this.getPositionEl(); if(local === true){ - return [this.el.getLeft(true), this.el.getTop(true)]; + return [el.getLeft(true), el.getTop(true)]; } - return this.xy || this.el.getXY(); + return this.xy || el.getXY(); }, getBox : function(local){ - var s = this.el.getSize(); - if(local === true){ - s.x = this.el.getLeft(true); - s.y = this.el.getTop(true); - }else{ - var xy = this.xy || this.el.getXY(); - s.x = xy[0]; - s.y = xy[1]; - } + var pos = this.getPosition(local); + var s = this.getSize(); + s.x = pos[0]; + s.y = pos[1]; return s; }, @@ -13592,12 +12830,18 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { return this; }, - getResizeEl : function(){ + + getResizeEl : function(){ return this.resizeEl || this.el; }, - getPositionEl : function(){ - return this.positionEl || this.el; + + setAutoScroll : function(scroll){ + if(this.rendered){ + this.getContentTarget().setOverflow(scroll ? 'auto' : ''); + } + this.autoScroll = scroll; + return this; }, @@ -13640,26 +12884,25 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { if(!this.boxReady){ return; } - if(x === undefined || y === undefined){ return; + if(x === undefined || y === undefined){ + return; } - var p = this.el.translatePoints(x, y); + var p = this.getPositionEl().translatePoints(x, y); this.setPosition(p.left, p.top); return this; }, - onRender : function(ct, position){ - Ext.BoxComponent.superclass.onRender.call(this, ct, position); + + afterRender : function(){ + Ext.BoxComponent.superclass.afterRender.call(this); if(this.resizeEl){ this.resizeEl = Ext.get(this.resizeEl); } if(this.positionEl){ this.positionEl = Ext.get(this.positionEl); } - }, - - afterRender : function(){ - Ext.BoxComponent.superclass.afterRender.call(this); this.boxReady = true; + Ext.isDefined(this.autoScroll) && this.setAutoScroll(this.autoScroll); this.setSize(this.width, this.height); if(this.x || this.y){ this.setPosition(this.x, this.y); @@ -13671,13 +12914,12 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { syncSize : function(){ delete this.lastSize; - this.setSize(this.autoWidth ? undefined : this.el.getWidth(), this.autoHeight ? undefined : this.el.getHeight()); + this.setSize(this.autoWidth ? undefined : this.getResizeEl().getWidth(), this.autoHeight ? undefined : this.getResizeEl().getHeight()); return this; }, onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ - }, @@ -13685,7 +12927,8 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { }, - adjustSize : function(w, h){ + + adjustSize : function(w, h){ if(this.autoWidth){ w = 'auto'; } @@ -13695,327 +12938,348 @@ Ext.BoxComponent = Ext.extend(Ext.Component, { return {width : w, height: h}; }, - adjustPosition : function(x, y){ + + adjustPosition : function(x, y){ return {x : x, y: y}; } }); Ext.reg('box', Ext.BoxComponent); - -Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){ - - - this.el = Ext.get(dragElement, true); - this.el.dom.unselectable = "on"; - - this.resizingEl = Ext.get(resizingElement, true); - - - this.orientation = orientation || Ext.SplitBar.HORIZONTAL; - - - this.minSize = 0; - - - this.maxSize = 2000; - - - this.animate = false; - - - this.useShim = false; - - - this.shim = null; - - if(!existingProxy){ - - this.proxy = Ext.SplitBar.createProxy(this.orientation); - }else{ - this.proxy = Ext.get(existingProxy).dom; - } - - this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id}); - - - this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this); - - - this.dd.endDrag = this.onEndProxyDrag.createDelegate(this); - - - this.dragSpecs = {}; - - - this.adapter = new Ext.SplitBar.BasicLayoutAdapter(); - this.adapter.init(this); - - if(this.orientation == Ext.SplitBar.HORIZONTAL){ - - this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT); - this.el.addClass("x-splitbar-h"); - }else{ - - this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM); - this.el.addClass("x-splitbar-v"); - } - - this.addEvents( - - "resize", - - "moved", - - "beforeresize", - - "beforeapply" - ); - - Ext.SplitBar.superclass.constructor.call(this); -}; - -Ext.extend(Ext.SplitBar, Ext.util.Observable, { - onStartProxyDrag : function(x, y){ - this.fireEvent("beforeresize", this); - this.overlay = Ext.DomHelper.append(document.body, {cls: "x-drag-overlay", html: " "}, true); - this.overlay.unselectable(); - this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); - this.overlay.show(); - Ext.get(this.proxy).setDisplayed("block"); - var size = this.adapter.getElementSize(this); - this.activeMinSize = this.getMinimumSize();; - this.activeMaxSize = this.getMaximumSize();; - var c1 = size - this.activeMinSize; - var c2 = Math.max(this.activeMaxSize - size, 0); - if(this.orientation == Ext.SplitBar.HORIZONTAL){ - this.dd.resetConstraints(); - this.dd.setXConstraint( - this.placement == Ext.SplitBar.LEFT ? c1 : c2, - this.placement == Ext.SplitBar.LEFT ? c2 : c1 - ); - this.dd.setYConstraint(0, 0); - }else{ - this.dd.resetConstraints(); - this.dd.setXConstraint(0, 0); - this.dd.setYConstraint( - this.placement == Ext.SplitBar.TOP ? c1 : c2, - this.placement == Ext.SplitBar.TOP ? c2 : c1 - ); - } - this.dragSpecs.startSize = size; - this.dragSpecs.startPoint = [x, y]; - Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y); - }, - - - onEndProxyDrag : function(e){ - Ext.get(this.proxy).setDisplayed(false); - var endPoint = Ext.lib.Event.getXY(e); - if(this.overlay){ - this.overlay.remove(); - delete this.overlay; - } - var newSize; - if(this.orientation == Ext.SplitBar.HORIZONTAL){ - newSize = this.dragSpecs.startSize + - (this.placement == Ext.SplitBar.LEFT ? - endPoint[0] - this.dragSpecs.startPoint[0] : - this.dragSpecs.startPoint[0] - endPoint[0] - ); - }else{ - newSize = this.dragSpecs.startSize + - (this.placement == Ext.SplitBar.TOP ? - endPoint[1] - this.dragSpecs.startPoint[1] : - this.dragSpecs.startPoint[1] - endPoint[1] - ); - } - newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize); - if(newSize != this.dragSpecs.startSize){ - if(this.fireEvent('beforeapply', this, newSize) !== false){ - this.adapter.setElementSize(this, newSize); - this.fireEvent("moved", this, newSize); - this.fireEvent("resize", this, newSize); - } - } - }, - - - getAdapter : function(){ - return this.adapter; - }, - - - setAdapter : function(adapter){ - this.adapter = adapter; - this.adapter.init(this); - }, - - - getMinimumSize : function(){ - return this.minSize; - }, - - - setMinimumSize : function(minSize){ - this.minSize = minSize; - }, - - - getMaximumSize : function(){ - return this.maxSize; - }, - - - setMaximumSize : function(maxSize){ - this.maxSize = maxSize; - }, - - - setCurrentSize : function(size){ - var oldAnimate = this.animate; - this.animate = false; - this.adapter.setElementSize(this, size); - this.animate = oldAnimate; - }, - - - destroy : function(removeEl){ - if(this.shim){ - this.shim.remove(); - } - this.dd.unreg(); - Ext.removeNode(this.proxy); - if(removeEl){ - this.el.remove(); - } - } -}); - - -Ext.SplitBar.createProxy = function(dir){ - var proxy = new Ext.Element(document.createElement("div")); - proxy.unselectable(); - var cls = 'x-splitbar-proxy'; - proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v')); - document.body.appendChild(proxy.dom); - return proxy.dom; -}; - - -Ext.SplitBar.BasicLayoutAdapter = function(){ -}; - -Ext.SplitBar.BasicLayoutAdapter.prototype = { - - init : function(s){ - - }, - - getElementSize : function(s){ - if(s.orientation == Ext.SplitBar.HORIZONTAL){ - return s.resizingEl.getWidth(); - }else{ - return s.resizingEl.getHeight(); - } - }, - - - setElementSize : function(s, newSize, onComplete){ - if(s.orientation == Ext.SplitBar.HORIZONTAL){ - if(!s.animate){ - s.resizingEl.setWidth(newSize); - if(onComplete){ - onComplete(s, newSize); - } - }else{ - s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut'); - } - }else{ - - if(!s.animate){ - s.resizingEl.setHeight(newSize); - if(onComplete){ - onComplete(s, newSize); - } - }else{ - s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut'); - } - } - } -}; - - -Ext.SplitBar.AbsoluteLayoutAdapter = function(container){ - this.basic = new Ext.SplitBar.BasicLayoutAdapter(); - this.container = Ext.get(container); -}; - -Ext.SplitBar.AbsoluteLayoutAdapter.prototype = { - init : function(s){ - this.basic.init(s); - }, - - getElementSize : function(s){ - return this.basic.getElementSize(s); - }, - - setElementSize : function(s, newSize, onComplete){ - this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s])); - }, - - moveSplitter : function(s){ - var yes = Ext.SplitBar; - switch(s.placement){ - case yes.LEFT: - s.el.setX(s.resizingEl.getRight()); - break; - case yes.RIGHT: - s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px"); - break; - case yes.TOP: - s.el.setY(s.resizingEl.getBottom()); - break; - case yes.BOTTOM: - s.el.setY(s.resizingEl.getTop() - s.el.getHeight()); - break; - } - } -}; - - -Ext.SplitBar.VERTICAL = 1; - - -Ext.SplitBar.HORIZONTAL = 2; - - -Ext.SplitBar.LEFT = 1; - - -Ext.SplitBar.RIGHT = 2; - - -Ext.SplitBar.TOP = 3; - - -Ext.SplitBar.BOTTOM = 4; + +Ext.Spacer = Ext.extend(Ext.BoxComponent, { + autoEl:'div' +}); +Ext.reg('spacer', Ext.Spacer); +Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){ + + + this.el = Ext.get(dragElement, true); + this.el.dom.unselectable = "on"; + + this.resizingEl = Ext.get(resizingElement, true); + + + this.orientation = orientation || Ext.SplitBar.HORIZONTAL; + + + + this.minSize = 0; + + + this.maxSize = 2000; + + + this.animate = false; + + + this.useShim = false; + + + this.shim = null; + + if(!existingProxy){ + + this.proxy = Ext.SplitBar.createProxy(this.orientation); + }else{ + this.proxy = Ext.get(existingProxy).dom; + } + + this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id}); + + + this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this); + + + this.dd.endDrag = this.onEndProxyDrag.createDelegate(this); + + + this.dragSpecs = {}; + + + this.adapter = new Ext.SplitBar.BasicLayoutAdapter(); + this.adapter.init(this); + + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + + this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT); + this.el.addClass("x-splitbar-h"); + }else{ + + this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM); + this.el.addClass("x-splitbar-v"); + } + + this.addEvents( + + "resize", + + "moved", + + "beforeresize", + + "beforeapply" + ); + + Ext.SplitBar.superclass.constructor.call(this); +}; + +Ext.extend(Ext.SplitBar, Ext.util.Observable, { + onStartProxyDrag : function(x, y){ + this.fireEvent("beforeresize", this); + this.overlay = Ext.DomHelper.append(document.body, {cls: "x-drag-overlay", html: " "}, true); + this.overlay.unselectable(); + this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.overlay.show(); + Ext.get(this.proxy).setDisplayed("block"); + var size = this.adapter.getElementSize(this); + this.activeMinSize = this.getMinimumSize(); + this.activeMaxSize = this.getMaximumSize(); + var c1 = size - this.activeMinSize; + var c2 = Math.max(this.activeMaxSize - size, 0); + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + this.dd.resetConstraints(); + this.dd.setXConstraint( + this.placement == Ext.SplitBar.LEFT ? c1 : c2, + this.placement == Ext.SplitBar.LEFT ? c2 : c1, + this.tickSize + ); + this.dd.setYConstraint(0, 0); + }else{ + this.dd.resetConstraints(); + this.dd.setXConstraint(0, 0); + this.dd.setYConstraint( + this.placement == Ext.SplitBar.TOP ? c1 : c2, + this.placement == Ext.SplitBar.TOP ? c2 : c1, + this.tickSize + ); + } + this.dragSpecs.startSize = size; + this.dragSpecs.startPoint = [x, y]; + Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y); + }, + + + onEndProxyDrag : function(e){ + Ext.get(this.proxy).setDisplayed(false); + var endPoint = Ext.lib.Event.getXY(e); + if(this.overlay){ + Ext.destroy(this.overlay); + delete this.overlay; + } + var newSize; + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + newSize = this.dragSpecs.startSize + + (this.placement == Ext.SplitBar.LEFT ? + endPoint[0] - this.dragSpecs.startPoint[0] : + this.dragSpecs.startPoint[0] - endPoint[0] + ); + }else{ + newSize = this.dragSpecs.startSize + + (this.placement == Ext.SplitBar.TOP ? + endPoint[1] - this.dragSpecs.startPoint[1] : + this.dragSpecs.startPoint[1] - endPoint[1] + ); + } + newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize); + if(newSize != this.dragSpecs.startSize){ + if(this.fireEvent('beforeapply', this, newSize) !== false){ + this.adapter.setElementSize(this, newSize); + this.fireEvent("moved", this, newSize); + this.fireEvent("resize", this, newSize); + } + } + }, + + + getAdapter : function(){ + return this.adapter; + }, + + + setAdapter : function(adapter){ + this.adapter = adapter; + this.adapter.init(this); + }, + + + getMinimumSize : function(){ + return this.minSize; + }, + + + setMinimumSize : function(minSize){ + this.minSize = minSize; + }, + + + getMaximumSize : function(){ + return this.maxSize; + }, + + + setMaximumSize : function(maxSize){ + this.maxSize = maxSize; + }, + + + setCurrentSize : function(size){ + var oldAnimate = this.animate; + this.animate = false; + this.adapter.setElementSize(this, size); + this.animate = oldAnimate; + }, + + + destroy : function(removeEl){ + Ext.destroy(this.shim, Ext.get(this.proxy)); + this.dd.unreg(); + if(removeEl){ + this.el.remove(); + } + this.purgeListeners(); + } +}); + + +Ext.SplitBar.createProxy = function(dir){ + var proxy = new Ext.Element(document.createElement("div")); + document.body.appendChild(proxy.dom); + proxy.unselectable(); + var cls = 'x-splitbar-proxy'; + proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v')); + return proxy.dom; +}; + + +Ext.SplitBar.BasicLayoutAdapter = function(){ +}; + +Ext.SplitBar.BasicLayoutAdapter.prototype = { + + init : function(s){ + + }, + + getElementSize : function(s){ + if(s.orientation == Ext.SplitBar.HORIZONTAL){ + return s.resizingEl.getWidth(); + }else{ + return s.resizingEl.getHeight(); + } + }, + + + setElementSize : function(s, newSize, onComplete){ + if(s.orientation == Ext.SplitBar.HORIZONTAL){ + if(!s.animate){ + s.resizingEl.setWidth(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut'); + } + }else{ + + if(!s.animate){ + s.resizingEl.setHeight(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut'); + } + } + } +}; + + +Ext.SplitBar.AbsoluteLayoutAdapter = function(container){ + this.basic = new Ext.SplitBar.BasicLayoutAdapter(); + this.container = Ext.get(container); +}; + +Ext.SplitBar.AbsoluteLayoutAdapter.prototype = { + init : function(s){ + this.basic.init(s); + }, + + getElementSize : function(s){ + return this.basic.getElementSize(s); + }, + + setElementSize : function(s, newSize, onComplete){ + this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s])); + }, + + moveSplitter : function(s){ + var yes = Ext.SplitBar; + switch(s.placement){ + case yes.LEFT: + s.el.setX(s.resizingEl.getRight()); + break; + case yes.RIGHT: + s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px"); + break; + case yes.TOP: + s.el.setY(s.resizingEl.getBottom()); + break; + case yes.BOTTOM: + s.el.setY(s.resizingEl.getTop() - s.el.getHeight()); + break; + } + } +}; + + +Ext.SplitBar.VERTICAL = 1; + + +Ext.SplitBar.HORIZONTAL = 2; + + +Ext.SplitBar.LEFT = 1; + + +Ext.SplitBar.RIGHT = 2; + + +Ext.SplitBar.TOP = 3; + + +Ext.SplitBar.BOTTOM = 4; + Ext.Container = Ext.extend(Ext.BoxComponent, { + bufferResize: 50, + - - autoDestroy: true, - - - defaultType: 'panel', - initComponent : function(){ + + autoDestroy : true, + + + forceLayout: false, + + + + defaultType : 'panel', + + + resizeEvent: 'resize', + + + bubbleEvents: ['add', 'remove'], + + + initComponent : function(){ Ext.Container.superclass.initComponent.call(this); this.addEvents( @@ -14035,123 +13299,165 @@ Ext.Container = Ext.extend(Ext.BoxComponent, { var items = this.items; if(items){ delete this.items; - if(Ext.isArray(items)){ - this.add.apply(this, items); - }else{ - this.add(items); - } + this.add(items); } }, - initItems : function(){ + + initItems : function(){ if(!this.items){ this.items = new Ext.util.MixedCollection(false, this.getComponentId); - this.getLayout(); } + this.getLayout(); + } }, - setLayout : function(layout){ + + setLayout : function(layout){ if(this.layout && this.layout != layout){ this.layout.setContainer(null); } - this.initItems(); this.layout = layout; + this.initItems(); layout.setContainer(this); }, - render : function(){ - Ext.Container.superclass.render.apply(this, arguments); - if(this.layout){ - if(typeof this.layout == 'string'){ - this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig); - } - this.setLayout(this.layout); + afterRender: function(){ + + + Ext.Container.superclass.afterRender.call(this); + if(!this.layout){ + this.layout = 'auto'; + } + if(Ext.isObject(this.layout) && !this.layout.layout){ + this.layoutConfig = this.layout; + this.layout = this.layoutConfig.type; + } + if(Ext.isString(this.layout)){ + this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig); + } + this.setLayout(this.layout); - if(this.activeItem !== undefined){ - var item = this.activeItem; - delete this.activeItem; - this.layout.setActiveItem(item); - return; - } + + if(this.activeItem !== undefined && this.layout.setActiveItem){ + var item = this.activeItem; + delete this.activeItem; + this.layout.setActiveItem(item); } + + if(!this.ownerCt){ - this.doLayout(); + this.doLayout(false, true); } + + + if(this.monitorResize === true){ Ext.EventManager.onWindowResize(this.doLayout, this, [false]); } }, - getLayoutTarget : function(){ + + getLayoutTarget : function(){ return this.el; }, - getComponentId : function(comp){ - return comp.itemId || comp.id; + + getComponentId : function(comp){ + return comp.getItemId(); }, add : function(comp){ - if(!this.items){ - this.initItems(); - } - var a = arguments, len = a.length; - if(len > 1){ - for(var i = 0; i < len; i++) { - this.add(a[i]); - } - return; + this.initItems(); + var args = arguments.length > 1; + if(args || Ext.isArray(comp)){ + var result = []; + Ext.each(args ? arguments : comp, function(c){ + result.push(this.add(c)); + }, this); + return result; } var c = this.lookupComponent(this.applyDefaults(comp)); - var pos = this.items.length; - if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){ - this.items.add(c); - c.ownerCt = this; - this.fireEvent('add', this, c, pos); - } - return c; - }, - - - insert : function(index, comp){ - if(!this.items){ - this.initItems(); - } - var a = arguments, len = a.length; - if(len > 2){ - for(var i = len-1; i >= 1; --i) { - this.insert(index, a[i]); - } - return; - } - var c = this.lookupComponent(this.applyDefaults(comp)); - - if(c.ownerCt == this && this.items.indexOf(c) < index){ - --index; - } - + var index = this.items.length; if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ - this.items.insert(index, c); - c.ownerCt = this; + this.items.add(c); + + c.onAdded(this, index); + this.onAdd(c); this.fireEvent('add', this, c, index); } return c; }, - applyDefaults : function(c){ - if(this.defaults){ - if(typeof c == 'string'){ + onAdd : function(c){ + + }, + + + onAdded : function(container, pos) { + + this.ownerCt = container; + this.initRef(); + + this.cascade(function(c){ + c.initRef(); + }); + this.fireEvent('added', this, container, pos); + }, + + + insert : function(index, comp) { + var args = arguments, + length = args.length, + result = [], + i, c; + + this.initItems(); + + if (length > 2) { + for (i = length - 1; i >= 1; --i) { + result.push(this.insert(index, args[i])); + } + return result; + } + + c = this.lookupComponent(this.applyDefaults(comp)); + index = Math.min(index, this.items.length); + + if (this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false) { + if (c.ownerCt == this) { + this.items.remove(c); + } + this.items.insert(index, c); + c.onAdded(this, index); + this.onAdd(c); + this.fireEvent('add', this, c, index); + } + + return c; + }, + + + applyDefaults : function(c){ + var d = this.defaults; + if(d){ + if(Ext.isFunction(d)){ + d = d.call(this, c); + } + if(Ext.isString(c)){ c = Ext.ComponentMgr.get(c); - Ext.apply(c, this.defaults); + Ext.apply(c, d); }else if(!c.events){ - Ext.applyIf(c, this.defaults); + Ext.applyIf(c.isAction ? c.initialConfig : c, d); }else{ - Ext.apply(c, this.defaults); + Ext.apply(c, d); } } return c; }, - onBeforeAdd : function(item){ + + onBeforeAdd : function(item){ if(item.ownerCt){ item.ownerCt.remove(item, false); } @@ -14162,31 +13468,66 @@ Ext.Container = Ext.extend(Ext.BoxComponent, { remove : function(comp, autoDestroy){ + this.initItems(); var c = this.getComponent(comp); if(c && this.fireEvent('beforeremove', this, c) !== false){ - this.items.remove(c); - delete c.ownerCt; - if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ - c.destroy(); - } - if(this.layout && this.layout.activeItem == c){ - delete this.layout.activeItem; - } + this.doRemove(c, autoDestroy); this.fireEvent('remove', this, c); } return c; }, + onRemove: function(c){ + + }, + + + doRemove: function(c, autoDestroy){ + var l = this.layout, + hasLayout = l && this.rendered; + + if(hasLayout){ + l.onRemove(c); + } + this.items.remove(c); + c.onRemoved(); + this.onRemove(c); + if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ + c.destroy(); + } + if(hasLayout){ + l.afterRemove(c); + } + }, + + + removeAll: function(autoDestroy){ + this.initItems(); + var item, rem = [], items = []; + this.items.each(function(i){ + rem.push(i); + }); + for (var i = 0, len = rem.length; i < len; ++i){ + item = rem[i]; + this.remove(item, autoDestroy); + if(item.ownerCt !== this){ + items.push(item); + } + } + return items; + }, + getComponent : function(comp){ - if(typeof comp == 'object'){ - return comp; + if(Ext.isObject(comp)){ + comp = comp.getItemId(); } return this.items.get(comp); }, - lookupComponent : function(comp){ - if(typeof comp == 'string'){ + + lookupComponent : function(comp){ + if(Ext.isString(comp)){ return Ext.ComponentMgr.get(comp); }else if(!comp.events){ return this.createComponent(comp); @@ -14194,60 +13535,124 @@ Ext.Container = Ext.extend(Ext.BoxComponent, { return comp; }, - createComponent : function(config){ - return Ext.ComponentMgr.create(config, this.defaultType); + + createComponent : function(config, defaultType){ + if (config.render) { + return config; + } + + + var c = Ext.create(Ext.apply({ + ownerCt: this + }, config), defaultType || this.defaultType); + delete c.initialConfig.ownerCt; + delete c.ownerCt; + return c; }, - doLayout : function(shallow){ - if(this.rendered && this.layout){ + canLayout : function() { + var el = this.getVisibilityEl(); + return el && el.dom && !el.isStyle("display", "none"); + }, + + + + doLayout : function(shallow, force){ + var rendered = this.rendered, + forceLayout = force || this.forceLayout; + + if(this.collapsed || !this.canLayout()){ + this.deferLayout = this.deferLayout || !shallow; + if(!forceLayout){ + return; + } + shallow = shallow && !this.deferLayout; + } else { + delete this.deferLayout; + } + if(rendered && this.layout){ this.layout.layout(); } - if(shallow !== false && this.items){ + if(shallow !== true && this.items){ var cs = this.items.items; - for(var i = 0, len = cs.length; i < len; i++) { - var c = cs[i]; + for(var i = 0, len = cs.length; i < len; i++){ + var c = cs[i]; if(c.doLayout){ - c.doLayout(); + c.doLayout(false, forceLayout); } } } + if(rendered){ + this.onLayout(shallow, forceLayout); + } + + this.hasLayout = true; + delete this.forceLayout; + }, + + onLayout : Ext.emptyFn, + + + shouldBufferLayout: function(){ + + var hl = this.hasLayout; + if(this.ownerCt){ + + return hl ? !this.hasLayoutPending() : false; + } + + return hl; + }, + + + hasLayoutPending: function(){ + + var pending = false; + this.ownerCt.bubble(function(c){ + if(c.layoutPending){ + pending = true; + return false; + } + }); + return pending; + }, + + onShow : function(){ + + Ext.Container.superclass.onShow.call(this); + + if(Ext.isDefined(this.deferLayout)){ + delete this.deferLayout; + this.doLayout(true); + } }, getLayout : function(){ if(!this.layout){ - var layout = new Ext.layout.ContainerLayout(this.layoutConfig); + var layout = new Ext.layout.AutoLayout(this.layoutConfig); this.setLayout(layout); } return this.layout; }, - beforeDestroy : function(){ + + beforeDestroy : function(){ + var c; if(this.items){ - Ext.destroy.apply(Ext, this.items.items); + while(c = this.items.first()){ + this.doRemove(c, true); + } } if(this.monitorResize){ Ext.EventManager.removeResizeListener(this.doLayout, this); } - if (this.layout && this.layout.destroy) { - this.layout.destroy(); - } + Ext.destroy(this.layout); Ext.Container.superclass.beforeDestroy.call(this); }, - bubble : function(fn, scope, args){ - var p = this; - while(p){ - if(fn.apply(scope || p, args || [p]) === false){ - break; - } - p = p.ownerCt; - } - }, - - cascade : function(fn, scope, args){ if(fn.apply(scope || this, args || [this]) !== false){ if(this.items){ @@ -14261,29 +13666,27 @@ Ext.Container = Ext.extend(Ext.BoxComponent, { } } } + return this; }, findById : function(id){ - var m, ct = this; + var m = null, + ct = this; this.cascade(function(c){ if(ct != c && c.id === id){ m = c; return false; } }); - return m || null; + return m; }, - findByType : function(xtype){ - return typeof xtype == 'function' ? - this.findBy(function(c){ - return c.constructor === xtype; - }) : - this.findBy(function(c){ - return c.constructor.xtype === xtype; - }); + findByType : function(xtype, shallow){ + return this.findBy(function(c){ + return c.isXType(xtype, shallow); + }); }, @@ -14302,370 +13705,674 @@ Ext.Container = Ext.extend(Ext.BoxComponent, { } }); return m; + }, + + + get : function(key){ + return this.getComponent(key); } }); Ext.Container.LAYOUTS = {}; Ext.reg('container', Ext.Container); -Ext.layout.ContainerLayout = function(config){ - Ext.apply(this, config); -}; - -Ext.layout.ContainerLayout.prototype = { +Ext.layout.ContainerLayout = Ext.extend(Object, { - monitorResize:false, - activeItem : null, + + monitorResize:false, + + activeItem : null, - layout : function(){ - var target = this.container.getLayoutTarget(); - this.onLayout(this.container, target); - this.container.fireEvent('afterlayout', this.container, this); + constructor : function(config){ + this.id = Ext.id(null, 'ext-layout-'); + Ext.apply(this, config); }, - onLayout : function(ct, target){ + type: 'container', + + + IEMeasureHack : function(target, viewFlag) { + var tChildren = target.dom.childNodes, tLen = tChildren.length, c, d = [], e, i, ret; + for (i = 0 ; i < tLen ; i++) { + c = tChildren[i]; + e = Ext.get(c); + if (e) { + d[i] = e.getStyle('display'); + e.setStyle({display: 'none'}); + } + } + ret = target ? target.getViewSize(viewFlag) : {}; + for (i = 0 ; i < tLen ; i++) { + c = tChildren[i]; + e = Ext.get(c); + if (e) { + e.setStyle({display: d[i]}); + } + } + return ret; + }, + + + getLayoutTargetSize : Ext.EmptyFn, + + + layout : function(){ + var ct = this.container, target = ct.getLayoutTarget(); + if(!(this.hasLayout || Ext.isEmpty(this.targetCls))){ + target.addClass(this.targetCls); + } + this.onLayout(ct, target); + ct.fireEvent('afterlayout', ct, this); + }, + + + onLayout : function(ct, target){ this.renderAll(ct, target); }, - isValidParent : function(c, target){ - var el = c.getPositionEl ? c.getPositionEl() : c.getEl(); - return el.dom.parentNode == target.dom; + + isValidParent : function(c, target){ + return target && c.getPositionEl().dom.parentNode == (target.dom || target); }, - renderAll : function(ct, target){ - var items = ct.items.items; - for(var i = 0, len = items.length; i < len; i++) { - var c = items[i]; + + renderAll : function(ct, target){ + var items = ct.items.items, i, c, len = items.length; + for(i = 0; i < len; i++) { + c = items[i]; if(c && (!c.rendered || !this.isValidParent(c, target))){ this.renderItem(c, i, target); } } }, - renderItem : function(c, position, target){ - if(c && !c.rendered){ - c.render(target, position); - if(this.extraCls){ - var t = c.getPositionEl ? c.getPositionEl() : c; - t.addClass(this.extraCls); - } - if (this.renderHidden && c != this.activeItem) { - c.hide(); - } - }else if(c && !this.isValidParent(c, target)){ - if(this.extraCls){ - c.addClass(this.extraCls); - } - if(typeof position == 'number'){ - position = target.dom.childNodes[position]; - } - target.dom.insertBefore(c.getEl().dom, position || null); - if (this.renderHidden && c != this.activeItem) { - c.hide(); + + renderItem : function(c, position, target){ + if (c) { + if (!c.rendered) { + c.render(target, position); + this.configureItem(c); + } else if (!this.isValidParent(c, target)) { + if (Ext.isNumber(position)) { + position = target.dom.childNodes[position]; + } + + target.dom.insertBefore(c.getPositionEl().dom, position || null); + c.container = target; + this.configureItem(c); } } }, - onResize: function(){ - if(this.container.collapsed){ + + + getRenderedItems: function(ct){ + var t = ct.getLayoutTarget(), cti = ct.items.items, len = cti.length, i, c, items = []; + for (i = 0; i < len; i++) { + if((c = cti[i]).rendered && this.isValidParent(c, t) && c.shouldLayout !== false){ + items.push(c); + } + }; + return items; + }, + + + configureItem: function(c){ + if (this.extraCls) { + var t = c.getPositionEl ? c.getPositionEl() : c; + t.addClass(this.extraCls); + } + + + if (c.doLayout && this.forceLayout) { + c.doLayout(); + } + if (this.renderHidden && c != this.activeItem) { + c.hide(); + } + }, + + onRemove: function(c){ + if(this.activeItem == c){ + delete this.activeItem; + } + if(c.rendered && this.extraCls){ + var t = c.getPositionEl ? c.getPositionEl() : c; + t.removeClass(this.extraCls); + } + }, + + afterRemove: function(c){ + if(c.removeRestore){ + c.removeMode = 'container'; + delete c.removeRestore; + } + }, + + + onResize: function(){ + var ct = this.container, + b; + if(ct.collapsed){ return; } - var b = this.container.bufferResize; - if(b){ + if(b = ct.bufferResize && ct.shouldBufferLayout()){ if(!this.resizeTask){ - this.resizeTask = new Ext.util.DelayedTask(this.layout, this); - this.resizeBuffer = typeof b == 'number' ? b : 100; + this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this); + this.resizeBuffer = Ext.isNumber(b) ? b : 50; } + ct.layoutPending = true; this.resizeTask.delay(this.resizeBuffer); }else{ - this.layout(); + this.runLayout(); } }, - setContainer : function(ct){ + runLayout: function(){ + var ct = this.container; + this.layout(); + ct.onLayout(); + delete ct.layoutPending; + }, + + + setContainer : function(ct){ + if(this.monitorResize && ct != this.container){ - if(this.container){ - this.container.un('resize', this.onResize, this); + var old = this.container; + if(old){ + old.un(old.resizeEvent, this.onResize, this); } if(ct){ - ct.on('resize', this.onResize, this); + ct.on(ct.resizeEvent, this.onResize, this); } } this.container = ct; }, - parseMargins : function(v){ - var ms = v.split(' '); - var len = ms.length; - if(len == 1){ - ms[1] = ms[0]; - ms[2] = ms[0]; - ms[3] = ms[0]; + + parseMargins : function(v){ + if (Ext.isNumber(v)) { + v = v.toString(); } - if(len == 2){ + var ms = v.split(' '), + len = ms.length; + + if (len == 1) { + ms[1] = ms[2] = ms[3] = ms[0]; + } else if(len == 2) { ms[2] = ms[0]; ms[3] = ms[1]; + } else if(len == 3) { + ms[3] = ms[1]; } + return { - top:parseInt(ms[0], 10) || 0, - right:parseInt(ms[1], 10) || 0, + top :parseInt(ms[0], 10) || 0, + right :parseInt(ms[1], 10) || 0, bottom:parseInt(ms[2], 10) || 0, - left:parseInt(ms[3], 10) || 0 + left :parseInt(ms[3], 10) || 0 }; }, - destroy : Ext.emptyFn -}; -Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout; - -Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { - monitorResize:true, - + fieldTpl: (function() { + var t = new Ext.Template( + '
', + '', + '
', + '
', + '
' + ); + t.disableFormats = true; + return t.compile(); + })(), + - onLayout : function(ct, target){ - Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target); - if(!this.container.collapsed){ - this.setItemSize(this.activeItem || ct.items.itemAt(0), target.getStyleSize()); - } - }, - + destroy : function(){ + + if(this.resizeTask && this.resizeTask.cancel){ + this.resizeTask.cancel(); + } + if(this.container) { + this.container.un(this.container.resizeEvent, this.onResize, this); + } + if(!Ext.isEmpty(this.targetCls)){ + var target = this.container.getLayoutTarget(); + if(target){ + target.removeClass(this.targetCls); + } + } + } +}); +Ext.layout.AutoLayout = Ext.extend(Ext.layout.ContainerLayout, { + type: 'auto', + + monitorResize: true, + + onLayout : function(ct, target){ + Ext.layout.AutoLayout.superclass.onLayout.call(this, ct, target); + var cs = this.getRenderedItems(ct), len = cs.length, i, c; + for(i = 0; i < len; i++){ + c = cs[i]; + if (c.doLayout){ + + c.doLayout(true); + } + } + } +}); + +Ext.Container.LAYOUTS['auto'] = Ext.layout.AutoLayout; + +Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { - setItemSize : function(item, size){ + monitorResize:true, + + type: 'fit', + + getLayoutTargetSize : function() { + var target = this.container.getLayoutTarget(); + if (!target) { + return {}; + } + + return target.getStyleSize(); + }, + + + onLayout : function(ct, target){ + Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target); + if(!ct.collapsed){ + this.setItemSize(this.activeItem || ct.items.itemAt(0), this.getLayoutTargetSize()); + } + }, + + + setItemSize : function(item, size){ if(item && size.height > 0){ - item.setSize(size); - } - } -}); + item.setSize(size); + } + } +}); Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout; - -Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { - - deferredRender : false, - +Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { - renderHidden : true, - - - setActiveItem : function(item){ - item = this.container.getComponent(item); - if(this.activeItem != item){ - if(this.activeItem){ - this.activeItem.hide(); - } - this.activeItem = item; - item.show(); - this.layout(); - } - }, - + deferredRender : false, + - renderAll : function(ct, target){ - if(this.deferredRender){ - this.renderItem(this.activeItem, undefined, target); - }else{ - Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target); - } - } -}); + layoutOnCardChange : false, + + + + renderHidden : true, + + type: 'card', + + + setActiveItem : function(item){ + var ai = this.activeItem, + ct = this.container; + item = ct.getComponent(item); + + + if(item && ai != item){ + + + if(ai){ + ai.hide(); + if (ai.hidden !== true) { + return false; + } + ai.fireEvent('deactivate', ai); + } + + var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered); + + + this.activeItem = item; + + + + delete item.deferLayout; + + + item.show(); + + this.layout(); + + if(layout){ + item.doLayout(); + } + item.fireEvent('activate', item); + } + }, + + + renderAll : function(ct, target){ + if(this.deferredRender){ + this.renderItem(this.activeItem, undefined, target); + }else{ + Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target); + } + } +}); Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout; - -Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, { + +Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, { - monitorResize:true, - + - getAnchorViewSize : function(ct, target){ - return target.dom == document.body ? - target.getViewSize() : target.getStyleSize(); - }, - + monitorResize : true, + + type : 'anchor', + - onLayout : function(ct, target){ - Ext.layout.AnchorLayout.superclass.onLayout.call(this, ct, target); - - var size = this.getAnchorViewSize(ct, target); - - var w = size.width, h = size.height; - - if(w < 20 || h < 20){ - return; - } - + defaultAnchor : '100%', + + parseAnchorRE : /^(r|right|b|bottom)$/i, + + + getLayoutTargetSize : function() { + var target = this.container.getLayoutTarget(), ret = {}; + if (target) { + ret = target.getViewSize(); + + + + + if (Ext.isIE && Ext.isStrict && ret.width == 0){ + ret = target.getStyleSize(); + } + ret.width -= target.getPadding('lr'); + ret.height -= target.getPadding('tb'); + } + return ret; + }, + + + onLayout : function(container, target) { + Ext.layout.AnchorLayout.superclass.onLayout.call(this, container, target); + + var size = this.getLayoutTargetSize(), + containerWidth = size.width, + containerHeight = size.height, + overflow = target.getStyle('overflow'), + components = this.getRenderedItems(container), + len = components.length, + boxes = [], + box, + anchorWidth, + anchorHeight, + component, + anchorSpec, + calcWidth, + calcHeight, + anchorsArray, + totalHeight = 0, + i, + el; + + if(containerWidth < 20 && containerHeight < 20){ + return; + } + - var aw, ah; - if(ct.anchorSize){ - if(typeof ct.anchorSize == 'number'){ - aw = ct.anchorSize; - }else{ - aw = ct.anchorSize.width; - ah = ct.anchorSize.height; - } - }else{ - aw = ct.initialConfig.width; - ah = ct.initialConfig.height; - } - - var cs = ct.items.items, len = cs.length, i, c, a, cw, ch; - for(i = 0; i < len; i++){ - c = cs[i]; - if(c.anchor){ - a = c.anchorSpec; - if(!a){ - var vs = c.anchor.split(' '); - c.anchorSpec = a = { - right: this.parseAnchor(vs[0], c.initialConfig.width, aw), - bottom: this.parseAnchor(vs[1], c.initialConfig.height, ah) - }; - } - cw = a.right ? this.adjustWidthAnchor(a.right(w), c) : undefined; - ch = a.bottom ? this.adjustHeightAnchor(a.bottom(h), c) : undefined; - - if(cw || ch){ - c.setSize(cw || undefined, ch || undefined); - } - } - } - }, - + if(container.anchorSize) { + if(typeof container.anchorSize == 'number') { + anchorWidth = container.anchorSize; + } else { + anchorWidth = container.anchorSize.width; + anchorHeight = container.anchorSize.height; + } + } else { + anchorWidth = container.initialConfig.width; + anchorHeight = container.initialConfig.height; + } + + for(i = 0; i < len; i++) { + component = components[i]; + el = component.getPositionEl(); + + + if (!component.anchor && component.items && !Ext.isNumber(component.width) && !(Ext.isIE6 && Ext.isStrict)){ + component.anchor = this.defaultAnchor; + } + + if(component.anchor) { + anchorSpec = component.anchorSpec; + + if(!anchorSpec){ + anchorsArray = component.anchor.split(' '); + component.anchorSpec = anchorSpec = { + right: this.parseAnchor(anchorsArray[0], component.initialConfig.width, anchorWidth), + bottom: this.parseAnchor(anchorsArray[1], component.initialConfig.height, anchorHeight) + }; + } + calcWidth = anchorSpec.right ? this.adjustWidthAnchor(anchorSpec.right(containerWidth) - el.getMargins('lr'), component) : undefined; + calcHeight = anchorSpec.bottom ? this.adjustHeightAnchor(anchorSpec.bottom(containerHeight) - el.getMargins('tb'), component) : undefined; + + if(calcWidth || calcHeight) { + boxes.push({ + component: component, + width: calcWidth || undefined, + height: calcHeight || undefined + }); + } + } + } + for (i = 0, len = boxes.length; i < len; i++) { + box = boxes[i]; + box.component.setSize(box.width, box.height); + } + + if (overflow && overflow != 'hidden' && !this.adjustmentPass) { + var newTargetSize = this.getLayoutTargetSize(); + if (newTargetSize.width != size.width || newTargetSize.height != size.height){ + this.adjustmentPass = true; + this.onLayout(container, target); + } + } + + delete this.adjustmentPass; + }, + - parseAnchor : function(a, start, cstart){ - if(a && a != 'none'){ - var last; - if(/^(r|right|b|bottom)$/i.test(a)){ - var diff = cstart - start; - return function(v){ - if(v !== last){ - last = v; - return v - diff; - } - } - }else if(a.indexOf('%') != -1){ - var ratio = parseFloat(a.replace('%', ''))*.01; - return function(v){ - if(v !== last){ - last = v; - return Math.floor(v*ratio); - } - } - }else{ - a = parseInt(a, 10); - if(!isNaN(a)){ - return function(v){ - if(v !== last){ - last = v; - return v + a; - } - } - } - } - } - return false; - }, - + parseAnchor : function(a, start, cstart) { + if (a && a != 'none') { + var last; + + if (this.parseAnchorRE.test(a)) { + var diff = cstart - start; + return function(v){ + if(v !== last){ + last = v; + return v - diff; + } + }; + + } else if(a.indexOf('%') != -1) { + var ratio = parseFloat(a.replace('%', ''))*.01; + return function(v){ + if(v !== last){ + last = v; + return Math.floor(v*ratio); + } + }; + + } else { + a = parseInt(a, 10); + if (!isNaN(a)) { + return function(v) { + if (v !== last) { + last = v; + return v + a; + } + }; + } + } + } + return false; + }, + - adjustWidthAnchor : function(value, comp){ - return value; - }, - + adjustWidthAnchor : function(value, comp){ + return value; + }, + - adjustHeightAnchor : function(value, comp){ - return value; - } - - -}); + adjustHeightAnchor : function(value, comp){ + return value; + } + + +}); Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout; - -Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { + +Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { - monitorResize:true, + monitorResize:true, + + type: 'column', + + extraCls: 'x-column', + + scrollOffset : 0, + - extraCls: 'x-column', - - scrollOffset : 0, - - - isValidParent : function(c, target){ - return c.getEl().dom.parentNode == this.innerCt.dom; - }, - - - onLayout : function(ct, target){ - var cs = ct.items.items, len = cs.length, c, i; - - if(!this.innerCt){ - target.addClass('x-column-layout-ct'); - + + targetCls: 'x-column-layout-ct', + + isValidParent : function(c, target){ + return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom; + }, + + getLayoutTargetSize : function() { + var target = this.container.getLayoutTarget(), ret; + if (target) { + ret = target.getViewSize(); + - this.innerCt = target.createChild({cls:'x-column-inner'}); - this.innerCt.createChild({cls:'x-clear'}); - } - this.renderAll(ct, this.innerCt); - - var size = Ext.isIE && target.dom != Ext.getBody().dom ? target.getStyleSize() : target.getViewSize(); - + + if (Ext.isIE && Ext.isStrict && ret.width == 0){ + ret = target.getStyleSize(); + } + + ret.width -= target.getPadding('lr'); + ret.height -= target.getPadding('tb'); + } + return ret; + }, + + renderAll : function(ct, target) { + if(!this.innerCt){ + + + this.innerCt = target.createChild({cls:'x-column-inner'}); + this.innerCt.createChild({cls:'x-clear'}); + } + Ext.layout.ColumnLayout.superclass.renderAll.call(this, ct, this.innerCt); + }, + + + onLayout : function(ct, target){ + var cs = ct.items.items, + len = cs.length, + c, + i, + m, + margins = []; + + this.renderAll(ct, target); + + var size = this.getLayoutTargetSize(); + if(size.width < 1 && size.height < 1){ - return; - } - - var w = size.width - target.getPadding('lr') - this.scrollOffset, - h = size.height - target.getPadding('tb'), - pw = w; - - this.innerCt.setWidth(w); - + return; + } + + var w = size.width - this.scrollOffset, + h = size.height, + pw = w; + + this.innerCt.setWidth(w); + - - for(i = 0; i < len; i++){ - c = cs[i]; - if(!c.columnWidth){ - pw -= (c.getSize().width + c.getEl().getMargins('lr')); - } - } - - pw = pw < 0 ? 0 : pw; - - for(i = 0; i < len; i++){ - c = cs[i]; - if(c.columnWidth){ - c.setSize(Math.floor(c.columnWidth*pw) - c.getEl().getMargins('lr')); - } - } - } - - -}); - + + for(i = 0; i < len; i++){ + c = cs[i]; + m = c.getPositionEl().getMargins('lr'); + margins[i] = m; + if(!c.columnWidth){ + pw -= (c.getWidth() + m); + } + } + + pw = pw < 0 ? 0 : pw; + + for(i = 0; i < len; i++){ + c = cs[i]; + m = margins[i]; + if(c.columnWidth){ + c.setSize(Math.floor(c.columnWidth * pw) - m); + } + } + + + + if (Ext.isIE) { + if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) { + var ts = this.getLayoutTargetSize(); + if (ts.width != size.width){ + this.adjustmentPass = true; + this.onLayout(ct, target); + } + } + } + delete this.adjustmentPass; + } + + +}); + Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout; Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { - monitorResize:true, - rendered : false, + + monitorResize:true, + + rendered : false, - onLayout : function(ct, target){ - var collapsed; + type: 'border', + + targetCls: 'x-border-layout-ct', + + getLayoutTargetSize : function() { + var target = this.container.getLayoutTarget(); + return target ? target.getViewSize() : {}; + }, + + + onLayout : function(ct, target){ + var collapsed, i, c, pos, items = ct.items.items, len = items.length; if(!this.rendered){ - target.position(); - target.addClass('x-border-layout-ct'); - var items = ct.items.items; collapsed = []; - for(var i = 0, len = items.length; i < len; i++) { - var c = items[i]; - var pos = c.region; + for(i = 0; i < len; i++) { + c = items[i]; + pos = c.region; if(c.collapsed){ collapsed.push(c); } c.collapsed = false; if(!c.rendered){ - c.cls = c.cls ? c.cls +' x-border-panel' : 'x-border-panel'; c.render(target, i); + c.getPositionEl().addClass('x-border-panel'); } this[pos] = pos != 'center' && c.split ? new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) : @@ -14675,8 +14382,9 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { this.rendered = true; } - var size = target.getViewSize(); - if(size.width < 20 || size.height < 20){ if(collapsed){ + var size = this.getLayoutTargetSize(); + if(size.width < 20 || size.height < 20){ + if(collapsed){ this.restoreCollapsed = collapsed; } return; @@ -14685,17 +14393,17 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { delete this.restoreCollapsed; } - var w = size.width, h = size.height; - var centerW = w, centerH = h, centerY = 0, centerX = 0; - - var n = this.north, s = this.south, west = this.west, e = this.east, c = this.center; - if(!c){ + var w = size.width, h = size.height, + centerW = w, centerH = h, centerY = 0, centerX = 0, + n = this.north, s = this.south, west = this.west, e = this.east, c = this.center, + b, m, totalWidth, totalHeight; + if(!c && Ext.layout.BorderLayout.WARN !== false){ throw 'No center region defined in BorderLayout ' + ct.id; } if(n && n.isVisible()){ - var b = n.getSize(); - var m = n.getMargins(); + b = n.getSize(); + m = n.getMargins(); b.width = w - (m.left+m.right); b.x = m.left; b.y = m.top; @@ -14704,67 +14412,80 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { n.applyLayout(b); } if(s && s.isVisible()){ - var b = s.getSize(); - var m = s.getMargins(); + b = s.getSize(); + m = s.getMargins(); b.width = w - (m.left+m.right); b.x = m.left; - var totalHeight = (b.height + m.top + m.bottom); + totalHeight = (b.height + m.top + m.bottom); b.y = h - totalHeight + m.top; centerH -= totalHeight; s.applyLayout(b); } if(west && west.isVisible()){ - var b = west.getSize(); - var m = west.getMargins(); + b = west.getSize(); + m = west.getMargins(); b.height = centerH - (m.top+m.bottom); b.x = m.left; b.y = centerY + m.top; - var totalWidth = (b.width + m.left + m.right); + totalWidth = (b.width + m.left + m.right); centerX += totalWidth; centerW -= totalWidth; west.applyLayout(b); } if(e && e.isVisible()){ - var b = e.getSize(); - var m = e.getMargins(); + b = e.getSize(); + m = e.getMargins(); b.height = centerH - (m.top+m.bottom); - var totalWidth = (b.width + m.left + m.right); + totalWidth = (b.width + m.left + m.right); b.x = w - totalWidth + m.left; b.y = centerY + m.top; centerW -= totalWidth; e.applyLayout(b); } - - var m = c.getMargins(); - var centerBox = { - x: centerX + m.left, - y: centerY + m.top, - width: centerW - (m.left+m.right), - height: centerH - (m.top+m.bottom) - }; - c.applyLayout(centerBox); - + if(c){ + m = c.getMargins(); + var centerBox = { + x: centerX + m.left, + y: centerY + m.top, + width: centerW - (m.left+m.right), + height: centerH - (m.top+m.bottom) + }; + c.applyLayout(centerBox); + } if(collapsed){ - for(var i = 0, len = collapsed.length; i < len; i++){ + for(i = 0, len = collapsed.length; i < len; i++){ collapsed[i].collapse(false); } } - - if(Ext.isIE && Ext.isStrict){ target.repaint(); + if(Ext.isIE && Ext.isStrict){ + target.repaint(); } + + if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) { + var ts = this.getLayoutTargetSize(); + if (ts.width != size.width || ts.height != size.height){ + this.adjustmentPass = true; + this.onLayout(ct, target); + } + } + delete this.adjustmentPass; }, destroy: function() { - var r = ['north', 'south', 'east', 'west']; - for (var i = 0; i < r.length; i++) { - var region = this[r[i]]; - if (region && region.split) { - region.split.destroy(true); + var r = ['north', 'south', 'east', 'west'], i, region; + for (i = 0; i < r.length; i++) { + region = this[r[i]]; + if(region){ + if(region.destroy){ + region.destroy(); + }else if (region.split){ + region.split.destroy(true); + } } } Ext.layout.BorderLayout.superclass.destroy.call(this); } - + }); @@ -14794,7 +14515,6 @@ Ext.layout.BorderLayout.Region = function(layout, config, pos){ Ext.layout.BorderLayout.Region.prototype = { - @@ -14809,9 +14529,13 @@ Ext.layout.BorderLayout.Region.prototype = { minHeight:50, - defaultMargins : {left:0,top:0,right:0,bottom:0}, - defaultNSCMargins : {left:5,top:5,right:5,bottom:5}, - defaultEWCMargins : {left:5,top:0,right:5,bottom:0}, + + defaultMargins : {left:0,top:0,right:0,bottom:0}, + + defaultNSCMargins : {left:5,top:5,right:5,bottom:5}, + + defaultEWCMargins : {left:5,top:0,right:5,bottom:0}, + floatingZIndex: 100, isCollapsed : false, @@ -14820,7 +14544,8 @@ Ext.layout.BorderLayout.Region.prototype = { - render : function(ct, p){ + + render : function(ct, p){ this.panel = p; p.el.enableDisplayMode(); this.targetEl = ct; @@ -14842,7 +14567,7 @@ Ext.layout.BorderLayout.Region.prototype = { show: this.onShow, scope: this }); - if(this.collapsible){ + if(this.collapsible || this.floatable){ p.collapseEl = 'el'; p.slideAnchor = this.getSlideAnchor(); } @@ -14853,7 +14578,8 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - getCollapsedEl : function(){ + + getCollapsedEl : function(){ if(!this.collapsedEl){ if(!this.toolTemplate){ var tt = new Ext.Template( @@ -14878,46 +14604,52 @@ Ext.layout.BorderLayout.Region.prototype = { this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); this.collapsedEl.on('click', this.onExpandClick, this, {stopEvent:true}); }else { - var t = this.toolTemplate.append( - this.collapsedEl.dom, - {id:'expand-'+this.position}, true); - t.addClassOnOver('x-tool-expand-'+this.position+'-over'); - t.on('click', this.onExpandClick, this, {stopEvent:true}); - - if(this.floatable !== false){ + if(this.collapsible !== false && !this.hideCollapseTool) { + var t = this.expandToolEl = this.toolTemplate.append( + this.collapsedEl.dom, + {id:'expand-'+this.position}, true); + t.addClassOnOver('x-tool-expand-'+this.position+'-over'); + t.on('click', this.onExpandClick, this, {stopEvent:true}); + } + if(this.floatable !== false || this.titleCollapse){ this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); - this.collapsedEl.on("click", this.collapseClick, this); + this.collapsedEl.on("click", this[this.floatable ? 'collapseClick' : 'onExpandClick'], this); } } } return this.collapsedEl; }, - onExpandClick : function(e){ + + onExpandClick : function(e){ if(this.isSlid){ - this.afterSlideIn(); this.panel.expand(false); }else{ this.panel.expand(); } }, - onCollapseClick : function(e){ + + onCollapseClick : function(e){ this.panel.collapse(); }, - beforeCollapse : function(p, animate){ + + beforeCollapse : function(p, animate){ this.lastAnim = animate; if(this.splitEl){ this.splitEl.hide(); } this.getCollapsedEl().show(); - this.panel.el.setStyle('z-index', 100); + var el = this.panel.getEl(); + this.originalZIndex = el.getStyle('z-index'); + el.setStyle('z-index', 100); this.isCollapsed = true; this.layout.layout(); }, - onCollapse : function(animate){ + + onCollapse : function(animate){ this.panel.el.setStyle('z-index', 1); if(this.lastAnim === false || this.panel.animCollapse === false){ this.getCollapsedEl().dom.style.visibility = 'visible'; @@ -14928,7 +14660,11 @@ Ext.layout.BorderLayout.Region.prototype = { this.panel.saveState(); }, - beforeExpand : function(animate){ + + beforeExpand : function(animate){ + if(this.isSlid){ + this.afterSlideIn(); + } var c = this.getCollapsedEl(); this.el.show(); if(this.position == 'east' || this.position == 'west'){ @@ -14938,21 +14674,23 @@ Ext.layout.BorderLayout.Region.prototype = { } c.hide(); c.dom.style.visibility = 'hidden'; - this.panel.el.setStyle('z-index', 100); + this.panel.el.setStyle('z-index', this.floatingZIndex); }, - onExpand : function(){ + + onExpand : function(){ this.isCollapsed = false; if(this.splitEl){ this.splitEl.show(); } this.layout.layout(); - this.panel.el.setStyle('z-index', 1); + this.panel.el.setStyle('z-index', this.originalZIndex); this.state.collapsed = false; this.panel.saveState(); }, - collapseClick : function(e){ + + collapseClick : function(e){ if(this.isSlid){ e.stopPropagation(); this.slideIn(); @@ -14962,7 +14700,8 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - onHide : function(){ + + onHide : function(){ if(this.isCollapsed){ this.getCollapsedEl().hide(); }else if(this.splitEl){ @@ -14970,7 +14709,8 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - onShow : function(){ + + onShow : function(){ if(this.isCollapsed){ this.getCollapsedEl().show(); }else if(this.splitEl){ @@ -15008,13 +14748,15 @@ Ext.layout.BorderLayout.Region.prototype = { return this.minHeight; }, - applyLayoutCollapsed : function(box){ + + applyLayoutCollapsed : function(box){ var ce = this.getCollapsedEl(); ce.setLeftTop(box.x, box.y); ce.setSize(box.width, box.height); }, - applyLayout : function(box){ + + applyLayout : function(box){ if(this.isCollapsed){ this.applyLayoutCollapsed(box); }else{ @@ -15023,63 +14765,89 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - beforeSlide: function(){ + + beforeSlide: function(){ this.panel.beforeEffect(); }, - afterSlide : function(){ + + afterSlide : function(){ this.panel.afterEffect(); }, - initAutoHide : function(){ + + initAutoHide : function(){ if(this.autoHide !== false){ if(!this.autoHideHd){ - var st = new Ext.util.DelayedTask(this.slideIn, this); + this.autoHideSlideTask = new Ext.util.DelayedTask(this.slideIn, this); this.autoHideHd = { "mouseout": function(e){ if(!e.within(this.el, true)){ - st.delay(500); + this.autoHideSlideTask.delay(500); } }, "mouseover" : function(e){ - st.cancel(); + this.autoHideSlideTask.cancel(); }, scope : this }; } this.el.on(this.autoHideHd); + this.collapsedEl.on(this.autoHideHd); } }, - clearAutoHide : function(){ + + clearAutoHide : function(){ if(this.autoHide !== false){ this.el.un("mouseout", this.autoHideHd.mouseout); this.el.un("mouseover", this.autoHideHd.mouseover); + this.collapsedEl.un("mouseout", this.autoHideHd.mouseout); + this.collapsedEl.un("mouseover", this.autoHideHd.mouseover); } }, - clearMonitor : function(){ + + clearMonitor : function(){ Ext.getDoc().un("click", this.slideInIf, this); }, - slideOut : function(){ + + slideOut : function(){ if(this.isSlid || this.el.hasActiveFx()){ return; } this.isSlid = true; - var ts = this.panel.tools; + var ts = this.panel.tools, dh, pc; if(ts && ts.toggle){ ts.toggle.hide(); } this.el.show(); + + + pc = this.panel.collapsed; + this.panel.collapsed = false; + if(this.position == 'east' || this.position == 'west'){ + + dh = this.panel.deferHeight; + this.panel.deferHeight = false; + this.panel.setSize(undefined, this.collapsedEl.getHeight()); + + + this.panel.deferHeight = dh; }else{ this.panel.setSize(this.collapsedEl.getWidth(), undefined); } + + + this.panel.collapsed = pc; + this.restoreLT = [this.el.dom.style.left, this.el.dom.style.top]; this.el.alignTo(this.collapsedEl, this.getCollapseAnchor()); - this.el.setStyle("z-index", 102); + this.el.setStyle("z-index", this.floatingZIndex+2); + this.panel.el.replaceClass('x-panel-collapsed', 'x-panel-floating'); if(this.animFloat !== false){ this.beforeSlide(); this.el.slideIn(this.getSlideAnchor(), { @@ -15097,11 +14865,13 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - afterSlideIn : function(){ + + afterSlideIn : function(){ this.clearAutoHide(); this.isSlid = false; this.clearMonitor(); this.el.setStyle("z-index", ""); + this.panel.el.replaceClass('x-panel-floating', 'x-panel-collapsed'); this.el.dom.style.left = this.restoreLT[0]; this.el.dom.style.top = this.restoreLT[1]; @@ -15111,7 +14881,8 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - slideIn : function(cb){ + + slideIn : function(cb){ if(!this.isSlid || this.el.hasActiveFx()){ Ext.callback(cb); return; @@ -15135,46 +14906,54 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - slideInIf : function(e){ + + slideInIf : function(e){ if(!e.within(this.el)){ this.slideIn(); } }, - anchors : { + + anchors : { "west" : "left", "east" : "right", "north" : "top", "south" : "bottom" }, - sanchors : { + + sanchors : { "west" : "l", "east" : "r", "north" : "t", "south" : "b" }, - canchors : { + + canchors : { "west" : "tl-tr", "east" : "tr-tl", "north" : "tl-bl", "south" : "bl-tl" }, - getAnchor : function(){ + + getAnchor : function(){ return this.anchors[this.position]; }, - getCollapseAnchor : function(){ + + getCollapseAnchor : function(){ return this.canchors[this.position]; }, - getSlideAnchor : function(){ + + getSlideAnchor : function(){ return this.sanchors[this.position]; }, - getAlignAdj : function(){ + + getAlignAdj : function(){ var cm = this.cmargins; switch(this.position){ case "west": @@ -15192,7 +14971,8 @@ Ext.layout.BorderLayout.Region.prototype = { } }, - getExpandAdj : function(){ + + getExpandAdj : function(){ var c = this.collapsedEl, cm = this.cmargins; switch(this.position){ case "west": @@ -15208,24 +14988,34 @@ Ext.layout.BorderLayout.Region.prototype = { return [0, cm.top+cm.bottom+c.getHeight()]; break; } + }, + + destroy : function(){ + if (this.autoHideSlideTask && this.autoHideSlideTask.cancel){ + this.autoHideSlideTask.cancel(); + } + Ext.destroyMembers(this, 'miniCollapsedEl', 'collapsedEl', 'expandToolEl'); } }; Ext.layout.BorderLayout.SplitRegion = function(layout, config, pos){ Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, layout, config, pos); - this.applyLayout = this.applyFns[pos]; + + this.applyLayout = this.applyFns[pos]; }; Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, { + splitTip : "Drag to resize.", collapsibleSplitTip : "Drag to resize. Double click to hide.", useSplitTips : false, - splitSettings : { + + splitSettings : { north : { orientation: Ext.SplitBar.VERTICAL, placement: Ext.SplitBar.TOP, @@ -15256,7 +15046,8 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, } }, - applyFns : { + + applyFns : { west : function(box){ if(this.isCollapsed){ return this.applyLayoutCollapsed(box); @@ -15307,7 +15098,8 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, } }, - render : function(ct, p){ + + render : function(ct, p){ Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p); var ps = this.position; @@ -15328,6 +15120,7 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, var s = this.splitSettings[ps]; this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation); + this.split.tickSize = this.tickSize; this.split.placement = s.placement; this.split.getMaximumSize = this[s.maxFn].createDelegate(this); this.split.minSize = this.minSize || this[s.minProp]; @@ -15347,7 +15140,8 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, } }, - getSize : function(){ + + getSize : function(){ if(this.isCollapsed){ return this.collapsedEl.getSize(); } @@ -15360,19 +15154,22 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, return s; }, - getHMaxSize : function(){ + + getHMaxSize : function(){ var cmax = this.maxSize || 10000; var center = this.layout.center; return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth()); }, - getVMaxSize : function(){ + + getVMaxSize : function(){ var cmax = this.maxSize || 10000; var center = this.layout.center; return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight()); }, - onSplitMove : function(split, newSize){ + + onSplitMove : function(split, newSize){ var s = this.panel.getSize(); this.lastSplitSize = newSize; if(this.position == 'north' || this.position == 'south'){ @@ -15390,357 +15187,2258 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, getSplitBar : function(){ return this.split; + }, + + + destroy : function() { + Ext.destroy(this.miniSplitEl, this.split, this.splitEl); + Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this); } }); Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout; Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { - - + labelSeparator : ':', - getAnchorViewSize : function(ct, target){ - return ct.body.getStyleSize(); + + + + trackLabels: true, + + type: 'form', + + onRemove: function(c){ + Ext.layout.FormLayout.superclass.onRemove.call(this, c); + if(this.trackLabels){ + c.un('show', this.onFieldShow, this); + c.un('hide', this.onFieldHide, this); + } + + var el = c.getPositionEl(), + ct = c.getItemCt && c.getItemCt(); + if (c.rendered && ct) { + if (el && el.dom) { + el.insertAfter(ct); + } + Ext.destroy(ct); + Ext.destroyMembers(c, 'label', 'itemCt'); + if (c.customItemCt) { + Ext.destroyMembers(c, 'getItemCt', 'customItemCt'); + } + } }, - setContainer : function(ct){ + + setContainer : function(ct){ Ext.layout.FormLayout.superclass.setContainer.call(this, ct); - if(ct.labelAlign){ ct.addClass('x-form-label-'+ct.labelAlign); } if(ct.hideLabels){ - this.labelStyle = "display:none"; - this.elementStyle = "padding-left:0;"; - this.labelAdjust = 0; + Ext.apply(this, { + labelStyle: 'display:none', + elementStyle: 'padding-left:0;', + labelAdjust: 0 + }); }else{ - this.labelSeparator = ct.labelSeparator || this.labelSeparator; + this.labelSeparator = Ext.isDefined(ct.labelSeparator) ? ct.labelSeparator : this.labelSeparator; ct.labelWidth = ct.labelWidth || 100; - if(typeof ct.labelWidth == 'number'){ - var pad = (typeof ct.labelPad == 'number' ? ct.labelPad : 5); - this.labelAdjust = ct.labelWidth+pad; - this.labelStyle = "width:"+ct.labelWidth+"px;"; - this.elementStyle = "padding-left:"+(ct.labelWidth+pad)+'px'; + if(Ext.isNumber(ct.labelWidth)){ + var pad = Ext.isNumber(ct.labelPad) ? ct.labelPad : 5; + Ext.apply(this, { + labelAdjust: ct.labelWidth + pad, + labelStyle: 'width:' + ct.labelWidth + 'px;', + elementStyle: 'padding-left:' + (ct.labelWidth + pad) + 'px' + }); } if(ct.labelAlign == 'top'){ - this.labelStyle = "width:auto;"; - this.labelAdjust = 0; - this.elementStyle = "padding-left:0;"; + Ext.apply(this, { + labelStyle: 'width:auto;', + labelAdjust: 0, + elementStyle: 'padding-left:0;' + }); } } - - if(!this.fieldTpl){ - var t = new Ext.Template( - '
', - '', - '
', - '
', - '
' - ); - t.disableFormats = true; - t.compile(); - Ext.layout.FormLayout.prototype.fieldTpl = t; - } }, - renderItem : function(c, position, target){ - if(c && !c.rendered && c.isFormField && c.inputType != 'hidden'){ - var args = [ - c.id, c.fieldLabel, - c.labelStyle||this.labelStyle||'', - this.elementStyle||'', - typeof c.labelSeparator == 'undefined' ? this.labelSeparator : c.labelSeparator, - (c.itemCls||this.container.itemCls||'') + (c.hideLabel ? ' x-hide-label' : ''), - c.clearCls || 'x-form-clear-left' - ]; - if(typeof position == 'number'){ + + isHide: function(c){ + return c.hideLabel || this.container.hideLabels; + }, + + onFieldShow: function(c){ + c.getItemCt().removeClass('x-hide-' + c.hideMode); + + + if (c.isComposite) { + c.doLayout(); + } + }, + + onFieldHide: function(c){ + c.getItemCt().addClass('x-hide-' + c.hideMode); + }, + + + getLabelStyle: function(s){ + var ls = '', items = [this.labelStyle, s]; + for (var i = 0, len = items.length; i < len; ++i){ + if (items[i]){ + ls += items[i]; + if (ls.substr(-1, 1) != ';'){ + ls += ';'; + } + } + } + return ls; + }, + + + + + renderItem : function(c, position, target){ + if(c && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){ + var args = this.getTemplateArgs(c); + if(Ext.isNumber(position)){ position = target.dom.childNodes[position] || null; } if(position){ - this.fieldTpl.insertBefore(position, args); + c.itemCt = this.fieldTpl.insertBefore(position, args, true); }else{ - this.fieldTpl.append(target, args); + c.itemCt = this.fieldTpl.append(target, args, true); } - c.render('x-form-el-'+c.id); + if(!c.getItemCt){ + + + Ext.apply(c, { + getItemCt: function(){ + return c.itemCt; + }, + customItemCt: true + }); + } + c.label = c.getItemCt().child('label.x-form-item-label'); + if(!c.rendered){ + c.render('x-form-el-' + c.id); + }else if(!this.isValidParent(c, target)){ + Ext.fly('x-form-el-' + c.id).appendChild(c.getPositionEl()); + } + if(this.trackLabels){ + if(c.hidden){ + this.onFieldHide(c); + } + c.on({ + scope: this, + show: this.onFieldShow, + hide: this.onFieldHide + }); + } + this.configureItem(c); }else { Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments); } }, - adjustWidthAnchor : function(value, comp){ - return value - (comp.isFormField ? (comp.hideLabel ? 0 : this.labelAdjust) : 0); + + getTemplateArgs: function(field) { + var noLabelSep = !field.fieldLabel || field.hideLabel, + itemCls = (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : ''); + + + if (Ext.isIE9 && Ext.isIEQuirks && field instanceof Ext.form.TextField) { + itemCls += ' x-input-wrapper'; + } + + return { + id : field.id, + label : field.fieldLabel, + itemCls : itemCls, + clearCls : field.clearCls || 'x-form-clear-left', + labelStyle : this.getLabelStyle(field.labelStyle), + elementStyle : this.elementStyle || '', + labelSeparator: noLabelSep ? '' : (Ext.isDefined(field.labelSeparator) ? field.labelSeparator : this.labelSeparator) + }; }, - isValidParent : function(c, target){ - return true; + + adjustWidthAnchor: function(value, c){ + if(c.label && !this.isHide(c) && (this.container.labelAlign != 'top')){ + var adjust = Ext.isIE6 || (Ext.isIE && !Ext.isStrict); + return value - this.labelAdjust + (adjust ? -3 : 0); + } + return value; + }, + + adjustHeightAnchor : function(value, c){ + if(c.label && !this.isHide(c) && (this.container.labelAlign == 'top')){ + return value - c.label.getHeight(); + } + return value; + }, + + + isValidParent : function(c, target){ + return target && this.container.getEl().contains(c.getPositionEl()); } }); Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout; - -Ext.layout.Accordion = Ext.extend(Ext.layout.FitLayout, { - - fill : true, - - autoWidth : true, - - titleCollapse : true, - - hideCollapseTool : false, - - collapseFirst : false, - - animate : false, - - sequence : false, - - activeOnTop : false, - - renderItem : function(c){ - if(this.animate === false){ - c.animCollapse = false; - } - c.collapsible = true; - if(this.autoWidth){ - c.autoWidth = true; - } - if(this.titleCollapse){ - c.titleCollapse = true; - } - if(this.hideCollapseTool){ - c.hideCollapseTool = true; - } - if(this.collapseFirst !== undefined){ - c.collapseFirst = this.collapseFirst; - } - if(!this.activeItem && !c.collapsed){ - this.activeItem = c; - }else if(this.activeItem){ - c.collapsed = true; - } - Ext.layout.Accordion.superclass.renderItem.apply(this, arguments); - c.header.addClass('x-accordion-hd'); - c.on('beforeexpand', this.beforeExpand, this); - }, - + +Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, { - beforeExpand : function(p, anim){ - var ai = this.activeItem; - if(ai){ - if(this.sequence){ - delete this.activeItem; - if (!ai.collapsed){ - ai.collapse({callback:function(){ - p.expand(anim || true); - }, scope: this}); - return false; - } - }else{ - ai.collapse(this.animate); - } - } - this.activeItem = p; - if(this.activeOnTop){ - p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild); - } - this.layout(); - }, - + fill : true, - setItemSize : function(item, size){ - if(this.fill && item){ - var items = this.container.items.items; - var hh = 0; - for(var i = 0, len = items.length; i < len; i++){ - var p = items[i]; - if(p != item){ - hh += (p.getSize().height - p.bwrap.getHeight()); - } - } - size.height -= hh; - item.setSize(size); - } - } -}); -Ext.Container.LAYOUTS['accordion'] = Ext.layout.Accordion; - -Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { - - + autoWidth : true, - monitorResize:false, - + titleCollapse : true, - setContainer : function(ct){ - Ext.layout.TableLayout.superclass.setContainer.call(this, ct); - - this.currentRow = 0; - this.currentColumn = 0; - this.cells = []; - }, - + hideCollapseTool : false, - onLayout : function(ct, target){ - var cs = ct.items.items, len = cs.length, c, i; - - if(!this.table){ - target.addClass('x-table-layout-ct'); - - this.table = target.createChild( - {tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, null, true); - - this.renderAll(ct, target); - } - }, - + collapseFirst : false, - getRow : function(index){ - var row = this.table.tBodies[0].childNodes[index]; - if(!row){ - row = document.createElement('tr'); - this.table.tBodies[0].appendChild(row); - } - return row; - }, - + animate : false, - getNextCell : function(c){ - var cell = this.getNextNonSpan(this.currentColumn, this.currentRow); - var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1]; - for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){ - if(!this.cells[rowIndex]){ - this.cells[rowIndex] = []; - } - for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){ - this.cells[rowIndex][colIndex] = true; - } - } - var td = document.createElement('td'); - if(c.cellId){ - td.id = c.cellId; - } - var cls = 'x-table-layout-cell'; - if(c.cellCls){ - cls += ' ' + c.cellCls; - } - td.className = cls; - if(c.colspan){ - td.colSpan = c.colspan; - } - if(c.rowspan){ - td.rowSpan = c.rowspan; - } - this.getRow(curRow).appendChild(td); - return td; - }, - + sequence : false, - getNextNonSpan: function(colIndex, rowIndex){ - var cols = this.columns; - while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) { - if(cols && colIndex >= cols){ - rowIndex++; - colIndex = 0; - }else{ - colIndex++; - } - } - return [colIndex, rowIndex]; - }, - + activeOnTop : false, + + type: 'accordion', + + renderItem : function(c){ + if(this.animate === false){ + c.animCollapse = false; + } + c.collapsible = true; + if(this.autoWidth){ + c.autoWidth = true; + } + if(this.titleCollapse){ + c.titleCollapse = true; + } + if(this.hideCollapseTool){ + c.hideCollapseTool = true; + } + if(this.collapseFirst !== undefined){ + c.collapseFirst = this.collapseFirst; + } + if(!this.activeItem && !c.collapsed){ + this.setActiveItem(c, true); + }else if(this.activeItem && this.activeItem != c){ + c.collapsed = true; + } + Ext.layout.AccordionLayout.superclass.renderItem.apply(this, arguments); + c.header.addClass('x-accordion-hd'); + c.on('beforeexpand', this.beforeExpand, this); + }, + + onRemove: function(c){ + Ext.layout.AccordionLayout.superclass.onRemove.call(this, c); + if(c.rendered){ + c.header.removeClass('x-accordion-hd'); + } + c.un('beforeexpand', this.beforeExpand, this); + }, + - renderItem : function(c, position, target){ - if(c && !c.rendered){ - c.render(this.getNextCell(c)); - } - }, - + beforeExpand : function(p, anim){ + var ai = this.activeItem; + if(ai){ + if(this.sequence){ + delete this.activeItem; + if (!ai.collapsed){ + ai.collapse({callback:function(){ + p.expand(anim || true); + }, scope: this}); + return false; + } + }else{ + ai.collapse(this.animate); + } + } + this.setActive(p); + if(this.activeOnTop){ + p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild); + } + + this.layout(); + }, + - isValidParent : function(c, target){ - return true; - } - - -}); - + setItemSize : function(item, size){ + if(this.fill && item){ + var hh = 0, i, ct = this.getRenderedItems(this.container), len = ct.length, p; + + for (i = 0; i < len; i++) { + if((p = ct[i]) != item && !p.hidden){ + hh += p.header.getHeight(); + } + }; + + size.height -= hh; + + + item.setSize(size); + } + }, + + + setActiveItem : function(item){ + this.setActive(item, true); + }, + + + setActive : function(item, expand){ + var ai = this.activeItem; + item = this.container.getComponent(item); + if(ai != item){ + if(item.rendered && item.collapsed && expand){ + item.expand(); + }else{ + if(ai){ + ai.fireEvent('deactivate', ai); + } + this.activeItem = item; + item.fireEvent('activate', item); + } + } + } +}); +Ext.Container.LAYOUTS.accordion = Ext.layout.AccordionLayout; + + +Ext.layout.Accordion = Ext.layout.AccordionLayout; +Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { + + + + monitorResize:false, + + type: 'table', + + targetCls: 'x-table-layout-ct', + + + tableAttrs:null, + + + setContainer : function(ct){ + Ext.layout.TableLayout.superclass.setContainer.call(this, ct); + + this.currentRow = 0; + this.currentColumn = 0; + this.cells = []; + }, + + + onLayout : function(ct, target){ + var cs = ct.items.items, len = cs.length, c, i; + + if(!this.table){ + target.addClass('x-table-layout-ct'); + + this.table = target.createChild( + Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true); + } + this.renderAll(ct, target); + }, + + + getRow : function(index){ + var row = this.table.tBodies[0].childNodes[index]; + if(!row){ + row = document.createElement('tr'); + this.table.tBodies[0].appendChild(row); + } + return row; + }, + + + getNextCell : function(c){ + var cell = this.getNextNonSpan(this.currentColumn, this.currentRow); + var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1]; + for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){ + if(!this.cells[rowIndex]){ + this.cells[rowIndex] = []; + } + for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){ + this.cells[rowIndex][colIndex] = true; + } + } + var td = document.createElement('td'); + if(c.cellId){ + td.id = c.cellId; + } + var cls = 'x-table-layout-cell'; + if(c.cellCls){ + cls += ' ' + c.cellCls; + } + td.className = cls; + if(c.colspan){ + td.colSpan = c.colspan; + } + if(c.rowspan){ + td.rowSpan = c.rowspan; + } + this.getRow(curRow).appendChild(td); + return td; + }, + + + getNextNonSpan: function(colIndex, rowIndex){ + var cols = this.columns; + while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) { + if(cols && colIndex >= cols){ + rowIndex++; + colIndex = 0; + }else{ + colIndex++; + } + } + return [colIndex, rowIndex]; + }, + + + renderItem : function(c, position, target){ + + if(!this.table){ + this.table = target.createChild( + Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true); + } + if(c && !c.rendered){ + c.render(this.getNextCell(c)); + this.configureItem(c); + }else if(c && !this.isValidParent(c, target)){ + var container = this.getNextCell(c); + container.insertBefore(c.getPositionEl().dom, null); + c.container = Ext.get(container); + this.configureItem(c); + } + }, + + + isValidParent : function(c, target){ + return c.getPositionEl().up('table', 5).dom.parentNode === (target.dom || target); + }, + + destroy: function(){ + delete this.table; + Ext.layout.TableLayout.superclass.destroy.call(this); + } + + +}); + Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout; - -Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, { - extraCls: 'x-abs-layout-item', - isForm: false, +Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, { + + extraCls: 'x-abs-layout-item', + + type: 'absolute', + + onLayout : function(ct, target){ + target.position(); + this.paddingLeft = target.getPadding('l'); + this.paddingTop = target.getPadding('t'); + Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); + }, + - setContainer : function(ct){ - Ext.layout.AbsoluteLayout.superclass.setContainer.call(this, ct); - if(ct.isXType('form')){ - this.isForm = true; - } - }, - - onLayout : function(ct, target){ - if(this.isForm){ ct.body.position(); } else { target.position(); } - Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); - }, - + adjustWidthAnchor : function(value, comp){ + return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value; + }, + - getAnchorViewSize : function(ct, target){ - return this.isForm ? ct.body.getStyleSize() : Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this, ct, target); - }, - + adjustHeightAnchor : function(value, comp){ + return value ? value - comp.getPosition(true)[1] + this.paddingTop : value; + } - isValidParent : function(c, target){ - return this.isForm ? true : Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this, c, target); - }, - - - adjustWidthAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[0] : value; - }, - - - adjustHeightAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[1] : value; - } - -}); +}); Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout; + +Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, { + + defaultMargins : {left:0,top:0,right:0,bottom:0}, + + padding : '0', + + pack : 'start', + + + monitorResize : true, + type: 'box', + scrollOffset : 0, + extraCls : 'x-box-item', + targetCls : 'x-box-layout-ct', + innerCls : 'x-box-inner', + + constructor : function(config){ + Ext.layout.BoxLayout.superclass.constructor.call(this, config); + + if (Ext.isString(this.defaultMargins)) { + this.defaultMargins = this.parseMargins(this.defaultMargins); + } + + var handler = this.overflowHandler; + + if (typeof handler == 'string') { + handler = { + type: handler + }; + } + + var handlerType = 'none'; + if (handler && handler.type != undefined) { + handlerType = handler.type; + } + + var constructor = Ext.layout.boxOverflow[handlerType]; + if (constructor[this.type]) { + constructor = constructor[this.type]; + } + + this.overflowHandler = new constructor(this, handler); + }, + + + onLayout: function(container, target) { + Ext.layout.BoxLayout.superclass.onLayout.call(this, container, target); + + var tSize = this.getLayoutTargetSize(), + items = this.getVisibleItems(container), + calcs = this.calculateChildBoxes(items, tSize), + boxes = calcs.boxes, + meta = calcs.meta; + + + if (tSize.width > 0) { + var handler = this.overflowHandler, + method = meta.tooNarrow ? 'handleOverflow' : 'clearOverflow'; + + var results = handler[method](calcs, tSize); + + if (results) { + if (results.targetSize) { + tSize = results.targetSize; + } + + if (results.recalculate) { + items = this.getVisibleItems(container); + calcs = this.calculateChildBoxes(items, tSize); + boxes = calcs.boxes; + } + } + } + + + this.layoutTargetLastSize = tSize; + + + this.childBoxCache = calcs; + + this.updateInnerCtSize(tSize, calcs); + this.updateChildBoxes(boxes); + + + this.handleTargetOverflow(tSize, container, target); + }, + + + updateChildBoxes: function(boxes) { + for (var i = 0, length = boxes.length; i < length; i++) { + var box = boxes[i], + comp = box.component; + + if (box.dirtySize) { + comp.setSize(box.width, box.height); + } + + if (isNaN(box.left) || isNaN(box.top)) { + continue; + } + + comp.setPosition(box.left, box.top); + } + }, + + + updateInnerCtSize: function(tSize, calcs) { + var align = this.align, + padding = this.padding, + width = tSize.width, + height = tSize.height; + + if (this.type == 'hbox') { + var innerCtWidth = width, + innerCtHeight = calcs.meta.maxHeight + padding.top + padding.bottom; + + if (align == 'stretch') { + innerCtHeight = height; + } else if (align == 'middle') { + innerCtHeight = Math.max(height, innerCtHeight); + } + } else { + var innerCtHeight = height, + innerCtWidth = calcs.meta.maxWidth + padding.left + padding.right; + + if (align == 'stretch') { + innerCtWidth = width; + } else if (align == 'center') { + innerCtWidth = Math.max(width, innerCtWidth); + } + } + + this.innerCt.setSize(innerCtWidth || undefined, innerCtHeight || undefined); + }, + + + handleTargetOverflow: function(previousTargetSize, container, target) { + var overflow = target.getStyle('overflow'); + + if (overflow && overflow != 'hidden' &&!this.adjustmentPass) { + var newTargetSize = this.getLayoutTargetSize(); + if (newTargetSize.width != previousTargetSize.width || newTargetSize.height != previousTargetSize.height){ + this.adjustmentPass = true; + this.onLayout(container, target); + } + } + + delete this.adjustmentPass; + }, + + + isValidParent : function(c, target) { + return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom; + }, + + + getVisibleItems: function(ct) { + var ct = ct || this.container, + t = ct.getLayoutTarget(), + cti = ct.items.items, + len = cti.length, + + i, c, items = []; + + for (i = 0; i < len; i++) { + if((c = cti[i]).rendered && this.isValidParent(c, t) && c.hidden !== true && c.collapsed !== true && c.shouldLayout !== false){ + items.push(c); + } + } + + return items; + }, + + + renderAll : function(ct, target) { + if (!this.innerCt) { + + this.innerCt = target.createChild({cls:this.innerCls}); + this.padding = this.parseMargins(this.padding); + } + Ext.layout.BoxLayout.superclass.renderAll.call(this, ct, this.innerCt); + }, + + getLayoutTargetSize : function() { + var target = this.container.getLayoutTarget(), ret; + + if (target) { + ret = target.getViewSize(); + + + + + if (Ext.isIE && Ext.isStrict && ret.width == 0){ + ret = target.getStyleSize(); + } + + ret.width -= target.getPadding('lr'); + ret.height -= target.getPadding('tb'); + } + + return ret; + }, + + + renderItem : function(c) { + if(Ext.isString(c.margins)){ + c.margins = this.parseMargins(c.margins); + }else if(!c.margins){ + c.margins = this.defaultMargins; + } + Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments); + }, + + + destroy: function() { + Ext.destroy(this.overflowHandler); + + Ext.layout.BoxLayout.superclass.destroy.apply(this, arguments); + } +}); + + + +Ext.layout.boxOverflow.None = Ext.extend(Object, { + constructor: function(layout, config) { + this.layout = layout; + + Ext.apply(this, config || {}); + }, + + handleOverflow: Ext.emptyFn, + + clearOverflow: Ext.emptyFn +}); + + +Ext.layout.boxOverflow.none = Ext.layout.boxOverflow.None; + +Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, { + + afterCls: 'x-strip-right', + + + noItemsMenuText : '
(None)
', + + constructor: function(layout) { + Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this, arguments); + + + this.menuItems = []; + }, + + + createInnerElements: function() { + if (!this.afterCt) { + this.afterCt = this.layout.innerCt.insertSibling({cls: this.afterCls}, 'before'); + } + }, + + + clearOverflow: function(calculations, targetSize) { + var newWidth = targetSize.width + (this.afterCt ? this.afterCt.getWidth() : 0), + items = this.menuItems; + + this.hideTrigger(); + + for (var index = 0, length = items.length; index < length; index++) { + items.pop().component.show(); + } + + return { + targetSize: { + height: targetSize.height, + width : newWidth + } + }; + }, + + + showTrigger: function() { + this.createMenu(); + this.menuTrigger.show(); + }, + + + hideTrigger: function() { + if (this.menuTrigger != undefined) { + this.menuTrigger.hide(); + } + }, + + + beforeMenuShow: function(menu) { + var items = this.menuItems, + len = items.length, + item, + prev; + + var needsSep = function(group, item){ + return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); + }; + + this.clearMenu(); + menu.removeAll(); + + for (var i = 0; i < len; i++) { + item = items[i].component; + + if (prev && (needsSep(item, prev) || needsSep(prev, item))) { + menu.add('-'); + } + + this.addComponentToMenu(menu, item); + prev = item; + } + + + if (menu.items.length < 1) { + menu.add(this.noItemsMenuText); + } + }, + + + createMenuConfig : function(component, hideOnClick){ + var config = Ext.apply({}, component.initialConfig), + group = component.toggleGroup; + + Ext.copyTo(config, component, [ + 'iconCls', 'icon', 'itemId', 'disabled', 'handler', 'scope', 'menu' + ]); + + Ext.apply(config, { + text : component.overflowText || component.text, + hideOnClick: hideOnClick + }); + + if (group || component.enableToggle) { + Ext.apply(config, { + group : group, + checked: component.pressed, + listeners: { + checkchange: function(item, checked){ + component.toggle(checked); + } + } + }); + } + + delete config.ownerCt; + delete config.xtype; + delete config.id; + + return config; + }, + + + addComponentToMenu : function(menu, component) { + if (component instanceof Ext.Toolbar.Separator) { + menu.add('-'); + + } else if (Ext.isFunction(component.isXType)) { + if (component.isXType('splitbutton')) { + menu.add(this.createMenuConfig(component, true)); + + } else if (component.isXType('button')) { + menu.add(this.createMenuConfig(component, !component.menu)); + + } else if (component.isXType('buttongroup')) { + component.items.each(function(item){ + this.addComponentToMenu(menu, item); + }, this); + } + } + }, + + + clearMenu : function(){ + var menu = this.moreMenu; + if (menu && menu.items) { + menu.items.each(function(item){ + delete item.menu; + }); + } + }, + + + createMenu: function() { + if (!this.menuTrigger) { + this.createInnerElements(); + + + this.menu = new Ext.menu.Menu({ + ownerCt : this.layout.container, + listeners: { + scope: this, + beforeshow: this.beforeMenuShow + } + }); + + + this.menuTrigger = new Ext.Button({ + iconCls : 'x-toolbar-more-icon', + cls : 'x-toolbar-more', + menu : this.menu, + renderTo: this.afterCt + }); + } + }, + + + destroy: function() { + Ext.destroy(this.menu, this.menuTrigger); + } +}); + +Ext.layout.boxOverflow.menu = Ext.layout.boxOverflow.Menu; + + + +Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu, { + + constructor: function() { + Ext.layout.boxOverflow.HorizontalMenu.superclass.constructor.apply(this, arguments); + + var me = this, + layout = me.layout, + origFunction = layout.calculateChildBoxes; + + layout.calculateChildBoxes = function(visibleItems, targetSize) { + var calcs = origFunction.apply(layout, arguments), + meta = calcs.meta, + items = me.menuItems; + + + + var hiddenWidth = 0; + for (var index = 0, length = items.length; index < length; index++) { + hiddenWidth += items[index].width; + } + + meta.minimumWidth += hiddenWidth; + meta.tooNarrow = meta.minimumWidth > targetSize.width; + + return calcs; + }; + }, + + handleOverflow: function(calculations, targetSize) { + this.showTrigger(); + + var newWidth = targetSize.width - this.afterCt.getWidth(), + boxes = calculations.boxes, + usedWidth = 0, + recalculate = false; + + + for (var index = 0, length = boxes.length; index < length; index++) { + usedWidth += boxes[index].width; + } + + var spareWidth = newWidth - usedWidth, + showCount = 0; + + + for (var index = 0, length = this.menuItems.length; index < length; index++) { + var hidden = this.menuItems[index], + comp = hidden.component, + width = hidden.width; + + if (width < spareWidth) { + comp.show(); + + spareWidth -= width; + showCount ++; + recalculate = true; + } else { + break; + } + } + + if (recalculate) { + this.menuItems = this.menuItems.slice(showCount); + } else { + for (var i = boxes.length - 1; i >= 0; i--) { + var item = boxes[i].component, + right = boxes[i].left + boxes[i].width; + + if (right >= newWidth) { + this.menuItems.unshift({ + component: item, + width : boxes[i].width + }); + + item.hide(); + } else { + break; + } + } + } + + if (this.menuItems.length == 0) { + this.hideTrigger(); + } + + return { + targetSize: { + height: targetSize.height, + width : newWidth + }, + recalculate: recalculate + }; + } +}); + +Ext.layout.boxOverflow.menu.hbox = Ext.layout.boxOverflow.HorizontalMenu; +Ext.layout.boxOverflow.Scroller = Ext.extend(Ext.layout.boxOverflow.None, { + + animateScroll: true, + + + scrollIncrement: 100, + + + wheelIncrement: 3, + + + scrollRepeatInterval: 400, + + + scrollDuration: 0.4, + + + beforeCls: 'x-strip-left', + + + afterCls: 'x-strip-right', + + + scrollerCls: 'x-strip-scroller', + + + beforeScrollerCls: 'x-strip-scroller-left', + + + afterScrollerCls: 'x-strip-scroller-right', + + + createWheelListener: function() { + this.layout.innerCt.on({ + scope : this, + mousewheel: function(e) { + e.stopEvent(); + + this.scrollBy(e.getWheelDelta() * this.wheelIncrement * -1, false); + } + }); + }, + + + handleOverflow: function(calculations, targetSize) { + this.createInnerElements(); + this.showScrollers(); + }, + + + clearOverflow: function() { + this.hideScrollers(); + }, + + + showScrollers: function() { + this.createScrollers(); + + this.beforeScroller.show(); + this.afterScroller.show(); + + this.updateScrollButtons(); + }, + + + hideScrollers: function() { + if (this.beforeScroller != undefined) { + this.beforeScroller.hide(); + this.afterScroller.hide(); + } + }, + + + createScrollers: function() { + if (!this.beforeScroller && !this.afterScroller) { + var before = this.beforeCt.createChild({ + cls: String.format("{0} {1} ", this.scrollerCls, this.beforeScrollerCls) + }); + + var after = this.afterCt.createChild({ + cls: String.format("{0} {1}", this.scrollerCls, this.afterScrollerCls) + }); + + before.addClassOnOver(this.beforeScrollerCls + '-hover'); + after.addClassOnOver(this.afterScrollerCls + '-hover'); + + before.setVisibilityMode(Ext.Element.DISPLAY); + after.setVisibilityMode(Ext.Element.DISPLAY); + + this.beforeRepeater = new Ext.util.ClickRepeater(before, { + interval: this.scrollRepeatInterval, + handler : this.scrollLeft, + scope : this + }); + + this.afterRepeater = new Ext.util.ClickRepeater(after, { + interval: this.scrollRepeatInterval, + handler : this.scrollRight, + scope : this + }); + + + this.beforeScroller = before; + + + this.afterScroller = after; + } + }, + + + destroy: function() { + Ext.destroy(this.beforeScroller, this.afterScroller, this.beforeRepeater, this.afterRepeater, this.beforeCt, this.afterCt); + }, + + + scrollBy: function(delta, animate) { + this.scrollTo(this.getScrollPosition() + delta, animate); + }, + + + getItem: function(item) { + if (Ext.isString(item)) { + item = Ext.getCmp(item); + } else if (Ext.isNumber(item)) { + item = this.items[item]; + } + + return item; + }, + + + getScrollAnim: function() { + return { + duration: this.scrollDuration, + callback: this.updateScrollButtons, + scope : this + }; + }, + + + updateScrollButtons: function() { + if (this.beforeScroller == undefined || this.afterScroller == undefined) { + return; + } + + var beforeMeth = this.atExtremeBefore() ? 'addClass' : 'removeClass', + afterMeth = this.atExtremeAfter() ? 'addClass' : 'removeClass', + beforeCls = this.beforeScrollerCls + '-disabled', + afterCls = this.afterScrollerCls + '-disabled'; + + this.beforeScroller[beforeMeth](beforeCls); + this.afterScroller[afterMeth](afterCls); + this.scrolling = false; + }, + + + atExtremeBefore: function() { + return this.getScrollPosition() === 0; + }, + + + scrollLeft: function(animate) { + this.scrollBy(-this.scrollIncrement, animate); + }, + + + scrollRight: function(animate) { + this.scrollBy(this.scrollIncrement, animate); + }, + + + scrollToItem: function(item, animate) { + item = this.getItem(item); + + if (item != undefined) { + var visibility = this.getItemVisibility(item); + + if (!visibility.fullyVisible) { + var box = item.getBox(true, true), + newX = box.x; + + if (visibility.hiddenRight) { + newX -= (this.layout.innerCt.getWidth() - box.width); + } + + this.scrollTo(newX, animate); + } + } + }, + + + getItemVisibility: function(item) { + var box = this.getItem(item).getBox(true, true), + itemLeft = box.x, + itemRight = box.x + box.width, + scrollLeft = this.getScrollPosition(), + scrollRight = this.layout.innerCt.getWidth() + scrollLeft; + + return { + hiddenLeft : itemLeft < scrollLeft, + hiddenRight : itemRight > scrollRight, + fullyVisible: itemLeft > scrollLeft && itemRight < scrollRight + }; + } +}); + +Ext.layout.boxOverflow.scroller = Ext.layout.boxOverflow.Scroller; + + -Ext.Viewport = Ext.extend(Ext.Container, { - - - - - - - - - - - - - initComponent : function() { - Ext.Viewport.superclass.initComponent.call(this); - document.getElementsByTagName('html')[0].className += ' x-viewport'; - this.el = Ext.getBody(); - this.el.setHeight = Ext.emptyFn; - this.el.setWidth = Ext.emptyFn; - this.el.setSize = Ext.emptyFn; - this.el.dom.scroll = 'no'; - this.allowDomMove = false; - this.autoWidth = true; - this.autoHeight = true; - Ext.EventManager.onWindowResize(this.fireResize, this); - this.renderTo = this.el; - }, - - fireResize : function(w, h){ - this.fireEvent('resize', this, w, h, w, h); - } -}); +Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, { + scrollIncrement: 75, + wheelIncrement : 2, + + handleOverflow: function(calculations, targetSize) { + Ext.layout.boxOverflow.VerticalScroller.superclass.handleOverflow.apply(this, arguments); + + return { + targetSize: { + height: targetSize.height - (this.beforeCt.getHeight() + this.afterCt.getHeight()), + width : targetSize.width + } + }; + }, + + + createInnerElements: function() { + var target = this.layout.innerCt; + + + + if (!this.beforeCt) { + this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before'); + this.afterCt = target.insertSibling({cls: this.afterCls}, 'after'); + + this.createWheelListener(); + } + }, + + + scrollTo: function(position, animate) { + var oldPosition = this.getScrollPosition(), + newPosition = position.constrain(0, this.getMaxScrollBottom()); + + if (newPosition != oldPosition && !this.scrolling) { + if (animate == undefined) { + animate = this.animateScroll; + } + + this.layout.innerCt.scrollTo('top', newPosition, animate ? this.getScrollAnim() : false); + + if (animate) { + this.scrolling = true; + } else { + this.scrolling = false; + this.updateScrollButtons(); + } + } + }, + + + getScrollPosition: function(){ + return parseInt(this.layout.innerCt.dom.scrollTop, 10) || 0; + }, + + + getMaxScrollBottom: function() { + return this.layout.innerCt.dom.scrollHeight - this.layout.innerCt.getHeight(); + }, + + + atExtremeAfter: function() { + return this.getScrollPosition() >= this.getMaxScrollBottom(); + } +}); + +Ext.layout.boxOverflow.scroller.vbox = Ext.layout.boxOverflow.VerticalScroller; + + + +Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, { + handleOverflow: function(calculations, targetSize) { + Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this, arguments); + + return { + targetSize: { + height: targetSize.height, + width : targetSize.width - (this.beforeCt.getWidth() + this.afterCt.getWidth()) + } + }; + }, + + + createInnerElements: function() { + var target = this.layout.innerCt; + + + + if (!this.beforeCt) { + this.afterCt = target.insertSibling({cls: this.afterCls}, 'before'); + this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before'); + + this.createWheelListener(); + } + }, + + + scrollTo: function(position, animate) { + var oldPosition = this.getScrollPosition(), + newPosition = position.constrain(0, this.getMaxScrollRight()); + + if (newPosition != oldPosition && !this.scrolling) { + if (animate == undefined) { + animate = this.animateScroll; + } + + this.layout.innerCt.scrollTo('left', newPosition, animate ? this.getScrollAnim() : false); + + if (animate) { + this.scrolling = true; + } else { + this.scrolling = false; + this.updateScrollButtons(); + } + } + }, + + + getScrollPosition: function(){ + return parseInt(this.layout.innerCt.dom.scrollLeft, 10) || 0; + }, + + + getMaxScrollRight: function() { + return this.layout.innerCt.dom.scrollWidth - this.layout.innerCt.getWidth(); + }, + + + atExtremeAfter: function() { + return this.getScrollPosition() >= this.getMaxScrollRight(); + } +}); + +Ext.layout.boxOverflow.scroller.hbox = Ext.layout.boxOverflow.HorizontalScroller; +Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, { + + align: 'top', + + type : 'hbox', + + + + + + calculateChildBoxes: function(visibleItems, targetSize) { + var visibleCount = visibleItems.length, + + padding = this.padding, + topOffset = padding.top, + leftOffset = padding.left, + paddingVert = topOffset + padding.bottom, + paddingHoriz = leftOffset + padding.right, + + width = targetSize.width - this.scrollOffset, + height = targetSize.height, + availHeight = Math.max(0, height - paddingVert), + + isStart = this.pack == 'start', + isCenter = this.pack == 'center', + isEnd = this.pack == 'end', + + nonFlexWidth = 0, + maxHeight = 0, + totalFlex = 0, + desiredWidth = 0, + minimumWidth = 0, + + + boxes = [], + + + child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedWidth, + horizMargins, vertMargins, stretchHeight; + + + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + childHeight = child.height; + childWidth = child.width; + canLayout = !child.hasLayout && typeof child.doLayout == 'function'; + + + if (typeof childWidth != 'number') { + + + if (child.flex && !childWidth) { + totalFlex += child.flex; + + + } else { + + + if (!childWidth && canLayout) { + child.doLayout(); + } + + childSize = child.getSize(); + childWidth = childSize.width; + childHeight = childSize.height; + } + } + + childMargins = child.margins; + horizMargins = childMargins.left + childMargins.right; + + nonFlexWidth += horizMargins + (childWidth || 0); + desiredWidth += horizMargins + (child.flex ? child.minWidth || 0 : childWidth); + minimumWidth += horizMargins + (child.minWidth || childWidth || 0); + + + if (typeof childHeight != 'number') { + if (canLayout) { + child.doLayout(); + } + childHeight = child.getHeight(); + } + + maxHeight = Math.max(maxHeight, childHeight + childMargins.top + childMargins.bottom); + + + boxes.push({ + component: child, + height : childHeight || undefined, + width : childWidth || undefined + }); + } + + var shortfall = desiredWidth - width, + tooNarrow = minimumWidth > width; + + + var availableWidth = Math.max(0, width - nonFlexWidth - paddingHoriz); + + if (tooNarrow) { + for (i = 0; i < visibleCount; i++) { + boxes[i].width = visibleItems[i].minWidth || visibleItems[i].width || boxes[i].width; + } + } else { + + + if (shortfall > 0) { + var minWidths = []; + + + for (var index = 0, length = visibleCount; index < length; index++) { + var item = visibleItems[index], + minWidth = item.minWidth || 0; + + + + if (item.flex) { + boxes[index].width = minWidth; + } else { + minWidths.push({ + minWidth : minWidth, + available: boxes[index].width - minWidth, + index : index + }); + } + } + + + minWidths.sort(function(a, b) { + return a.available > b.available ? 1 : -1; + }); + + + for (var i = 0, length = minWidths.length; i < length; i++) { + var itemIndex = minWidths[i].index; + + if (itemIndex == undefined) { + continue; + } + + var item = visibleItems[itemIndex], + box = boxes[itemIndex], + oldWidth = box.width, + minWidth = item.minWidth, + newWidth = Math.max(minWidth, oldWidth - Math.ceil(shortfall / (length - i))), + reduction = oldWidth - newWidth; + + boxes[itemIndex].width = newWidth; + shortfall -= reduction; + } + } else { + + var remainingWidth = availableWidth, + remainingFlex = totalFlex; + + + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + vertMargins = childMargins.top + childMargins.bottom; + + if (isStart && child.flex && !child.width) { + flexedWidth = Math.ceil((child.flex / remainingFlex) * remainingWidth); + remainingWidth -= flexedWidth; + remainingFlex -= child.flex; + + calcs.width = flexedWidth; + calcs.dirtySize = true; + } + } + } + } + + if (isCenter) { + leftOffset += availableWidth / 2; + } else if (isEnd) { + leftOffset += availableWidth; + } + + + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + leftOffset += childMargins.left; + vertMargins = childMargins.top + childMargins.bottom; + + calcs.left = leftOffset; + calcs.top = topOffset + childMargins.top; + + switch (this.align) { + case 'stretch': + stretchHeight = availHeight - vertMargins; + calcs.height = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000); + calcs.dirtySize = true; + break; + case 'stretchmax': + stretchHeight = maxHeight - vertMargins; + calcs.height = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000); + calcs.dirtySize = true; + break; + case 'middle': + var diff = availHeight - calcs.height - vertMargins; + if (diff > 0) { + calcs.top = topOffset + vertMargins + (diff / 2); + } + } + + leftOffset += calcs.width + childMargins.right; + } + + return { + boxes: boxes, + meta : { + maxHeight : maxHeight, + nonFlexWidth: nonFlexWidth, + desiredWidth: desiredWidth, + minimumWidth: minimumWidth, + shortfall : desiredWidth - width, + tooNarrow : tooNarrow + } + }; + } +}); + +Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout; +Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, { + + align : 'left', + type: 'vbox', + + + + + + + calculateChildBoxes: function(visibleItems, targetSize) { + var visibleCount = visibleItems.length, + + padding = this.padding, + topOffset = padding.top, + leftOffset = padding.left, + paddingVert = topOffset + padding.bottom, + paddingHoriz = leftOffset + padding.right, + + width = targetSize.width - this.scrollOffset, + height = targetSize.height, + availWidth = Math.max(0, width - paddingHoriz), + + isStart = this.pack == 'start', + isCenter = this.pack == 'center', + isEnd = this.pack == 'end', + + nonFlexHeight= 0, + maxWidth = 0, + totalFlex = 0, + desiredHeight= 0, + minimumHeight= 0, + + + boxes = [], + + + child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedHeight, + horizMargins, vertMargins, stretchWidth, length; + + + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + childHeight = child.height; + childWidth = child.width; + canLayout = !child.hasLayout && typeof child.doLayout == 'function'; + + + if (typeof childHeight != 'number') { + + + if (child.flex && !childHeight) { + totalFlex += child.flex; + + + } else { + + + if (!childHeight && canLayout) { + child.doLayout(); + } + + childSize = child.getSize(); + childWidth = childSize.width; + childHeight = childSize.height; + } + } + + childMargins = child.margins; + vertMargins = childMargins.top + childMargins.bottom; + + nonFlexHeight += vertMargins + (childHeight || 0); + desiredHeight += vertMargins + (child.flex ? child.minHeight || 0 : childHeight); + minimumHeight += vertMargins + (child.minHeight || childHeight || 0); + + + if (typeof childWidth != 'number') { + if (canLayout) { + child.doLayout(); + } + childWidth = child.getWidth(); + } + + maxWidth = Math.max(maxWidth, childWidth + childMargins.left + childMargins.right); + + + boxes.push({ + component: child, + height : childHeight || undefined, + width : childWidth || undefined + }); + } + + var shortfall = desiredHeight - height, + tooNarrow = minimumHeight > height; + + + var availableHeight = Math.max(0, (height - nonFlexHeight - paddingVert)); + + if (tooNarrow) { + for (i = 0, length = visibleCount; i < length; i++) { + boxes[i].height = visibleItems[i].minHeight || visibleItems[i].height || boxes[i].height; + } + } else { + + + if (shortfall > 0) { + var minHeights = []; + + + for (var index = 0, length = visibleCount; index < length; index++) { + var item = visibleItems[index], + minHeight = item.minHeight || 0; + + + + if (item.flex) { + boxes[index].height = minHeight; + } else { + minHeights.push({ + minHeight: minHeight, + available: boxes[index].height - minHeight, + index : index + }); + } + } + + + minHeights.sort(function(a, b) { + return a.available > b.available ? 1 : -1; + }); + + + for (var i = 0, length = minHeights.length; i < length; i++) { + var itemIndex = minHeights[i].index; + + if (itemIndex == undefined) { + continue; + } + + var item = visibleItems[itemIndex], + box = boxes[itemIndex], + oldHeight = box.height, + minHeight = item.minHeight, + newHeight = Math.max(minHeight, oldHeight - Math.ceil(shortfall / (length - i))), + reduction = oldHeight - newHeight; + + boxes[itemIndex].height = newHeight; + shortfall -= reduction; + } + } else { + + var remainingHeight = availableHeight, + remainingFlex = totalFlex; + + + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + horizMargins = childMargins.left + childMargins.right; + + if (isStart && child.flex && !child.height) { + flexedHeight = Math.ceil((child.flex / remainingFlex) * remainingHeight); + remainingHeight -= flexedHeight; + remainingFlex -= child.flex; + + calcs.height = flexedHeight; + calcs.dirtySize = true; + } + } + } + } + + if (isCenter) { + topOffset += availableHeight / 2; + } else if (isEnd) { + topOffset += availableHeight; + } + + + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + topOffset += childMargins.top; + horizMargins = childMargins.left + childMargins.right; + + + calcs.left = leftOffset + childMargins.left; + calcs.top = topOffset; + + switch (this.align) { + case 'stretch': + stretchWidth = availWidth - horizMargins; + calcs.width = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000); + calcs.dirtySize = true; + break; + case 'stretchmax': + stretchWidth = maxWidth - horizMargins; + calcs.width = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000); + calcs.dirtySize = true; + break; + case 'center': + var diff = availWidth - calcs.width - horizMargins; + if (diff > 0) { + calcs.left = leftOffset + horizMargins + (diff / 2); + } + } + + topOffset += calcs.height + childMargins.bottom; + } + + return { + boxes: boxes, + meta : { + maxWidth : maxWidth, + nonFlexHeight: nonFlexHeight, + desiredHeight: desiredHeight, + minimumHeight: minimumHeight, + shortfall : desiredHeight - height, + tooNarrow : tooNarrow + } + }; + } +}); + +Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout; + +Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { + monitorResize : true, + + type: 'toolbar', + + + triggerWidth: 18, + + + noItemsMenuText : '
(None)
', + + + lastOverflow: false, + + + tableHTML: [ + '', + '', + '', + '', + '', + '', + '', + '
', + '', + '', + '', + '', + '
', + '
', + '', + '', + '', + '', + '', + '', + '', + '
', + '', + '', + '', + '', + '
', + '
', + '', + '', + '', + '', + '
', + '
', + '
' + ].join(""), + + + onLayout : function(ct, target) { + + if (!this.leftTr) { + var align = ct.buttonAlign == 'center' ? 'center' : 'left'; + + target.addClass('x-toolbar-layout-ct'); + target.insertHtml('beforeEnd', String.format(this.tableHTML, align)); + + this.leftTr = target.child('tr.x-toolbar-left-row', true); + this.rightTr = target.child('tr.x-toolbar-right-row', true); + this.extrasTr = target.child('tr.x-toolbar-extras-row', true); + + if (this.hiddenItem == undefined) { + + this.hiddenItems = []; + } + } + + var side = ct.buttonAlign == 'right' ? this.rightTr : this.leftTr, + items = ct.items.items, + position = 0; + + + for (var i = 0, len = items.length, c; i < len; i++, position++) { + c = items[i]; + + if (c.isFill) { + side = this.rightTr; + position = -1; + } else if (!c.rendered) { + c.render(this.insertCell(c, side, position)); + this.configureItem(c); + } else { + if (!c.xtbHidden && !this.isValidParent(c, side.childNodes[position])) { + var td = this.insertCell(c, side, position); + td.appendChild(c.getPositionEl().dom); + c.container = Ext.get(td); + } + } + } + + + this.cleanup(this.leftTr); + this.cleanup(this.rightTr); + this.cleanup(this.extrasTr); + this.fitToSize(target); + }, + + + cleanup : function(el) { + var cn = el.childNodes, i, c; + + for (i = cn.length-1; i >= 0 && (c = cn[i]); i--) { + if (!c.firstChild) { + el.removeChild(c); + } + } + }, + + + insertCell : function(c, target, position) { + var td = document.createElement('td'); + td.className = 'x-toolbar-cell'; + + target.insertBefore(td, target.childNodes[position] || null); + + return td; + }, + + + hideItem : function(item) { + this.hiddenItems.push(item); + + item.xtbHidden = true; + item.xtbWidth = item.getPositionEl().dom.parentNode.offsetWidth; + item.hide(); + }, + + + unhideItem : function(item) { + item.show(); + item.xtbHidden = false; + this.hiddenItems.remove(item); + }, + + + getItemWidth : function(c) { + return c.hidden ? (c.xtbWidth || 0) : c.getPositionEl().dom.parentNode.offsetWidth; + }, + + + fitToSize : function(target) { + if (this.container.enableOverflow === false) { + return; + } + + var width = target.dom.clientWidth, + tableWidth = target.dom.firstChild.offsetWidth, + clipWidth = width - this.triggerWidth, + lastWidth = this.lastWidth || 0, + + hiddenItems = this.hiddenItems, + hasHiddens = hiddenItems.length != 0, + isLarger = width >= lastWidth; + + this.lastWidth = width; + + if (tableWidth > width || (hasHiddens && isLarger)) { + var items = this.container.items.items, + len = items.length, + loopWidth = 0, + item; + + for (var i = 0; i < len; i++) { + item = items[i]; + + if (!item.isFill) { + loopWidth += this.getItemWidth(item); + if (loopWidth > clipWidth) { + if (!(item.hidden || item.xtbHidden)) { + this.hideItem(item); + } + } else if (item.xtbHidden) { + this.unhideItem(item); + } + } + } + } + + + hasHiddens = hiddenItems.length != 0; + + if (hasHiddens) { + this.initMore(); + + if (!this.lastOverflow) { + this.container.fireEvent('overflowchange', this.container, true); + this.lastOverflow = true; + } + } else if (this.more) { + this.clearMenu(); + this.more.destroy(); + delete this.more; + + if (this.lastOverflow) { + this.container.fireEvent('overflowchange', this.container, false); + this.lastOverflow = false; + } + } + }, + + + createMenuConfig : function(component, hideOnClick){ + var config = Ext.apply({}, component.initialConfig), + group = component.toggleGroup; + + Ext.copyTo(config, component, [ + 'iconCls', 'icon', 'itemId', 'disabled', 'handler', 'scope', 'menu' + ]); + + Ext.apply(config, { + text : component.overflowText || component.text, + hideOnClick: hideOnClick + }); + + if (group || component.enableToggle) { + Ext.apply(config, { + group : group, + checked: component.pressed, + listeners: { + checkchange: function(item, checked){ + component.toggle(checked); + } + } + }); + } + + delete config.ownerCt; + delete config.xtype; + delete config.id; + + return config; + }, + + + addComponentToMenu : function(menu, component) { + if (component instanceof Ext.Toolbar.Separator) { + menu.add('-'); + + } else if (Ext.isFunction(component.isXType)) { + if (component.isXType('splitbutton')) { + menu.add(this.createMenuConfig(component, true)); + + } else if (component.isXType('button')) { + menu.add(this.createMenuConfig(component, !component.menu)); + + } else if (component.isXType('buttongroup')) { + component.items.each(function(item){ + this.addComponentToMenu(menu, item); + }, this); + } + } + }, + + + clearMenu : function(){ + var menu = this.moreMenu; + if (menu && menu.items) { + menu.items.each(function(item){ + delete item.menu; + }); + } + }, + + + beforeMoreShow : function(menu) { + var items = this.container.items.items, + len = items.length, + item, + prev; + + var needsSep = function(group, item){ + return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); + }; + + this.clearMenu(); + menu.removeAll(); + for (var i = 0; i < len; i++) { + item = items[i]; + if (item.xtbHidden) { + if (prev && (needsSep(item, prev) || needsSep(prev, item))) { + menu.add('-'); + } + this.addComponentToMenu(menu, item); + prev = item; + } + } + + + if (menu.items.length < 1) { + menu.add(this.noItemsMenuText); + } + }, + + + initMore : function(){ + if (!this.more) { + + this.moreMenu = new Ext.menu.Menu({ + ownerCt : this.container, + listeners: { + beforeshow: this.beforeMoreShow, + scope: this + } + }); + + + this.more = new Ext.Button({ + iconCls: 'x-toolbar-more-icon', + cls : 'x-toolbar-more', + menu : this.moreMenu, + ownerCt: this.container + }); + + var td = this.insertCell(this.more, this.extrasTr, 100); + this.more.render(td); + } + }, + + destroy : function(){ + Ext.destroy(this.more, this.moreMenu); + delete this.leftTr; + delete this.rightTr; + delete this.extrasTr; + Ext.layout.ToolbarLayout.superclass.destroy.call(this); + } +}); + +Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout; + + Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, { + monitorResize : true, + + type: 'menu', + + setContainer : function(ct){ + this.monitorResize = !ct.floating; + + + ct.on('autosize', this.doAutoSize, this); + Ext.layout.MenuLayout.superclass.setContainer.call(this, ct); + }, + + renderItem : function(c, position, target){ + if (!this.itemTpl) { + this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate( + '
  • ', + '', + '{altText}', + '', + '
  • ' + ); + } + + if(c && !c.rendered){ + if(Ext.isNumber(position)){ + position = target.dom.childNodes[position]; + } + var a = this.getItemArgs(c); + + + c.render(c.positionEl = position ? + this.itemTpl.insertBefore(position, a, true) : + this.itemTpl.append(target, a, true)); + + + c.positionEl.menuItemId = c.getItemId(); + + + + if (!a.isMenuItem && a.needsIcon) { + c.positionEl.addClass('x-menu-list-item-indent'); + } + this.configureItem(c); + }else if(c && !this.isValidParent(c, target)){ + if(Ext.isNumber(position)){ + position = target.dom.childNodes[position]; + } + target.dom.insertBefore(c.getActionEl().dom, position || null); + } + }, + + getItemArgs : function(c) { + var isMenuItem = c instanceof Ext.menu.Item, + canHaveIcon = !(isMenuItem || c instanceof Ext.menu.Separator); + + return { + isMenuItem: isMenuItem, + needsIcon: canHaveIcon && (c.icon || c.iconCls), + icon: c.icon || Ext.BLANK_IMAGE_URL, + iconCls: 'x-menu-item-icon ' + (c.iconCls || ''), + itemId: 'x-menu-el-' + c.id, + itemCls: 'x-menu-list-item ', + altText: c.altText || '' + }; + }, + + + isValidParent : function(c, target) { + return c.el.up('li.x-menu-list-item', 5).dom.parentNode === (target.dom || target); + }, + + onLayout : function(ct, target){ + Ext.layout.MenuLayout.superclass.onLayout.call(this, ct, target); + this.doAutoSize(); + }, + + doAutoSize : function(){ + var ct = this.container, w = ct.width; + if(ct.floating){ + if(w){ + ct.setWidth(w); + }else if(Ext.isIE){ + ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8 || Ext.isIE9) ? 'auto' : ct.minWidth); + var el = ct.getEl(), t = el.dom.offsetWidth; + ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr')); + } + } + } +}); +Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout; + +Ext.Viewport = Ext.extend(Ext.Container, { + + + + + + + + + + + + + + initComponent : function() { + Ext.Viewport.superclass.initComponent.call(this); + document.getElementsByTagName('html')[0].className += ' x-viewport'; + this.el = Ext.getBody(); + this.el.setHeight = Ext.emptyFn; + this.el.setWidth = Ext.emptyFn; + this.el.setSize = Ext.emptyFn; + this.el.dom.scroll = 'no'; + this.allowDomMove = false; + this.autoWidth = true; + this.autoHeight = true; + Ext.EventManager.onWindowResize(this.fireResize, this); + this.renderTo = this.el; + }, + + fireResize : function(w, h){ + this.fireEvent('resize', this, w, h, w, h); + } +}); Ext.reg('viewport', Ext.Viewport); Ext.Panel = Ext.extend(Ext.Container, { @@ -15772,46 +17470,72 @@ Ext.Panel = Ext.extend(Ext.Container, { - + + + + + + + + + + + baseCls : 'x-panel', collapsedCls : 'x-panel-collapsed', - maskDisabled: true, + maskDisabled : true, - animCollapse: Ext.enableFx, + animCollapse : Ext.enableFx, - headerAsText: true, + headerAsText : true, - buttonAlign: 'right', + buttonAlign : 'right', collapsed : false, - collapseFirst: true, + collapseFirst : true, + + minButtonWidth : 75, - minButtonWidth:75, elements : 'body', + + preventBodyReset : false, - toolTarget : 'header', + + padding: undefined, + + + resizeEvent: 'bodyresize', + + + + + toolTarget : 'header', collapseEl : 'bwrap', slideAnchor : 't', - disabledClass: '', + disabledClass : '', - deferHeight: true, - expandDefaults: { - duration:.25 + + deferHeight : true, + + expandDefaults: { + duration : 0.25 }, - collapseDefaults: { - duration:.25 + + collapseDefaults : { + duration : 0.25 }, - initComponent : function(){ + + initComponent : function(){ Ext.Panel.superclass.initComponent.call(this); this.addEvents( @@ -15820,6 +17544,8 @@ Ext.Panel = Ext.extend(Ext.Container, { 'titlechange', + 'iconchange', + 'collapse', 'expand', @@ -15837,51 +17563,88 @@ Ext.Panel = Ext.extend(Ext.Container, { 'deactivate' ); - if(this.tbar){ + if(this.unstyled){ + this.baseCls = 'x-plain'; + } + + + this.toolbars = []; + + if(this.tbar){ this.elements += ',tbar'; - if(typeof this.tbar == 'object'){ - this.topToolbar = this.tbar; - } - delete this.tbar; + this.topToolbar = this.createToolbar(this.tbar); + this.tbar = null; + } if(this.bbar){ this.elements += ',bbar'; - if(typeof this.bbar == 'object'){ - this.bottomToolbar = this.bbar; - } - delete this.bbar; + this.bottomToolbar = this.createToolbar(this.bbar); + this.bbar = null; } if(this.header === true){ this.elements += ',header'; - delete this.header; - }else if(this.title && this.header !== false){ + this.header = null; + }else if(this.headerCfg || (this.title && this.header !== false)){ this.elements += ',header'; } - if(this.footer === true){ + if(this.footerCfg || this.footer === true){ this.elements += ',footer'; - delete this.footer; + this.footer = null; } if(this.buttons){ - var btns = this.buttons; - - this.buttons = []; - for(var i = 0, len = btns.length; i < len; i++) { - if(btns[i].render){ btns[i].ownerCt = this; - this.buttons.push(btns[i]); - }else{ - this.addButton(btns[i]); - } - } + this.fbar = this.buttons; + this.buttons = null; + } + if(this.fbar){ + this.createFbar(this.fbar); } if(this.autoLoad){ this.on('render', this.doAutoLoad, this, {delay:10}); } }, - createElement : function(name, pnode){ + + createFbar : function(fbar){ + var min = this.minButtonWidth; + this.elements += ',footer'; + this.fbar = this.createToolbar(fbar, { + buttonAlign: this.buttonAlign, + toolbarCls: 'x-panel-fbar', + enableOverflow: false, + defaults: function(c){ + return { + minWidth: c.minWidth || min + }; + } + }); + + + + this.fbar.items.each(function(c){ + c.minWidth = c.minWidth || this.minButtonWidth; + }, this); + this.buttons = this.fbar.items.items; + }, + + + createToolbar: function(tb, options){ + var result; + + if(Ext.isArray(tb)){ + tb = { + items: tb + }; + } + result = tb.events ? Ext.apply(tb, options) : this.createComponent(Ext.apply({}, tb, options), 'toolbar'); + this.toolbars.push(result); + return result; + }, + + + createElement : function(name, pnode){ if(this[name]){ pnode.appendChild(this[name].dom); return; @@ -15895,33 +17658,57 @@ Ext.Panel = Ext.extend(Ext.Container, { el.className = this[name+'Cls']; this[name] = Ext.get(pnode.appendChild(el)); } + if(this[name+'CssClass']){ + this[name].addClass(this[name+'CssClass']); + } + if(this[name+'Style']){ + this[name].applyStyles(this[name+'Style']); + } } }, - onRender : function(ct, position){ + + onRender : function(ct, position){ Ext.Panel.superclass.onRender.call(this, ct, position); - this.createClasses(); - if(this.el){ this.el.addClass(this.baseCls); - this.header = this.el.down('.'+this.headerCls); - this.bwrap = this.el.down('.'+this.bwrapCls); - var cp = this.bwrap ? this.bwrap : this.el; + var el = this.el, + d = el.dom, + bw, + ts; + + + if(this.collapsible && !this.hideCollapseTool){ + this.tools = this.tools ? this.tools.slice(0) : []; + this.tools[this.collapseFirst?'unshift':'push']({ + id: 'toggle', + handler : this.toggleCollapse, + scope: this + }); + } + + if(this.tools){ + ts = this.tools; + this.elements += (this.header !== false) ? ',header' : ''; + } + this.tools = {}; + + el.addClass(this.baseCls); + if(d.firstChild){ + this.header = el.down('.'+this.headerCls); + this.bwrap = el.down('.'+this.bwrapCls); + var cp = this.bwrap ? this.bwrap : el; this.tbar = cp.down('.'+this.tbarCls); this.body = cp.down('.'+this.bodyCls); this.bbar = cp.down('.'+this.bbarCls); this.footer = cp.down('.'+this.footerCls); this.fromMarkup = true; - }else{ - this.el = ct.createChild({ - id: this.id, - cls: this.baseCls - }, position); } - var el = this.el, d = el.dom; - + if (this.preventBodyReset === true) { + el.addClass('x-panel-reset'); + } if(this.cls){ - this.el.addClass(this.cls); + el.addClass(this.cls); } if(this.buttons){ @@ -15929,13 +17716,16 @@ Ext.Panel = Ext.extend(Ext.Container, { } - if(this.frame){ + + + if(this.frame){ el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls)); this.createElement('header', d.firstChild.firstChild.firstChild); this.createElement('bwrap', d); - var bw = this.bwrap.dom; + + bw = this.bwrap.dom; var ml = d.childNodes[1], bl = d.childNodes[2]; bw.appendChild(ml); bw.appendChild(bl); @@ -15949,11 +17739,15 @@ Ext.Panel = Ext.extend(Ext.Container, { if(!this.footer){ this.bwrap.dom.lastChild.className += ' x-panel-nofooter'; } + + this.ft = Ext.get(this.bwrap.dom.lastChild); + this.mc = Ext.get(mc); }else{ this.createElement('header', d); this.createElement('bwrap', d); - var bw = this.bwrap.dom; + + bw = this.bwrap.dom; this.createElement('tbar', bw); this.createElement('body', bw); this.createElement('bbar', bw); @@ -15967,6 +17761,10 @@ Ext.Panel = Ext.extend(Ext.Container, { } } + if(Ext.isDefined(this.padding)){ + this.body.setStyle('padding', this.body.addUnits(this.padding)); + } + if(this.border === false){ this.el.addClass(this.baseCls + '-noborder'); this.body.addClass(this.bodyCls + '-noborder'); @@ -15988,16 +17786,13 @@ Ext.Panel = Ext.extend(Ext.Container, { this.body.addClass(this.bodyCls + '-noborder'); } - if(this.bodyStyle){ - this.body.applyStyles(this.bodyStyle); - } - this.bwrap.enableDisplayMode('block'); if(this.header){ this.header.unselectable(); - if(this.headerAsText){ + + if(this.headerAsText){ this.header.dom.innerHTML = ''+this.header.dom.innerHTML+''; @@ -16011,55 +17806,28 @@ Ext.Panel = Ext.extend(Ext.Container, { this.makeFloating(this.floating); } - if(this.collapsible){ - this.tools = this.tools ? this.tools.slice(0) : []; - if(!this.hideCollapseTool){ - this.tools[this.collapseFirst?'unshift':'push']({ - id: 'toggle', - handler : this.toggleCollapse, - scope: this - }); - } - if(this.titleCollapse && this.header){ - this.header.on('click', this.toggleCollapse, this); - this.header.setStyle('cursor', 'pointer'); - } + if(this.collapsible && this.titleCollapse && this.header){ + this.mon(this.header, 'click', this.toggleCollapse, this); + this.header.setStyle('cursor', 'pointer'); } - if(this.tools){ - var ts = this.tools; - this.tools = {}; + if(ts){ this.addTool.apply(this, ts); - }else{ - this.tools = {}; } - if(this.buttons && this.buttons.length > 0){ - var tb = this.footer.createChild({cls:'x-panel-btns-ct', cn: { - cls:"x-panel-btns x-panel-btns-"+this.buttonAlign, - html:'
    ' - }}, null, true); - var tr = tb.getElementsByTagName('tr')[0]; - for(var i = 0, len = this.buttons.length; i < len; i++) { - var b = this.buttons[i]; - var td = document.createElement('td'); - td.className = 'x-panel-btn-td'; - b.render(tr.appendChild(td)); - } + + if(this.fbar){ + this.footer.addClass('x-panel-btns'); + this.fbar.ownerCt = this; + this.fbar.render(this.footer); + this.footer.createChild({cls:'x-clear'}); } - if(this.tbar && this.topToolbar){ - if(Ext.isArray(this.topToolbar)){ - this.topToolbar = new Ext.Toolbar(this.topToolbar); - } - this.topToolbar.render(this.tbar); this.topToolbar.ownerCt = this; + this.topToolbar.render(this.tbar); } if(this.bbar && this.bottomToolbar){ - if(Ext.isArray(this.bottomToolbar)){ - this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar); - } - this.bottomToolbar.render(this.bbar); this.bottomToolbar.ownerCt = this; + this.bottomToolbar.render(this.bbar); } }, @@ -16072,29 +17840,32 @@ Ext.Panel = Ext.extend(Ext.Container, { this.header.addClass('x-panel-icon'); this.header.replaceClass(old, this.iconCls); }else{ - var hd = this.header.dom; - var img = hd.firstChild && String(hd.firstChild.tagName).toLowerCase() == 'img' ? hd.firstChild : null; + var hd = this.header, + img = hd.child('img.x-panel-inline-icon'); if(img){ Ext.fly(img).replaceClass(old, this.iconCls); }else{ - Ext.DomHelper.insertBefore(hd.firstChild, { - tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls - }); + var hdspan = hd.child('span.' + this.headerTextCls); + if (hdspan) { + Ext.DomHelper.insertBefore(hdspan.dom, { + tag:'img', alt: '', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls + }); + } } } } + this.fireEvent('iconchange', this, cls, old); }, - makeFloating : function(cfg){ + + makeFloating : function(cfg){ this.floating = true; - this.el = new Ext.Layer( - typeof cfg == 'object' ? cfg : { - shadow: this.shadow !== undefined ? this.shadow : 'sides', - shadowOffset: this.shadowOffset, - constrain:false, - shim: this.shim === false ? false : undefined - }, this.el - ); + this.el = new Ext.Layer(Ext.apply({}, cfg, { + shadow: Ext.isDefined(this.shadow) ? this.shadow : 'sides', + shadowOffset: this.shadowOffset, + constrain:false, + shim: this.shim === false ? false : undefined + }), this.el); }, @@ -16108,32 +17879,45 @@ Ext.Panel = Ext.extend(Ext.Container, { }, - addButton : function(config, handler, scope){ - var bc = { - handler: handler, - scope: scope, - minWidth: this.minButtonWidth, - hideParent:true - }; - if(typeof config == "string"){ - bc.text = config; - }else{ - Ext.apply(bc, config); - } - var btn = new Ext.Button(bc); - btn.ownerCt = this; - if(!this.buttons){ - this.buttons = []; - } - this.buttons.push(btn); - return btn; + getFooterToolbar : function() { + return this.fbar; }, - addTool : function(){ - if(!this[this.toolTarget]) { return; + + addButton : function(config, handler, scope){ + if(!this.fbar){ + this.createFbar([]); + } + if(handler){ + if(Ext.isString(config)){ + config = {text: config}; + } + config = Ext.apply({ + handler: handler, + scope: scope + }, config); + } + return this.fbar.add(config); + }, + + + addTool : function(){ + if(!this.rendered){ + if(!this.tools){ + this.tools = []; + } + Ext.each(arguments, function(arg){ + this.tools.push(arg); + }, this); + return; + } + + if(!this[this.toolTarget]){ + return; } if(!this.toolTemplate){ - var tt = new Ext.Template( + + var tt = new Ext.Template( '
     
    ' ); tt.disableFormats = true; @@ -16141,126 +17925,162 @@ Ext.Panel = Ext.extend(Ext.Container, { Ext.Panel.prototype.toolTemplate = tt; } for(var i = 0, a = arguments, len = a.length; i < len; i++) { - var tc = a[i], overCls = 'x-tool-'+tc.id+'-over'; - var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), tc, true); - this.tools[tc.id] = t; - t.enableDisplayMode('block'); - t.on('click', this.createToolHandler(t, tc, overCls, this)); - if(tc.on){ - t.on(tc.on); - } - if(tc.hidden){ - t.hide(); - } - if(tc.qtip){ - if(typeof tc.qtip == 'object'){ - Ext.QuickTips.register(Ext.apply({ - target: t.id - }, tc.qtip)); - } else { - t.dom.qtip = tc.qtip; + var tc = a[i]; + if(!this.tools[tc.id]){ + var overCls = 'x-tool-'+tc.id+'-over'; + var t = this.toolTemplate.insertFirst(this[this.toolTarget], tc, true); + this.tools[tc.id] = t; + t.enableDisplayMode('block'); + this.mon(t, 'click', this.createToolHandler(t, tc, overCls, this)); + if(tc.on){ + this.mon(t, tc.on); } + if(tc.hidden){ + t.hide(); + } + if(tc.qtip){ + if(Ext.isObject(tc.qtip)){ + Ext.QuickTips.register(Ext.apply({ + target: t.id + }, tc.qtip)); + } else { + t.dom.qtip = tc.qtip; + } + } + t.addClassOnOver(overCls); } - t.addClassOnOver(overCls); } }, - onShow : function(){ + onLayout : function(shallow, force){ + Ext.Panel.superclass.onLayout.apply(this, arguments); + if(this.hasLayout && this.toolbars.length > 0){ + Ext.each(this.toolbars, function(tb){ + tb.doLayout(undefined, force); + }); + this.syncHeight(); + } + }, + + syncHeight : function(){ + var h = this.toolbarHeight, + bd = this.body, + lsh = this.lastSize.height, + sz; + + if(this.autoHeight || !Ext.isDefined(lsh) || lsh == 'auto'){ + return; + } + + + if(h != this.getToolbarHeight()){ + h = Math.max(0, lsh - this.getFrameHeight()); + bd.setHeight(h); + sz = bd.getSize(); + this.toolbarHeight = this.getToolbarHeight(); + this.onBodyResize(sz.width, sz.height); + } + }, + + + onShow : function(){ if(this.floating){ return this.el.show(); } Ext.Panel.superclass.onShow.call(this); }, - onHide : function(){ + + onHide : function(){ if(this.floating){ return this.el.hide(); } Ext.Panel.superclass.onHide.call(this); }, - createToolHandler : function(t, tc, overCls, panel){ + + createToolHandler : function(t, tc, overCls, panel){ return function(e){ t.removeClass(overCls); - e.stopEvent(); + if(tc.stopEvent !== false){ + e.stopEvent(); + } if(tc.handler){ - tc.handler.call(tc.scope || t, e, t, panel); + tc.handler.call(tc.scope || t, e, t, panel, tc); } }; }, - afterRender : function(){ - if(this.fromMarkup && this.height === undefined && !this.autoHeight){ - this.height = this.el.getHeight(); - } - if(this.floating && !this.hidden && !this.initHidden){ + + afterRender : function(){ + if(this.floating && !this.hidden){ this.el.show(); } if(this.title){ this.setTitle(this.title); } - this.setAutoScroll(); - if(this.html){ - this.body.update(typeof this.html == 'object' ? - Ext.DomHelper.markup(this.html) : - this.html); - delete this.html; - } - if(this.contentEl){ - var ce = Ext.getDom(this.contentEl); - Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']); - this.body.dom.appendChild(ce); - } - if(this.collapsed){ + Ext.Panel.superclass.afterRender.call(this); + if (this.collapsed) { this.collapsed = false; this.collapse(false); } - Ext.Panel.superclass.afterRender.call(this); this.initEvents(); + this.initEvents(); }, - setAutoScroll : function(){ - if(this.rendered && this.autoScroll){ - var el = this.body || this.el; - if(el){ - el.setOverflow('auto'); - } - } - }, - - getKeyMap : function(){ + + getKeyMap : function(){ if(!this.keyMap){ this.keyMap = new Ext.KeyMap(this.el, this.keys); } return this.keyMap; }, - initEvents : function(){ + + initEvents : function(){ if(this.keys){ this.getKeyMap(); } if(this.draggable){ this.initDraggable(); } + if(this.toolbars.length > 0){ + Ext.each(this.toolbars, function(tb){ + tb.doLayout(); + tb.on({ + scope: this, + afterlayout: this.syncHeight, + remove: this.syncHeight + }); + }, this); + this.syncHeight(); + } + }, - initDraggable : function(){ + + initDraggable : function(){ - this.dd = new Ext.Panel.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); + this.dd = new Ext.Panel.DD(this, Ext.isBoolean(this.draggable) ? null : this.draggable); }, - beforeEffect : function(){ + + beforeEffect : function(anim){ if(this.floating){ this.el.beforeAction(); } - this.el.addClass('x-panel-animated'); + if(anim !== false){ + this.el.addClass('x-panel-animated'); + } }, - afterEffect : function(){ + + afterEffect : function(anim){ this.syncShadow(); this.el.removeClass('x-panel-animated'); }, - createEffect : function(a, cb, scope){ + + createEffect : function(a, cb, scope){ var o = { scope:scope, block:true @@ -16270,7 +18090,8 @@ Ext.Panel = Ext.extend(Ext.Container, { return o; }else if(!a.callback){ o.callback = cb; - }else { o.callback = function(){ + }else { + o.callback = function(){ cb.call(scope); Ext.callback(a.callback, a.scope); }; @@ -16284,26 +18105,38 @@ Ext.Panel = Ext.extend(Ext.Container, { return; } var doAnim = animate === true || (animate !== false && this.animCollapse); - this.beforeEffect(); + this.beforeEffect(doAnim); this.onCollapse(doAnim, animate); return this; }, - onCollapse : function(doAnim, animArg){ + + onCollapse : function(doAnim, animArg){ if(doAnim){ this[this.collapseEl].slideOut(this.slideAnchor, Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this), this.collapseDefaults)); }else{ - this[this.collapseEl].hide(); - this.afterCollapse(); + this[this.collapseEl].hide(this.hideMode); + this.afterCollapse(false); } }, - afterCollapse : function(){ + + afterCollapse : function(anim){ this.collapsed = true; this.el.addClass(this.collapsedCls); - this.afterEffect(); + if(anim !== false){ + this[this.collapseEl].hide(this.hideMode); + } + this.afterEffect(anim); + + + this.cascade(function(c) { + if (c.lastSize) { + c.lastSize = { width: undefined, height: undefined }; + } + }); this.fireEvent('collapse', this); }, @@ -16314,25 +18147,34 @@ Ext.Panel = Ext.extend(Ext.Container, { } var doAnim = animate === true || (animate !== false && this.animCollapse); this.el.removeClass(this.collapsedCls); - this.beforeEffect(); + this.beforeEffect(doAnim); this.onExpand(doAnim, animate); return this; }, - onExpand : function(doAnim, animArg){ + + onExpand : function(doAnim, animArg){ if(doAnim){ this[this.collapseEl].slideIn(this.slideAnchor, Ext.apply(this.createEffect(animArg||true, this.afterExpand, this), this.expandDefaults)); }else{ - this[this.collapseEl].show(); - this.afterExpand(); + this[this.collapseEl].show(this.hideMode); + this.afterExpand(false); } }, - afterExpand : function(){ + + afterExpand : function(anim){ this.collapsed = false; - this.afterEffect(); + if(anim !== false){ + this[this.collapseEl].show(this.hideMode); + } + this.afterEffect(anim); + if (this.deferLayout) { + delete this.deferLayout; + this.doLayout(true); + } this.fireEvent('expand', this); }, @@ -16342,93 +18184,146 @@ Ext.Panel = Ext.extend(Ext.Container, { return this; }, - onDisable : function(){ + + onDisable : function(){ if(this.rendered && this.maskDisabled){ this.el.mask(); } Ext.Panel.superclass.onDisable.call(this); }, - onEnable : function(){ + + onEnable : function(){ if(this.rendered && this.maskDisabled){ this.el.unmask(); } Ext.Panel.superclass.onEnable.call(this); }, - onResize : function(w, h){ - if(w !== undefined || h !== undefined){ + + onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ + var w = adjWidth, + h = adjHeight; + + if(Ext.isDefined(w) || Ext.isDefined(h)){ if(!this.collapsed){ - if(typeof w == 'number'){ - this.body.setWidth( - this.adjustBodyWidth(w - this.getFrameWidth())); - }else if(w == 'auto'){ - this.body.setWidth(w); + + + + + if(Ext.isNumber(w)){ + this.body.setWidth(w = this.adjustBodyWidth(w - this.getFrameWidth())); + } else if (w == 'auto') { + w = this.body.setWidth('auto').dom.offsetWidth; + } else { + w = this.body.dom.offsetWidth; } - if(typeof h == 'number'){ - this.body.setHeight( - this.adjustBodyHeight(h - this.getFrameHeight())); + if(this.tbar){ + this.tbar.setWidth(w); + if(this.topToolbar){ + this.topToolbar.setSize(w); + } + } + if(this.bbar){ + this.bbar.setWidth(w); + if(this.bottomToolbar){ + this.bottomToolbar.setSize(w); + + if (Ext.isIE) { + this.bbar.setStyle('position', 'static'); + this.bbar.setStyle('position', ''); + } + } + } + if(this.footer){ + this.footer.setWidth(w); + if(this.fbar){ + this.fbar.setSize(Ext.isIE ? (w - this.footer.getFrameWidth('lr')) : 'auto'); + } + } + + + if(Ext.isNumber(h)){ + h = Math.max(0, h - this.getFrameHeight()); + + this.body.setHeight(h); }else if(h == 'auto'){ this.body.setHeight(h); } - + if(this.disabled && this.el._mask){ this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight()); } }else{ + this.queuedBodySize = {width: w, height: h}; if(!this.queuedExpand && this.allowQueuedExpand !== false){ this.queuedExpand = true; this.on('expand', function(){ delete this.queuedExpand; this.onResize(this.queuedBodySize.width, this.queuedBodySize.height); - this.doLayout(); }, this, {single:true}); } } - this.fireEvent('bodyresize', this, w, h); + this.onBodyResize(w, h); } this.syncShadow(); + Ext.Panel.superclass.onResize.call(this, adjWidth, adjHeight, rawWidth, rawHeight); + }, - adjustBodyHeight : function(h){ + + onBodyResize: function(w, h){ + this.fireEvent('bodyresize', this, w, h); + }, + + + getToolbarHeight: function(){ + var h = 0; + if(this.rendered){ + Ext.each(this.toolbars, function(tb){ + h += tb.getHeight(); + }, this); + } return h; }, - adjustBodyWidth : function(w){ + + adjustBodyHeight : function(h){ + return h; + }, + + + adjustBodyWidth : function(w){ return w; }, - onPosition : function(){ + + onPosition : function(){ this.syncShadow(); }, getFrameWidth : function(){ - var w = this.el.getFrameWidth('lr'); + var w = this.el.getFrameWidth('lr') + this.bwrap.getFrameWidth('lr'); if(this.frame){ var l = this.bwrap.dom.firstChild; w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r')); - var mc = this.bwrap.dom.firstChild.firstChild.firstChild; - w += Ext.fly(mc).getFrameWidth('lr'); + w += this.mc.getFrameWidth('lr'); } return w; }, - getFrameHeight : function(){ - var h = this.el.getFrameWidth('tb'); + getFrameHeight : function() { + var h = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb'); h += (this.tbar ? this.tbar.getHeight() : 0) + (this.bbar ? this.bbar.getHeight() : 0); if(this.frame){ - var hd = this.el.dom.firstChild; - var ft = this.bwrap.dom.lastChild; - h += (hd.offsetHeight + ft.offsetHeight); - var mc = this.bwrap.dom.firstChild.firstChild.firstChild; - h += Ext.fly(mc).getFrameWidth('tb'); + h += this.el.dom.firstChild.offsetHeight + this.ft.dom.offsetHeight + this.mc.getFrameWidth('tb'); }else{ h += (this.header ? this.header.getHeight() : 0) + (this.footer ? this.footer.getHeight() : 0); @@ -16443,16 +18338,24 @@ Ext.Panel = Ext.extend(Ext.Container, { getInnerHeight : function(){ - return this.getSize().height - this.getFrameHeight(); + return this.body.getHeight(); + }, - syncShadow : function(){ + + syncShadow : function(){ if(this.floating){ this.el.sync(true); } }, - getLayoutTarget : function(){ + + getLayoutTarget : function(){ + return this.body; + }, + + + getContentTarget : function(){ return this.body; }, @@ -16481,32 +18384,52 @@ Ext.Panel = Ext.extend(Ext.Container, { return this; }, - beforeDestroy : function(){ - Ext.Element.uncache( - this.header, - this.tbar, - this.bbar, - this.footer, - this.body - ); + + beforeDestroy : function(){ + Ext.Panel.superclass.beforeDestroy.call(this); + if(this.header){ + this.header.removeAllListeners(); + } if(this.tools){ for(var k in this.tools){ Ext.destroy(this.tools[k]); } } - if(this.buttons){ - for(var b in this.buttons){ - Ext.destroy(this.buttons[b]); + if(this.toolbars.length > 0){ + Ext.each(this.toolbars, function(tb){ + tb.un('afterlayout', this.syncHeight, this); + tb.un('remove', this.syncHeight, this); + }, this); + } + if(Ext.isArray(this.buttons)){ + while(this.buttons.length) { + Ext.destroy(this.buttons[0]); } } - Ext.destroy( - this.topToolbar, - this.bottomToolbar - ); - Ext.Panel.superclass.beforeDestroy.call(this); + if(this.rendered){ + Ext.destroy( + this.ft, + this.header, + this.footer, + this.tbar, + this.bbar, + this.body, + this.mc, + this.bwrap, + this.dd + ); + if (this.fbar) { + Ext.destroy( + this.fbar, + this.fbar.el + ); + } + } + Ext.destroy(this.toolbars); }, - createClasses : function(){ + + createClasses : function(){ this.headerCls = this.baseCls + '-header'; this.headerTextCls = this.baseCls + '-header-text'; this.bwrapCls = this.baseCls + '-bwrap'; @@ -16516,7 +18439,8 @@ Ext.Panel = Ext.extend(Ext.Container, { this.footerCls = this.baseCls + '-footer'; }, - createGhost : function(cls, useShim, appendTo){ + + createGhost : function(cls, useShim, appendTo){ var el = document.createElement('div'); el.className = 'x-panel-ghost ' + (cls ? cls : ''); if(this.header){ @@ -16538,16 +18462,9508 @@ Ext.Panel = Ext.extend(Ext.Container, { } }, - doAutoLoad : function(){ - this.body.load( - typeof this.autoLoad == 'object' ? - this.autoLoad : {url: this.autoLoad}); + + doAutoLoad : function(){ + var u = this.body.getUpdater(); + if(this.renderer){ + u.setRenderer(this.renderer); + } + u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad}); + }, + + + getTool : function(id) { + return this.tools[id]; } }); Ext.reg('panel', Ext.Panel); +Ext.Editor = function(field, config){ + if(field.field){ + this.field = Ext.create(field.field, 'textfield'); + config = Ext.apply({}, field); + delete config.field; + }else{ + this.field = field; + } + Ext.Editor.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.Editor, Ext.Component, { + + + allowBlur: true, + + + + + + value : "", + + alignment: "c-c?", + + offsets: [0, 0], + + shadow : "frame", + + constrain : false, + + swallowKeys : true, + + completeOnEnter : true, + + cancelOnEsc : true, + + updateEl : false, + + initComponent : function(){ + Ext.Editor.superclass.initComponent.call(this); + this.addEvents( + + "beforestartedit", + + "startedit", + + "beforecomplete", + + "complete", + + "canceledit", + + "specialkey" + ); + }, + + + onRender : function(ct, position){ + this.el = new Ext.Layer({ + shadow: this.shadow, + cls: "x-editor", + parentEl : ct, + shim : this.shim, + shadowOffset: this.shadowOffset || 4, + id: this.id, + constrain: this.constrain + }); + if(this.zIndex){ + this.el.setZIndex(this.zIndex); + } + this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); + if(this.field.msgTarget != 'title'){ + this.field.msgTarget = 'qtip'; + } + this.field.inEditor = true; + this.mon(this.field, { + scope: this, + blur: this.onBlur, + specialkey: this.onSpecialKey + }); + if(this.field.grow){ + this.mon(this.field, "autosize", this.el.sync, this.el, {delay:1}); + } + this.field.render(this.el).show(); + this.field.getEl().dom.name = ''; + if(this.swallowKeys){ + this.field.el.swallowEvent([ + 'keypress', + 'keydown' + ]); + } + }, + + + onSpecialKey : function(field, e){ + var key = e.getKey(), + complete = this.completeOnEnter && key == e.ENTER, + cancel = this.cancelOnEsc && key == e.ESC; + if(complete || cancel){ + e.stopEvent(); + if(complete){ + this.completeEdit(); + }else{ + this.cancelEdit(); + } + if(field.triggerBlur){ + field.triggerBlur(); + } + } + this.fireEvent('specialkey', field, e); + }, + + + startEdit : function(el, value){ + if(this.editing){ + this.completeEdit(); + } + this.boundEl = Ext.get(el); + var v = value !== undefined ? value : this.boundEl.dom.innerHTML; + if(!this.rendered){ + this.render(this.parentEl || document.body); + } + if(this.fireEvent("beforestartedit", this, this.boundEl, v) !== false){ + this.startValue = v; + this.field.reset(); + this.field.setValue(v); + this.realign(true); + this.editing = true; + this.show(); + } + }, + + + doAutoSize : function(){ + if(this.autoSize){ + var sz = this.boundEl.getSize(), + fs = this.field.getSize(); + + switch(this.autoSize){ + case "width": + this.setSize(sz.width, fs.height); + break; + case "height": + this.setSize(fs.width, sz.height); + break; + case "none": + this.setSize(fs.width, fs.height); + break; + default: + this.setSize(sz.width, sz.height); + } + } + }, + + + setSize : function(w, h){ + delete this.field.lastSize; + this.field.setSize(w, h); + if(this.el){ + + if(Ext.isGecko2 || Ext.isOpera || (Ext.isIE7 && Ext.isStrict)){ + + this.el.setSize(w, h); + } + this.el.sync(); + } + }, + + + realign : function(autoSize){ + if(autoSize === true){ + this.doAutoSize(); + } + this.el.alignTo(this.boundEl, this.alignment, this.offsets); + }, + + + completeEdit : function(remainVisible){ + if(!this.editing){ + return; + } + + if (this.field.assertValue) { + this.field.assertValue(); + } + var v = this.getValue(); + if(!this.field.isValid()){ + if(this.revertInvalid !== false){ + this.cancelEdit(remainVisible); + } + return; + } + if(String(v) === String(this.startValue) && this.ignoreNoChange){ + this.hideEdit(remainVisible); + return; + } + if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){ + v = this.getValue(); + if(this.updateEl && this.boundEl){ + this.boundEl.update(v); + } + this.hideEdit(remainVisible); + this.fireEvent("complete", this, v, this.startValue); + } + }, + + + onShow : function(){ + this.el.show(); + if(this.hideEl !== false){ + this.boundEl.hide(); + } + this.field.show().focus(false, true); + this.fireEvent("startedit", this.boundEl, this.startValue); + }, + + + cancelEdit : function(remainVisible){ + if(this.editing){ + var v = this.getValue(); + this.setValue(this.startValue); + this.hideEdit(remainVisible); + this.fireEvent("canceledit", this, v, this.startValue); + } + }, + + + hideEdit: function(remainVisible){ + if(remainVisible !== true){ + this.editing = false; + this.hide(); + } + }, + + + onBlur : function(){ + + if(this.allowBlur === true && this.editing && this.selectSameEditor !== true){ + this.completeEdit(); + } + }, + + + onHide : function(){ + if(this.editing){ + this.completeEdit(); + return; + } + this.field.blur(); + if(this.field.collapse){ + this.field.collapse(); + } + this.el.hide(); + if(this.hideEl !== false){ + this.boundEl.show(); + } + }, + + + setValue : function(v){ + this.field.setValue(v); + }, + + + getValue : function(){ + return this.field.getValue(); + }, + + beforeDestroy : function(){ + Ext.destroyMembers(this, 'field'); + + delete this.parentEl; + delete this.boundEl; + } +}); +Ext.reg('editor', Ext.Editor); + +Ext.ColorPalette = Ext.extend(Ext.Component, { + + + itemCls : 'x-color-palette', + + value : null, + + clickEvent :'click', + + ctype : 'Ext.ColorPalette', + + + allowReselect : false, + + + colors : [ + '000000', '993300', '333300', '003300', '003366', '000080', '333399', '333333', + '800000', 'FF6600', '808000', '008000', '008080', '0000FF', '666699', '808080', + 'FF0000', 'FF9900', '99CC00', '339966', '33CCCC', '3366FF', '800080', '969696', + 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF', '993366', 'C0C0C0', + 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', '99CCFF', 'CC99FF', 'FFFFFF' + ], + + + + + + initComponent : function(){ + Ext.ColorPalette.superclass.initComponent.call(this); + this.addEvents( + + 'select' + ); + + if(this.handler){ + this.on('select', this.handler, this.scope, true); + } + }, + + + onRender : function(container, position){ + this.autoEl = { + tag: 'div', + cls: this.itemCls + }; + Ext.ColorPalette.superclass.onRender.call(this, container, position); + var t = this.tpl || new Ext.XTemplate( + ' ' + ); + t.overwrite(this.el, this.colors); + this.mon(this.el, this.clickEvent, this.handleClick, this, {delegate: 'a'}); + if(this.clickEvent != 'click'){ + this.mon(this.el, 'click', Ext.emptyFn, this, {delegate: 'a', preventDefault: true}); + } + }, + + + afterRender : function(){ + Ext.ColorPalette.superclass.afterRender.call(this); + if(this.value){ + var s = this.value; + this.value = null; + this.select(s, true); + } + }, + + + handleClick : function(e, t){ + e.preventDefault(); + if(!this.disabled){ + var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1]; + this.select(c.toUpperCase()); + } + }, + + + select : function(color, suppressEvent){ + color = color.replace('#', ''); + if(color != this.value || this.allowReselect){ + var el = this.el; + if(this.value){ + el.child('a.color-'+this.value).removeClass('x-color-palette-sel'); + } + el.child('a.color-'+color).addClass('x-color-palette-sel'); + this.value = color; + if(suppressEvent !== true){ + this.fireEvent('select', this, color); + } + } + } + + +}); +Ext.reg('colorpalette', Ext.ColorPalette); +Ext.DatePicker = Ext.extend(Ext.BoxComponent, { + + todayText : 'Today', + + okText : ' OK ', + + cancelText : 'Cancel', + + + + todayTip : '{0} (Spacebar)', + + minText : 'This date is before the minimum date', + + maxText : 'This date is after the maximum date', + + format : 'm/d/y', + + disabledDaysText : 'Disabled', + + disabledDatesText : 'Disabled', + + monthNames : Date.monthNames, + + dayNames : Date.dayNames, + + nextText : 'Next Month (Control+Right)', + + prevText : 'Previous Month (Control+Left)', + + monthYearText : 'Choose a month (Control+Up/Down to move years)', + + startDay : 0, + + showToday : true, + + + + + + + + + focusOnSelect: true, + + + + initHour: 12, + + + initComponent : function(){ + Ext.DatePicker.superclass.initComponent.call(this); + + this.value = this.value ? + this.value.clearTime(true) : new Date().clearTime(); + + this.addEvents( + + 'select' + ); + + if(this.handler){ + this.on('select', this.handler, this.scope || this); + } + + this.initDisabledDays(); + }, + + + initDisabledDays : function(){ + if(!this.disabledDatesRE && this.disabledDates){ + var dd = this.disabledDates, + len = dd.length - 1, + re = '(?:'; + + Ext.each(dd, function(d, i){ + re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i]; + if(i != len){ + re += '|'; + } + }, this); + this.disabledDatesRE = new RegExp(re + ')'); + } + }, + + + setDisabledDates : function(dd){ + if(Ext.isArray(dd)){ + this.disabledDates = dd; + this.disabledDatesRE = null; + }else{ + this.disabledDatesRE = dd; + } + this.initDisabledDays(); + this.update(this.value, true); + }, + + + setDisabledDays : function(dd){ + this.disabledDays = dd; + this.update(this.value, true); + }, + + + setMinDate : function(dt){ + this.minDate = dt; + this.update(this.value, true); + }, + + + setMaxDate : function(dt){ + this.maxDate = dt; + this.update(this.value, true); + }, + + + setValue : function(value){ + this.value = value.clearTime(true); + this.update(this.value); + }, + + + getValue : function(){ + return this.value; + }, + + + focus : function(){ + this.update(this.activeDate); + }, + + + onEnable: function(initial){ + Ext.DatePicker.superclass.onEnable.call(this); + this.doDisabled(false); + this.update(initial ? this.value : this.activeDate); + if(Ext.isIE){ + this.el.repaint(); + } + + }, + + + onDisable : function(){ + Ext.DatePicker.superclass.onDisable.call(this); + this.doDisabled(true); + if(Ext.isIE && !Ext.isIE8){ + + Ext.each([].concat(this.textNodes, this.el.query('th span')), function(el){ + Ext.fly(el).repaint(); + }); + } + }, + + + doDisabled : function(disabled){ + this.keyNav.setDisabled(disabled); + this.prevRepeater.setDisabled(disabled); + this.nextRepeater.setDisabled(disabled); + if(this.showToday){ + this.todayKeyListener.setDisabled(disabled); + this.todayBtn.setDisabled(disabled); + } + }, + + + onRender : function(container, position){ + var m = [ + '', + '', + '', + this.showToday ? '' : '', + '
      
    '], + dn = this.dayNames, + i; + for(i = 0; i < 7; i++){ + var d = this.startDay+i; + if(d > 6){ + d = d-7; + } + m.push(''); + } + m[m.length] = ''; + for(i = 0; i < 42; i++) { + if(i % 7 === 0 && i !== 0){ + m[m.length] = ''; + } + m[m.length] = ''; + } + m.push('
    ', dn[d].substr(0,1), '
    '); + + var el = document.createElement('div'); + el.className = 'x-date-picker'; + el.innerHTML = m.join(''); + + container.dom.insertBefore(el, position); + + this.el = Ext.get(el); + this.eventEl = Ext.get(el.firstChild); + + this.prevRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-left a'), { + handler: this.showPrevMonth, + scope: this, + preventDefault:true, + stopDefault:true + }); + + this.nextRepeater = new Ext.util.ClickRepeater(this.el.child('td.x-date-right a'), { + handler: this.showNextMonth, + scope: this, + preventDefault:true, + stopDefault:true + }); + + this.monthPicker = this.el.down('div.x-date-mp'); + this.monthPicker.enableDisplayMode('block'); + + this.keyNav = new Ext.KeyNav(this.eventEl, { + 'left' : function(e){ + if(e.ctrlKey){ + this.showPrevMonth(); + }else{ + this.update(this.activeDate.add('d', -1)); + } + }, + + 'right' : function(e){ + if(e.ctrlKey){ + this.showNextMonth(); + }else{ + this.update(this.activeDate.add('d', 1)); + } + }, + + 'up' : function(e){ + if(e.ctrlKey){ + this.showNextYear(); + }else{ + this.update(this.activeDate.add('d', -7)); + } + }, + + 'down' : function(e){ + if(e.ctrlKey){ + this.showPrevYear(); + }else{ + this.update(this.activeDate.add('d', 7)); + } + }, + + 'pageUp' : function(e){ + this.showNextMonth(); + }, + + 'pageDown' : function(e){ + this.showPrevMonth(); + }, + + 'enter' : function(e){ + e.stopPropagation(); + return true; + }, + + scope : this + }); + + this.el.unselectable(); + + this.cells = this.el.select('table.x-date-inner tbody td'); + this.textNodes = this.el.query('table.x-date-inner tbody span'); + + this.mbtn = new Ext.Button({ + text: ' ', + tooltip: this.monthYearText, + renderTo: this.el.child('td.x-date-middle', true) + }); + this.mbtn.el.child('em').addClass('x-btn-arrow'); + + if(this.showToday){ + this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday, this); + var today = (new Date()).dateFormat(this.format); + this.todayBtn = new Ext.Button({ + renderTo: this.el.child('td.x-date-bottom', true), + text: String.format(this.todayText, today), + tooltip: String.format(this.todayTip, today), + handler: this.selectToday, + scope: this + }); + } + this.mon(this.eventEl, 'mousewheel', this.handleMouseWheel, this); + this.mon(this.eventEl, 'click', this.handleDateClick, this, {delegate: 'a.x-date-date'}); + this.mon(this.mbtn, 'click', this.showMonthPicker, this); + this.onEnable(true); + }, + + + createMonthPicker : function(){ + if(!this.monthPicker.dom.firstChild){ + var buf = ['']; + for(var i = 0; i < 6; i++){ + buf.push( + '', + '', + i === 0 ? + '' : + '' + ); + } + buf.push( + '', + '
    ', Date.getShortMonthName(i), '', Date.getShortMonthName(i + 6), '
    ' + ); + this.monthPicker.update(buf.join('')); + + this.mon(this.monthPicker, 'click', this.onMonthClick, this); + this.mon(this.monthPicker, 'dblclick', this.onMonthDblClick, this); + + this.mpMonths = this.monthPicker.select('td.x-date-mp-month'); + this.mpYears = this.monthPicker.select('td.x-date-mp-year'); + + this.mpMonths.each(function(m, a, i){ + i += 1; + if((i%2) === 0){ + m.dom.xmonth = 5 + Math.round(i * 0.5); + }else{ + m.dom.xmonth = Math.round((i-1) * 0.5); + } + }); + } + }, + + + showMonthPicker : function(){ + if(!this.disabled){ + this.createMonthPicker(); + var size = this.el.getSize(); + this.monthPicker.setSize(size); + this.monthPicker.child('table').setSize(size); + + this.mpSelMonth = (this.activeDate || this.value).getMonth(); + this.updateMPMonth(this.mpSelMonth); + this.mpSelYear = (this.activeDate || this.value).getFullYear(); + this.updateMPYear(this.mpSelYear); + + this.monthPicker.slideIn('t', {duration:0.2}); + } + }, + + + updateMPYear : function(y){ + this.mpyear = y; + var ys = this.mpYears.elements; + for(var i = 1; i <= 10; i++){ + var td = ys[i-1], y2; + if((i%2) === 0){ + y2 = y + Math.round(i * 0.5); + td.firstChild.innerHTML = y2; + td.xyear = y2; + }else{ + y2 = y - (5-Math.round(i * 0.5)); + td.firstChild.innerHTML = y2; + td.xyear = y2; + } + this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel'); + } + }, + + + updateMPMonth : function(sm){ + this.mpMonths.each(function(m, a, i){ + m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel'); + }); + }, + + + selectMPMonth : function(m){ + + }, + + + onMonthClick : function(e, t){ + e.stopEvent(); + var el = new Ext.Element(t), pn; + if(el.is('button.x-date-mp-cancel')){ + this.hideMonthPicker(); + } + else if(el.is('button.x-date-mp-ok')){ + var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate()); + if(d.getMonth() != this.mpSelMonth){ + + d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth(); + } + this.update(d); + this.hideMonthPicker(); + } + else if((pn = el.up('td.x-date-mp-month', 2))){ + this.mpMonths.removeClass('x-date-mp-sel'); + pn.addClass('x-date-mp-sel'); + this.mpSelMonth = pn.dom.xmonth; + } + else if((pn = el.up('td.x-date-mp-year', 2))){ + this.mpYears.removeClass('x-date-mp-sel'); + pn.addClass('x-date-mp-sel'); + this.mpSelYear = pn.dom.xyear; + } + else if(el.is('a.x-date-mp-prev')){ + this.updateMPYear(this.mpyear-10); + } + else if(el.is('a.x-date-mp-next')){ + this.updateMPYear(this.mpyear+10); + } + }, + + + onMonthDblClick : function(e, t){ + e.stopEvent(); + var el = new Ext.Element(t), pn; + if((pn = el.up('td.x-date-mp-month', 2))){ + this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + else if((pn = el.up('td.x-date-mp-year', 2))){ + this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + }, + + + hideMonthPicker : function(disableAnim){ + if(this.monthPicker){ + if(disableAnim === true){ + this.monthPicker.hide(); + }else{ + this.monthPicker.slideOut('t', {duration:0.2}); + } + } + }, + + + showPrevMonth : function(e){ + this.update(this.activeDate.add('mo', -1)); + }, + + + showNextMonth : function(e){ + this.update(this.activeDate.add('mo', 1)); + }, + + + showPrevYear : function(){ + this.update(this.activeDate.add('y', -1)); + }, + + + showNextYear : function(){ + this.update(this.activeDate.add('y', 1)); + }, + + + handleMouseWheel : function(e){ + e.stopEvent(); + if(!this.disabled){ + var delta = e.getWheelDelta(); + if(delta > 0){ + this.showPrevMonth(); + } else if(delta < 0){ + this.showNextMonth(); + } + } + }, + + + handleDateClick : function(e, t){ + e.stopEvent(); + if(!this.disabled && t.dateValue && !Ext.fly(t.parentNode).hasClass('x-date-disabled')){ + this.cancelFocus = this.focusOnSelect === false; + this.setValue(new Date(t.dateValue)); + delete this.cancelFocus; + this.fireEvent('select', this, this.value); + } + }, + + + selectToday : function(){ + if(this.todayBtn && !this.todayBtn.disabled){ + this.setValue(new Date().clearTime()); + this.fireEvent('select', this, this.value); + } + }, + + + update : function(date, forceRefresh){ + if(this.rendered){ + var vd = this.activeDate, vis = this.isVisible(); + this.activeDate = date; + if(!forceRefresh && vd && this.el){ + var t = date.getTime(); + if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){ + this.cells.removeClass('x-date-selected'); + this.cells.each(function(c){ + if(c.dom.firstChild.dateValue == t){ + c.addClass('x-date-selected'); + if(vis && !this.cancelFocus){ + Ext.fly(c.dom.firstChild).focus(50); + } + return false; + } + }, this); + return; + } + } + var days = date.getDaysInMonth(), + firstOfMonth = date.getFirstDateOfMonth(), + startingPos = firstOfMonth.getDay()-this.startDay; + + if(startingPos < 0){ + startingPos += 7; + } + days += startingPos; + + var pm = date.add('mo', -1), + prevStart = pm.getDaysInMonth()-startingPos, + cells = this.cells.elements, + textEls = this.textNodes, + + d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart, this.initHour)), + today = new Date().clearTime().getTime(), + sel = date.clearTime(true).getTime(), + min = this.minDate ? this.minDate.clearTime(true) : Number.NEGATIVE_INFINITY, + max = this.maxDate ? this.maxDate.clearTime(true) : Number.POSITIVE_INFINITY, + ddMatch = this.disabledDatesRE, + ddText = this.disabledDatesText, + ddays = this.disabledDays ? this.disabledDays.join('') : false, + ddaysText = this.disabledDaysText, + format = this.format; + + if(this.showToday){ + var td = new Date().clearTime(), + disable = (td < min || td > max || + (ddMatch && format && ddMatch.test(td.dateFormat(format))) || + (ddays && ddays.indexOf(td.getDay()) != -1)); + + if(!this.disabled){ + this.todayBtn.setDisabled(disable); + this.todayKeyListener[disable ? 'disable' : 'enable'](); + } + } + + var setCellClass = function(cal, cell){ + cell.title = ''; + var t = d.clearTime(true).getTime(); + cell.firstChild.dateValue = t; + if(t == today){ + cell.className += ' x-date-today'; + cell.title = cal.todayText; + } + if(t == sel){ + cell.className += ' x-date-selected'; + if(vis){ + Ext.fly(cell.firstChild).focus(50); + } + } + + if(t < min) { + cell.className = ' x-date-disabled'; + cell.title = cal.minText; + return; + } + if(t > max) { + cell.className = ' x-date-disabled'; + cell.title = cal.maxText; + return; + } + if(ddays){ + if(ddays.indexOf(d.getDay()) != -1){ + cell.title = ddaysText; + cell.className = ' x-date-disabled'; + } + } + if(ddMatch && format){ + var fvalue = d.dateFormat(format); + if(ddMatch.test(fvalue)){ + cell.title = ddText.replace('%0', fvalue); + cell.className = ' x-date-disabled'; + } + } + }; + + var i = 0; + for(; i < startingPos; i++) { + textEls[i].innerHTML = (++prevStart); + d.setDate(d.getDate()+1); + cells[i].className = 'x-date-prevday'; + setCellClass(this, cells[i]); + } + for(; i < days; i++){ + var intDay = i - startingPos + 1; + textEls[i].innerHTML = (intDay); + d.setDate(d.getDate()+1); + cells[i].className = 'x-date-active'; + setCellClass(this, cells[i]); + } + var extraDays = 0; + for(; i < 42; i++) { + textEls[i].innerHTML = (++extraDays); + d.setDate(d.getDate()+1); + cells[i].className = 'x-date-nextday'; + setCellClass(this, cells[i]); + } + + this.mbtn.setText(this.monthNames[date.getMonth()] + ' ' + date.getFullYear()); + + if(!this.internalRender){ + var main = this.el.dom.firstChild, + w = main.offsetWidth; + this.el.setWidth(w + this.el.getBorderWidth('lr')); + Ext.fly(main).setWidth(w); + this.internalRender = true; + + + + if(Ext.isOpera && !this.secondPass){ + main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px'; + this.secondPass = true; + this.update.defer(10, this, [date]); + } + } + } + }, + + + beforeDestroy : function() { + if(this.rendered){ + Ext.destroy( + this.keyNav, + this.monthPicker, + this.eventEl, + this.mbtn, + this.nextRepeater, + this.prevRepeater, + this.cells.el, + this.todayBtn + ); + delete this.textNodes; + delete this.cells.elements; + } + } + + +}); + +Ext.reg('datepicker', Ext.DatePicker); + +Ext.LoadMask = function(el, config){ + this.el = Ext.get(el); + Ext.apply(this, config); + if(this.store){ + this.store.on({ + scope: this, + beforeload: this.onBeforeLoad, + load: this.onLoad, + exception: this.onLoad + }); + this.removeMask = Ext.value(this.removeMask, false); + }else{ + var um = this.el.getUpdater(); + um.showLoadIndicator = false; + um.on({ + scope: this, + beforeupdate: this.onBeforeLoad, + update: this.onLoad, + failure: this.onLoad + }); + this.removeMask = Ext.value(this.removeMask, true); + } +}; + +Ext.LoadMask.prototype = { + + + + msg : 'Loading...', + + msgCls : 'x-mask-loading', + + + disabled: false, + + + disable : function(){ + this.disabled = true; + }, + + + enable : function(){ + this.disabled = false; + }, + + + onLoad : function(){ + this.el.unmask(this.removeMask); + }, + + + onBeforeLoad : function(){ + if(!this.disabled){ + this.el.mask(this.msg, this.msgCls); + } + }, + + + show: function(){ + this.onBeforeLoad(); + }, + + + hide: function(){ + this.onLoad(); + }, + + + destroy : function(){ + if(this.store){ + this.store.un('beforeload', this.onBeforeLoad, this); + this.store.un('load', this.onLoad, this); + this.store.un('exception', this.onLoad, this); + }else{ + var um = this.el.getUpdater(); + um.un('beforeupdate', this.onBeforeLoad, this); + um.un('update', this.onLoad, this); + um.un('failure', this.onLoad, this); + } + } +}; +Ext.slider.Thumb = Ext.extend(Object, { + + + dragging: false, + + + constructor: function(config) { + + Ext.apply(this, config || {}, { + cls: 'x-slider-thumb', + + + constrain: false + }); + + Ext.slider.Thumb.superclass.constructor.call(this, config); + + if (this.slider.vertical) { + Ext.apply(this, Ext.slider.Thumb.Vertical); + } + }, + + + render: function() { + this.el = this.slider.innerEl.insertFirst({cls: this.cls}); + + this.initEvents(); + }, + + + enable: function() { + this.disabled = false; + this.el.removeClass(this.slider.disabledClass); + }, + + + disable: function() { + this.disabled = true; + this.el.addClass(this.slider.disabledClass); + }, + + + initEvents: function() { + var el = this.el; + + el.addClassOnOver('x-slider-thumb-over'); + + this.tracker = new Ext.dd.DragTracker({ + onBeforeStart: this.onBeforeDragStart.createDelegate(this), + onStart : this.onDragStart.createDelegate(this), + onDrag : this.onDrag.createDelegate(this), + onEnd : this.onDragEnd.createDelegate(this), + tolerance : 3, + autoStart : 300 + }); + + this.tracker.initEl(el); + }, + + + onBeforeDragStart : function(e) { + if (this.disabled) { + return false; + } else { + this.slider.promoteThumb(this); + return true; + } + }, + + + onDragStart: function(e){ + this.el.addClass('x-slider-thumb-drag'); + this.dragging = true; + this.dragStartValue = this.value; + + this.slider.fireEvent('dragstart', this.slider, e, this); + }, + + + onDrag: function(e) { + var slider = this.slider, + index = this.index, + newValue = this.getNewValue(); + + if (this.constrain) { + var above = slider.thumbs[index + 1], + below = slider.thumbs[index - 1]; + + if (below != undefined && newValue <= below.value) newValue = below.value; + if (above != undefined && newValue >= above.value) newValue = above.value; + } + + slider.setValue(index, newValue, false); + slider.fireEvent('drag', slider, e, this); + }, + + getNewValue: function() { + var slider = this.slider, + pos = slider.innerEl.translatePoints(this.tracker.getXY()); + + return Ext.util.Format.round(slider.reverseValue(pos.left), slider.decimalPrecision); + }, + + + onDragEnd: function(e) { + var slider = this.slider, + value = this.value; + + this.el.removeClass('x-slider-thumb-drag'); + + this.dragging = false; + slider.fireEvent('dragend', slider, e); + + if (this.dragStartValue != value) { + slider.fireEvent('changecomplete', slider, value, this); + } + }, + + + destroy: function(){ + Ext.destroyMembers(this, 'tracker', 'el'); + } +}); + + +Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, { + + + vertical: false, + + minValue: 0, + + maxValue: 100, + + decimalPrecision: 0, + + keyIncrement: 1, + + increment: 0, + + + clickRange: [5,15], + + + clickToChange : true, + + animate: true, + + constrainThumbs: true, + + + topThumbZIndex: 10000, + + + initComponent : function(){ + if(!Ext.isDefined(this.value)){ + this.value = this.minValue; + } + + + this.thumbs = []; + + Ext.slider.MultiSlider.superclass.initComponent.call(this); + + this.keyIncrement = Math.max(this.increment, this.keyIncrement); + this.addEvents( + + 'beforechange', + + + 'change', + + + 'changecomplete', + + + 'dragstart', + + + 'drag', + + + 'dragend' + ); + + + if (this.values == undefined || Ext.isEmpty(this.values)) this.values = [0]; + + var values = this.values; + + for (var i=0; i < values.length; i++) { + this.addThumb(values[i]); + } + + if(this.vertical){ + Ext.apply(this, Ext.slider.Vertical); + } + }, + + + addThumb: function(value) { + var thumb = new Ext.slider.Thumb({ + value : value, + slider : this, + index : this.thumbs.length, + constrain: this.constrainThumbs + }); + this.thumbs.push(thumb); + + + if (this.rendered) thumb.render(); + }, + + + promoteThumb: function(topThumb) { + var thumbs = this.thumbs, + zIndex, thumb; + + for (var i = 0, j = thumbs.length; i < j; i++) { + thumb = thumbs[i]; + + if (thumb == topThumb) { + zIndex = this.topThumbZIndex; + } else { + zIndex = ''; + } + + thumb.el.setStyle('zIndex', zIndex); + } + }, + + + onRender : function() { + this.autoEl = { + cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'), + cn : { + cls: 'x-slider-end', + cn : { + cls:'x-slider-inner', + cn : [{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}] + } + } + }; + + Ext.slider.MultiSlider.superclass.onRender.apply(this, arguments); + + this.endEl = this.el.first(); + this.innerEl = this.endEl.first(); + this.focusEl = this.innerEl.child('.x-slider-focus'); + + + for (var i=0; i < this.thumbs.length; i++) { + this.thumbs[i].render(); + } + + + var thumb = this.innerEl.child('.x-slider-thumb'); + this.halfThumb = (this.vertical ? thumb.getHeight() : thumb.getWidth()) / 2; + + this.initEvents(); + }, + + + initEvents : function(){ + this.mon(this.el, { + scope : this, + mousedown: this.onMouseDown, + keydown : this.onKeyDown + }); + + this.focusEl.swallowEvent("click", true); + }, + + + onMouseDown : function(e){ + if(this.disabled){ + return; + } + + + var thumbClicked = false; + for (var i=0; i < this.thumbs.length; i++) { + thumbClicked = thumbClicked || e.target == this.thumbs[i].el.dom; + } + + if (this.clickToChange && !thumbClicked) { + var local = this.innerEl.translatePoints(e.getXY()); + this.onClickChange(local); + } + this.focus(); + }, + + + onClickChange : function(local) { + if (local.top > this.clickRange[0] && local.top < this.clickRange[1]) { + + var thumb = this.getNearest(local, 'left'), + index = thumb.index; + + this.setValue(index, Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true); + } + }, + + + getNearest: function(local, prop) { + var localValue = prop == 'top' ? this.innerEl.getHeight() - local[prop] : local[prop], + clickValue = this.reverseValue(localValue), + nearestDistance = (this.maxValue - this.minValue) + 5, + index = 0, + nearest = null; + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i], + value = thumb.value, + dist = Math.abs(value - clickValue); + + if (Math.abs(dist <= nearestDistance)) { + nearest = thumb; + index = i; + nearestDistance = dist; + } + } + return nearest; + }, + + + onKeyDown : function(e){ + + if(this.disabled || this.thumbs.length !== 1){ + e.preventDefault(); + return; + } + var k = e.getKey(), + val; + switch(k){ + case e.UP: + case e.RIGHT: + e.stopEvent(); + val = e.ctrlKey ? this.maxValue : this.getValue(0) + this.keyIncrement; + this.setValue(0, val, undefined, true); + break; + case e.DOWN: + case e.LEFT: + e.stopEvent(); + val = e.ctrlKey ? this.minValue : this.getValue(0) - this.keyIncrement; + this.setValue(0, val, undefined, true); + break; + default: + e.preventDefault(); + } + }, + + + doSnap : function(value){ + if (!(this.increment && value)) { + return value; + } + var newValue = value, + inc = this.increment, + m = value % inc; + if (m != 0) { + newValue -= m; + if (m * 2 >= inc) { + newValue += inc; + } else if (m * 2 < -inc) { + newValue -= inc; + } + } + return newValue.constrain(this.minValue, this.maxValue); + }, + + + afterRender : function(){ + Ext.slider.MultiSlider.superclass.afterRender.apply(this, arguments); + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i]; + + if (thumb.value !== undefined) { + var v = this.normalizeValue(thumb.value); + + if (v !== thumb.value) { + + this.setValue(i, v, false); + } else { + this.moveThumb(i, this.translateValue(v), false); + } + } + }; + }, + + + getRatio : function(){ + var w = this.innerEl.getWidth(), + v = this.maxValue - this.minValue; + return v == 0 ? w : (w/v); + }, + + + normalizeValue : function(v){ + v = this.doSnap(v); + v = Ext.util.Format.round(v, this.decimalPrecision); + v = v.constrain(this.minValue, this.maxValue); + return v; + }, + + + setMinValue : function(val){ + this.minValue = val; + var i = 0, + thumbs = this.thumbs, + len = thumbs.length, + t; + + for(; i < len; ++i){ + t = thumbs[i]; + t.value = t.value < val ? val : t.value; + } + this.syncThumb(); + }, + + + setMaxValue : function(val){ + this.maxValue = val; + var i = 0, + thumbs = this.thumbs, + len = thumbs.length, + t; + + for(; i < len; ++i){ + t = thumbs[i]; + t.value = t.value > val ? val : t.value; + } + this.syncThumb(); + }, + + + setValue : function(index, v, animate, changeComplete) { + var thumb = this.thumbs[index], + el = thumb.el; + + v = this.normalizeValue(v); + + if (v !== thumb.value && this.fireEvent('beforechange', this, v, thumb.value, thumb) !== false) { + thumb.value = v; + if(this.rendered){ + this.moveThumb(index, this.translateValue(v), animate !== false); + this.fireEvent('change', this, v, thumb); + if(changeComplete){ + this.fireEvent('changecomplete', this, v, thumb); + } + } + } + }, + + + translateValue : function(v) { + var ratio = this.getRatio(); + return (v * ratio) - (this.minValue * ratio) - this.halfThumb; + }, + + + reverseValue : function(pos){ + var ratio = this.getRatio(); + return (pos + (this.minValue * ratio)) / ratio; + }, + + + moveThumb: function(index, v, animate){ + var thumb = this.thumbs[index].el; + + if(!animate || this.animate === false){ + thumb.setLeft(v); + }else{ + thumb.shift({left: v, stopFx: true, duration:.35}); + } + }, + + + focus : function(){ + this.focusEl.focus(10); + }, + + + onResize : function(w, h){ + var thumbs = this.thumbs, + len = thumbs.length, + i = 0; + + + for(; i < len; ++i){ + thumbs[i].el.stopFx(); + } + + if(Ext.isNumber(w)){ + this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); + } + this.syncThumb(); + Ext.slider.MultiSlider.superclass.onResize.apply(this, arguments); + }, + + + onDisable: function(){ + Ext.slider.MultiSlider.superclass.onDisable.call(this); + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i], + el = thumb.el; + + thumb.disable(); + + if(Ext.isIE){ + + + var xy = el.getXY(); + el.hide(); + + this.innerEl.addClass(this.disabledClass).dom.disabled = true; + + if (!this.thumbHolder) { + this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass}); + } + + this.thumbHolder.show().setXY(xy); + } + } + }, + + + onEnable: function(){ + Ext.slider.MultiSlider.superclass.onEnable.call(this); + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i], + el = thumb.el; + + thumb.enable(); + + if (Ext.isIE) { + this.innerEl.removeClass(this.disabledClass).dom.disabled = false; + + if (this.thumbHolder) this.thumbHolder.hide(); + + el.show(); + this.syncThumb(); + } + } + }, + + + syncThumb : function() { + if (this.rendered) { + for (var i=0; i < this.thumbs.length; i++) { + this.moveThumb(i, this.translateValue(this.thumbs[i].value)); + } + } + }, + + + getValue : function(index) { + return this.thumbs[index].value; + }, + + + getValues: function() { + var values = []; + + for (var i=0; i < this.thumbs.length; i++) { + values.push(this.thumbs[i].value); + } + + return values; + }, + + + beforeDestroy : function(){ + var thumbs = this.thumbs; + for(var i = 0, len = thumbs.length; i < len; ++i){ + thumbs[i].destroy(); + thumbs[i] = null; + } + Ext.destroyMembers(this, 'endEl', 'innerEl', 'focusEl', 'thumbHolder'); + Ext.slider.MultiSlider.superclass.beforeDestroy.call(this); + } +}); + +Ext.reg('multislider', Ext.slider.MultiSlider); + + +Ext.slider.SingleSlider = Ext.extend(Ext.slider.MultiSlider, { + constructor: function(config) { + config = config || {}; + + Ext.applyIf(config, { + values: [config.value || 0] + }); + + Ext.slider.SingleSlider.superclass.constructor.call(this, config); + }, + + + getValue: function() { + + return Ext.slider.SingleSlider.superclass.getValue.call(this, 0); + }, + + + setValue: function(value, animate) { + var args = Ext.toArray(arguments), + len = args.length; + + + + + if (len == 1 || (len <= 3 && typeof arguments[1] != 'number')) { + args.unshift(0); + } + + return Ext.slider.SingleSlider.superclass.setValue.apply(this, args); + }, + + + syncThumb : function() { + return Ext.slider.SingleSlider.superclass.syncThumb.apply(this, [0].concat(arguments)); + }, + + + getNearest : function(){ + + return this.thumbs[0]; + } +}); + + +Ext.Slider = Ext.slider.SingleSlider; + +Ext.reg('slider', Ext.slider.SingleSlider); + + +Ext.slider.Vertical = { + onResize : function(w, h){ + this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b'))); + this.syncThumb(); + }, + + getRatio : function(){ + var h = this.innerEl.getHeight(), + v = this.maxValue - this.minValue; + return h/v; + }, + + moveThumb: function(index, v, animate) { + var thumb = this.thumbs[index], + el = thumb.el; + + if (!animate || this.animate === false) { + el.setBottom(v); + } else { + el.shift({bottom: v, stopFx: true, duration:.35}); + } + }, + + onClickChange : function(local) { + if (local.left > this.clickRange[0] && local.left < this.clickRange[1]) { + var thumb = this.getNearest(local, 'top'), + index = thumb.index, + value = this.minValue + this.reverseValue(this.innerEl.getHeight() - local.top); + + this.setValue(index, Ext.util.Format.round(value, this.decimalPrecision), undefined, true); + } + } +}; + + +Ext.slider.Thumb.Vertical = { + getNewValue: function() { + var slider = this.slider, + innerEl = slider.innerEl, + pos = innerEl.translatePoints(this.tracker.getXY()), + bottom = innerEl.getHeight() - pos.top; + + return slider.minValue + Ext.util.Format.round(bottom / slider.getRatio(), slider.decimalPrecision); + } +}; + +Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { + + baseCls : 'x-progress', + + + animate : false, + + + waitTimer : null, + + + initComponent : function(){ + Ext.ProgressBar.superclass.initComponent.call(this); + this.addEvents( + + "update" + ); + }, + + + onRender : function(ct, position){ + var tpl = new Ext.Template( + '
    ', + '
    ', + '
    ', + '
    ', + '
     
    ', + '
    ', + '
    ', + '
    ', + '
     
    ', + '
    ', + '
    ', + '
    ' + ); + + this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true) + : tpl.append(ct, {cls: this.baseCls}, true); + + if(this.id){ + this.el.dom.id = this.id; + } + var inner = this.el.dom.firstChild; + this.progressBar = Ext.get(inner.firstChild); + + if(this.textEl){ + + this.textEl = Ext.get(this.textEl); + delete this.textTopEl; + }else{ + + this.textTopEl = Ext.get(this.progressBar.dom.firstChild); + var textBackEl = Ext.get(inner.childNodes[1]); + this.textTopEl.setStyle("z-index", 99).addClass('x-hidden'); + this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]); + this.textEl.setWidth(inner.offsetWidth); + } + this.progressBar.setHeight(inner.offsetHeight); + }, + + + afterRender : function(){ + Ext.ProgressBar.superclass.afterRender.call(this); + if(this.value){ + this.updateProgress(this.value, this.text); + }else{ + this.updateText(this.text); + } + }, + + + updateProgress : function(value, text, animate){ + this.value = value || 0; + if(text){ + this.updateText(text); + } + if(this.rendered && !this.isDestroyed){ + var w = Math.floor(value*this.el.dom.firstChild.offsetWidth); + this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate)); + if(this.textTopEl){ + + this.textTopEl.removeClass('x-hidden').setWidth(w); + } + } + this.fireEvent('update', this, value, text); + return this; + }, + + + wait : function(o){ + if(!this.waitTimer){ + var scope = this; + o = o || {}; + this.updateText(o.text); + this.waitTimer = Ext.TaskMgr.start({ + run: function(i){ + var inc = o.increment || 10; + i -= 1; + this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate); + }, + interval: o.interval || 1000, + duration: o.duration, + onStop: function(){ + if(o.fn){ + o.fn.apply(o.scope || this); + } + this.reset(); + }, + scope: scope + }); + } + return this; + }, + + + isWaiting : function(){ + return this.waitTimer !== null; + }, + + + updateText : function(text){ + this.text = text || ' '; + if(this.rendered){ + this.textEl.update(this.text); + } + return this; + }, + + + syncProgressBar : function(){ + if(this.value){ + this.updateProgress(this.value, this.text); + } + return this; + }, + + + setSize : function(w, h){ + Ext.ProgressBar.superclass.setSize.call(this, w, h); + if(this.textTopEl){ + var inner = this.el.dom.firstChild; + this.textEl.setSize(inner.offsetWidth, inner.offsetHeight); + } + this.syncProgressBar(); + return this; + }, + + + reset : function(hide){ + this.updateProgress(0); + if(this.textTopEl){ + this.textTopEl.addClass('x-hidden'); + } + this.clearTimer(); + if(hide === true){ + this.hide(); + } + return this; + }, + + + clearTimer : function(){ + if(this.waitTimer){ + this.waitTimer.onStop = null; + Ext.TaskMgr.stop(this.waitTimer); + this.waitTimer = null; + } + }, + + onDestroy: function(){ + this.clearTimer(); + if(this.rendered){ + if(this.textEl.isComposite){ + this.textEl.clear(); + } + Ext.destroyMembers(this, 'textEl', 'progressBar', 'textTopEl'); + } + Ext.ProgressBar.superclass.onDestroy.call(this); + } +}); +Ext.reg('progress', Ext.ProgressBar); + +(function() { + +var Event=Ext.EventManager; +var Dom=Ext.lib.Dom; + + +Ext.dd.DragDrop = function(id, sGroup, config) { + if(id) { + this.init(id, sGroup, config); + } +}; + +Ext.dd.DragDrop.prototype = { + + + + + id: null, + + + config: null, + + + dragElId: null, + + + handleElId: null, + + + invalidHandleTypes: null, + + + invalidHandleIds: null, + + + invalidHandleClasses: null, + + + startPageX: 0, + + + startPageY: 0, + + + groups: null, + + + locked: false, + + + lock: function() { + this.locked = true; + }, + + + moveOnly: false, + + + unlock: function() { + this.locked = false; + }, + + + isTarget: true, + + + padding: null, + + + _domRef: null, + + + __ygDragDrop: true, + + + constrainX: false, + + + constrainY: false, + + + minX: 0, + + + maxX: 0, + + + minY: 0, + + + maxY: 0, + + + maintainOffset: false, + + + xTicks: null, + + + yTicks: null, + + + primaryButtonOnly: true, + + + available: false, + + + hasOuterHandles: false, + + + b4StartDrag: function(x, y) { }, + + + startDrag: function(x, y) { }, + + + b4Drag: function(e) { }, + + + onDrag: function(e) { }, + + + onDragEnter: function(e, id) { }, + + + b4DragOver: function(e) { }, + + + onDragOver: function(e, id) { }, + + + b4DragOut: function(e) { }, + + + onDragOut: function(e, id) { }, + + + b4DragDrop: function(e) { }, + + + onDragDrop: function(e, id) { }, + + + onInvalidDrop: function(e) { }, + + + b4EndDrag: function(e) { }, + + + endDrag: function(e) { }, + + + b4MouseDown: function(e) { }, + + + onMouseDown: function(e) { }, + + + onMouseUp: function(e) { }, + + + onAvailable: function () { + }, + + + defaultPadding : {left:0, right:0, top:0, bottom:0}, + + + constrainTo : function(constrainTo, pad, inContent){ + if(Ext.isNumber(pad)){ + pad = {left: pad, right:pad, top:pad, bottom:pad}; + } + pad = pad || this.defaultPadding; + var b = Ext.get(this.getEl()).getBox(), + ce = Ext.get(constrainTo), + s = ce.getScroll(), + c, + cd = ce.dom; + if(cd == document.body){ + c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()}; + }else{ + var xy = ce.getXY(); + c = {x : xy[0], y: xy[1], width: cd.clientWidth, height: cd.clientHeight}; + } + + + var topSpace = b.y - c.y, + leftSpace = b.x - c.x; + + this.resetConstraints(); + this.setXConstraint(leftSpace - (pad.left||0), + c.width - leftSpace - b.width - (pad.right||0), + this.xTickSize + ); + this.setYConstraint(topSpace - (pad.top||0), + c.height - topSpace - b.height - (pad.bottom||0), + this.yTickSize + ); + }, + + + getEl: function() { + if (!this._domRef) { + this._domRef = Ext.getDom(this.id); + } + + return this._domRef; + }, + + + getDragEl: function() { + return Ext.getDom(this.dragElId); + }, + + + init: function(id, sGroup, config) { + this.initTarget(id, sGroup, config); + Event.on(this.id, "mousedown", this.handleMouseDown, this); + + }, + + + initTarget: function(id, sGroup, config) { + + + this.config = config || {}; + + + this.DDM = Ext.dd.DDM; + + this.groups = {}; + + + + if (typeof id !== "string") { + id = Ext.id(id); + } + + + this.id = id; + + + this.addToGroup((sGroup) ? sGroup : "default"); + + + + this.handleElId = id; + + + this.setDragElId(id); + + + this.invalidHandleTypes = { A: "A" }; + this.invalidHandleIds = {}; + this.invalidHandleClasses = []; + + this.applyConfig(); + + this.handleOnAvailable(); + }, + + + applyConfig: function() { + + + + this.padding = this.config.padding || [0, 0, 0, 0]; + this.isTarget = (this.config.isTarget !== false); + this.maintainOffset = (this.config.maintainOffset); + this.primaryButtonOnly = (this.config.primaryButtonOnly !== false); + + }, + + + handleOnAvailable: function() { + this.available = true; + this.resetConstraints(); + this.onAvailable(); + }, + + + setPadding: function(iTop, iRight, iBot, iLeft) { + + if (!iRight && 0 !== iRight) { + this.padding = [iTop, iTop, iTop, iTop]; + } else if (!iBot && 0 !== iBot) { + this.padding = [iTop, iRight, iTop, iRight]; + } else { + this.padding = [iTop, iRight, iBot, iLeft]; + } + }, + + + setInitPosition: function(diffX, diffY) { + var el = this.getEl(); + + if (!this.DDM.verifyEl(el)) { + return; + } + + var dx = diffX || 0; + var dy = diffY || 0; + + var p = Dom.getXY( el ); + + this.initPageX = p[0] - dx; + this.initPageY = p[1] - dy; + + this.lastPageX = p[0]; + this.lastPageY = p[1]; + + this.setStartPosition(p); + }, + + + setStartPosition: function(pos) { + var p = pos || Dom.getXY( this.getEl() ); + this.deltaSetXY = null; + + this.startPageX = p[0]; + this.startPageY = p[1]; + }, + + + addToGroup: function(sGroup) { + this.groups[sGroup] = true; + this.DDM.regDragDrop(this, sGroup); + }, + + + removeFromGroup: function(sGroup) { + if (this.groups[sGroup]) { + delete this.groups[sGroup]; + } + + this.DDM.removeDDFromGroup(this, sGroup); + }, + + + setDragElId: function(id) { + this.dragElId = id; + }, + + + setHandleElId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + this.handleElId = id; + this.DDM.regHandle(this.id, id); + }, + + + setOuterHandleElId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + Event.on(id, "mousedown", + this.handleMouseDown, this); + this.setHandleElId(id); + + this.hasOuterHandles = true; + }, + + + unreg: function() { + Event.un(this.id, "mousedown", + this.handleMouseDown); + this._domRef = null; + this.DDM._remove(this); + }, + + destroy : function(){ + this.unreg(); + }, + + + isLocked: function() { + return (this.DDM.isLocked() || this.locked); + }, + + + handleMouseDown: function(e, oDD){ + if (this.primaryButtonOnly && e.button != 0) { + return; + } + + if (this.isLocked()) { + return; + } + + this.DDM.refreshCache(this.groups); + + var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e)); + if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) ) { + } else { + if (this.clickValidator(e)) { + + + this.setStartPosition(); + + this.b4MouseDown(e); + this.onMouseDown(e); + + this.DDM.handleMouseDown(e, this); + + this.DDM.stopEvent(e); + } else { + + + } + } + }, + + clickValidator: function(e) { + var target = e.getTarget(); + return ( this.isValidHandleChild(target) && + (this.id == this.handleElId || + this.DDM.handleWasClicked(target, this.id)) ); + }, + + + addInvalidHandleType: function(tagName) { + var type = tagName.toUpperCase(); + this.invalidHandleTypes[type] = type; + }, + + + addInvalidHandleId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + this.invalidHandleIds[id] = id; + }, + + + addInvalidHandleClass: function(cssClass) { + this.invalidHandleClasses.push(cssClass); + }, + + + removeInvalidHandleType: function(tagName) { + var type = tagName.toUpperCase(); + + delete this.invalidHandleTypes[type]; + }, + + + removeInvalidHandleId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + delete this.invalidHandleIds[id]; + }, + + + removeInvalidHandleClass: function(cssClass) { + for (var i=0, len=this.invalidHandleClasses.length; i= this.minX; i = i - iTickSize) { + if (!tickMap[i]) { + this.xTicks[this.xTicks.length] = i; + tickMap[i] = true; + } + } + + for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) { + if (!tickMap[i]) { + this.xTicks[this.xTicks.length] = i; + tickMap[i] = true; + } + } + + this.xTicks.sort(this.DDM.numericSort) ; + }, + + + setYTicks: function(iStartY, iTickSize) { + this.yTicks = []; + this.yTickSize = iTickSize; + + var tickMap = {}; + + for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) { + if (!tickMap[i]) { + this.yTicks[this.yTicks.length] = i; + tickMap[i] = true; + } + } + + for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) { + if (!tickMap[i]) { + this.yTicks[this.yTicks.length] = i; + tickMap[i] = true; + } + } + + this.yTicks.sort(this.DDM.numericSort) ; + }, + + + setXConstraint: function(iLeft, iRight, iTickSize) { + this.leftConstraint = iLeft; + this.rightConstraint = iRight; + + this.minX = this.initPageX - iLeft; + this.maxX = this.initPageX + iRight; + if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); } + + this.constrainX = true; + }, + + + clearConstraints: function() { + this.constrainX = false; + this.constrainY = false; + this.clearTicks(); + }, + + + clearTicks: function() { + this.xTicks = null; + this.yTicks = null; + this.xTickSize = 0; + this.yTickSize = 0; + }, + + + setYConstraint: function(iUp, iDown, iTickSize) { + this.topConstraint = iUp; + this.bottomConstraint = iDown; + + this.minY = this.initPageY - iUp; + this.maxY = this.initPageY + iDown; + if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); } + + this.constrainY = true; + + }, + + + resetConstraints: function() { + + if (this.initPageX || this.initPageX === 0) { + + var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0; + var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0; + + this.setInitPosition(dx, dy); + + + } else { + this.setInitPosition(); + } + + if (this.constrainX) { + this.setXConstraint( this.leftConstraint, + this.rightConstraint, + this.xTickSize ); + } + + if (this.constrainY) { + this.setYConstraint( this.topConstraint, + this.bottomConstraint, + this.yTickSize ); + } + }, + + + getTick: function(val, tickArray) { + if (!tickArray) { + + + return val; + } else if (tickArray[0] >= val) { + + + return tickArray[0]; + } else { + for (var i=0, len=tickArray.length; i= val) { + var diff1 = val - tickArray[i]; + var diff2 = tickArray[next] - val; + return (diff2 > diff1) ? tickArray[i] : tickArray[next]; + } + } + + + + return tickArray[tickArray.length - 1]; + } + }, + + + toString: function() { + return ("DragDrop " + this.id); + } + +}; + +})(); + + + + +if (!Ext.dd.DragDropMgr) { + + +Ext.dd.DragDropMgr = function() { + + var Event = Ext.EventManager; + + return { + + + ids: {}, + + + handleIds: {}, + + + dragCurrent: null, + + + dragOvers: {}, + + + deltaX: 0, + + + deltaY: 0, + + + preventDefault: true, + + + stopPropagation: true, + + + initialized: false, + + + locked: false, + + + init: function() { + this.initialized = true; + }, + + + POINT: 0, + + + INTERSECT: 1, + + + mode: 0, + + + _execOnAll: function(sMethod, args) { + for (var i in this.ids) { + for (var j in this.ids[i]) { + var oDD = this.ids[i][j]; + if (! this.isTypeOfDD(oDD)) { + continue; + } + oDD[sMethod].apply(oDD, args); + } + } + }, + + + _onLoad: function() { + + this.init(); + + + Event.on(document, "mouseup", this.handleMouseUp, this, true); + Event.on(document, "mousemove", this.handleMouseMove, this, true); + Event.on(window, "unload", this._onUnload, this, true); + Event.on(window, "resize", this._onResize, this, true); + + + }, + + + _onResize: function(e) { + this._execOnAll("resetConstraints", []); + }, + + + lock: function() { this.locked = true; }, + + + unlock: function() { this.locked = false; }, + + + isLocked: function() { return this.locked; }, + + + locationCache: {}, + + + useCache: true, + + + clickPixelThresh: 3, + + + clickTimeThresh: 350, + + + dragThreshMet: false, + + + clickTimeout: null, + + + startX: 0, + + + startY: 0, + + + regDragDrop: function(oDD, sGroup) { + if (!this.initialized) { this.init(); } + + if (!this.ids[sGroup]) { + this.ids[sGroup] = {}; + } + this.ids[sGroup][oDD.id] = oDD; + }, + + + removeDDFromGroup: function(oDD, sGroup) { + if (!this.ids[sGroup]) { + this.ids[sGroup] = {}; + } + + var obj = this.ids[sGroup]; + if (obj && obj[oDD.id]) { + delete obj[oDD.id]; + } + }, + + + _remove: function(oDD) { + for (var g in oDD.groups) { + if (g && this.ids[g] && this.ids[g][oDD.id]) { + delete this.ids[g][oDD.id]; + } + } + delete this.handleIds[oDD.id]; + }, + + + regHandle: function(sDDId, sHandleId) { + if (!this.handleIds[sDDId]) { + this.handleIds[sDDId] = {}; + } + this.handleIds[sDDId][sHandleId] = sHandleId; + }, + + + isDragDrop: function(id) { + return ( this.getDDById(id) ) ? true : false; + }, + + + getRelated: function(p_oDD, bTargetsOnly) { + var oDDs = []; + for (var i in p_oDD.groups) { + for (var j in this.ids[i]) { + var dd = this.ids[i][j]; + if (! this.isTypeOfDD(dd)) { + continue; + } + if (!bTargetsOnly || dd.isTarget) { + oDDs[oDDs.length] = dd; + } + } + } + + return oDDs; + }, + + + isLegalTarget: function (oDD, oTargetDD) { + var targets = this.getRelated(oDD, true); + for (var i=0, len=targets.length;i this.clickPixelThresh || + diffY > this.clickPixelThresh) { + this.startDrag(this.startX, this.startY); + } + } + + if (this.dragThreshMet) { + this.dragCurrent.b4Drag(e); + this.dragCurrent.onDrag(e); + if(!this.dragCurrent.moveOnly){ + this.fireEvents(e, false); + } + } + + this.stopEvent(e); + + return true; + }, + + + fireEvents: function(e, isDrop) { + var dc = this.dragCurrent; + + + + if (!dc || dc.isLocked()) { + return; + } + + var pt = e.getPoint(); + + + var oldOvers = []; + + var outEvts = []; + var overEvts = []; + var dropEvts = []; + var enterEvts = []; + + + + for (var i in this.dragOvers) { + + var ddo = this.dragOvers[i]; + + if (! this.isTypeOfDD(ddo)) { + continue; + } + + if (! this.isOverTarget(pt, ddo, this.mode)) { + outEvts.push( ddo ); + } + + oldOvers[i] = true; + delete this.dragOvers[i]; + } + + for (var sGroup in dc.groups) { + + if ("string" != typeof sGroup) { + continue; + } + + for (i in this.ids[sGroup]) { + var oDD = this.ids[sGroup][i]; + if (! this.isTypeOfDD(oDD)) { + continue; + } + + if (oDD.isTarget && !oDD.isLocked() && ((oDD != dc) || (dc.ignoreSelf === false))) { + if (this.isOverTarget(pt, oDD, this.mode)) { + + if (isDrop) { + dropEvts.push( oDD ); + + } else { + + + if (!oldOvers[oDD.id]) { + enterEvts.push( oDD ); + + } else { + overEvts.push( oDD ); + } + + this.dragOvers[oDD.id] = oDD; + } + } + } + } + } + + if (this.mode) { + if (outEvts.length) { + dc.b4DragOut(e, outEvts); + dc.onDragOut(e, outEvts); + } + + if (enterEvts.length) { + dc.onDragEnter(e, enterEvts); + } + + if (overEvts.length) { + dc.b4DragOver(e, overEvts); + dc.onDragOver(e, overEvts); + } + + if (dropEvts.length) { + dc.b4DragDrop(e, dropEvts); + dc.onDragDrop(e, dropEvts); + } + + } else { + + var len = 0; + for (i=0, len=outEvts.length; i 2000) { + } else { + setTimeout(DDM._addListeners, 10); + if (document && document.body) { + DDM._timeoutCount += 1; + } + } + } + }, + + + handleWasClicked: function(node, id) { + if (this.isHandle(id, node.id)) { + return true; + } else { + + var p = node.parentNode; + + while (p) { + if (this.isHandle(id, p.id)) { + return true; + } else { + p = p.parentNode; + } + } + } + + return false; + } + + }; + +}(); + + +Ext.dd.DDM = Ext.dd.DragDropMgr; +Ext.dd.DDM._addListeners(); + +} + + +Ext.dd.DD = function(id, sGroup, config) { + if (id) { + this.init(id, sGroup, config); + } +}; + +Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { + + + scroll: true, + + + autoOffset: function(iPageX, iPageY) { + var x = iPageX - this.startPageX; + var y = iPageY - this.startPageY; + this.setDelta(x, y); + }, + + + setDelta: function(iDeltaX, iDeltaY) { + this.deltaX = iDeltaX; + this.deltaY = iDeltaY; + }, + + + setDragElPos: function(iPageX, iPageY) { + + + + var el = this.getDragEl(); + this.alignElWithMouse(el, iPageX, iPageY); + }, + + + alignElWithMouse: function(el, iPageX, iPageY) { + var oCoord = this.getTargetCoord(iPageX, iPageY); + var fly = el.dom ? el : Ext.fly(el, '_dd'); + if (!this.deltaSetXY) { + var aCoord = [oCoord.x, oCoord.y]; + fly.setXY(aCoord); + var newLeft = fly.getLeft(true); + var newTop = fly.getTop(true); + this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ]; + } else { + fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]); + } + + this.cachePosition(oCoord.x, oCoord.y); + this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth); + return oCoord; + }, + + + cachePosition: function(iPageX, iPageY) { + if (iPageX) { + this.lastPageX = iPageX; + this.lastPageY = iPageY; + } else { + var aCoord = Ext.lib.Dom.getXY(this.getEl()); + this.lastPageX = aCoord[0]; + this.lastPageY = aCoord[1]; + } + }, + + + autoScroll: function(x, y, h, w) { + + if (this.scroll) { + + var clientH = Ext.lib.Dom.getViewHeight(); + + + var clientW = Ext.lib.Dom.getViewWidth(); + + + var st = this.DDM.getScrollTop(); + + + var sl = this.DDM.getScrollLeft(); + + + var bot = h + y; + + + var right = w + x; + + + + + var toBot = (clientH + st - y - this.deltaY); + + + var toRight = (clientW + sl - x - this.deltaX); + + + + + var thresh = 40; + + + + + var scrAmt = (document.all) ? 80 : 30; + + + + if ( bot > clientH && toBot < thresh ) { + window.scrollTo(sl, st + scrAmt); + } + + + + if ( y < st && st > 0 && y - st < thresh ) { + window.scrollTo(sl, st - scrAmt); + } + + + + if ( right > clientW && toRight < thresh ) { + window.scrollTo(sl + scrAmt, st); + } + + + + if ( x < sl && sl > 0 && x - sl < thresh ) { + window.scrollTo(sl - scrAmt, st); + } + } + }, + + + getTargetCoord: function(iPageX, iPageY) { + var x = iPageX - this.deltaX; + var y = iPageY - this.deltaY; + + if (this.constrainX) { + if (x < this.minX) { x = this.minX; } + if (x > this.maxX) { x = this.maxX; } + } + + if (this.constrainY) { + if (y < this.minY) { y = this.minY; } + if (y > this.maxY) { y = this.maxY; } + } + + x = this.getTick(x, this.xTicks); + y = this.getTick(y, this.yTicks); + + + return {x:x, y:y}; + }, + + + applyConfig: function() { + Ext.dd.DD.superclass.applyConfig.call(this); + this.scroll = (this.config.scroll !== false); + }, + + + b4MouseDown: function(e) { + + this.autoOffset(e.getPageX(), + e.getPageY()); + }, + + + b4Drag: function(e) { + this.setDragElPos(e.getPageX(), + e.getPageY()); + }, + + toString: function() { + return ("DD " + this.id); + } + + + + + + +}); + +Ext.dd.DDProxy = function(id, sGroup, config) { + if (id) { + this.init(id, sGroup, config); + this.initFrame(); + } +}; + + +Ext.dd.DDProxy.dragElId = "ygddfdiv"; + +Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, { + + + resizeFrame: true, + + + centerFrame: false, + + + createFrame: function() { + var self = this; + var body = document.body; + + if (!body || !body.firstChild) { + setTimeout( function() { self.createFrame(); }, 50 ); + return; + } + + var div = this.getDragEl(); + + if (!div) { + div = document.createElement("div"); + div.id = this.dragElId; + var s = div.style; + + s.position = "absolute"; + s.visibility = "hidden"; + s.cursor = "move"; + s.border = "2px solid #aaa"; + s.zIndex = 999; + + + + + body.insertBefore(div, body.firstChild); + } + }, + + + initFrame: function() { + this.createFrame(); + }, + + applyConfig: function() { + Ext.dd.DDProxy.superclass.applyConfig.call(this); + + this.resizeFrame = (this.config.resizeFrame !== false); + this.centerFrame = (this.config.centerFrame); + this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId); + }, + + + showFrame: function(iPageX, iPageY) { + var el = this.getEl(); + var dragEl = this.getDragEl(); + var s = dragEl.style; + + this._resizeProxy(); + + if (this.centerFrame) { + this.setDelta( Math.round(parseInt(s.width, 10)/2), + Math.round(parseInt(s.height, 10)/2) ); + } + + this.setDragElPos(iPageX, iPageY); + + Ext.fly(dragEl).show(); + }, + + + _resizeProxy: function() { + if (this.resizeFrame) { + var el = this.getEl(); + Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight); + } + }, + + + b4MouseDown: function(e) { + var x = e.getPageX(); + var y = e.getPageY(); + this.autoOffset(x, y); + this.setDragElPos(x, y); + }, + + + b4StartDrag: function(x, y) { + + this.showFrame(x, y); + }, + + + b4EndDrag: function(e) { + Ext.fly(this.getDragEl()).hide(); + }, + + + + + endDrag: function(e) { + + var lel = this.getEl(); + var del = this.getDragEl(); + + + del.style.visibility = ""; + + this.beforeMove(); + + + lel.style.visibility = "hidden"; + Ext.dd.DDM.moveToEl(lel, del); + del.style.visibility = "hidden"; + lel.style.visibility = ""; + + this.afterDrag(); + }, + + beforeMove : function(){ + + }, + + afterDrag : function(){ + + }, + + toString: function() { + return ("DDProxy " + this.id); + } + +}); + +Ext.dd.DDTarget = function(id, sGroup, config) { + if (id) { + this.initTarget(id, sGroup, config); + } +}; + + +Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { + + getDragEl: Ext.emptyFn, + + isValidHandleChild: Ext.emptyFn, + + startDrag: Ext.emptyFn, + + endDrag: Ext.emptyFn, + + onDrag: Ext.emptyFn, + + onDragDrop: Ext.emptyFn, + + onDragEnter: Ext.emptyFn, + + onDragOut: Ext.emptyFn, + + onDragOver: Ext.emptyFn, + + onInvalidDrop: Ext.emptyFn, + + onMouseDown: Ext.emptyFn, + + onMouseUp: Ext.emptyFn, + + setXConstraint: Ext.emptyFn, + + setYConstraint: Ext.emptyFn, + + resetConstraints: Ext.emptyFn, + + clearConstraints: Ext.emptyFn, + + clearTicks: Ext.emptyFn, + + setInitPosition: Ext.emptyFn, + + setDragElId: Ext.emptyFn, + + setHandleElId: Ext.emptyFn, + + setOuterHandleElId: Ext.emptyFn, + + addInvalidHandleClass: Ext.emptyFn, + + addInvalidHandleId: Ext.emptyFn, + + addInvalidHandleType: Ext.emptyFn, + + removeInvalidHandleClass: Ext.emptyFn, + + removeInvalidHandleId: Ext.emptyFn, + + removeInvalidHandleType: Ext.emptyFn, + + toString: function() { + return ("DDTarget " + this.id); + } +}); +Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { + + active: false, + + tolerance: 5, + + autoStart: false, + + constructor : function(config){ + Ext.apply(this, config); + this.addEvents( + + 'mousedown', + + 'mouseup', + + 'mousemove', + + 'dragstart', + + 'dragend', + + 'drag' + ); + + this.dragRegion = new Ext.lib.Region(0,0,0,0); + + if(this.el){ + this.initEl(this.el); + } + Ext.dd.DragTracker.superclass.constructor.call(this, config); + }, + + initEl: function(el){ + this.el = Ext.get(el); + el.on('mousedown', this.onMouseDown, this, + this.delegate ? {delegate: this.delegate} : undefined); + }, + + destroy : function(){ + this.el.un('mousedown', this.onMouseDown, this); + delete this.el; + }, + + onMouseDown: function(e, target){ + if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){ + this.startXY = this.lastXY = e.getXY(); + this.dragTarget = this.delegate ? target : this.el.dom; + if(this.preventDefault !== false){ + e.preventDefault(); + } + Ext.getDoc().on({ + scope: this, + mouseup: this.onMouseUp, + mousemove: this.onMouseMove, + selectstart: this.stopSelect + }); + if(this.autoStart){ + this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this, [e]); + } + } + }, + + onMouseMove: function(e, target){ + + if(this.active && Ext.isIE && !e.browserEvent.button){ + e.preventDefault(); + this.onMouseUp(e); + return; + } + + e.preventDefault(); + var xy = e.getXY(), s = this.startXY; + this.lastXY = xy; + if(!this.active){ + if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){ + this.triggerStart(e); + }else{ + return; + } + } + this.fireEvent('mousemove', this, e); + this.onDrag(e); + this.fireEvent('drag', this, e); + }, + + onMouseUp: function(e) { + var doc = Ext.getDoc(), + wasActive = this.active; + + doc.un('mousemove', this.onMouseMove, this); + doc.un('mouseup', this.onMouseUp, this); + doc.un('selectstart', this.stopSelect, this); + e.preventDefault(); + this.clearStart(); + this.active = false; + delete this.elRegion; + this.fireEvent('mouseup', this, e); + if(wasActive){ + this.onEnd(e); + this.fireEvent('dragend', this, e); + } + }, + + triggerStart: function(e) { + this.clearStart(); + this.active = true; + this.onStart(e); + this.fireEvent('dragstart', this, e); + }, + + clearStart : function() { + if(this.timer){ + clearTimeout(this.timer); + delete this.timer; + } + }, + + stopSelect : function(e) { + e.stopEvent(); + return false; + }, + + + onBeforeStart : function(e) { + + }, + + + onStart : function(xy) { + + }, + + + onDrag : function(e) { + + }, + + + onEnd : function(e) { + + }, + + + getDragTarget : function(){ + return this.dragTarget; + }, + + getDragCt : function(){ + return this.el; + }, + + getXY : function(constrain){ + return constrain ? + this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY; + }, + + getOffset : function(constrain){ + var xy = this.getXY(constrain), + s = this.startXY; + return [s[0]-xy[0], s[1]-xy[1]]; + }, + + constrainModes: { + 'point' : function(xy){ + + if(!this.elRegion){ + this.elRegion = this.getDragCt().getRegion(); + } + + var dr = this.dragRegion; + + dr.left = xy[0]; + dr.top = xy[1]; + dr.right = xy[0]; + dr.bottom = xy[1]; + + dr.constrainTo(this.elRegion); + + return [dr.left, dr.top]; + } + } +}); +Ext.dd.ScrollManager = function(){ + var ddm = Ext.dd.DragDropMgr; + var els = {}; + var dragEl = null; + var proc = {}; + + var onStop = function(e){ + dragEl = null; + clearProc(); + }; + + var triggerRefresh = function(){ + if(ddm.dragCurrent){ + ddm.refreshCache(ddm.dragCurrent.groups); + } + }; + + var doScroll = function(){ + if(ddm.dragCurrent){ + var dds = Ext.dd.ScrollManager; + var inc = proc.el.ddScrollConfig ? + proc.el.ddScrollConfig.increment : dds.increment; + if(!dds.animate){ + if(proc.el.scroll(proc.dir, inc)){ + triggerRefresh(); + } + }else{ + proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh); + } + } + }; + + var clearProc = function(){ + if(proc.id){ + clearInterval(proc.id); + } + proc.id = 0; + proc.el = null; + proc.dir = ""; + }; + + var startProc = function(el, dir){ + clearProc(); + proc.el = el; + proc.dir = dir; + var group = el.ddScrollConfig ? el.ddScrollConfig.ddGroup : undefined, + freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) + ? el.ddScrollConfig.frequency + : Ext.dd.ScrollManager.frequency; + + if (group === undefined || ddm.dragCurrent.ddGroup == group) { + proc.id = setInterval(doScroll, freq); + } + }; + + var onFire = function(e, isDrop){ + if(isDrop || !ddm.dragCurrent){ return; } + var dds = Ext.dd.ScrollManager; + if(!dragEl || dragEl != ddm.dragCurrent){ + dragEl = ddm.dragCurrent; + + dds.refreshCache(); + } + + var xy = Ext.lib.Event.getXY(e); + var pt = new Ext.lib.Point(xy[0], xy[1]); + for(var id in els){ + var el = els[id], r = el._region; + var c = el.ddScrollConfig ? el.ddScrollConfig : dds; + if(r && r.contains(pt) && el.isScrollable()){ + if(r.bottom - pt.y <= c.vthresh){ + if(proc.el != el){ + startProc(el, "down"); + } + return; + }else if(r.right - pt.x <= c.hthresh){ + if(proc.el != el){ + startProc(el, "left"); + } + return; + }else if(pt.y - r.top <= c.vthresh){ + if(proc.el != el){ + startProc(el, "up"); + } + return; + }else if(pt.x - r.left <= c.hthresh){ + if(proc.el != el){ + startProc(el, "right"); + } + return; + } + } + } + clearProc(); + }; + + ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm); + ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm); + + return { + + register : function(el){ + if(Ext.isArray(el)){ + for(var i = 0, len = el.length; i < len; i++) { + this.register(el[i]); + } + }else{ + el = Ext.get(el); + els[el.id] = el; + } + }, + + + unregister : function(el){ + if(Ext.isArray(el)){ + for(var i = 0, len = el.length; i < len; i++) { + this.unregister(el[i]); + } + }else{ + el = Ext.get(el); + delete els[el.id]; + } + }, + + + vthresh : 25, + + hthresh : 25, + + + increment : 100, + + + frequency : 500, + + + animate: true, + + + animDuration: .4, + + + ddGroup: undefined, + + + refreshCache : function(){ + for(var id in els){ + if(typeof els[id] == 'object'){ + els[id]._region = els[id].getRegion(); + } + } + } + }; +}(); +Ext.dd.Registry = function(){ + var elements = {}; + var handles = {}; + var autoIdSeed = 0; + + var getId = function(el, autogen){ + if(typeof el == "string"){ + return el; + } + var id = el.id; + if(!id && autogen !== false){ + id = "extdd-" + (++autoIdSeed); + el.id = id; + } + return id; + }; + + return { + + register : function(el, data){ + data = data || {}; + if(typeof el == "string"){ + el = document.getElementById(el); + } + data.ddel = el; + elements[getId(el)] = data; + if(data.isHandle !== false){ + handles[data.ddel.id] = data; + } + if(data.handles){ + var hs = data.handles; + for(var i = 0, len = hs.length; i < len; i++){ + handles[getId(hs[i])] = data; + } + } + }, + + + unregister : function(el){ + var id = getId(el, false); + var data = elements[id]; + if(data){ + delete elements[id]; + if(data.handles){ + var hs = data.handles; + for(var i = 0, len = hs.length; i < len; i++){ + delete handles[getId(hs[i], false)]; + } + } + } + }, + + + getHandle : function(id){ + if(typeof id != "string"){ + id = id.id; + } + return handles[id]; + }, + + + getHandleFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e); + return t ? handles[t.id] : null; + }, + + + getTarget : function(id){ + if(typeof id != "string"){ + id = id.id; + } + return elements[id]; + }, + + + getTargetFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e); + return t ? elements[t.id] || handles[t.id] : null; + } + }; +}(); +Ext.dd.StatusProxy = function(config){ + Ext.apply(this, config); + this.id = this.id || Ext.id(); + this.el = new Ext.Layer({ + dh: { + id: this.id, tag: "div", cls: "x-dd-drag-proxy "+this.dropNotAllowed, children: [ + {tag: "div", cls: "x-dd-drop-icon"}, + {tag: "div", cls: "x-dd-drag-ghost"} + ] + }, + shadow: !config || config.shadow !== false + }); + this.ghost = Ext.get(this.el.dom.childNodes[1]); + this.dropStatus = this.dropNotAllowed; +}; + +Ext.dd.StatusProxy.prototype = { + + dropAllowed : "x-dd-drop-ok", + + dropNotAllowed : "x-dd-drop-nodrop", + + + setStatus : function(cssClass){ + cssClass = cssClass || this.dropNotAllowed; + if(this.dropStatus != cssClass){ + this.el.replaceClass(this.dropStatus, cssClass); + this.dropStatus = cssClass; + } + }, + + + reset : function(clearGhost){ + this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed; + this.dropStatus = this.dropNotAllowed; + if(clearGhost){ + this.ghost.update(""); + } + }, + + + update : function(html){ + if(typeof html == "string"){ + this.ghost.update(html); + }else{ + this.ghost.update(""); + html.style.margin = "0"; + this.ghost.dom.appendChild(html); + } + var el = this.ghost.dom.firstChild; + if(el){ + Ext.fly(el).setStyle('float', 'none'); + } + }, + + + getEl : function(){ + return this.el; + }, + + + getGhost : function(){ + return this.ghost; + }, + + + hide : function(clear){ + this.el.hide(); + if(clear){ + this.reset(true); + } + }, + + + stop : function(){ + if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){ + this.anim.stop(); + } + }, + + + show : function(){ + this.el.show(); + }, + + + sync : function(){ + this.el.sync(); + }, + + + repair : function(xy, callback, scope){ + this.callback = callback; + this.scope = scope; + if(xy && this.animRepair !== false){ + this.el.addClass("x-dd-drag-repair"); + this.el.hideUnders(true); + this.anim = this.el.shift({ + duration: this.repairDuration || .5, + easing: 'easeOut', + xy: xy, + stopFx: true, + callback: this.afterRepair, + scope: this + }); + }else{ + this.afterRepair(); + } + }, + + + afterRepair : function(){ + this.hide(true); + if(typeof this.callback == "function"){ + this.callback.call(this.scope || this); + } + this.callback = null; + this.scope = null; + }, + + destroy: function(){ + Ext.destroy(this.ghost, this.el); + } +}; +Ext.dd.DragSource = function(el, config){ + this.el = Ext.get(el); + if(!this.dragData){ + this.dragData = {}; + } + + Ext.apply(this, config); + + if(!this.proxy){ + this.proxy = new Ext.dd.StatusProxy(); + } + Ext.dd.DragSource.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, + {dragElId : this.proxy.id, resizeFrame: false, isTarget: false, scroll: this.scroll === true}); + + this.dragging = false; +}; + +Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, { + + + dropAllowed : "x-dd-drop-ok", + + dropNotAllowed : "x-dd-drop-nodrop", + + + getDragData : function(e){ + return this.dragData; + }, + + + onDragEnter : function(e, id){ + var target = Ext.dd.DragDropMgr.getDDById(id); + this.cachedTarget = target; + if(this.beforeDragEnter(target, e, id) !== false){ + if(target.isNotifyTarget){ + var status = target.notifyEnter(this, e, this.dragData); + this.proxy.setStatus(status); + }else{ + this.proxy.setStatus(this.dropAllowed); + } + + if(this.afterDragEnter){ + + this.afterDragEnter(target, e, id); + } + } + }, + + + beforeDragEnter : function(target, e, id){ + return true; + }, + + + alignElWithMouse: function() { + Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments); + this.proxy.sync(); + }, + + + onDragOver : function(e, id){ + var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); + if(this.beforeDragOver(target, e, id) !== false){ + if(target.isNotifyTarget){ + var status = target.notifyOver(this, e, this.dragData); + this.proxy.setStatus(status); + } + + if(this.afterDragOver){ + + this.afterDragOver(target, e, id); + } + } + }, + + + beforeDragOver : function(target, e, id){ + return true; + }, + + + onDragOut : function(e, id){ + var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); + if(this.beforeDragOut(target, e, id) !== false){ + if(target.isNotifyTarget){ + target.notifyOut(this, e, this.dragData); + } + this.proxy.reset(); + if(this.afterDragOut){ + + this.afterDragOut(target, e, id); + } + } + this.cachedTarget = null; + }, + + + beforeDragOut : function(target, e, id){ + return true; + }, + + + onDragDrop : function(e, id){ + var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); + if(this.beforeDragDrop(target, e, id) !== false){ + if(target.isNotifyTarget){ + if(target.notifyDrop(this, e, this.dragData)){ + this.onValidDrop(target, e, id); + }else{ + this.onInvalidDrop(target, e, id); + } + }else{ + this.onValidDrop(target, e, id); + } + + if(this.afterDragDrop){ + + this.afterDragDrop(target, e, id); + } + } + delete this.cachedTarget; + }, + + + beforeDragDrop : function(target, e, id){ + return true; + }, + + + onValidDrop : function(target, e, id){ + this.hideProxy(); + if(this.afterValidDrop){ + + this.afterValidDrop(target, e, id); + } + }, + + + getRepairXY : function(e, data){ + return this.el.getXY(); + }, + + + onInvalidDrop : function(target, e, id){ + this.beforeInvalidDrop(target, e, id); + if(this.cachedTarget){ + if(this.cachedTarget.isNotifyTarget){ + this.cachedTarget.notifyOut(this, e, this.dragData); + } + this.cacheTarget = null; + } + this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this); + + if(this.afterInvalidDrop){ + + this.afterInvalidDrop(e, id); + } + }, + + + afterRepair : function(){ + if(Ext.enableFx){ + this.el.highlight(this.hlColor || "c3daf9"); + } + this.dragging = false; + }, + + + beforeInvalidDrop : function(target, e, id){ + return true; + }, + + + handleMouseDown : function(e){ + if(this.dragging) { + return; + } + var data = this.getDragData(e); + if(data && this.onBeforeDrag(data, e) !== false){ + this.dragData = data; + this.proxy.stop(); + Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments); + } + }, + + + onBeforeDrag : function(data, e){ + return true; + }, + + + onStartDrag : Ext.emptyFn, + + + startDrag : function(x, y){ + this.proxy.reset(); + this.dragging = true; + this.proxy.update(""); + this.onInitDrag(x, y); + this.proxy.show(); + }, + + + onInitDrag : function(x, y){ + var clone = this.el.dom.cloneNode(true); + clone.id = Ext.id(); + this.proxy.update(clone); + this.onStartDrag(x, y); + return true; + }, + + + getProxy : function(){ + return this.proxy; + }, + + + hideProxy : function(){ + this.proxy.hide(); + this.proxy.reset(true); + this.dragging = false; + }, + + + triggerCacheRefresh : function(){ + Ext.dd.DDM.refreshCache(this.groups); + }, + + + b4EndDrag: function(e) { + }, + + + endDrag : function(e){ + this.onEndDrag(this.dragData, e); + }, + + + onEndDrag : function(data, e){ + }, + + + autoOffset : function(x, y) { + this.setDelta(-12, -20); + }, + + destroy: function(){ + Ext.dd.DragSource.superclass.destroy.call(this); + Ext.destroy(this.proxy); + } +}); +Ext.dd.DropTarget = Ext.extend(Ext.dd.DDTarget, { + + constructor : function(el, config){ + this.el = Ext.get(el); + + Ext.apply(this, config); + + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.el); + } + + Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, + {isTarget: true}); + }, + + + + + dropAllowed : "x-dd-drop-ok", + + dropNotAllowed : "x-dd-drop-nodrop", + + + isTarget : true, + + + isNotifyTarget : true, + + + notifyEnter : function(dd, e, data){ + if(this.overClass){ + this.el.addClass(this.overClass); + } + return this.dropAllowed; + }, + + + notifyOver : function(dd, e, data){ + return this.dropAllowed; + }, + + + notifyOut : function(dd, e, data){ + if(this.overClass){ + this.el.removeClass(this.overClass); + } + }, + + + notifyDrop : function(dd, e, data){ + return false; + }, + + destroy : function(){ + Ext.dd.DropTarget.superclass.destroy.call(this); + if(this.containerScroll){ + Ext.dd.ScrollManager.unregister(this.el); + } + } +}); +Ext.dd.DragZone = Ext.extend(Ext.dd.DragSource, { + + constructor : function(el, config){ + Ext.dd.DragZone.superclass.constructor.call(this, el, config); + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.el); + } + }, + + + + + + + getDragData : function(e){ + return Ext.dd.Registry.getHandleFromEvent(e); + }, + + + onInitDrag : function(x, y){ + this.proxy.update(this.dragData.ddel.cloneNode(true)); + this.onStartDrag(x, y); + return true; + }, + + + afterRepair : function(){ + if(Ext.enableFx){ + Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); + } + this.dragging = false; + }, + + + getRepairXY : function(e){ + return Ext.Element.fly(this.dragData.ddel).getXY(); + }, + + destroy : function(){ + Ext.dd.DragZone.superclass.destroy.call(this); + if(this.containerScroll){ + Ext.dd.ScrollManager.unregister(this.el); + } + } +}); +Ext.dd.DropZone = function(el, config){ + Ext.dd.DropZone.superclass.constructor.call(this, el, config); +}; + +Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, { + + getTargetFromEvent : function(e){ + return Ext.dd.Registry.getTargetFromEvent(e); + }, + + + onNodeEnter : function(n, dd, e, data){ + + }, + + + onNodeOver : function(n, dd, e, data){ + return this.dropAllowed; + }, + + + onNodeOut : function(n, dd, e, data){ + + }, + + + onNodeDrop : function(n, dd, e, data){ + return false; + }, + + + onContainerOver : function(dd, e, data){ + return this.dropNotAllowed; + }, + + + onContainerDrop : function(dd, e, data){ + return false; + }, + + + notifyEnter : function(dd, e, data){ + return this.dropNotAllowed; + }, + + + notifyOver : function(dd, e, data){ + var n = this.getTargetFromEvent(e); + if(!n){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + return this.onContainerOver(dd, e, data); + } + if(this.lastOverNode != n){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + } + this.onNodeEnter(n, dd, e, data); + this.lastOverNode = n; + } + return this.onNodeOver(n, dd, e, data); + }, + + + notifyOut : function(dd, e, data){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + }, + + + notifyDrop : function(dd, e, data){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + var n = this.getTargetFromEvent(e); + return n ? + this.onNodeDrop(n, dd, e, data) : + this.onContainerDrop(dd, e, data); + }, + + + triggerCacheRefresh : function(){ + Ext.dd.DDM.refreshCache(this.groups); + } +}); +Ext.Element.addMethods({ + + initDD : function(group, config, overrides){ + var dd = new Ext.dd.DD(Ext.id(this.dom), group, config); + return Ext.apply(dd, overrides); + }, + + + initDDProxy : function(group, config, overrides){ + var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config); + return Ext.apply(dd, overrides); + }, + + + initDDTarget : function(group, config, overrides){ + var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config); + return Ext.apply(dd, overrides); + } +}); + +Ext.data.Api = (function() { + + + + + + var validActions = {}; + + return { + + actions : { + create : 'create', + read : 'read', + update : 'update', + destroy : 'destroy' + }, + + + restActions : { + create : 'POST', + read : 'GET', + update : 'PUT', + destroy : 'DELETE' + }, + + + isAction : function(action) { + return (Ext.data.Api.actions[action]) ? true : false; + }, + + + getVerb : function(name) { + if (validActions[name]) { + return validActions[name]; + } + for (var verb in this.actions) { + if (this.actions[verb] === name) { + validActions[name] = verb; + break; + } + } + return (validActions[name] !== undefined) ? validActions[name] : null; + }, + + + isValid : function(api){ + var invalid = []; + var crud = this.actions; + for (var action in api) { + if (!(action in crud)) { + invalid.push(action); + } + } + return (!invalid.length) ? true : invalid; + }, + + + hasUniqueUrl : function(proxy, verb) { + var url = (proxy.api[verb]) ? proxy.api[verb].url : null; + var unique = true; + for (var action in proxy.api) { + if ((unique = (action === verb) ? true : (proxy.api[action].url != url) ? true : false) === false) { + break; + } + } + return unique; + }, + + + prepare : function(proxy) { + if (!proxy.api) { + proxy.api = {}; + } + for (var verb in this.actions) { + var action = this.actions[verb]; + proxy.api[action] = proxy.api[action] || proxy.url || proxy.directFn; + if (typeof(proxy.api[action]) == 'string') { + proxy.api[action] = { + url: proxy.api[action], + method: (proxy.restful === true) ? Ext.data.Api.restActions[action] : undefined + }; + } + } + }, + + + restify : function(proxy) { + proxy.restful = true; + for (var verb in this.restActions) { + proxy.api[this.actions[verb]].method || + (proxy.api[this.actions[verb]].method = this.restActions[verb]); + } + + + proxy.onWrite = proxy.onWrite.createInterceptor(function(action, o, response, rs) { + var reader = o.reader; + var res = new Ext.data.Response({ + action: action, + raw: response + }); + + switch (response.status) { + case 200: + return true; + break; + case 201: + if (Ext.isEmpty(res.raw.responseText)) { + res.success = true; + } else { + + return true; + } + break; + case 204: + res.success = true; + res.data = null; + break; + default: + return true; + break; + } + if (res.success === true) { + this.fireEvent("write", this, action, res.data, res, rs, o.request.arg); + } else { + this.fireEvent('exception', this, 'remote', action, o, res, rs); + } + o.request.callback.call(o.request.scope, res.data, res, res.success); + + return false; + }, proxy); + } + }; +})(); + + +Ext.data.Response = function(params, response) { + Ext.apply(this, params, { + raw: response + }); +}; +Ext.data.Response.prototype = { + message : null, + success : false, + status : null, + root : null, + raw : null, + + getMessage : function() { + return this.message; + }, + getSuccess : function() { + return this.success; + }, + getStatus : function() { + return this.status; + }, + getRoot : function() { + return this.root; + }, + getRawResponse : function() { + return this.raw; + } +}; + + +Ext.data.Api.Error = Ext.extend(Ext.Error, { + constructor : function(message, arg) { + this.arg = arg; + Ext.Error.call(this, message); + }, + name: 'Ext.data.Api' +}); +Ext.apply(Ext.data.Api.Error.prototype, { + lang: { + 'action-url-undefined': 'No fallback url defined for this action. When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.', + 'invalid': 'received an invalid API-configuration. Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions', + 'invalid-url': 'Invalid url. Please review your proxy configuration.', + 'execute': 'Attempted to execute an unknown action. Valid API actions are defined in Ext.data.Api.actions"' + } +}); + + + + +Ext.data.SortTypes = { + + none : function(s){ + return s; + }, + + + stripTagsRE : /<\/?[^>]+>/gi, + + + asText : function(s){ + return String(s).replace(this.stripTagsRE, ""); + }, + + + asUCText : function(s){ + return String(s).toUpperCase().replace(this.stripTagsRE, ""); + }, + + + asUCString : function(s) { + return String(s).toUpperCase(); + }, + + + asDate : function(s) { + if(!s){ + return 0; + } + if(Ext.isDate(s)){ + return s.getTime(); + } + return Date.parse(String(s)); + }, + + + asFloat : function(s) { + var val = parseFloat(String(s).replace(/,/g, "")); + return isNaN(val) ? 0 : val; + }, + + + asInt : function(s) { + var val = parseInt(String(s).replace(/,/g, ""), 10); + return isNaN(val) ? 0 : val; + } +}; +Ext.data.Record = function(data, id){ + + this.id = (id || id === 0) ? id : Ext.data.Record.id(this); + this.data = data || {}; +}; + + +Ext.data.Record.create = function(o){ + var f = Ext.extend(Ext.data.Record, {}); + var p = f.prototype; + p.fields = new Ext.util.MixedCollection(false, function(field){ + return field.name; + }); + for(var i = 0, len = o.length; i < len; i++){ + p.fields.add(new Ext.data.Field(o[i])); + } + f.getField = function(name){ + return p.fields.get(name); + }; + return f; +}; + +Ext.data.Record.PREFIX = 'ext-record'; +Ext.data.Record.AUTO_ID = 1; +Ext.data.Record.EDIT = 'edit'; +Ext.data.Record.REJECT = 'reject'; +Ext.data.Record.COMMIT = 'commit'; + + + +Ext.data.Record.id = function(rec) { + rec.phantom = true; + return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID++].join(''); +}; + +Ext.data.Record.prototype = { + + + + + + + dirty : false, + editing : false, + error : null, + + modified : null, + + phantom : false, + + + join : function(store){ + + this.store = store; + }, + + + set : function(name, value){ + var encode = Ext.isPrimitive(value) ? String : Ext.encode; + if(encode(this.data[name]) == encode(value)) { + return; + } + this.dirty = true; + if(!this.modified){ + this.modified = {}; + } + if(this.modified[name] === undefined){ + this.modified[name] = this.data[name]; + } + this.data[name] = value; + if(!this.editing){ + this.afterEdit(); + } + }, + + + afterEdit : function(){ + if (this.store != undefined && typeof this.store.afterEdit == "function") { + this.store.afterEdit(this); + } + }, + + + afterReject : function(){ + if(this.store){ + this.store.afterReject(this); + } + }, + + + afterCommit : function(){ + if(this.store){ + this.store.afterCommit(this); + } + }, + + + get : function(name){ + return this.data[name]; + }, + + + beginEdit : function(){ + this.editing = true; + this.modified = this.modified || {}; + }, + + + cancelEdit : function(){ + this.editing = false; + delete this.modified; + }, + + + endEdit : function(){ + this.editing = false; + if(this.dirty){ + this.afterEdit(); + } + }, + + + reject : function(silent){ + var m = this.modified; + for(var n in m){ + if(typeof m[n] != "function"){ + this.data[n] = m[n]; + } + } + this.dirty = false; + delete this.modified; + this.editing = false; + if(silent !== true){ + this.afterReject(); + } + }, + + + commit : function(silent){ + this.dirty = false; + delete this.modified; + this.editing = false; + if(silent !== true){ + this.afterCommit(); + } + }, + + + getChanges : function(){ + var m = this.modified, cs = {}; + for(var n in m){ + if(m.hasOwnProperty(n)){ + cs[n] = this.data[n]; + } + } + return cs; + }, + + + hasError : function(){ + return this.error !== null; + }, + + + clearError : function(){ + this.error = null; + }, + + + copy : function(newId) { + return new this.constructor(Ext.apply({}, this.data), newId || this.id); + }, + + + isModified : function(fieldName){ + return !!(this.modified && this.modified.hasOwnProperty(fieldName)); + }, + + + isValid : function() { + return this.fields.find(function(f) { + return (f.allowBlank === false && Ext.isEmpty(this.data[f.name])) ? true : false; + },this) ? false : true; + }, + + + markDirty : function(){ + this.dirty = true; + if(!this.modified){ + this.modified = {}; + } + this.fields.each(function(f) { + this.modified[f.name] = this.data[f.name]; + },this); + } +}; + +Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), { + + + + register : function(){ + for(var i = 0, s; (s = arguments[i]); i++){ + this.add(s); + } + }, + + + unregister : function(){ + for(var i = 0, s; (s = arguments[i]); i++){ + this.remove(this.lookup(s)); + } + }, + + + lookup : function(id){ + if(Ext.isArray(id)){ + var fields = ['field1'], expand = !Ext.isArray(id[0]); + if(!expand){ + for(var i = 2, len = id[0].length; i <= len; ++i){ + fields.push('field' + i); + } + } + return new Ext.data.ArrayStore({ + fields: fields, + data: id, + expandData: expand, + autoDestroy: true, + autoCreated: true + + }); + } + return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id); + }, + + + getKey : function(o){ + return o.storeId; + } +}); +Ext.data.Store = Ext.extend(Ext.util.Observable, { + + + + + + + + writer : undefined, + + + + remoteSort : false, + + + autoDestroy : false, + + + pruneModifiedRecords : false, + + + lastOptions : null, + + + autoSave : true, + + + batch : true, + + + restful: false, + + + paramNames : undefined, + + + defaultParamNames : { + start : 'start', + limit : 'limit', + sort : 'sort', + dir : 'dir' + }, + + isDestroyed: false, + hasMultiSort: false, + + + batchKey : '_ext_batch_', + + constructor : function(config){ + + + + + this.data = new Ext.util.MixedCollection(false); + this.data.getKey = function(o){ + return o.id; + }; + + + + this.removed = []; + + if(config && config.data){ + this.inlineData = config.data; + delete config.data; + } + + Ext.apply(this, config); + + + this.baseParams = Ext.isObject(this.baseParams) ? this.baseParams : {}; + + this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames); + + if((this.url || this.api) && !this.proxy){ + this.proxy = new Ext.data.HttpProxy({url: this.url, api: this.api}); + } + + if (this.restful === true && this.proxy) { + + + this.batch = false; + Ext.data.Api.restify(this.proxy); + } + + if(this.reader){ + if(!this.recordType){ + this.recordType = this.reader.recordType; + } + if(this.reader.onMetaChange){ + this.reader.onMetaChange = this.reader.onMetaChange.createSequence(this.onMetaChange, this); + } + if (this.writer) { + if (this.writer instanceof(Ext.data.DataWriter) === false) { + this.writer = this.buildWriter(this.writer); + } + this.writer.meta = this.reader.meta; + this.pruneModifiedRecords = true; + } + } + + + + if(this.recordType){ + + this.fields = this.recordType.prototype.fields; + } + this.modified = []; + + this.addEvents( + + 'datachanged', + + 'metachange', + + 'add', + + 'remove', + + 'update', + + 'clear', + + 'exception', + + 'beforeload', + + 'load', + + 'loadexception', + + 'beforewrite', + + 'write', + + 'beforesave', + + 'save' + + ); + + if(this.proxy){ + + this.relayEvents(this.proxy, ['loadexception', 'exception']); + } + + if (this.writer) { + this.on({ + scope: this, + add: this.createRecords, + remove: this.destroyRecord, + update: this.updateRecord, + clear: this.onClear + }); + } + + this.sortToggle = {}; + if(this.sortField){ + this.setDefaultSort(this.sortField, this.sortDir); + }else if(this.sortInfo){ + this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); + } + + Ext.data.Store.superclass.constructor.call(this); + + if(this.id){ + this.storeId = this.id; + delete this.id; + } + if(this.storeId){ + Ext.StoreMgr.register(this); + } + if(this.inlineData){ + this.loadData(this.inlineData); + delete this.inlineData; + }else if(this.autoLoad){ + this.load.defer(10, this, [ + typeof this.autoLoad == 'object' ? + this.autoLoad : undefined]); + } + + this.batchCounter = 0; + this.batches = {}; + }, + + + buildWriter : function(config) { + var klass = undefined, + type = (config.format || 'json').toLowerCase(); + switch (type) { + case 'json': + klass = Ext.data.JsonWriter; + break; + case 'xml': + klass = Ext.data.XmlWriter; + break; + default: + klass = Ext.data.JsonWriter; + } + return new klass(config); + }, + + + destroy : function(){ + if(!this.isDestroyed){ + if(this.storeId){ + Ext.StoreMgr.unregister(this); + } + this.clearData(); + this.data = null; + Ext.destroy(this.proxy); + this.reader = this.writer = null; + this.purgeListeners(); + this.isDestroyed = true; + } + }, + + + add : function(records) { + var i, len, record, index; + + records = [].concat(records); + if (records.length < 1) { + return; + } + + for (i = 0, len = records.length; i < len; i++) { + record = records[i]; + + record.join(this); + + if (record.dirty || record.phantom) { + this.modified.push(record); + } + } + + index = this.data.length; + this.data.addAll(records); + + if (this.snapshot) { + this.snapshot.addAll(records); + } + + this.fireEvent('add', this, records, index); + }, + + + addSorted : function(record){ + var index = this.findInsertIndex(record); + this.insert(index, record); + }, + + + doUpdate: function(rec){ + var id = rec.id; + + this.getById(id).join(null); + + this.data.replace(id, rec); + if (this.snapshot) { + this.snapshot.replace(id, rec); + } + rec.join(this); + this.fireEvent('update', this, rec, Ext.data.Record.COMMIT); + }, + + + remove : function(record){ + if(Ext.isArray(record)){ + Ext.each(record, function(r){ + this.remove(r); + }, this); + return; + } + var index = this.data.indexOf(record); + if(index > -1){ + record.join(null); + this.data.removeAt(index); + } + if(this.pruneModifiedRecords){ + this.modified.remove(record); + } + if(this.snapshot){ + this.snapshot.remove(record); + } + if(index > -1){ + this.fireEvent('remove', this, record, index); + } + }, + + + removeAt : function(index){ + this.remove(this.getAt(index)); + }, + + + removeAll : function(silent){ + var items = []; + this.each(function(rec){ + items.push(rec); + }); + this.clearData(); + if(this.snapshot){ + this.snapshot.clear(); + } + if(this.pruneModifiedRecords){ + this.modified = []; + } + if (silent !== true) { + this.fireEvent('clear', this, items); + } + }, + + + onClear: function(store, records){ + Ext.each(records, function(rec, index){ + this.destroyRecord(this, rec, index); + }, this); + }, + + + insert : function(index, records) { + var i, len, record; + + records = [].concat(records); + for (i = 0, len = records.length; i < len; i++) { + record = records[i]; + + this.data.insert(index + i, record); + record.join(this); + + if (record.dirty || record.phantom) { + this.modified.push(record); + } + } + + if (this.snapshot) { + this.snapshot.addAll(records); + } + + this.fireEvent('add', this, records, index); + }, + + + indexOf : function(record){ + return this.data.indexOf(record); + }, + + + indexOfId : function(id){ + return this.data.indexOfKey(id); + }, + + + getById : function(id){ + return (this.snapshot || this.data).key(id); + }, + + + getAt : function(index){ + return this.data.itemAt(index); + }, + + + getRange : function(start, end){ + return this.data.getRange(start, end); + }, + + + storeOptions : function(o){ + o = Ext.apply({}, o); + delete o.callback; + delete o.scope; + this.lastOptions = o; + }, + + + clearData: function(){ + this.data.each(function(rec) { + rec.join(null); + }); + this.data.clear(); + }, + + + load : function(options) { + options = Ext.apply({}, options); + this.storeOptions(options); + if(this.sortInfo && this.remoteSort){ + var pn = this.paramNames; + options.params = Ext.apply({}, options.params); + options.params[pn.sort] = this.sortInfo.field; + options.params[pn.dir] = this.sortInfo.direction; + } + try { + return this.execute('read', null, options); + } catch(e) { + this.handleException(e); + return false; + } + }, + + + updateRecord : function(store, record, action) { + if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid()))) { + this.save(); + } + }, + + + createRecords : function(store, records, index) { + var modified = this.modified, + length = records.length, + record, i; + + for (i = 0; i < length; i++) { + record = records[i]; + + if (record.phantom && record.isValid()) { + record.markDirty(); + + if (modified.indexOf(record) == -1) { + modified.push(record); + } + } + } + if (this.autoSave === true) { + this.save(); + } + }, + + + destroyRecord : function(store, record, index) { + if (this.modified.indexOf(record) != -1) { + this.modified.remove(record); + } + if (!record.phantom) { + this.removed.push(record); + + + + + record.lastIndex = index; + + if (this.autoSave === true) { + this.save(); + } + } + }, + + + execute : function(action, rs, options, batch) { + + if (!Ext.data.Api.isAction(action)) { + throw new Ext.data.Api.Error('execute', action); + } + + options = Ext.applyIf(options||{}, { + params: {} + }); + if(batch !== undefined){ + this.addToBatch(batch); + } + + + var doRequest = true; + + if (action === 'read') { + doRequest = this.fireEvent('beforeload', this, options); + Ext.applyIf(options.params, this.baseParams); + } + else { + + + if (this.writer.listful === true && this.restful !== true) { + rs = (Ext.isArray(rs)) ? rs : [rs]; + } + + else if (Ext.isArray(rs) && rs.length == 1) { + rs = rs.shift(); + } + + if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) { + this.writer.apply(options.params, this.baseParams, action, rs); + } + } + if (doRequest !== false) { + + if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) { + options.params.xaction = action; + } + + + + + + this.proxy.request(Ext.data.Api.actions[action], rs, options.params, this.reader, this.createCallback(action, rs, batch), this, options); + } + return doRequest; + }, + + + save : function() { + if (!this.writer) { + throw new Ext.data.Store.Error('writer-undefined'); + } + + var queue = [], + len, + trans, + batch, + data = {}, + i; + + if(this.removed.length){ + queue.push(['destroy', this.removed]); + } + + + var rs = [].concat(this.getModifiedRecords()); + if(rs.length){ + + var phantoms = []; + for(i = rs.length-1; i >= 0; i--){ + if(rs[i].phantom === true){ + var rec = rs.splice(i, 1).shift(); + if(rec.isValid()){ + phantoms.push(rec); + } + }else if(!rs[i].isValid()){ + rs.splice(i,1); + } + } + + if(phantoms.length){ + queue.push(['create', phantoms]); + } + + + if(rs.length){ + queue.push(['update', rs]); + } + } + len = queue.length; + if(len){ + batch = ++this.batchCounter; + for(i = 0; i < len; ++i){ + trans = queue[i]; + data[trans[0]] = trans[1]; + } + if(this.fireEvent('beforesave', this, data) !== false){ + for(i = 0; i < len; ++i){ + trans = queue[i]; + this.doTransaction(trans[0], trans[1], batch); + } + return batch; + } + } + return -1; + }, + + + doTransaction : function(action, rs, batch) { + function transaction(records) { + try{ + this.execute(action, records, undefined, batch); + }catch (e){ + this.handleException(e); + } + } + if(this.batch === false){ + for(var i = 0, len = rs.length; i < len; i++){ + transaction.call(this, rs[i]); + } + }else{ + transaction.call(this, rs); + } + }, + + + addToBatch : function(batch){ + var b = this.batches, + key = this.batchKey + batch, + o = b[key]; + + if(!o){ + b[key] = o = { + id: batch, + count: 0, + data: {} + }; + } + ++o.count; + }, + + removeFromBatch : function(batch, action, data){ + var b = this.batches, + key = this.batchKey + batch, + o = b[key], + arr; + + + if(o){ + arr = o.data[action] || []; + o.data[action] = arr.concat(data); + if(o.count === 1){ + data = o.data; + delete b[key]; + this.fireEvent('save', this, batch, data); + }else{ + --o.count; + } + } + }, + + + + createCallback : function(action, rs, batch) { + var actions = Ext.data.Api.actions; + return (action == 'read') ? this.loadRecords : function(data, response, success) { + + this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, [].concat(data)); + + if (success === true) { + this.fireEvent('write', this, action, data, response, rs); + } + this.removeFromBatch(batch, action, data); + }; + }, + + + + + clearModified : function(rs) { + if (Ext.isArray(rs)) { + for (var n=rs.length-1;n>=0;n--) { + this.modified.splice(this.modified.indexOf(rs[n]), 1); + } + } else { + this.modified.splice(this.modified.indexOf(rs), 1); + } + }, + + + reMap : function(record) { + if (Ext.isArray(record)) { + for (var i = 0, len = record.length; i < len; i++) { + this.reMap(record[i]); + } + } else { + delete this.data.map[record._phid]; + this.data.map[record.id] = record; + var index = this.data.keys.indexOf(record._phid); + this.data.keys.splice(index, 1, record.id); + delete record._phid; + } + }, + + + onCreateRecords : function(success, rs, data) { + if (success === true) { + try { + this.reader.realize(rs, data); + } + catch (e) { + this.handleException(e); + if (Ext.isArray(rs)) { + + this.onCreateRecords(success, rs, data); + } + } + } + }, + + + onUpdateRecords : function(success, rs, data) { + if (success === true) { + try { + this.reader.update(rs, data); + } catch (e) { + this.handleException(e); + if (Ext.isArray(rs)) { + + this.onUpdateRecords(success, rs, data); + } + } + } + }, + + + onDestroyRecords : function(success, rs, data) { + + rs = (rs instanceof Ext.data.Record) ? [rs] : [].concat(rs); + for (var i=0,len=rs.length;i=0;i--) { + this.insert(rs[i].lastIndex, rs[i]); + } + } + }, + + + handleException : function(e) { + + Ext.handleError(e); + }, + + + reload : function(options){ + this.load(Ext.applyIf(options||{}, this.lastOptions)); + }, + + + + loadRecords : function(o, options, success){ + var i, len; + + if (this.isDestroyed === true) { + return; + } + if(!o || success === false){ + if(success !== false){ + this.fireEvent('load', this, [], options); + } + if(options.callback){ + options.callback.call(options.scope || this, [], options, false, o); + } + return; + } + var r = o.records, t = o.totalRecords || r.length; + if(!options || options.add !== true){ + if(this.pruneModifiedRecords){ + this.modified = []; + } + for(i = 0, len = r.length; i < len; i++){ + r[i].join(this); + } + if(this.snapshot){ + this.data = this.snapshot; + delete this.snapshot; + } + this.clearData(); + this.data.addAll(r); + this.totalLength = t; + this.applySort(); + this.fireEvent('datachanged', this); + }else{ + var toAdd = [], + rec, + cnt = 0; + for(i = 0, len = r.length; i < len; ++i){ + rec = r[i]; + if(this.indexOfId(rec.id) > -1){ + this.doUpdate(rec); + }else{ + toAdd.push(rec); + ++cnt; + } + } + this.totalLength = Math.max(t, this.data.length + cnt); + this.add(toAdd); + } + this.fireEvent('load', this, r, options); + if(options.callback){ + options.callback.call(options.scope || this, r, options, true); + } + }, + + + loadData : function(o, append){ + var r = this.reader.readRecords(o); + this.loadRecords(r, {add: append}, true); + }, + + + getCount : function(){ + return this.data.length || 0; + }, + + + getTotalCount : function(){ + return this.totalLength || 0; + }, + + + getSortState : function(){ + return this.sortInfo; + }, + + + applySort : function(){ + if ((this.sortInfo || this.multiSortInfo) && !this.remoteSort) { + this.sortData(); + } + }, + + + sortData : function() { + var sortInfo = this.hasMultiSort ? this.multiSortInfo : this.sortInfo, + direction = sortInfo.direction || "ASC", + sorters = sortInfo.sorters, + sortFns = []; + + + if (!this.hasMultiSort) { + sorters = [{direction: direction, field: sortInfo.field}]; + } + + + for (var i=0, j = sorters.length; i < j; i++) { + sortFns.push(this.createSortFunction(sorters[i].field, sorters[i].direction)); + } + + if (sortFns.length == 0) { + return; + } + + + + var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; + + + var fn = function(r1, r2) { + var result = sortFns[0].call(this, r1, r2); + + + if (sortFns.length > 1) { + for (var i=1, j = sortFns.length; i < j; i++) { + result = result || sortFns[i].call(this, r1, r2); + } + } + + return directionModifier * result; + }; + + + this.data.sort(direction, fn); + if (this.snapshot && this.snapshot != this.data) { + this.snapshot.sort(direction, fn); + } + }, + + + createSortFunction: function(field, direction) { + direction = direction || "ASC"; + var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; + + var sortType = this.fields.get(field).sortType; + + + + return function(r1, r2) { + var v1 = sortType(r1.data[field]), + v2 = sortType(r2.data[field]); + + return directionModifier * (v1 > v2 ? 1 : (v1 < v2 ? -1 : 0)); + }; + }, + + + setDefaultSort : function(field, dir) { + dir = dir ? dir.toUpperCase() : 'ASC'; + this.sortInfo = {field: field, direction: dir}; + this.sortToggle[field] = dir; + }, + + + sort : function(fieldName, dir) { + if (Ext.isArray(arguments[0])) { + return this.multiSort.call(this, fieldName, dir); + } else { + return this.singleSort(fieldName, dir); + } + }, + + + singleSort: function(fieldName, dir) { + var field = this.fields.get(fieldName); + if (!field) { + return false; + } + + var name = field.name, + sortInfo = this.sortInfo || null, + sortToggle = this.sortToggle ? this.sortToggle[name] : null; + + if (!dir) { + if (sortInfo && sortInfo.field == name) { + dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC'); + } else { + dir = field.sortDir; + } + } + + this.sortToggle[name] = dir; + this.sortInfo = {field: name, direction: dir}; + this.hasMultiSort = false; + + if (this.remoteSort) { + if (!this.load(this.lastOptions)) { + if (sortToggle) { + this.sortToggle[name] = sortToggle; + } + if (sortInfo) { + this.sortInfo = sortInfo; + } + } + } else { + this.applySort(); + this.fireEvent('datachanged', this); + } + return true; + }, + + + multiSort: function(sorters, direction) { + this.hasMultiSort = true; + direction = direction || "ASC"; + + + if (this.multiSortInfo && direction == this.multiSortInfo.direction) { + direction = direction.toggle("ASC", "DESC"); + } + + + this.multiSortInfo = { + sorters : sorters, + direction: direction + }; + + if (this.remoteSort) { + this.singleSort(sorters[0].field, sorters[0].direction); + + } else { + this.applySort(); + this.fireEvent('datachanged', this); + } + }, + + + each : function(fn, scope){ + this.data.each(fn, scope); + }, + + + getModifiedRecords : function(){ + return this.modified; + }, + + + sum : function(property, start, end){ + var rs = this.data.items, v = 0; + start = start || 0; + end = (end || end === 0) ? end : rs.length-1; + + for(var i = start; i <= end; i++){ + v += (rs[i].data[property] || 0); + } + return v; + }, + + + createFilterFn : function(property, value, anyMatch, caseSensitive, exactMatch){ + if(Ext.isEmpty(value, false)){ + return false; + } + value = this.data.createValueMatcher(value, anyMatch, caseSensitive, exactMatch); + return function(r) { + return value.test(r.data[property]); + }; + }, + + + createMultipleFilterFn: function(filters) { + return function(record) { + var isMatch = true; + + for (var i=0, j = filters.length; i < j; i++) { + var filter = filters[i], + fn = filter.fn, + scope = filter.scope; + + isMatch = isMatch && fn.call(scope, record); + } + + return isMatch; + }; + }, + + + filter : function(property, value, anyMatch, caseSensitive, exactMatch){ + var fn; + + if (Ext.isObject(property)) { + property = [property]; + } + + if (Ext.isArray(property)) { + var filters = []; + + + for (var i=0, j = property.length; i < j; i++) { + var filter = property[i], + func = filter.fn, + scope = filter.scope || this; + + + if (!Ext.isFunction(func)) { + func = this.createFilterFn(filter.property, filter.value, filter.anyMatch, filter.caseSensitive, filter.exactMatch); + } + + filters.push({fn: func, scope: scope}); + } + + fn = this.createMultipleFilterFn(filters); + } else { + + fn = this.createFilterFn(property, value, anyMatch, caseSensitive, exactMatch); + } + + return fn ? this.filterBy(fn) : this.clearFilter(); + }, + + + filterBy : function(fn, scope){ + this.snapshot = this.snapshot || this.data; + this.data = this.queryBy(fn, scope || this); + this.fireEvent('datachanged', this); + }, + + + clearFilter : function(suppressEvent){ + if(this.isFiltered()){ + this.data = this.snapshot; + delete this.snapshot; + if(suppressEvent !== true){ + this.fireEvent('datachanged', this); + } + } + }, + + + isFiltered : function(){ + return !!this.snapshot && this.snapshot != this.data; + }, + + + query : function(property, value, anyMatch, caseSensitive){ + var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + return fn ? this.queryBy(fn) : this.data.clone(); + }, + + + queryBy : function(fn, scope){ + var data = this.snapshot || this.data; + return data.filterBy(fn, scope||this); + }, + + + find : function(property, value, start, anyMatch, caseSensitive){ + var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + return fn ? this.data.findIndexBy(fn, null, start) : -1; + }, + + + findExact: function(property, value, start){ + return this.data.findIndexBy(function(rec){ + return rec.get(property) === value; + }, this, start); + }, + + + findBy : function(fn, scope, start){ + return this.data.findIndexBy(fn, scope, start); + }, + + + collect : function(dataIndex, allowNull, bypassFilter){ + var d = (bypassFilter === true && this.snapshot) ? + this.snapshot.items : this.data.items; + var v, sv, r = [], l = {}; + for(var i = 0, len = d.length; i < len; i++){ + v = d[i].data[dataIndex]; + sv = String(v); + if((allowNull || !Ext.isEmpty(v)) && !l[sv]){ + l[sv] = true; + r[r.length] = v; + } + } + return r; + }, + + + afterEdit : function(record){ + if(this.modified.indexOf(record) == -1){ + this.modified.push(record); + } + this.fireEvent('update', this, record, Ext.data.Record.EDIT); + }, + + + afterReject : function(record){ + this.modified.remove(record); + this.fireEvent('update', this, record, Ext.data.Record.REJECT); + }, + + + afterCommit : function(record){ + this.modified.remove(record); + this.fireEvent('update', this, record, Ext.data.Record.COMMIT); + }, + + + commitChanges : function(){ + var modified = this.modified.slice(0), + length = modified.length, + i; + + for (i = 0; i < length; i++){ + modified[i].commit(); + } + + this.modified = []; + this.removed = []; + }, + + + rejectChanges : function() { + var modified = this.modified.slice(0), + removed = this.removed.slice(0).reverse(), + mLength = modified.length, + rLength = removed.length, + i; + + for (i = 0; i < mLength; i++) { + modified[i].reject(); + } + + for (i = 0; i < rLength; i++) { + this.insert(removed[i].lastIndex || 0, removed[i]); + removed[i].reject(); + } + + this.modified = []; + this.removed = []; + }, + + + onMetaChange : function(meta){ + this.recordType = this.reader.recordType; + this.fields = this.recordType.prototype.fields; + delete this.snapshot; + if(this.reader.meta.sortInfo){ + this.sortInfo = this.reader.meta.sortInfo; + }else if(this.sortInfo && !this.fields.get(this.sortInfo.field)){ + delete this.sortInfo; + } + if(this.writer){ + this.writer.meta = this.reader.meta; + } + this.modified = []; + this.fireEvent('metachange', this, this.reader.meta); + }, + + + findInsertIndex : function(record){ + this.suspendEvents(); + var data = this.data.clone(); + this.data.add(record); + this.applySort(); + var index = this.data.indexOf(record); + this.data = data; + this.resumeEvents(); + return index; + }, + + + setBaseParam : function (name, value){ + this.baseParams = this.baseParams || {}; + this.baseParams[name] = value; + } +}); + +Ext.reg('store', Ext.data.Store); + + +Ext.data.Store.Error = Ext.extend(Ext.Error, { + name: 'Ext.data.Store' +}); +Ext.apply(Ext.data.Store.Error.prototype, { + lang: { + 'writer-undefined' : 'Attempted to execute a write-action without a DataWriter installed.' + } +}); + +Ext.data.Field = Ext.extend(Object, { + + constructor : function(config){ + if(Ext.isString(config)){ + config = {name: config}; + } + Ext.apply(this, config); + + var types = Ext.data.Types, + st = this.sortType, + t; + + if(this.type){ + if(Ext.isString(this.type)){ + this.type = Ext.data.Types[this.type.toUpperCase()] || types.AUTO; + } + }else{ + this.type = types.AUTO; + } + + + if(Ext.isString(st)){ + this.sortType = Ext.data.SortTypes[st]; + }else if(Ext.isEmpty(st)){ + this.sortType = this.type.sortType; + } + + if(!this.convert){ + this.convert = this.type.convert; + } + }, + + + + + + dateFormat: null, + + + useNull: false, + + + defaultValue: "", + + mapping: null, + + sortType : null, + + sortDir : "ASC", + + allowBlank : true +}); + +Ext.data.DataReader = function(meta, recordType){ + + this.meta = meta; + + this.recordType = Ext.isArray(recordType) ? + Ext.data.Record.create(recordType) : recordType; + + + if (this.recordType){ + this.buildExtractors(); + } +}; + +Ext.data.DataReader.prototype = { + + + getTotal: Ext.emptyFn, + + getRoot: Ext.emptyFn, + + getMessage: Ext.emptyFn, + + getSuccess: Ext.emptyFn, + + getId: Ext.emptyFn, + + buildExtractors : Ext.emptyFn, + + extractValues : Ext.emptyFn, + + + realize: function(rs, data){ + if (Ext.isArray(rs)) { + for (var i = rs.length - 1; i >= 0; i--) { + + if (Ext.isArray(data)) { + this.realize(rs.splice(i,1).shift(), data.splice(i,1).shift()); + } + else { + + + this.realize(rs.splice(i,1).shift(), data); + } + } + } + else { + + if (Ext.isArray(data) && data.length == 1) { + data = data.shift(); + } + if (!this.isData(data)) { + + + throw new Ext.data.DataReader.Error('realize', rs); + } + rs.phantom = false; + rs._phid = rs.id; + rs.id = this.getId(data); + rs.data = data; + + rs.commit(); + rs.store.reMap(rs); + } + }, + + + update : function(rs, data) { + if (Ext.isArray(rs)) { + for (var i=rs.length-1; i >= 0; i--) { + if (Ext.isArray(data)) { + this.update(rs.splice(i,1).shift(), data.splice(i,1).shift()); + } + else { + + + this.update(rs.splice(i,1).shift(), data); + } + } + } + else { + + if (Ext.isArray(data) && data.length == 1) { + data = data.shift(); + } + if (this.isData(data)) { + rs.data = Ext.apply(rs.data, data); + } + rs.commit(); + } + }, + + + extractData : function(root, returnRecords) { + + var rawName = (this instanceof Ext.data.JsonReader) ? 'json' : 'node'; + + var rs = []; + + + + if (this.isData(root) && !(this instanceof Ext.data.XmlReader)) { + root = [root]; + } + var f = this.recordType.prototype.fields, + fi = f.items, + fl = f.length, + rs = []; + if (returnRecords === true) { + var Record = this.recordType; + for (var i = 0; i < root.length; i++) { + var n = root[i]; + var record = new Record(this.extractValues(n, fi, fl), this.getId(n)); + record[rawName] = n; + rs.push(record); + } + } + else { + for (var i = 0; i < root.length; i++) { + var data = this.extractValues(root[i], fi, fl); + data[this.meta.idProperty] = this.getId(root[i]); + rs.push(data); + } + } + return rs; + }, + + + isData : function(data) { + return (data && Ext.isObject(data) && !Ext.isEmpty(this.getId(data))) ? true : false; + }, + + + onMetaChange : function(meta){ + delete this.ef; + this.meta = meta; + this.recordType = Ext.data.Record.create(meta.fields); + this.buildExtractors(); + } +}; + + +Ext.data.DataReader.Error = Ext.extend(Ext.Error, { + constructor : function(message, arg) { + this.arg = arg; + Ext.Error.call(this, message); + }, + name: 'Ext.data.DataReader' +}); +Ext.apply(Ext.data.DataReader.Error.prototype, { + lang : { + 'update': "#update received invalid data from server. Please see docs for DataReader#update and review your DataReader configuration.", + 'realize': "#realize was called with invalid remote-data. Please see the docs for DataReader#realize and review your DataReader configuration.", + 'invalid-response': "#readResponse received an invalid response from the server." + } +}); + +Ext.data.DataWriter = function(config){ + Ext.apply(this, config); +}; +Ext.data.DataWriter.prototype = { + + + writeAllFields : false, + + listful : false, + + + apply : function(params, baseParams, action, rs) { + var data = [], + renderer = action + 'Record'; + + if (Ext.isArray(rs)) { + Ext.each(rs, function(rec){ + data.push(this[renderer](rec)); + }, this); + } + else if (rs instanceof Ext.data.Record) { + data = this[renderer](rs); + } + this.render(params, baseParams, data); + }, + + + render : Ext.emptyFn, + + + updateRecord : Ext.emptyFn, + + + createRecord : Ext.emptyFn, + + + destroyRecord : Ext.emptyFn, + + + toHash : function(rec, config) { + var map = rec.fields.map, + data = {}, + raw = (this.writeAllFields === false && rec.phantom === false) ? rec.getChanges() : rec.data, + m; + Ext.iterate(raw, function(prop, value){ + if((m = map[prop])){ + data[m.mapping ? m.mapping : m.name] = value; + } + }); + + + + if (rec.phantom) { + if (rec.fields.containsKey(this.meta.idProperty) && Ext.isEmpty(rec.data[this.meta.idProperty])) { + delete data[this.meta.idProperty]; + } + } else { + data[this.meta.idProperty] = rec.id; + } + return data; + }, + + + toArray : function(data) { + var fields = []; + Ext.iterate(data, function(k, v) {fields.push({name: k, value: v});},this); + return fields; + } +}; +Ext.data.DataProxy = function(conn){ + + + conn = conn || {}; + + + + + + this.api = conn.api; + this.url = conn.url; + this.restful = conn.restful; + this.listeners = conn.listeners; + + + this.prettyUrls = conn.prettyUrls; + + + + this.addEvents( + + 'exception', + + 'beforeload', + + 'load', + + 'loadexception', + + 'beforewrite', + + 'write' + ); + Ext.data.DataProxy.superclass.constructor.call(this); + + + try { + Ext.data.Api.prepare(this); + } catch (e) { + if (e instanceof Ext.data.Api.Error) { + e.toConsole(); + } + } + + Ext.data.DataProxy.relayEvents(this, ['beforewrite', 'write', 'exception']); +}; + +Ext.extend(Ext.data.DataProxy, Ext.util.Observable, { + + restful: false, + + + setApi : function() { + if (arguments.length == 1) { + var valid = Ext.data.Api.isValid(arguments[0]); + if (valid === true) { + this.api = arguments[0]; + } + else { + throw new Ext.data.Api.Error('invalid', valid); + } + } + else if (arguments.length == 2) { + if (!Ext.data.Api.isAction(arguments[0])) { + throw new Ext.data.Api.Error('invalid', arguments[0]); + } + this.api[arguments[0]] = arguments[1]; + } + Ext.data.Api.prepare(this); + }, + + + isApiAction : function(action) { + return (this.api[action]) ? true : false; + }, + + + request : function(action, rs, params, reader, callback, scope, options) { + if (!this.api[action] && !this.load) { + throw new Ext.data.DataProxy.Error('action-undefined', action); + } + params = params || {}; + if ((action === Ext.data.Api.actions.read) ? this.fireEvent("beforeload", this, params) : this.fireEvent("beforewrite", this, action, rs, params) !== false) { + this.doRequest.apply(this, arguments); + } + else { + callback.call(scope || this, null, options, false); + } + }, + + + + load : null, + + + doRequest : function(action, rs, params, reader, callback, scope, options) { + + + + this.load(params, reader, callback, scope, options); + }, + + + onRead : Ext.emptyFn, + + onWrite : Ext.emptyFn, + + buildUrl : function(action, record) { + record = record || null; + + + + + var url = (this.conn && this.conn.url) ? this.conn.url : (this.api[action]) ? this.api[action].url : this.url; + if (!url) { + throw new Ext.data.Api.Error('invalid-url', action); + } + + + + + + + + var provides = null; + var m = url.match(/(.*)(\.json|\.xml|\.html)$/); + if (m) { + provides = m[2]; + url = m[1]; + } + + if ((this.restful === true || this.prettyUrls === true) && record instanceof Ext.data.Record && !record.phantom) { + url += '/' + record.id; + } + return (provides === null) ? url : url + provides; + }, + + + destroy: function(){ + this.purgeListeners(); + } +}); + + + +Ext.apply(Ext.data.DataProxy, Ext.util.Observable.prototype); +Ext.util.Observable.call(Ext.data.DataProxy); + + +Ext.data.DataProxy.Error = Ext.extend(Ext.Error, { + constructor : function(message, arg) { + this.arg = arg; + Ext.Error.call(this, message); + }, + name: 'Ext.data.DataProxy' +}); +Ext.apply(Ext.data.DataProxy.Error.prototype, { + lang: { + 'action-undefined': "DataProxy attempted to execute an API-action but found an undefined url / function. Please review your Proxy url/api-configuration.", + 'api-invalid': 'Recieved an invalid API-configuration. Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions.' + } +}); + + + +Ext.data.Request = function(params) { + Ext.apply(this, params); +}; +Ext.data.Request.prototype = { + + action : undefined, + + rs : undefined, + + params: undefined, + + callback : Ext.emptyFn, + + scope : undefined, + + reader : undefined +}; + +Ext.data.Response = function(params) { + Ext.apply(this, params); +}; +Ext.data.Response.prototype = { + + action: undefined, + + success : undefined, + + message : undefined, + + data: undefined, + + raw: undefined, + + records: undefined +}; + +Ext.data.ScriptTagProxy = function(config){ + Ext.apply(this, config); + + Ext.data.ScriptTagProxy.superclass.constructor.call(this, config); + + this.head = document.getElementsByTagName("head")[0]; + + +}; + +Ext.data.ScriptTagProxy.TRANS_ID = 1000; + +Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, { + + + timeout : 30000, + + callbackParam : "callback", + + nocache : true, + + + doRequest : function(action, rs, params, reader, callback, scope, arg) { + var p = Ext.urlEncode(Ext.apply(params, this.extraParams)); + + var url = this.buildUrl(action, rs); + if (!url) { + throw new Ext.data.Api.Error('invalid-url', url); + } + url = Ext.urlAppend(url, p); + + if(this.nocache){ + url = Ext.urlAppend(url, '_dc=' + (new Date().getTime())); + } + var transId = ++Ext.data.ScriptTagProxy.TRANS_ID; + var trans = { + id : transId, + action: action, + cb : "stcCallback"+transId, + scriptId : "stcScript"+transId, + params : params, + arg : arg, + url : url, + callback : callback, + scope : scope, + reader : reader + }; + window[trans.cb] = this.createCallback(action, rs, trans); + url += String.format("&{0}={1}", this.callbackParam, trans.cb); + if(this.autoAbort !== false){ + this.abort(); + } + + trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]); + + var script = document.createElement("script"); + script.setAttribute("src", url); + script.setAttribute("type", "text/javascript"); + script.setAttribute("id", trans.scriptId); + this.head.appendChild(script); + + this.trans = trans; + }, + + + createCallback : function(action, rs, trans) { + var self = this; + return function(res) { + self.trans = false; + self.destroyTrans(trans, true); + if (action === Ext.data.Api.actions.read) { + self.onRead.call(self, action, trans, res); + } else { + self.onWrite.call(self, action, trans, res, rs); + } + }; + }, + + onRead : function(action, trans, res) { + var result; + try { + result = trans.reader.readRecords(res); + }catch(e){ + + this.fireEvent("loadexception", this, trans, res, e); + + this.fireEvent('exception', this, 'response', action, trans, res, e); + trans.callback.call(trans.scope||window, null, trans.arg, false); + return; + } + if (result.success === false) { + + this.fireEvent('loadexception', this, trans, res); + + this.fireEvent('exception', this, 'remote', action, trans, res, null); + } else { + this.fireEvent("load", this, res, trans.arg); + } + trans.callback.call(trans.scope||window, result, trans.arg, result.success); + }, + + onWrite : function(action, trans, response, rs) { + var reader = trans.reader; + try { + + var res = reader.readResponse(action, response); + } catch (e) { + this.fireEvent('exception', this, 'response', action, trans, res, e); + trans.callback.call(trans.scope||window, null, res, false); + return; + } + if(!res.success === true){ + this.fireEvent('exception', this, 'remote', action, trans, res, rs); + trans.callback.call(trans.scope||window, null, res, false); + return; + } + this.fireEvent("write", this, action, res.data, res, rs, trans.arg ); + trans.callback.call(trans.scope||window, res.data, res, true); + }, + + + isLoading : function(){ + return this.trans ? true : false; + }, + + + abort : function(){ + if(this.isLoading()){ + this.destroyTrans(this.trans); + } + }, + + + destroyTrans : function(trans, isLoaded){ + this.head.removeChild(document.getElementById(trans.scriptId)); + clearTimeout(trans.timeoutId); + if(isLoaded){ + window[trans.cb] = undefined; + try{ + delete window[trans.cb]; + }catch(e){} + }else{ + + window[trans.cb] = function(){ + window[trans.cb] = undefined; + try{ + delete window[trans.cb]; + }catch(e){} + }; + } + }, + + + handleFailure : function(trans){ + this.trans = false; + this.destroyTrans(trans, false); + if (trans.action === Ext.data.Api.actions.read) { + + this.fireEvent("loadexception", this, null, trans.arg); + } + + this.fireEvent('exception', this, 'response', trans.action, { + response: null, + options: trans.arg + }); + trans.callback.call(trans.scope||window, null, trans.arg, false); + }, + + + destroy: function(){ + this.abort(); + Ext.data.ScriptTagProxy.superclass.destroy.call(this); + } +}); +Ext.data.HttpProxy = function(conn){ + Ext.data.HttpProxy.superclass.constructor.call(this, conn); + + + this.conn = conn; + + + + + + this.conn.url = null; + + this.useAjax = !conn || !conn.events; + + + var actions = Ext.data.Api.actions; + this.activeRequest = {}; + for (var verb in actions) { + this.activeRequest[actions[verb]] = undefined; + } +}; + +Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { + + getConnection : function() { + return this.useAjax ? Ext.Ajax : this.conn; + }, + + + setUrl : function(url, makePermanent) { + this.conn.url = url; + if (makePermanent === true) { + this.url = url; + this.api = null; + Ext.data.Api.prepare(this); + } + }, + + + doRequest : function(action, rs, params, reader, cb, scope, arg) { + var o = { + method: (this.api[action]) ? this.api[action]['method'] : undefined, + request: { + callback : cb, + scope : scope, + arg : arg + }, + reader: reader, + callback : this.createCallback(action, rs), + scope: this + }; + + + + if (params.jsonData) { + o.jsonData = params.jsonData; + } else if (params.xmlData) { + o.xmlData = params.xmlData; + } else { + o.params = params || {}; + } + + + + this.conn.url = this.buildUrl(action, rs); + + if(this.useAjax){ + + Ext.applyIf(o, this.conn); + + + if (this.activeRequest[action]) { + + + + + + } + this.activeRequest[action] = Ext.Ajax.request(o); + }else{ + this.conn.request(o); + } + + this.conn.url = null; + }, + + + createCallback : function(action, rs) { + return function(o, success, response) { + this.activeRequest[action] = undefined; + if (!success) { + if (action === Ext.data.Api.actions.read) { + + + this.fireEvent('loadexception', this, o, response); + } + this.fireEvent('exception', this, 'response', action, o, response); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + if (action === Ext.data.Api.actions.read) { + this.onRead(action, o, response); + } else { + this.onWrite(action, o, response, rs); + } + }; + }, + + + onRead : function(action, o, response) { + var result; + try { + result = o.reader.read(response); + }catch(e){ + + + this.fireEvent('loadexception', this, o, response, e); + + this.fireEvent('exception', this, 'response', action, o, response, e); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + if (result.success === false) { + + + this.fireEvent('loadexception', this, o, response); + + + var res = o.reader.readResponse(action, response); + this.fireEvent('exception', this, 'remote', action, o, res, null); + } + else { + this.fireEvent('load', this, o, o.request.arg); + } + + + + o.request.callback.call(o.request.scope, result, o.request.arg, result.success); + }, + + onWrite : function(action, o, response, rs) { + var reader = o.reader; + var res; + try { + res = reader.readResponse(action, response); + } catch (e) { + this.fireEvent('exception', this, 'response', action, o, response, e); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + if (res.success === true) { + this.fireEvent('write', this, action, res.data, res, rs, o.request.arg); + } else { + this.fireEvent('exception', this, 'remote', action, o, res, rs); + } + + + + o.request.callback.call(o.request.scope, res.data, res, res.success); + }, + + + destroy: function(){ + if(!this.useAjax){ + this.conn.abort(); + }else if(this.activeRequest){ + var actions = Ext.data.Api.actions; + for (var verb in actions) { + if(this.activeRequest[actions[verb]]){ + Ext.Ajax.abort(this.activeRequest[actions[verb]]); + } + } + } + Ext.data.HttpProxy.superclass.destroy.call(this); + } +}); +Ext.data.MemoryProxy = function(data){ + + var api = {}; + api[Ext.data.Api.actions.read] = true; + Ext.data.MemoryProxy.superclass.constructor.call(this, { + api: api + }); + this.data = data; +}; + +Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, { + + + + doRequest : function(action, rs, params, reader, callback, scope, arg) { + + params = params || {}; + var result; + try { + result = reader.readRecords(this.data); + }catch(e){ + + this.fireEvent("loadexception", this, null, arg, e); + + this.fireEvent('exception', this, 'response', action, arg, null, e); + callback.call(scope, null, arg, false); + return; + } + callback.call(scope, result, arg, true); + } +}); +Ext.data.Types = new function(){ + var st = Ext.data.SortTypes; + Ext.apply(this, { + + stripRe: /[\$,%]/g, + + + AUTO: { + convert: function(v){ return v; }, + sortType: st.none, + type: 'auto' + }, + + + STRING: { + convert: function(v){ return (v === undefined || v === null) ? '' : String(v); }, + sortType: st.asUCString, + type: 'string' + }, + + + INT: { + convert: function(v){ + return v !== undefined && v !== null && v !== '' ? + parseInt(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0); + }, + sortType: st.none, + type: 'int' + }, + + + FLOAT: { + convert: function(v){ + return v !== undefined && v !== null && v !== '' ? + parseFloat(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0); + }, + sortType: st.none, + type: 'float' + }, + + + BOOL: { + convert: function(v){ return v === true || v === 'true' || v == 1; }, + sortType: st.none, + type: 'bool' + }, + + + DATE: { + convert: function(v){ + var df = this.dateFormat; + if(!v){ + return null; + } + if(Ext.isDate(v)){ + return v; + } + if(df){ + if(df == 'timestamp'){ + return new Date(v*1000); + } + if(df == 'time'){ + return new Date(parseInt(v, 10)); + } + return Date.parseDate(v, df); + } + var parsed = Date.parse(v); + return parsed ? new Date(parsed) : null; + }, + sortType: st.asDate, + type: 'date' + } + }); + + Ext.apply(this, { + + BOOLEAN: this.BOOL, + + INTEGER: this.INT, + + NUMBER: this.FLOAT + }); +}; +Ext.data.JsonWriter = Ext.extend(Ext.data.DataWriter, { + + encode : true, + + encodeDelete: false, + + constructor : function(config){ + Ext.data.JsonWriter.superclass.constructor.call(this, config); + }, + + + render : function(params, baseParams, data) { + if (this.encode === true) { + + Ext.apply(params, baseParams); + params[this.meta.root] = Ext.encode(data); + } else { + + var jdata = Ext.apply({}, baseParams); + jdata[this.meta.root] = data; + params.jsonData = jdata; + } + }, + + createRecord : function(rec) { + return this.toHash(rec); + }, + + updateRecord : function(rec) { + return this.toHash(rec); + + }, + + destroyRecord : function(rec){ + if(this.encodeDelete){ + var data = {}; + data[this.meta.idProperty] = rec.id; + return data; + }else{ + return rec.id; + } + } +}); +Ext.data.JsonReader = function(meta, recordType){ + meta = meta || {}; + + + + + Ext.applyIf(meta, { + idProperty: 'id', + successProperty: 'success', + totalProperty: 'total' + }); + + Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields); +}; +Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { + + + read : function(response){ + var json = response.responseText; + var o = Ext.decode(json); + if(!o) { + throw {message: 'JsonReader.read: Json object not found'}; + } + return this.readRecords(o); + }, + + + + readResponse : function(action, response) { + var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response; + if(!o) { + throw new Ext.data.JsonReader.Error('response'); + } + + var root = this.getRoot(o), + success = this.getSuccess(o); + if (success && action === Ext.data.Api.actions.create) { + var def = Ext.isDefined(root); + if (def && Ext.isEmpty(root)) { + throw new Ext.data.JsonReader.Error('root-empty', this.meta.root); + } + else if (!def) { + throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root); + } + } + + + var res = new Ext.data.Response({ + action: action, + success: success, + data: (root) ? this.extractData(root, false) : [], + message: this.getMessage(o), + raw: o + }); + + + if (Ext.isEmpty(res.success)) { + throw new Ext.data.JsonReader.Error('successProperty-response', this.meta.successProperty); + } + return res; + }, + + + readRecords : function(o){ + + this.jsonData = o; + if(o.metaData){ + this.onMetaChange(o.metaData); + } + var s = this.meta, Record = this.recordType, + f = Record.prototype.fields, fi = f.items, fl = f.length, v; + + var root = this.getRoot(o), c = root.length, totalRecords = c, success = true; + if(s.totalProperty){ + v = parseInt(this.getTotal(o), 10); + if(!isNaN(v)){ + totalRecords = v; + } + } + if(s.successProperty){ + v = this.getSuccess(o); + if(v === false || v === 'false'){ + success = false; + } + } + + + return { + success : success, + records : this.extractData(root, true), + totalRecords : totalRecords + }; + }, + + + buildExtractors : function() { + if(this.ef){ + return; + } + var s = this.meta, Record = this.recordType, + f = Record.prototype.fields, fi = f.items, fl = f.length; + + if(s.totalProperty) { + this.getTotal = this.createAccessor(s.totalProperty); + } + if(s.successProperty) { + this.getSuccess = this.createAccessor(s.successProperty); + } + if (s.messageProperty) { + this.getMessage = this.createAccessor(s.messageProperty); + } + this.getRoot = s.root ? this.createAccessor(s.root) : function(p){return p;}; + if (s.id || s.idProperty) { + var g = this.createAccessor(s.id || s.idProperty); + this.getId = function(rec) { + var r = g(rec); + return (r === undefined || r === '') ? null : r; + }; + } else { + this.getId = function(){return null;}; + } + var ef = []; + for(var i = 0; i < fl; i++){ + f = fi[i]; + var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; + ef.push(this.createAccessor(map)); + } + this.ef = ef; + }, + + + simpleAccess : function(obj, subsc) { + return obj[subsc]; + }, + + + createAccessor : function(){ + var re = /[\[\.]/; + return function(expr) { + if(Ext.isEmpty(expr)){ + return Ext.emptyFn; + } + if(Ext.isFunction(expr)){ + return expr; + } + var i = String(expr).search(re); + if(i >= 0){ + return new Function('obj', 'return obj' + (i > 0 ? '.' : '') + expr); + } + return function(obj){ + return obj[expr]; + }; + + }; + }(), + + + extractValues : function(data, items, len) { + var f, values = {}; + for(var j = 0; j < len; j++){ + f = items[j]; + var v = this.ef[j](data); + values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data); + } + return values; + } +}); + + +Ext.data.JsonReader.Error = Ext.extend(Ext.Error, { + constructor : function(message, arg) { + this.arg = arg; + Ext.Error.call(this, message); + }, + name : 'Ext.data.JsonReader' +}); +Ext.apply(Ext.data.JsonReader.Error.prototype, { + lang: { + 'response': 'An error occurred while json-decoding your server response', + 'successProperty-response': 'Could not locate your "successProperty" in your server response. Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response. See the JsonReader docs.', + 'root-undefined-config': 'Your JsonReader was configured without a "root" property. Please review your JsonReader config and make sure to define the root property. See the JsonReader docs.', + 'idProperty-undefined' : 'Your JsonReader was configured without an "idProperty" Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id"). See the JsonReader docs.', + 'root-empty': 'Data was expected to be returned by the server in the "root" property of the response. Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response. See JsonReader docs.' + } +}); + +Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { + + + + + readRecords : function(o){ + this.arrayData = o; + var s = this.meta, + sid = s ? Ext.num(s.idIndex, s.id) : null, + recordType = this.recordType, + fields = recordType.prototype.fields, + records = [], + success = true, + v; + + var root = this.getRoot(o); + + for(var i = 0, len = root.length; i < len; i++) { + var n = root[i], + values = {}, + id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); + for(var j = 0, jlen = fields.length; j < jlen; j++) { + var f = fields.items[j], + k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; + v = n[k] !== undefined ? n[k] : f.defaultValue; + v = f.convert(v, n); + values[f.name] = v; + } + var record = new recordType(values, id); + record.json = n; + records[records.length] = record; + } + + var totalRecords = records.length; + + if(s.totalProperty) { + v = parseInt(this.getTotal(o), 10); + if(!isNaN(v)) { + totalRecords = v; + } + } + if(s.successProperty){ + v = this.getSuccess(o); + if(v === false || v === 'false'){ + success = false; + } + } + + return { + success : success, + records : records, + totalRecords : totalRecords + }; + } +}); +Ext.data.ArrayStore = Ext.extend(Ext.data.Store, { + + constructor: function(config){ + Ext.data.ArrayStore.superclass.constructor.call(this, Ext.apply(config, { + reader: new Ext.data.ArrayReader(config) + })); + }, + + loadData : function(data, append){ + if(this.expandData === true){ + var r = []; + for(var i = 0, len = data.length; i < len; i++){ + r[r.length] = [data[i]]; + } + data = r; + } + Ext.data.ArrayStore.superclass.loadData.call(this, data, append); + } +}); +Ext.reg('arraystore', Ext.data.ArrayStore); + + +Ext.data.SimpleStore = Ext.data.ArrayStore; +Ext.reg('simplestore', Ext.data.SimpleStore); +Ext.data.JsonStore = Ext.extend(Ext.data.Store, { + + constructor: function(config){ + Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(config, { + reader: new Ext.data.JsonReader(config) + })); + } +}); +Ext.reg('jsonstore', Ext.data.JsonStore); +Ext.data.XmlWriter = function(params) { + Ext.data.XmlWriter.superclass.constructor.apply(this, arguments); + + this.tpl = (typeof(this.tpl) === 'string') ? new Ext.XTemplate(this.tpl).compile() : this.tpl.compile(); +}; +Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, { + + documentRoot: 'xrequest', + + forceDocumentRoot: false, + + root: 'records', + + xmlVersion : '1.0', + + xmlEncoding: 'ISO-8859-15', + + + tpl: '<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}', + + + + render : function(params, baseParams, data) { + baseParams = this.toArray(baseParams); + params.xmlData = this.tpl.applyTemplate({ + version: this.xmlVersion, + encoding: this.xmlEncoding, + documentRoot: (baseParams.length > 0 || this.forceDocumentRoot === true) ? this.documentRoot : false, + record: this.meta.record, + root: this.root, + baseParams: baseParams, + records: (Ext.isArray(data[0])) ? data : [data] + }); + }, + + + createRecord : function(rec) { + return this.toArray(this.toHash(rec)); + }, + + + updateRecord : function(rec) { + return this.toArray(this.toHash(rec)); + + }, + + destroyRecord : function(rec) { + var data = {}; + data[this.meta.idProperty] = rec.id; + return this.toArray(data); + } +}); + +Ext.data.XmlReader = function(meta, recordType){ + meta = meta || {}; + + + Ext.applyIf(meta, { + idProperty: meta.idProperty || meta.idPath || meta.id, + successProperty: meta.successProperty || meta.success + }); + + Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields); +}; +Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { + + read : function(response){ + var doc = response.responseXML; + if(!doc) { + throw {message: "XmlReader.read: XML Document not available"}; + } + return this.readRecords(doc); + }, + + + readRecords : function(doc){ + + this.xmlData = doc; + + var root = doc.documentElement || doc, + q = Ext.DomQuery, + totalRecords = 0, + success = true; + + if(this.meta.totalProperty){ + totalRecords = this.getTotal(root, 0); + } + if(this.meta.successProperty){ + success = this.getSuccess(root); + } + + var records = this.extractData(q.select(this.meta.record, root), true); + + + return { + success : success, + records : records, + totalRecords : totalRecords || records.length + }; + }, + + + readResponse : function(action, response) { + var q = Ext.DomQuery, + doc = response.responseXML, + root = doc.documentElement || doc; + + + var res = new Ext.data.Response({ + action: action, + success : this.getSuccess(root), + message: this.getMessage(root), + data: this.extractData(q.select(this.meta.record, root) || q.select(this.meta.root, root), false), + raw: doc + }); + + if (Ext.isEmpty(res.success)) { + throw new Ext.data.DataReader.Error('successProperty-response', this.meta.successProperty); + } + + + if (action === Ext.data.Api.actions.create) { + var def = Ext.isDefined(res.data); + if (def && Ext.isEmpty(res.data)) { + throw new Ext.data.JsonReader.Error('root-empty', this.meta.root); + } + else if (!def) { + throw new Ext.data.JsonReader.Error('root-undefined-response', this.meta.root); + } + } + return res; + }, + + getSuccess : function() { + return true; + }, + + + buildExtractors : function() { + if(this.ef){ + return; + } + var s = this.meta, + Record = this.recordType, + f = Record.prototype.fields, + fi = f.items, + fl = f.length; + + if(s.totalProperty) { + this.getTotal = this.createAccessor(s.totalProperty); + } + if(s.successProperty) { + this.getSuccess = this.createAccessor(s.successProperty); + } + if (s.messageProperty) { + this.getMessage = this.createAccessor(s.messageProperty); + } + this.getRoot = function(res) { + return (!Ext.isEmpty(res[this.meta.record])) ? res[this.meta.record] : res[this.meta.root]; + }; + if (s.idPath || s.idProperty) { + var g = this.createAccessor(s.idPath || s.idProperty); + this.getId = function(rec) { + var id = g(rec) || rec.id; + return (id === undefined || id === '') ? null : id; + }; + } else { + this.getId = function(){return null;}; + } + var ef = []; + for(var i = 0; i < fl; i++){ + f = fi[i]; + var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; + ef.push(this.createAccessor(map)); + } + this.ef = ef; + }, + + + createAccessor : function(){ + var q = Ext.DomQuery; + return function(key) { + if (Ext.isFunction(key)) { + return key; + } + switch(key) { + case this.meta.totalProperty: + return function(root, def){ + return q.selectNumber(key, root, def); + }; + break; + case this.meta.successProperty: + return function(root, def) { + var sv = q.selectValue(key, root, true); + var success = sv !== false && sv !== 'false'; + return success; + }; + break; + default: + return function(root, def) { + return q.selectValue(key, root, def); + }; + break; + } + }; + }(), + + + extractValues : function(data, items, len) { + var f, values = {}; + for(var j = 0; j < len; j++){ + f = items[j]; + var v = this.ef[j](data); + values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data); + } + return values; + } +}); +Ext.data.XmlStore = Ext.extend(Ext.data.Store, { + + constructor: function(config){ + Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, { + reader: new Ext.data.XmlReader(config) + })); + } +}); +Ext.reg('xmlstore', Ext.data.XmlStore); +Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { + + + constructor: function(config) { + config = config || {}; + + + + + + this.hasMultiSort = true; + this.multiSortInfo = this.multiSortInfo || {sorters: []}; + + var sorters = this.multiSortInfo.sorters, + groupField = config.groupField || this.groupField, + sortInfo = config.sortInfo || this.sortInfo, + groupDir = config.groupDir || this.groupDir; + + + if(groupField){ + sorters.push({ + field : groupField, + direction: groupDir + }); + } + + + if (sortInfo) { + sorters.push(sortInfo); + } + + Ext.data.GroupingStore.superclass.constructor.call(this, config); + + this.addEvents( + + 'groupchange' + ); + + this.applyGroupField(); + }, + + + + remoteGroup : false, + + groupOnSort:false, + + + groupDir : 'ASC', + + + clearGrouping : function(){ + this.groupField = false; + + if(this.remoteGroup){ + if(this.baseParams){ + delete this.baseParams.groupBy; + delete this.baseParams.groupDir; + } + var lo = this.lastOptions; + if(lo && lo.params){ + delete lo.params.groupBy; + delete lo.params.groupDir; + } + + this.reload(); + }else{ + this.sort(); + this.fireEvent('datachanged', this); + } + }, + + + groupBy : function(field, forceRegroup, direction) { + direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir; + + if (this.groupField == field && this.groupDir == direction && !forceRegroup) { + return; + } + + + + var sorters = this.multiSortInfo.sorters; + if (sorters.length > 0 && sorters[0].field == this.groupField) { + sorters.shift(); + } + + this.groupField = field; + this.groupDir = direction; + this.applyGroupField(); + + var fireGroupEvent = function() { + this.fireEvent('groupchange', this, this.getGroupState()); + }; + + if (this.groupOnSort) { + this.sort(field, direction); + fireGroupEvent.call(this); + return; + } + + if (this.remoteGroup) { + this.on('load', fireGroupEvent, this, {single: true}); + this.reload(); + } else { + this.sort(sorters); + fireGroupEvent.call(this); + } + }, + + + + sort : function(fieldName, dir) { + if (this.remoteSort) { + return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir); + } + + var sorters = []; + + + if (Ext.isArray(arguments[0])) { + sorters = arguments[0]; + } else if (fieldName == undefined) { + + + sorters = this.sortInfo ? [this.sortInfo] : []; + } else { + + + var field = this.fields.get(fieldName); + if (!field) return false; + + var name = field.name, + sortInfo = this.sortInfo || null, + sortToggle = this.sortToggle ? this.sortToggle[name] : null; + + if (!dir) { + if (sortInfo && sortInfo.field == name) { + dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC'); + } else { + dir = field.sortDir; + } + } + + this.sortToggle[name] = dir; + this.sortInfo = {field: name, direction: dir}; + + sorters = [this.sortInfo]; + } + + + if (this.groupField) { + sorters.unshift({direction: this.groupDir, field: this.groupField}); + } + + return this.multiSort.call(this, sorters, dir); + }, + + + applyGroupField: function(){ + if (this.remoteGroup) { + if(!this.baseParams){ + this.baseParams = {}; + } + + Ext.apply(this.baseParams, { + groupBy : this.groupField, + groupDir: this.groupDir + }); + + var lo = this.lastOptions; + if (lo && lo.params) { + lo.params.groupDir = this.groupDir; + + + delete lo.params.groupBy; + } + } + }, + + + applyGrouping : function(alwaysFireChange){ + if(this.groupField !== false){ + this.groupBy(this.groupField, true, this.groupDir); + return true; + }else{ + if(alwaysFireChange === true){ + this.fireEvent('datachanged', this); + } + return false; + } + }, + + + getGroupState : function(){ + return this.groupOnSort && this.groupField !== false ? + (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; + } +}); +Ext.reg('groupingstore', Ext.data.GroupingStore); + +Ext.data.DirectProxy = function(config){ + Ext.apply(this, config); + if(typeof this.paramOrder == 'string'){ + this.paramOrder = this.paramOrder.split(/[\s,|]/); + } + Ext.data.DirectProxy.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, { + + paramOrder: undefined, + + + paramsAsHash: true, + + + directFn : undefined, + + + doRequest : function(action, rs, params, reader, callback, scope, options) { + var args = [], + directFn = this.api[action] || this.directFn; + + switch (action) { + case Ext.data.Api.actions.create: + args.push(params.jsonData); + break; + case Ext.data.Api.actions.read: + + if(directFn.directCfg.method.len > 0){ + if(this.paramOrder){ + for(var i = 0, len = this.paramOrder.length; i < len; i++){ + args.push(params[this.paramOrder[i]]); + } + }else if(this.paramsAsHash){ + args.push(params); + } + } + break; + case Ext.data.Api.actions.update: + args.push(params.jsonData); + break; + case Ext.data.Api.actions.destroy: + args.push(params.jsonData); + break; + } + + var trans = { + params : params || {}, + request: { + callback : callback, + scope : scope, + arg : options + }, + reader: reader + }; + + args.push(this.createCallback(action, rs, trans), this); + directFn.apply(window, args); + }, + + + createCallback : function(action, rs, trans) { + var me = this; + return function(result, res) { + if (!res.status) { + + if (action === Ext.data.Api.actions.read) { + me.fireEvent("loadexception", me, trans, res, null); + } + me.fireEvent('exception', me, 'remote', action, trans, res, null); + trans.request.callback.call(trans.request.scope, null, trans.request.arg, false); + return; + } + if (action === Ext.data.Api.actions.read) { + me.onRead(action, trans, result, res); + } else { + me.onWrite(action, trans, result, res, rs); + } + }; + }, + + + onRead : function(action, trans, result, res) { + var records; + try { + records = trans.reader.readRecords(result); + } + catch (ex) { + + this.fireEvent("loadexception", this, trans, res, ex); + + this.fireEvent('exception', this, 'response', action, trans, res, ex); + trans.request.callback.call(trans.request.scope, null, trans.request.arg, false); + return; + } + this.fireEvent("load", this, res, trans.request.arg); + trans.request.callback.call(trans.request.scope, records, trans.request.arg, true); + }, + + onWrite : function(action, trans, result, res, rs) { + var data = trans.reader.extractData(trans.reader.getRoot(result), false); + var success = trans.reader.getSuccess(result); + success = (success !== false); + if (success){ + this.fireEvent("write", this, action, data, res, rs, trans.request.arg); + }else{ + this.fireEvent('exception', this, 'remote', action, trans, result, rs); + } + trans.request.callback.call(trans.request.scope, data, res, success); + } +}); + +Ext.data.DirectStore = Ext.extend(Ext.data.Store, { + constructor : function(config){ + + var c = Ext.apply({}, { + batchTransactions: false + }, config); + Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: Ext.isDefined(c.proxy) ? c.proxy : new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')), + reader: (!Ext.isDefined(c.reader) && c.fields) ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader + })); + } +}); +Ext.reg('directstore', Ext.data.DirectStore); + +Ext.Direct = Ext.extend(Ext.util.Observable, { + + + + exceptions: { + TRANSPORT: 'xhr', + PARSE: 'parse', + LOGIN: 'login', + SERVER: 'exception' + }, + + + constructor: function(){ + this.addEvents( + + 'event', + + 'exception' + ); + this.transactions = {}; + this.providers = {}; + }, + + + addProvider : function(provider){ + var a = arguments; + if(a.length > 1){ + for(var i = 0, len = a.length; i < len; i++){ + this.addProvider(a[i]); + } + return; + } + + + if(!provider.events){ + provider = new Ext.Direct.PROVIDERS[provider.type](provider); + } + provider.id = provider.id || Ext.id(); + this.providers[provider.id] = provider; + + provider.on('data', this.onProviderData, this); + provider.on('exception', this.onProviderException, this); + + + if(!provider.isConnected()){ + provider.connect(); + } + + return provider; + }, + + + getProvider : function(id){ + return this.providers[id]; + }, + + removeProvider : function(id){ + var provider = id.id ? id : this.providers[id]; + provider.un('data', this.onProviderData, this); + provider.un('exception', this.onProviderException, this); + delete this.providers[provider.id]; + return provider; + }, + + addTransaction: function(t){ + this.transactions[t.tid] = t; + return t; + }, + + removeTransaction: function(t){ + delete this.transactions[t.tid || t]; + return t; + }, + + getTransaction: function(tid){ + return this.transactions[tid.tid || tid]; + }, + + onProviderData : function(provider, e){ + if(Ext.isArray(e)){ + for(var i = 0, len = e.length; i < len; i++){ + this.onProviderData(provider, e[i]); + } + return; + } + if(e.name && e.name != 'event' && e.name != 'exception'){ + this.fireEvent(e.name, e); + }else if(e.type == 'exception'){ + this.fireEvent('exception', e); + } + this.fireEvent('event', e, provider); + }, + + createEvent : function(response, extraProps){ + return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps)); + } +}); + +Ext.Direct = new Ext.Direct(); + +Ext.Direct.TID = 1; +Ext.Direct.PROVIDERS = {}; +Ext.Direct.Transaction = function(config){ + Ext.apply(this, config); + this.tid = ++Ext.Direct.TID; + this.retryCount = 0; +}; +Ext.Direct.Transaction.prototype = { + send: function(){ + this.provider.queueTransaction(this); + }, + + retry: function(){ + this.retryCount++; + this.send(); + }, + + getProvider: function(){ + return this.provider; + } +};Ext.Direct.Event = function(config){ + Ext.apply(this, config); +}; + +Ext.Direct.Event.prototype = { + status: true, + getData: function(){ + return this.data; + } +}; + +Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, { + type: 'rpc', + getTransaction: function(){ + return this.transaction || Ext.Direct.getTransaction(this.tid); + } +}); + +Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, { + status: false, + type: 'exception' +}); + +Ext.Direct.eventTypes = { + 'rpc': Ext.Direct.RemotingEvent, + 'event': Ext.Direct.Event, + 'exception': Ext.Direct.ExceptionEvent +}; + +Ext.direct.Provider = Ext.extend(Ext.util.Observable, { + + + + priority: 1, + + + + + constructor : function(config){ + Ext.apply(this, config); + this.addEvents( + + 'connect', + + 'disconnect', + + 'data', + + 'exception' + ); + Ext.direct.Provider.superclass.constructor.call(this, config); + }, + + + isConnected: function(){ + return false; + }, + + + connect: Ext.emptyFn, + + + disconnect: Ext.emptyFn +}); + +Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, { + parseResponse: function(xhr){ + if(!Ext.isEmpty(xhr.responseText)){ + if(typeof xhr.responseText == 'object'){ + return xhr.responseText; + } + return Ext.decode(xhr.responseText); + } + return null; + }, + + getEvents: function(xhr){ + var data = null; + try{ + data = this.parseResponse(xhr); + }catch(e){ + var event = new Ext.Direct.ExceptionEvent({ + data: e, + xhr: xhr, + code: Ext.Direct.exceptions.PARSE, + message: 'Error parsing json response: \n\n ' + data + }); + return [event]; + } + var events = []; + if(Ext.isArray(data)){ + for(var i = 0, len = data.length; i < len; i++){ + events.push(Ext.Direct.createEvent(data[i])); + } + }else{ + events.push(Ext.Direct.createEvent(data)); + } + return events; + } +}); +Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, { + + + priority: 3, + + + interval: 3000, + + + + + + + constructor : function(config){ + Ext.direct.PollingProvider.superclass.constructor.call(this, config); + this.addEvents( + + 'beforepoll', + + 'poll' + ); + }, + + + isConnected: function(){ + return !!this.pollTask; + }, + + + connect: function(){ + if(this.url && !this.pollTask){ + this.pollTask = Ext.TaskMgr.start({ + run: function(){ + if(this.fireEvent('beforepoll', this) !== false){ + if(typeof this.url == 'function'){ + this.url(this.baseParams); + }else{ + Ext.Ajax.request({ + url: this.url, + callback: this.onData, + scope: this, + params: this.baseParams + }); + } + } + }, + interval: this.interval, + scope: this + }); + this.fireEvent('connect', this); + }else if(!this.url){ + throw 'Error initializing PollingProvider, no url configured.'; + } + }, + + + disconnect: function(){ + if(this.pollTask){ + Ext.TaskMgr.stop(this.pollTask); + delete this.pollTask; + this.fireEvent('disconnect', this); + } + }, + + + onData: function(opt, success, xhr){ + if(success){ + var events = this.getEvents(xhr); + for(var i = 0, len = events.length; i < len; i++){ + var e = events[i]; + this.fireEvent('data', this, e); + } + }else{ + var e = new Ext.Direct.ExceptionEvent({ + data: e, + code: Ext.Direct.exceptions.TRANSPORT, + message: 'Unable to connect to the server.', + xhr: xhr + }); + this.fireEvent('data', this, e); + } + } +}); + +Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider; +Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, { + + + + + + + + + + enableBuffer: 10, + + + maxRetries: 1, + + + timeout: undefined, + + constructor : function(config){ + Ext.direct.RemotingProvider.superclass.constructor.call(this, config); + this.addEvents( + + 'beforecall', + + 'call' + ); + this.namespace = (Ext.isString(this.namespace)) ? Ext.ns(this.namespace) : this.namespace || window; + this.transactions = {}; + this.callBuffer = []; + }, + + + initAPI : function(){ + var o = this.actions; + for(var c in o){ + var cls = this.namespace[c] || (this.namespace[c] = {}), + ms = o[c]; + for(var i = 0, len = ms.length; i < len; i++){ + var m = ms[i]; + cls[m.name] = this.createMethod(c, m); + } + } + }, + + + isConnected: function(){ + return !!this.connected; + }, + + connect: function(){ + if(this.url){ + this.initAPI(); + this.connected = true; + this.fireEvent('connect', this); + }else if(!this.url){ + throw 'Error initializing RemotingProvider, no url configured.'; + } + }, + + disconnect: function(){ + if(this.connected){ + this.connected = false; + this.fireEvent('disconnect', this); + } + }, + + onData: function(opt, success, xhr){ + if(success){ + var events = this.getEvents(xhr); + for(var i = 0, len = events.length; i < len; i++){ + var e = events[i], + t = this.getTransaction(e); + this.fireEvent('data', this, e); + if(t){ + this.doCallback(t, e, true); + Ext.Direct.removeTransaction(t); + } + } + }else{ + var ts = [].concat(opt.ts); + for(var i = 0, len = ts.length; i < len; i++){ + var t = this.getTransaction(ts[i]); + if(t && t.retryCount < this.maxRetries){ + t.retry(); + }else{ + var e = new Ext.Direct.ExceptionEvent({ + data: e, + transaction: t, + code: Ext.Direct.exceptions.TRANSPORT, + message: 'Unable to connect to the server.', + xhr: xhr + }); + this.fireEvent('data', this, e); + if(t){ + this.doCallback(t, e, false); + Ext.Direct.removeTransaction(t); + } + } + } + } + }, + + getCallData: function(t){ + return { + action: t.action, + method: t.method, + data: t.data, + type: 'rpc', + tid: t.tid + }; + }, + + doSend : function(data){ + var o = { + url: this.url, + callback: this.onData, + scope: this, + ts: data, + timeout: this.timeout + }, callData; + + if(Ext.isArray(data)){ + callData = []; + for(var i = 0, len = data.length; i < len; i++){ + callData.push(this.getCallData(data[i])); + } + }else{ + callData = this.getCallData(data); + } + + if(this.enableUrlEncode){ + var params = {}; + params[Ext.isString(this.enableUrlEncode) ? this.enableUrlEncode : 'data'] = Ext.encode(callData); + o.params = params; + }else{ + o.jsonData = callData; + } + Ext.Ajax.request(o); + }, + + combineAndSend : function(){ + var len = this.callBuffer.length; + if(len > 0){ + this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer); + this.callBuffer = []; + } + }, + + queueTransaction: function(t){ + if(t.form){ + this.processForm(t); + return; + } + this.callBuffer.push(t); + if(this.enableBuffer){ + if(!this.callTask){ + this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this); + } + this.callTask.delay(Ext.isNumber(this.enableBuffer) ? this.enableBuffer : 10); + }else{ + this.combineAndSend(); + } + }, + + doCall : function(c, m, args){ + var data = null, hs = args[m.len], scope = args[m.len+1]; + + if(m.len !== 0){ + data = args.slice(0, m.len); + } + + var t = new Ext.Direct.Transaction({ + provider: this, + args: args, + action: c, + method: m.name, + data: data, + cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs + }); + + if(this.fireEvent('beforecall', this, t, m) !== false){ + Ext.Direct.addTransaction(t); + this.queueTransaction(t); + this.fireEvent('call', this, t, m); + } + }, + + doForm : function(c, m, form, callback, scope){ + var t = new Ext.Direct.Transaction({ + provider: this, + action: c, + method: m.name, + args:[form, callback, scope], + cb: scope && Ext.isFunction(callback) ? callback.createDelegate(scope) : callback, + isForm: true + }); + + if(this.fireEvent('beforecall', this, t, m) !== false){ + Ext.Direct.addTransaction(t); + var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data', + params = { + extTID: t.tid, + extAction: c, + extMethod: m.name, + extType: 'rpc', + extUpload: String(isUpload) + }; + + + + Ext.apply(t, { + form: Ext.getDom(form), + isUpload: isUpload, + params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params + }); + this.fireEvent('call', this, t, m); + this.processForm(t); + } + }, + + processForm: function(t){ + Ext.Ajax.request({ + url: this.url, + params: t.params, + callback: this.onData, + scope: this, + form: t.form, + isUpload: t.isUpload, + ts: t + }); + }, + + createMethod : function(c, m){ + var f; + if(!m.formHandler){ + f = function(){ + this.doCall(c, m, Array.prototype.slice.call(arguments, 0)); + }.createDelegate(this); + }else{ + f = function(form, callback, scope){ + this.doForm(c, m, form, callback, scope); + }.createDelegate(this); + } + f.directCfg = { + action: c, + method: m + }; + return f; + }, + + getTransaction: function(opt){ + return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null; + }, + + doCallback: function(t, e){ + var fn = e.status ? 'success' : 'failure'; + if(t && t.cb){ + var hs = t.cb, + result = Ext.isDefined(e.result) ? e.result : e.data; + if(Ext.isFunction(hs)){ + hs(result, e); + } else{ + Ext.callback(hs[fn], hs.scope, [result, e]); + Ext.callback(hs.callback, hs.scope, [result, e]); + } + } + } +}); +Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider; +Ext.Resizable = Ext.extend(Ext.util.Observable, { + + constructor: function(el, config){ + this.el = Ext.get(el); + if(config && config.wrap){ + config.resizeChild = this.el; + this.el = this.el.wrap(typeof config.wrap == 'object' ? config.wrap : {cls:'xresizable-wrap'}); + this.el.id = this.el.dom.id = config.resizeChild.id + '-rzwrap'; + this.el.setStyle('overflow', 'hidden'); + this.el.setPositioning(config.resizeChild.getPositioning()); + config.resizeChild.clearPositioning(); + if(!config.width || !config.height){ + var csize = config.resizeChild.getSize(); + this.el.setSize(csize.width, csize.height); + } + if(config.pinned && !config.adjustments){ + config.adjustments = 'auto'; + } + } + + + this.proxy = this.el.createProxy({tag: 'div', cls: 'x-resizable-proxy', id: this.el.id + '-rzproxy'}, Ext.getBody()); + this.proxy.unselectable(); + this.proxy.enableDisplayMode('block'); + + Ext.apply(this, config); + + if(this.pinned){ + this.disableTrackOver = true; + this.el.addClass('x-resizable-pinned'); + } + + var position = this.el.getStyle('position'); + if(position != 'absolute' && position != 'fixed'){ + this.el.setStyle('position', 'relative'); + } + if(!this.handles){ + this.handles = 's,e,se'; + if(this.multiDirectional){ + this.handles += ',n,w'; + } + } + if(this.handles == 'all'){ + this.handles = 'n s e w ne nw se sw'; + } + var hs = this.handles.split(/\s*?[,;]\s*?| /); + var ps = Ext.Resizable.positions; + for(var i = 0, len = hs.length; i < len; i++){ + if(hs[i] && ps[hs[i]]){ + var pos = ps[hs[i]]; + this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent, this.handleCls); + } + } + + this.corner = this.southeast; + + if(this.handles.indexOf('n') != -1 || this.handles.indexOf('w') != -1){ + this.updateBox = true; + } + + this.activeHandle = null; + + if(this.resizeChild){ + if(typeof this.resizeChild == 'boolean'){ + this.resizeChild = Ext.get(this.el.dom.firstChild, true); + }else{ + this.resizeChild = Ext.get(this.resizeChild, true); + } + } + + if(this.adjustments == 'auto'){ + var rc = this.resizeChild; + var hw = this.west, he = this.east, hn = this.north, hs = this.south; + if(rc && (hw || hn)){ + rc.position('relative'); + rc.setLeft(hw ? hw.el.getWidth() : 0); + rc.setTop(hn ? hn.el.getHeight() : 0); + } + this.adjustments = [ + (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0), + (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 + ]; + } + + if(this.draggable){ + this.dd = this.dynamic ? + this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id}); + this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id); + if(this.constrainTo){ + this.dd.constrainTo(this.constrainTo); + } + } + + this.addEvents( + + 'beforeresize', + + 'resize' + ); + + if(this.width !== null && this.height !== null){ + this.resizeTo(this.width, this.height); + }else{ + this.updateChildSize(); + } + if(Ext.isIE){ + this.el.dom.style.zoom = 1; + } + Ext.Resizable.superclass.constructor.call(this); + }, + + + adjustments : [0, 0], + + animate : false, + + + disableTrackOver : false, + + draggable: false, + + duration : 0.35, + + dynamic : false, + + easing : 'easeOutStrong', + + enabled : true, + + + handles : false, + + multiDirectional : false, + + height : null, + + width : null, + + heightIncrement : 0, + + widthIncrement : 0, + + minHeight : 5, + + minWidth : 5, + + maxHeight : 10000, + + maxWidth : 10000, + + minX: 0, + + minY: 0, + + pinned : false, + + preserveRatio : false, + + resizeChild : false, + + transparent: false, + + + + + + + resizeTo : function(width, height){ + this.el.setSize(width, height); + this.updateChildSize(); + this.fireEvent('resize', this, width, height, null); + }, + + + startSizing : function(e, handle){ + this.fireEvent('beforeresize', this, e); + if(this.enabled){ + + if(!this.overlay){ + this.overlay = this.el.createProxy({tag: 'div', cls: 'x-resizable-overlay', html: ' '}, Ext.getBody()); + this.overlay.unselectable(); + this.overlay.enableDisplayMode('block'); + this.overlay.on({ + scope: this, + mousemove: this.onMouseMove, + mouseup: this.onMouseUp + }); + } + this.overlay.setStyle('cursor', handle.el.getStyle('cursor')); + + this.resizing = true; + this.startBox = this.el.getBox(); + this.startPoint = e.getXY(); + this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0], + (this.startBox.y + this.startBox.height) - this.startPoint[1]]; + + this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.overlay.show(); + + if(this.constrainTo) { + var ct = Ext.get(this.constrainTo); + this.resizeRegion = ct.getRegion().adjust( + ct.getFrameWidth('t'), + ct.getFrameWidth('l'), + -ct.getFrameWidth('b'), + -ct.getFrameWidth('r') + ); + } + + this.proxy.setStyle('visibility', 'hidden'); + this.proxy.show(); + this.proxy.setBox(this.startBox); + if(!this.dynamic){ + this.proxy.setStyle('visibility', 'visible'); + } + } + }, + + + onMouseDown : function(handle, e){ + if(this.enabled){ + e.stopEvent(); + this.activeHandle = handle; + this.startSizing(e, handle); + } + }, + + + onMouseUp : function(e){ + this.activeHandle = null; + var size = this.resizeElement(); + this.resizing = false; + this.handleOut(); + this.overlay.hide(); + this.proxy.hide(); + this.fireEvent('resize', this, size.width, size.height, e); + }, + + + updateChildSize : function(){ + if(this.resizeChild){ + var el = this.el; + var child = this.resizeChild; + var adj = this.adjustments; + if(el.dom.offsetWidth){ + var b = el.getSize(true); + child.setSize(b.width+adj[0], b.height+adj[1]); + } + + + + + if(Ext.isIE){ + setTimeout(function(){ + if(el.dom.offsetWidth){ + var b = el.getSize(true); + child.setSize(b.width+adj[0], b.height+adj[1]); + } + }, 10); + } + } + }, + + + snap : function(value, inc, min){ + if(!inc || !value){ + return value; + } + var newValue = value; + var m = value % inc; + if(m > 0){ + if(m > (inc/2)){ + newValue = value + (inc-m); + }else{ + newValue = value - m; + } + } + return Math.max(min, newValue); + }, + + + resizeElement : function(){ + var box = this.proxy.getBox(); + if(this.updateBox){ + this.el.setBox(box, false, this.animate, this.duration, null, this.easing); + }else{ + this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing); + } + this.updateChildSize(); + if(!this.dynamic){ + this.proxy.hide(); + } + if(this.draggable && this.constrainTo){ + this.dd.resetConstraints(); + this.dd.constrainTo(this.constrainTo); + } + return box; + }, + + + constrain : function(v, diff, m, mx){ + if(v - diff < m){ + diff = v - m; + }else if(v - diff > mx){ + diff = v - mx; + } + return diff; + }, + + + onMouseMove : function(e){ + if(this.enabled && this.activeHandle){ + try{ + + if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) { + return; + } + + + var curSize = this.curSize || this.startBox, + x = this.startBox.x, y = this.startBox.y, + ox = x, + oy = y, + w = curSize.width, + h = curSize.height, + ow = w, + oh = h, + mw = this.minWidth, + mh = this.minHeight, + mxw = this.maxWidth, + mxh = this.maxHeight, + wi = this.widthIncrement, + hi = this.heightIncrement, + eventXY = e.getXY(), + diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])), + diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])), + pos = this.activeHandle.position, + tw, + th; + + switch(pos){ + case 'east': + w += diffX; + w = Math.min(Math.max(mw, w), mxw); + break; + case 'south': + h += diffY; + h = Math.min(Math.max(mh, h), mxh); + break; + case 'southeast': + w += diffX; + h += diffY; + w = Math.min(Math.max(mw, w), mxw); + h = Math.min(Math.max(mh, h), mxh); + break; + case 'north': + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + break; + case 'west': + diffX = this.constrain(w, diffX, mw, mxw); + x += diffX; + w -= diffX; + break; + case 'northeast': + w += diffX; + w = Math.min(Math.max(mw, w), mxw); + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + break; + case 'northwest': + diffX = this.constrain(w, diffX, mw, mxw); + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + x += diffX; + w -= diffX; + break; + case 'southwest': + diffX = this.constrain(w, diffX, mw, mxw); + h += diffY; + h = Math.min(Math.max(mh, h), mxh); + x += diffX; + w -= diffX; + break; + } + + var sw = this.snap(w, wi, mw); + var sh = this.snap(h, hi, mh); + if(sw != w || sh != h){ + switch(pos){ + case 'northeast': + y -= sh - h; + break; + case 'north': + y -= sh - h; + break; + case 'southwest': + x -= sw - w; + break; + case 'west': + x -= sw - w; + break; + case 'northwest': + x -= sw - w; + y -= sh - h; + break; + } + w = sw; + h = sh; + } + + if(this.preserveRatio){ + switch(pos){ + case 'southeast': + case 'east': + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + w = ow * (h/oh); + break; + case 'south': + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + break; + case 'northeast': + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + break; + case 'north': + tw = w; + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + x += (tw - w) / 2; + break; + case 'southwest': + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + tw = w; + w = ow * (h/oh); + x += tw - w; + break; + case 'west': + th = h; + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + y += (th - h) / 2; + tw = w; + w = ow * (h/oh); + x += tw - w; + break; + case 'northwest': + tw = w; + th = h; + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + w = ow * (h/oh); + y += th - h; + x += tw - w; + break; + + } + } + this.proxy.setBounds(x, y, w, h); + if(this.dynamic){ + this.resizeElement(); + } + }catch(ex){} + } + }, + + + handleOver : function(){ + if(this.enabled){ + this.el.addClass('x-resizable-over'); + } + }, + + + handleOut : function(){ + if(!this.resizing){ + this.el.removeClass('x-resizable-over'); + } + }, + + + getEl : function(){ + return this.el; + }, + + + getResizeChild : function(){ + return this.resizeChild; + }, + + + destroy : function(removeEl){ + Ext.destroy(this.dd, this.overlay, this.proxy); + this.overlay = null; + this.proxy = null; + + var ps = Ext.Resizable.positions; + for(var k in ps){ + if(typeof ps[k] != 'function' && this[ps[k]]){ + this[ps[k]].destroy(); + } + } + if(removeEl){ + this.el.update(''); + Ext.destroy(this.el); + this.el = null; + } + this.purgeListeners(); + }, + + syncHandleHeight : function(){ + var h = this.el.getHeight(true); + if(this.west){ + this.west.el.setHeight(h); + } + if(this.east){ + this.east.el.setHeight(h); + } + } +}); + + + +Ext.Resizable.positions = { + n: 'north', s: 'south', e: 'east', w: 'west', se: 'southeast', sw: 'southwest', nw: 'northwest', ne: 'northeast' +}; + +Ext.Resizable.Handle = Ext.extend(Object, { + constructor : function(rz, pos, disableTrackOver, transparent, cls){ + if(!this.tpl){ + + var tpl = Ext.DomHelper.createTemplate( + {tag: 'div', cls: 'x-resizable-handle x-resizable-handle-{0}'} + ); + tpl.compile(); + Ext.Resizable.Handle.prototype.tpl = tpl; + } + this.position = pos; + this.rz = rz; + this.el = this.tpl.append(rz.el.dom, [this.position], true); + this.el.unselectable(); + if(transparent){ + this.el.setOpacity(0); + } + if(!Ext.isEmpty(cls)){ + this.el.addClass(cls); + } + this.el.on('mousedown', this.onMouseDown, this); + if(!disableTrackOver){ + this.el.on({ + scope: this, + mouseover: this.onMouseOver, + mouseout: this.onMouseOut + }); + } + }, + + + afterResize : function(rz){ + + }, + + onMouseDown : function(e){ + this.rz.onMouseDown(this, e); + }, + + onMouseOver : function(e){ + this.rz.handleOver(this, e); + }, + + onMouseOut : function(e){ + this.rz.handleOut(this, e); + }, + + destroy : function(){ + Ext.destroy(this.el); + this.el = null; + } +}); Ext.Window = Ext.extend(Ext.Panel, { @@ -16559,45 +27975,64 @@ Ext.Window = Ext.extend(Ext.Panel, { + + + baseCls : 'x-window', - resizable:true, + resizable : true, - draggable:true, + draggable : true, closable : true, - constrain:false, + closeAction : 'close', - constrainHeader:false, + constrain : false, - plain:false, + constrainHeader : false, + + plain : false, minimizable : false, maximizable : false, - minHeight: 100, + minHeight : 100, - minWidth: 200, + minWidth : 200, - expandOnShow: true, + expandOnShow : true, - closeAction: 'close', - elements: 'header,body', + showAnimDuration: 0.25, + + + hideAnimDuration: 0.25, - collapsible:false, + + collapsible : false, - initHidden : true, - monitorResize : true, - - frame:true, - - floating:true, + initHidden : undefined, - initComponent : function(){ + + hidden : true, + + + + + + + elements : 'header,body', + + frame : true, + + floating : true, + + + initComponent : function(){ + this.initTools(); Ext.Window.superclass.initComponent.call(this); this.addEvents( @@ -16611,35 +28046,51 @@ Ext.Window = Ext.extend(Ext.Panel, { 'restore' ); + + if(Ext.isDefined(this.initHidden)){ + this.hidden = this.initHidden; + } + if(this.hidden === false){ + this.hidden = true; + this.show(); + } }, - getState : function(){ - return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox()); + + getState : function(){ + return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox(true)); }, - onRender : function(ct, position){ + + onRender : function(ct, position){ Ext.Window.superclass.onRender.call(this, ct, position); if(this.plain){ this.el.addClass('x-window-plain'); } - this.focusEl = this.el.createChild({ - tag: "a", href:"#", cls:"x-dlg-focus", - tabIndex:"-1", html: " "}); + + this.focusEl = this.el.createChild({ + tag: 'a', href:'#', cls:'x-dlg-focus', + tabIndex:'-1', html: ' '}); this.focusEl.swallowEvent('click', true); - this.proxy = this.el.createProxy("x-window-proxy"); + this.proxy = this.el.createProxy('x-window-proxy'); this.proxy.enableDisplayMode('block'); if(this.modal){ - this.mask = this.container.createChild({cls:"ext-el-mask"}, this.el.dom); - this.mask.enableDisplayMode("block"); + this.mask = this.container.createChild({cls:'ext-el-mask'}, this.el.dom); + this.mask.enableDisplayMode('block'); this.mask.hide(); + this.mon(this.mask, 'click', this.focus, this); + } + if(this.maximizable){ + this.mon(this.header, 'dblclick', this.toggleMaximize, this); } }, - initEvents : function(){ + + initEvents : function(){ Ext.Window.superclass.initEvents.call(this); if(this.animateTarget){ this.setAnimateTarget(this.animateTarget); @@ -16649,23 +28100,21 @@ Ext.Window = Ext.extend(Ext.Panel, { this.resizer = new Ext.Resizable(this.el, { minWidth: this.minWidth, minHeight:this.minHeight, - handles: this.resizeHandles || "all", + handles: this.resizeHandles || 'all', pinned: true, - resizeElement : this.resizerAction + resizeElement : this.resizerAction, + handleCls: 'x-window-handle' }); this.resizer.window = this; - this.resizer.on("beforeresize", this.beforeResize, this); + this.mon(this.resizer, 'beforeresize', this.beforeResize, this); } if(this.draggable){ - this.header.addClass("x-window-draggable"); + this.header.addClass('x-window-draggable'); } - this.initTools(); - - this.el.on("mousedown", this.toFront, this); + this.mon(this.el, 'mousedown', this.toFront, this); this.manager = this.manager || Ext.WindowMgr; this.manager.register(this); - this.hidden = true; if(this.maximized){ this.maximized = false; this.maximize(); @@ -16682,28 +28131,41 @@ Ext.Window = Ext.extend(Ext.Panel, { this.dd = new Ext.Window.DD(this); }, - onEsc : function(){ + + onEsc : function(k, e){ + if (this.activeGhost) { + this.unghost(); + } + e.stopEvent(); this[this.closeAction](); }, - beforeDestroy : function(){ - Ext.destroy( - this.resizer, - this.dd, - this.proxy, - this.mask - ); + + beforeDestroy : function(){ + if(this.rendered){ + this.hide(); + this.clearAnchor(); + Ext.destroy( + this.focusEl, + this.resizer, + this.dd, + this.proxy, + this.mask + ); + } Ext.Window.superclass.beforeDestroy.call(this); }, - onDestroy : function(){ + + onDestroy : function(){ if(this.manager){ this.manager.unregister(this); } Ext.Window.superclass.onDestroy.call(this); }, - initTools : function(){ + + initTools : function(){ if(this.minimizable){ this.addTool({ id: 'minimize', @@ -16720,7 +28182,6 @@ Ext.Window = Ext.extend(Ext.Panel, { handler: this.restore.createDelegate(this, []), hidden:true }); - this.header.on('dblclick', this.toggleMaximize, this); } if(this.closable){ this.addTool({ @@ -16730,53 +28191,69 @@ Ext.Window = Ext.extend(Ext.Panel, { } }, - resizerAction : function(){ + + resizerAction : function(){ var box = this.proxy.getBox(); this.proxy.hide(); this.window.handleResize(box); return box; }, - beforeResize : function(){ - this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40); + + beforeResize : function(){ + this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); + this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40); this.resizeBox = this.el.getBox(); }, - updateHandles : function(){ + + updateHandles : function(){ if(Ext.isIE && this.resizer){ this.resizer.syncHandleHeight(); this.el.repaint(); } }, - handleResize : function(box){ + + handleResize : function(box){ var rz = this.resizeBox; if(rz.x != box.x || rz.y != box.y){ this.updateBox(box); }else{ this.setSize(box); + if (Ext.isIE6 && Ext.isStrict) { + this.doLayout(); + } } this.focus(); this.updateHandles(); this.saveState(); - if(this.layout){ - this.doLayout(); - } - this.fireEvent("resize", this, box.width, box.height); }, focus : function(){ - var f = this.focusEl, db = this.defaultButton, t = typeof db; - if(t != 'undefined'){ - if(t == 'number'){ - f = this.buttons[db]; - }else if(t == 'string'){ + var f = this.focusEl, + db = this.defaultButton, + t = typeof db, + el, + ct; + if(Ext.isDefined(db)){ + if(Ext.isNumber(db) && this.fbar){ + f = this.fbar.items.get(db); + }else if(Ext.isString(db)){ f = Ext.getCmp(db); }else{ f = db; } + el = f.getEl(); + ct = Ext.getDom(this.container); + if (el && ct) { + if (ct != document.body && !Ext.lib.Region.getRegion(ct).contains(Ext.lib.Region.getRegion(el.dom))){ + return; + } + } } + f = f || this.focusEl; f.focus.defer(10, f); }, @@ -16786,7 +28263,8 @@ Ext.Window = Ext.extend(Ext.Panel, { this.animateTarget = el; }, - beforeShow : function(){ + + beforeShow : function(){ delete this.el.lastXY; delete this.el.lastLT; if(this.x === undefined || this.y === undefined){ @@ -16802,7 +28280,7 @@ Ext.Window = Ext.extend(Ext.Panel, { } if(this.modal){ - Ext.getBody().addClass("x-body-masked"); + Ext.getBody().addClass('x-body-masked'); this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); this.mask.show(); } @@ -16815,16 +28293,16 @@ Ext.Window = Ext.extend(Ext.Panel, { } if(this.hidden === false){ this.toFront(); - return; + return this; } - if(this.fireEvent("beforeshow", this) === false){ - return; + if(this.fireEvent('beforeshow', this) === false){ + return this; } if(cb){ this.on('show', cb, scope, {single:true}); } this.hidden = false; - if(animateTarget !== undefined){ + if(Ext.isDefined(animateTarget)){ this.setAnimateTarget(animateTarget); } this.beforeShow(); @@ -16833,55 +28311,62 @@ Ext.Window = Ext.extend(Ext.Panel, { }else{ this.afterShow(); } + return this; }, - afterShow : function(){ + + afterShow : function(isAnim){ + if (this.isDestroyed){ + return false; + } this.proxy.hide(); this.el.setStyle('display', 'block'); this.el.show(); if(this.maximized){ this.fitContainer(); } - if(Ext.isMac && Ext.isGecko){ this.cascade(this.setAutoScroll); + if(Ext.isMac && Ext.isGecko2){ + this.cascade(this.setAutoScroll); } if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ Ext.EventManager.onWindowResize(this.onWindowResize, this); } this.doConstrain(); - if(this.layout){ - this.doLayout(); - } + this.doLayout(); if(this.keyMap){ this.keyMap.enable(); } this.toFront(); this.updateHandles(); - this.fireEvent("show", this); + if(isAnim && (Ext.isIE || Ext.isWebKit)){ + var sz = this.getSize(); + this.onResize(sz.width, sz.height); + } + this.onShow(); + this.fireEvent('show', this); }, - animShow : function(){ + + animShow : function(){ this.proxy.show(); this.proxy.setBox(this.animateTarget.getBox()); this.proxy.setOpacity(0); - var b = this.getBox(false); - b.callback = this.afterShow; - b.scope = this; - b.duration = .25; - b.easing = 'easeNone'; - b.opacity = .5; - b.block = true; + var b = this.getBox(); this.el.setStyle('display', 'none'); - this.proxy.shift(b); + this.proxy.shift(Ext.apply(b, { + callback: this.afterShow.createDelegate(this, [true], false), + scope: this, + easing: 'easeNone', + duration: this.showAnimDuration, + opacity: 0.5 + })); }, hide : function(animateTarget, cb, scope){ - if(this.activeGhost){ this.hide.defer(100, this, [animateTarget, cb, scope]); - return; - } - if(this.hidden || this.fireEvent("beforehide", this) === false){ - return; + if(this.hidden || this.fireEvent('beforehide', this) === false){ + return this; } if(cb){ this.on('hide', cb, scope, {single:true}); @@ -16890,46 +28375,56 @@ Ext.Window = Ext.extend(Ext.Panel, { if(animateTarget !== undefined){ this.setAnimateTarget(animateTarget); } + if(this.modal){ + this.mask.hide(); + Ext.getBody().removeClass('x-body-masked'); + } if(this.animateTarget){ this.animHide(); }else{ this.el.hide(); this.afterHide(); } + return this; }, - afterHide : function(){ + + afterHide : function(){ this.proxy.hide(); if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ Ext.EventManager.removeResizeListener(this.onWindowResize, this); } - if(this.modal){ - this.mask.hide(); - Ext.getBody().removeClass("x-body-masked"); - } if(this.keyMap){ this.keyMap.disable(); } - this.fireEvent("hide", this); + this.onHide(); + this.fireEvent('hide', this); }, - animHide : function(){ - this.proxy.setOpacity(.5); + + animHide : function(){ + this.proxy.setOpacity(0.5); this.proxy.show(); var tb = this.getBox(false); this.proxy.setBox(tb); this.el.hide(); - var b = this.animateTarget.getBox(); - b.callback = this.afterHide; - b.scope = this; - b.duration = .25; - b.easing = 'easeNone'; - b.block = true; - b.opacity = 0; - this.proxy.shift(b); + this.proxy.shift(Ext.apply(this.animateTarget.getBox(), { + callback: this.afterHide, + scope: this, + duration: this.hideAnimDuration, + easing: 'easeNone', + opacity: 0 + })); }, - onWindowResize : function(){ + + onShow : Ext.emptyFn, + + + onHide : Ext.emptyFn, + + + onWindowResize : function(){ if(this.maximized){ this.fitContainer(); } @@ -16941,7 +28436,8 @@ Ext.Window = Ext.extend(Ext.Panel, { this.doConstrain(); }, - doConstrain : function(){ + + doConstrain : function(){ if(this.constrain || this.constrainHeader){ var offsets; if(this.constrain){ @@ -16954,7 +28450,7 @@ Ext.Window = Ext.extend(Ext.Panel, { var s = this.getSize(); offsets = { right:-(s.width - 100), - bottom:-(s.height - 25) + bottom:-(s.height - 25 + this.el.getConstrainOffset()) }; } @@ -16965,7 +28461,8 @@ Ext.Window = Ext.extend(Ext.Panel, { } }, - ghost : function(cls){ + + ghost : function(cls){ var ghost = this.createGhost(cls); var box = this.getBox(true); ghost.setLeftTop(box.x, box.y); @@ -16975,12 +28472,17 @@ Ext.Window = Ext.extend(Ext.Panel, { return ghost; }, - unghost : function(show, matchPosition){ + + unghost : function(show, matchPosition){ + if(!this.activeGhost) { + return; + } if(show !== false){ this.el.show(); - this.focus(); - if(Ext.isMac && Ext.isGecko){ this.cascade(this.setAutoScroll); - } + this.focus.defer(10, this); + if(Ext.isMac && Ext.isGecko2){ + this.cascade(this.setAutoScroll); + } } if(matchPosition !== false){ this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true)); @@ -16993,19 +28495,27 @@ Ext.Window = Ext.extend(Ext.Panel, { minimize : function(){ this.fireEvent('minimize', this); + return this; }, close : function(){ - if(this.fireEvent("beforeclose", this) !== false){ - this.hide(null, function(){ - this.fireEvent('close', this); - this.destroy(); - }, this); + if(this.fireEvent('beforeclose', this) !== false){ + if(this.hidden){ + this.doClose(); + }else{ + this.hide(null, this.doClose, this); + } } }, + doClose : function(){ + this.fireEvent('close', this); + this.destroy(); + }, + + maximize : function(){ if(!this.maximized){ this.expand(false); @@ -17031,14 +28541,20 @@ Ext.Window = Ext.extend(Ext.Panel, { this.fitContainer(); this.fireEvent('maximize', this); } + return this; }, restore : function(){ if(this.maximized){ + var t = this.tools; this.el.removeClass('x-window-maximized'); - this.tools.restore.hide(); - this.tools.maximize.show(); + if(t.restore){ + t.restore.hide(); + } + if(t.maximize){ + t.maximize.show(); + } this.setPosition(this.restorePos[0], this.restorePos[1]); this.setSize(this.restoreSize.width, this.restoreSize.height); delete this.restorePos; @@ -17049,35 +28565,39 @@ Ext.Window = Ext.extend(Ext.Panel, { if(this.dd){ this.dd.unlock(); } - if(this.collapsible){ - this.tools.toggle.show(); + if(this.collapsible && t.toggle){ + t.toggle.show(); } this.container.removeClass('x-window-maximized-ct'); this.doConstrain(); this.fireEvent('restore', this); } + return this; }, toggleMaximize : function(){ - this[this.maximized ? 'restore' : 'maximize'](); + return this[this.maximized ? 'restore' : 'maximize'](); }, - fitContainer : function(){ - var vs = this.container.getViewSize(); + + fitContainer : function(){ + var vs = this.container.getViewSize(false); this.setSize(vs.width, vs.height); }, - setZIndex : function(index){ + + + setZIndex : function(index){ if(this.modal){ - this.mask.setStyle("z-index", index); + this.mask.setStyle('z-index', index); } this.el.setZIndex(++index); index += 5; if(this.resizer){ - this.resizer.proxy.setStyle("z-index", ++index); + this.resizer.proxy.setStyle('z-index', ++index); } this.lastZIndex = index; @@ -17091,25 +28611,46 @@ Ext.Window = Ext.extend(Ext.Panel, { }, - anchorTo : function(el, alignment, offsets, monitorScroll, _pname){ - var action = function(){ - this.alignTo(el, alignment, offsets); + anchorTo : function(el, alignment, offsets, monitorScroll){ + this.clearAnchor(); + this.anchorTarget = { + el: el, + alignment: alignment, + offsets: offsets }; - Ext.EventManager.onWindowResize(action, this); + + Ext.EventManager.onWindowResize(this.doAnchor, this); var tm = typeof monitorScroll; if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', action, this, + Ext.EventManager.on(window, 'scroll', this.doAnchor, this, {buffer: tm == 'number' ? monitorScroll : 50}); } - action.call(this); - this[_pname] = action; + return this.doAnchor(); + }, + + + doAnchor : function(){ + var o = this.anchorTarget; + this.alignTo(o.el, o.alignment, o.offsets); return this; }, - toFront : function(){ + clearAnchor : function(){ + if(this.anchorTarget){ + Ext.EventManager.removeResizeListener(this.doAnchor, this); + Ext.EventManager.un(window, 'scroll', this.doAnchor, this); + delete this.anchorTarget; + } + return this; + }, + + + toFront : function(e){ if(this.manager.bringToFront(this)){ - this.focus(); + if(!e || !e.getTarget().focus){ + this.focus(); + } } return this; }, @@ -17144,19 +28685,21 @@ Ext.Window = Ext.extend(Ext.Panel, { }); Ext.reg('window', Ext.Window); -Ext.Window.DD = function(win){ - this.win = win; - Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id); - this.setHandleElId(win.header.id); - this.scroll = false; -}; -Ext.extend(Ext.Window.DD, Ext.dd.DD, { +Ext.Window.DD = Ext.extend(Ext.dd.DD, { + + constructor : function(win){ + this.win = win; + Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id); + this.setHandleElId(win.header.id); + this.scroll = false; + }, + moveOnly:true, headerOffsets:[100, 25], startDrag : function(){ var w = this.win; - this.proxy = w.ghost(); + this.proxy = w.ghost(w.initialConfig.cls); if(w.constrain !== false){ var so = w.el.shadowOffset; this.constrainTo(w.container, {right: so, left: so, bottom: so}); @@ -17177,17 +28720,18 @@ Ext.extend(Ext.Window.DD, Ext.dd.DD, { } }); - Ext.WindowGroup = function(){ var list = {}; var accessList = []; var front = null; - var sortWindows = function(d1, d2){ + + var sortWindows = function(d1, d2){ return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1; }; - var orderWindows = function(){ + + var orderWindows = function(){ var a = accessList, len = a.length; if(len > 0){ a.sort(sortWindows); @@ -17202,7 +28746,8 @@ Ext.WindowGroup = function(){ activateLast(); }; - var setActiveWin = function(win){ + + var setActiveWin = function(win){ if(win != front){ if(front){ front.setActive(false); @@ -17214,27 +28759,37 @@ Ext.WindowGroup = function(){ } }; - var activateLast = function(){ + + var activateLast = function(){ for(var i = accessList.length-1; i >=0; --i) { if(!accessList[i].hidden){ setActiveWin(accessList[i]); return; } } - setActiveWin(null); + + setActiveWin(null); }; return { zseed : 9000, - register : function(win){ + + register : function(win){ + if(win.manager){ + win.manager.unregister(win); + } + win.manager = this; + list[win.id] = win; accessList.push(win); win.on('hide', activateLast); }, - unregister : function(win){ + + unregister : function(win){ + delete win.manager; delete list[win.id]; win.un('hide', activateLast); accessList.remove(win); @@ -17306,310 +28861,733 @@ Ext.WindowGroup = function(){ Ext.WindowMgr = new Ext.WindowGroup(); - -Ext.dd.PanelProxy = function(panel, config){ - this.panel = panel; - this.id = this.panel.id +'-ddproxy'; - Ext.apply(this, config); -}; - -Ext.dd.PanelProxy.prototype = { - - insertProxy : true, - - - setStatus : Ext.emptyFn, - reset : Ext.emptyFn, - update : Ext.emptyFn, - stop : Ext.emptyFn, - sync: Ext.emptyFn, - - - getEl : function(){ - return this.ghost; - }, - - - getGhost : function(){ - return this.ghost; - }, - - - getProxy : function(){ - return this.proxy; - }, - - - hide : function(){ - if(this.ghost){ - if(this.proxy){ - this.proxy.remove(); - delete this.proxy; - } - this.panel.el.dom.style.display = ''; - this.ghost.remove(); - delete this.ghost; - } - }, - - - show : function(){ - if(!this.ghost){ - this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody()); - this.ghost.setXY(this.panel.el.getXY()) - if(this.insertProxy){ - this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); - this.proxy.setSize(this.panel.getSize()); - } - this.panel.el.dom.style.display = 'none'; - } - }, - - - repair : function(xy, callback, scope){ - this.hide(); - if(typeof callback == "function"){ - callback.call(scope || this); - } - }, - - - moveProxy : function(parentNode, before){ - if(this.proxy){ - parentNode.insertBefore(this.proxy.dom, before); - } - } -}; - +Ext.MessageBox = function(){ + var dlg, opt, mask, waitTimer, + bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl, + buttons, activeTextEl, bwidth, bufferIcon = '', iconCls = '', + buttonNames = ['ok', 'yes', 'no', 'cancel']; -Ext.Panel.DD = function(panel, cfg){ - this.panel = panel; - this.dragData = {panel: panel}; - this.proxy = new Ext.dd.PanelProxy(panel, cfg); - Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); - var h = panel.header; - if(h){ - this.setHandleElId(h.id); - } - (h ? h : this.panel.body).setStyle('cursor', 'move'); - this.scroll = false; -}; - -Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, { - showFrame: Ext.emptyFn, - startDrag: Ext.emptyFn, - b4StartDrag: function(x, y) { - this.proxy.show(); - }, - b4MouseDown: function(e) { - var x = e.getPageX(); - var y = e.getPageY(); - this.autoOffset(x, y); - }, - onInitDrag : function(x, y){ - this.onStartDrag(x, y); - return true; - }, - createFrame : Ext.emptyFn, - getDragEl : function(e){ - return this.proxy.ghost.dom; - }, - endDrag : function(e){ - this.proxy.hide(); - this.panel.saveState(); - }, - - autoOffset : function(x, y) { - x -= this.startPageX; - y -= this.startPageY; - this.setDelta(x, y); - } -}); - -Ext.state.Provider = function(){ - - this.addEvents("statechange"); - this.state = {}; - Ext.state.Provider.superclass.constructor.call(this); -}; -Ext.extend(Ext.state.Provider, Ext.util.Observable, { - - get : function(name, defaultValue){ - return typeof this.state[name] == "undefined" ? - defaultValue : this.state[name]; - }, - - - clear : function(name){ - delete this.state[name]; - this.fireEvent("statechange", this, name, null); - }, - - - set : function(name, value){ - this.state[name] = value; - this.fireEvent("statechange", this, name, value); - }, - - - decodeValue : function(cookie){ - var re = /^(a|n|d|b|s|o)\:(.*)$/; - var matches = re.exec(unescape(cookie)); - if(!matches || !matches[1]) return; - var type = matches[1]; - var v = matches[2]; - switch(type){ - case "n": - return parseFloat(v); - case "d": - return new Date(Date.parse(v)); - case "b": - return (v == "1"); - case "a": - var all = []; - var values = v.split("^"); - for(var i = 0, len = values.length; i < len; i++){ - all.push(this.decodeValue(values[i])); - } - return all; - case "o": - var all = {}; - var values = v.split("^"); - for(var i = 0, len = values.length; i < len; i++){ - var kv = values[i].split("="); - all[kv[0]] = this.decodeValue(kv[1]); - } - return all; - default: - return v; - } - }, - - - encodeValue : function(v){ - var enc; - if(typeof v == "number"){ - enc = "n:" + v; - }else if(typeof v == "boolean"){ - enc = "b:" + (v ? "1" : "0"); - }else if(Ext.isDate(v)){ - enc = "d:" + v.toGMTString(); - }else if(Ext.isArray(v)){ - var flat = ""; - for(var i = 0, len = v.length; i < len; i++){ - flat += this.encodeValue(v[i]); - if(i != len-1) flat += "^"; - } - enc = "a:" + flat; - }else if(typeof v == "object"){ - var flat = ""; - for(var key in v){ - if(typeof v[key] != "function" && v[key] !== undefined){ - flat += key + "=" + this.encodeValue(v[key]) + "^"; - } - } - enc = "o:" + flat.substring(0, flat.length-1); - }else{ - enc = "s:" + v; - } - return escape(enc); - } -}); + + var handleButton = function(button){ + buttons[button].blur(); + if(dlg.isVisible()){ + dlg.hide(); + handleHide(); + Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value, opt], 1); + } + }; - -Ext.state.Manager = function(){ - var provider = new Ext.state.Provider(); - - return { - - setProvider : function(stateProvider){ - provider = stateProvider; - }, - - - get : function(key, defaultValue){ - return provider.get(key, defaultValue); - }, - - - set : function(key, value){ - provider.set(key, value); - }, - - - clear : function(key){ - provider.clear(key); - }, - - - getProvider : function(){ - return provider; - } - }; + + var handleHide = function(){ + if(opt && opt.cls){ + dlg.el.removeClass(opt.cls); + } + progressBar.reset(); + }; + + + var handleEsc = function(d, k, e){ + if(opt && opt.closable !== false){ + dlg.hide(); + handleHide(); + } + if(e){ + e.stopEvent(); + } + }; + + + var updateButtons = function(b){ + var width = 0, + cfg; + if(!b){ + Ext.each(buttonNames, function(name){ + buttons[name].hide(); + }); + return width; + } + dlg.footer.dom.style.display = ''; + Ext.iterate(buttons, function(name, btn){ + cfg = b[name]; + if(cfg){ + btn.show(); + btn.setText(Ext.isString(cfg) ? cfg : Ext.MessageBox.buttonText[name]); + width += btn.getEl().getWidth() + 15; + }else{ + btn.hide(); + } + }); + return width; + }; + + return { + + getDialog : function(titleText){ + if(!dlg){ + var btns = []; + + buttons = {}; + Ext.each(buttonNames, function(name){ + btns.push(buttons[name] = new Ext.Button({ + text: this.buttonText[name], + handler: handleButton.createCallback(name), + hideMode: 'offsets' + })); + }, this); + dlg = new Ext.Window({ + autoCreate : true, + title:titleText, + resizable:false, + constrain:true, + constrainHeader:true, + minimizable : false, + maximizable : false, + stateful: false, + modal: true, + shim:true, + buttonAlign:"center", + width:400, + height:100, + minHeight: 80, + plain:true, + footer:true, + closable:true, + close : function(){ + if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ + handleButton("no"); + }else{ + handleButton("cancel"); + } + }, + fbar: new Ext.Toolbar({ + items: btns, + enableOverflow: false + }) + }); + dlg.render(document.body); + dlg.getEl().addClass('x-window-dlg'); + mask = dlg.mask; + bodyEl = dlg.body.createChild({ + html:'

    ' + }); + iconEl = Ext.get(bodyEl.dom.firstChild); + var contentEl = bodyEl.dom.childNodes[1]; + msgEl = Ext.get(contentEl.firstChild); + textboxEl = Ext.get(contentEl.childNodes[2].firstChild); + textboxEl.enableDisplayMode(); + textboxEl.addKeyListener([10,13], function(){ + if(dlg.isVisible() && opt && opt.buttons){ + if(opt.buttons.ok){ + handleButton("ok"); + }else if(opt.buttons.yes){ + handleButton("yes"); + } + } + }); + textareaEl = Ext.get(contentEl.childNodes[2].childNodes[1]); + textareaEl.enableDisplayMode(); + progressBar = new Ext.ProgressBar({ + renderTo:bodyEl + }); + bodyEl.createChild({cls:'x-clear'}); + } + return dlg; + }, + + + updateText : function(text){ + if(!dlg.isVisible() && !opt.width){ + dlg.setSize(this.maxWidth, 100); + } + + msgEl.update(text ? text + ' ' : ' '); + + var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0, + mw = msgEl.getWidth() + msgEl.getMargins('lr'), + fw = dlg.getFrameWidth('lr'), + bw = dlg.body.getFrameWidth('lr'), + w; + + w = Math.max(Math.min(opt.width || iw+mw+fw+bw, opt.maxWidth || this.maxWidth), + Math.max(opt.minWidth || this.minWidth, bwidth || 0)); + + if(opt.prompt === true){ + activeTextEl.setWidth(w-iw-fw-bw); + } + if(opt.progress === true || opt.wait === true){ + progressBar.setSize(w-iw-fw-bw); + } + if(Ext.isIE && w == bwidth){ + w += 4; + } + msgEl.update(text || ' '); + dlg.setSize(w, 'auto').center(); + return this; + }, + + + updateProgress : function(value, progressText, msg){ + progressBar.updateProgress(value, progressText); + if(msg){ + this.updateText(msg); + } + return this; + }, + + + isVisible : function(){ + return dlg && dlg.isVisible(); + }, + + + hide : function(){ + var proxy = dlg ? dlg.activeGhost : null; + if(this.isVisible() || proxy){ + dlg.hide(); + handleHide(); + if (proxy){ + + + dlg.unghost(false, false); + } + } + return this; + }, + + + show : function(options){ + if(this.isVisible()){ + this.hide(); + } + opt = options; + var d = this.getDialog(opt.title || " "); + + d.setTitle(opt.title || " "); + var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true); + d.tools.close.setDisplayed(allowClose); + activeTextEl = textboxEl; + opt.prompt = opt.prompt || (opt.multiline ? true : false); + if(opt.prompt){ + if(opt.multiline){ + textboxEl.hide(); + textareaEl.show(); + textareaEl.setHeight(Ext.isNumber(opt.multiline) ? opt.multiline : this.defaultTextHeight); + activeTextEl = textareaEl; + }else{ + textboxEl.show(); + textareaEl.hide(); + } + }else{ + textboxEl.hide(); + textareaEl.hide(); + } + activeTextEl.dom.value = opt.value || ""; + if(opt.prompt){ + d.focusEl = activeTextEl; + }else{ + var bs = opt.buttons; + var db = null; + if(bs && bs.ok){ + db = buttons["ok"]; + }else if(bs && bs.yes){ + db = buttons["yes"]; + } + if (db){ + d.focusEl = db; + } + } + if(Ext.isDefined(opt.iconCls)){ + d.setIconClass(opt.iconCls); + } + this.setIcon(Ext.isDefined(opt.icon) ? opt.icon : bufferIcon); + bwidth = updateButtons(opt.buttons); + progressBar.setVisible(opt.progress === true || opt.wait === true); + this.updateProgress(0, opt.progressText); + this.updateText(opt.msg); + if(opt.cls){ + d.el.addClass(opt.cls); + } + d.proxyDrag = opt.proxyDrag === true; + d.modal = opt.modal !== false; + d.mask = opt.modal !== false ? mask : false; + if(!d.isVisible()){ + + document.body.appendChild(dlg.el.dom); + d.setAnimateTarget(opt.animEl); + + d.on('show', function(){ + if(allowClose === true){ + d.keyMap.enable(); + }else{ + d.keyMap.disable(); + } + }, this, {single:true}); + d.show(opt.animEl); + } + if(opt.wait === true){ + progressBar.wait(opt.waitConfig); + } + return this; + }, + + + setIcon : function(icon){ + if(!dlg){ + bufferIcon = icon; + return; + } + bufferIcon = undefined; + if(icon && icon != ''){ + iconEl.removeClass('x-hidden'); + iconEl.replaceClass(iconCls, icon); + bodyEl.addClass('x-dlg-icon'); + iconCls = icon; + }else{ + iconEl.replaceClass(iconCls, 'x-hidden'); + bodyEl.removeClass('x-dlg-icon'); + iconCls = ''; + } + return this; + }, + + + progress : function(title, msg, progressText){ + this.show({ + title : title, + msg : msg, + buttons: false, + progress:true, + closable:false, + minWidth: this.minProgressWidth, + progressText: progressText + }); + return this; + }, + + + wait : function(msg, title, config){ + this.show({ + title : title, + msg : msg, + buttons: false, + closable:false, + wait:true, + modal:true, + minWidth: this.minProgressWidth, + waitConfig: config + }); + return this; + }, + + + alert : function(title, msg, fn, scope){ + this.show({ + title : title, + msg : msg, + buttons: this.OK, + fn: fn, + scope : scope, + minWidth: this.minWidth + }); + return this; + }, + + + confirm : function(title, msg, fn, scope){ + this.show({ + title : title, + msg : msg, + buttons: this.YESNO, + fn: fn, + scope : scope, + icon: this.QUESTION, + minWidth: this.minWidth + }); + return this; + }, + + + prompt : function(title, msg, fn, scope, multiline, value){ + this.show({ + title : title, + msg : msg, + buttons: this.OKCANCEL, + fn: fn, + minWidth: this.minPromptWidth, + scope : scope, + prompt:true, + multiline: multiline, + value: value + }); + return this; + }, + + + OK : {ok:true}, + + CANCEL : {cancel:true}, + + OKCANCEL : {ok:true, cancel:true}, + + YESNO : {yes:true, no:true}, + + YESNOCANCEL : {yes:true, no:true, cancel:true}, + + INFO : 'ext-mb-info', + + WARNING : 'ext-mb-warning', + + QUESTION : 'ext-mb-question', + + ERROR : 'ext-mb-error', + + + defaultTextHeight : 75, + + maxWidth : 600, + + minWidth : 100, + + minProgressWidth : 250, + + minPromptWidth: 250, + + buttonText : { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + } + }; }(); - - -Ext.state.CookieProvider = function(config){ - Ext.state.CookieProvider.superclass.constructor.call(this); - this.path = "/"; - this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); - this.domain = null; - this.secure = false; - Ext.apply(this, config); - this.state = this.readCookies(); -}; - -Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, { + + +Ext.Msg = Ext.MessageBox; +Ext.dd.PanelProxy = Ext.extend(Object, { - set : function(name, value){ - if(typeof value == "undefined" || value === null){ - this.clear(name); - return; - } - this.setCookie(name, value); - Ext.state.CookieProvider.superclass.set.call(this, name, value); - }, - + constructor : function(panel, config){ + this.panel = panel; + this.id = this.panel.id +'-ddproxy'; + Ext.apply(this, config); + }, - clear : function(name){ - this.clearCookie(name); - Ext.state.CookieProvider.superclass.clear.call(this, name); - }, - - readCookies : function(){ - var cookies = {}; - var c = document.cookie + ";"; - var re = /\s?(.*?)=(.*?);/g; - var matches; - while((matches = re.exec(c)) != null){ - var name = matches[1]; - var value = matches[2]; - if(name && name.substring(0,3) == "ys-"){ - cookies[name.substr(3)] = this.decodeValue(value); - } - } - return cookies; - }, - + insertProxy : true, + - setCookie : function(name, value){ - document.cookie = "ys-"+ name + "=" + this.encodeValue(value) + - ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) + - ((this.path == null) ? "" : ("; path=" + this.path)) + - ((this.domain == null) ? "" : ("; domain=" + this.domain)) + - ((this.secure == true) ? "; secure" : ""); - }, - + setStatus : Ext.emptyFn, + reset : Ext.emptyFn, + update : Ext.emptyFn, + stop : Ext.emptyFn, + sync: Ext.emptyFn, + - clearCookie : function(name){ - document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" + - ((this.path == null) ? "" : ("; path=" + this.path)) + - ((this.domain == null) ? "" : ("; domain=" + this.domain)) + - ((this.secure == true) ? "; secure" : ""); - } + getEl : function(){ + return this.ghost; + }, + + + getGhost : function(){ + return this.ghost; + }, + + + getProxy : function(){ + return this.proxy; + }, + + + hide : function(){ + if(this.ghost){ + if(this.proxy){ + this.proxy.remove(); + delete this.proxy; + } + this.panel.el.dom.style.display = ''; + this.ghost.remove(); + delete this.ghost; + } + }, + + + show : function(){ + if(!this.ghost){ + this.ghost = this.panel.createGhost(this.panel.initialConfig.cls, undefined, Ext.getBody()); + this.ghost.setXY(this.panel.el.getXY()); + if(this.insertProxy){ + this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); + this.proxy.setSize(this.panel.getSize()); + } + this.panel.el.dom.style.display = 'none'; + } + }, + + + repair : function(xy, callback, scope){ + this.hide(); + if(typeof callback == "function"){ + callback.call(scope || this); + } + }, + + + moveProxy : function(parentNode, before){ + if(this.proxy){ + parentNode.insertBefore(this.proxy.dom, before); + } + } }); + +Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, { + + constructor : function(panel, cfg){ + this.panel = panel; + this.dragData = {panel: panel}; + this.proxy = new Ext.dd.PanelProxy(panel, cfg); + Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); + var h = panel.header, + el = panel.body; + if(h){ + this.setHandleElId(h.id); + el = panel.header; + } + el.setStyle('cursor', 'move'); + this.scroll = false; + }, + + showFrame: Ext.emptyFn, + startDrag: Ext.emptyFn, + b4StartDrag: function(x, y) { + this.proxy.show(); + }, + b4MouseDown: function(e) { + var x = e.getPageX(), + y = e.getPageY(); + this.autoOffset(x, y); + }, + onInitDrag : function(x, y){ + this.onStartDrag(x, y); + return true; + }, + createFrame : Ext.emptyFn, + getDragEl : function(e){ + return this.proxy.ghost.dom; + }, + endDrag : function(e){ + this.proxy.hide(); + this.panel.saveState(); + }, + + autoOffset : function(x, y) { + x -= this.startPageX; + y -= this.startPageY; + this.setDelta(x, y); + } +}); +Ext.state.Provider = Ext.extend(Ext.util.Observable, { + + constructor : function(){ + + this.addEvents("statechange"); + this.state = {}; + Ext.state.Provider.superclass.constructor.call(this); + }, + + + get : function(name, defaultValue){ + return typeof this.state[name] == "undefined" ? + defaultValue : this.state[name]; + }, + + + clear : function(name){ + delete this.state[name]; + this.fireEvent("statechange", this, name, null); + }, + + + set : function(name, value){ + this.state[name] = value; + this.fireEvent("statechange", this, name, value); + }, + + + decodeValue : function(cookie){ + + var re = /^(a|n|d|b|s|o|e)\:(.*)$/, + matches = re.exec(unescape(cookie)), + all, + type, + v, + kv; + if(!matches || !matches[1]){ + return; + } + type = matches[1]; + v = matches[2]; + switch(type){ + case 'e': + return null; + case 'n': + return parseFloat(v); + case 'd': + return new Date(Date.parse(v)); + case 'b': + return (v == '1'); + case 'a': + all = []; + if(v != ''){ + Ext.each(v.split('^'), function(val){ + all.push(this.decodeValue(val)); + }, this); + } + return all; + case 'o': + all = {}; + if(v != ''){ + Ext.each(v.split('^'), function(val){ + kv = val.split('='); + all[kv[0]] = this.decodeValue(kv[1]); + }, this); + } + return all; + default: + return v; + } + }, + + + encodeValue : function(v){ + var enc, + flat = '', + i = 0, + len, + key; + if(v == null){ + return 'e:1'; + }else if(typeof v == 'number'){ + enc = 'n:' + v; + }else if(typeof v == 'boolean'){ + enc = 'b:' + (v ? '1' : '0'); + }else if(Ext.isDate(v)){ + enc = 'd:' + v.toGMTString(); + }else if(Ext.isArray(v)){ + for(len = v.length; i < len; i++){ + flat += this.encodeValue(v[i]); + if(i != len - 1){ + flat += '^'; + } + } + enc = 'a:' + flat; + }else if(typeof v == 'object'){ + for(key in v){ + if(typeof v[key] != 'function' && v[key] !== undefined){ + flat += key + '=' + this.encodeValue(v[key]) + '^'; + } + } + enc = 'o:' + flat.substring(0, flat.length-1); + }else{ + enc = 's:' + v; + } + return escape(enc); + } +}); + +Ext.state.Manager = function(){ + var provider = new Ext.state.Provider(); + + return { + + setProvider : function(stateProvider){ + provider = stateProvider; + }, + + + get : function(key, defaultValue){ + return provider.get(key, defaultValue); + }, + + + set : function(key, value){ + provider.set(key, value); + }, + + + clear : function(key){ + provider.clear(key); + }, + + + getProvider : function(){ + return provider; + } + }; +}(); + +Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, { + + constructor : function(config){ + Ext.state.CookieProvider.superclass.constructor.call(this); + this.path = "/"; + this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); + this.domain = null; + this.secure = false; + Ext.apply(this, config); + this.state = this.readCookies(); + }, + + + set : function(name, value){ + if(typeof value == "undefined" || value === null){ + this.clear(name); + return; + } + this.setCookie(name, value); + Ext.state.CookieProvider.superclass.set.call(this, name, value); + }, + + + clear : function(name){ + this.clearCookie(name); + Ext.state.CookieProvider.superclass.clear.call(this, name); + }, + + + readCookies : function(){ + var cookies = {}, + c = document.cookie + ";", + re = /\s?(.*?)=(.*?);/g, + matches, + name, + value; + while((matches = re.exec(c)) != null){ + name = matches[1]; + value = matches[2]; + if(name && name.substring(0,3) == "ys-"){ + cookies[name.substr(3)] = this.decodeValue(value); + } + } + return cookies; + }, + + + setCookie : function(name, value){ + document.cookie = "ys-"+ name + "=" + this.encodeValue(value) + + ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + }, + + + clearCookie : function(name){ + document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + } +}); Ext.DataView = Ext.extend(Ext.BoxComponent, { @@ -17628,13 +29606,17 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { deferEmptyText: true, trackOver: false, + + + blockRefresh: false, - last: false, + + last: false, - - initComponent : function(){ + + initComponent : function(){ Ext.DataView.superclass.initComponent.call(this); - if(typeof this.tpl == "string"){ + if(Ext.isString(this.tpl) || Ext.isArray(this.tpl)){ this.tpl = new Ext.XTemplate(this.tpl); } @@ -17654,28 +29636,24 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { "contextmenu", + "containercontextmenu", + "selectionchange", "beforeselect" ); + this.store = Ext.StoreMgr.lookup(this.store); this.all = new Ext.CompositeElementLite(); this.selected = new Ext.CompositeElementLite(); }, - onRender : function(){ - if(!this.el){ - this.el = document.createElement('div'); - this.el.id = this.id; - } - Ext.DataView.superclass.onRender.apply(this, arguments); - }, - - afterRender : function(){ + + afterRender : function(){ Ext.DataView.superclass.afterRender.call(this); - this.el.on({ + this.mon(this.getTemplateTarget(), { "click": this.onClick, "dblclick": this.onDblClick, "contextmenu": this.onContextMenu, @@ -17683,7 +29661,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { }); if(this.overClass || this.trackOver){ - this.el.on({ + this.mon(this.getTemplateTarget(), { "mouseover": this.onMouseOver, "mouseout": this.onMouseOut, scope:this @@ -17691,26 +29669,32 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { } if(this.store){ - this.setStore(this.store, true); + this.bindStore(this.store, true); } }, - refresh : function(){ + refresh : function() { this.clearSelections(false, true); - this.el.update(""); - var records = this.store.getRange(); + var el = this.getTemplateTarget(), + records = this.store.getRange(); + + el.update(''); if(records.length < 1){ if(!this.deferEmptyText || this.hasSkippedEmptyText){ - this.el.update(this.emptyText); + el.update(this.emptyText); } - this.hasSkippedEmptyText = true; this.all.clear(); - return; + }else{ + this.tpl.overwrite(el, this.collectData(records, 0)); + this.all.fill(Ext.query(this.itemSelector, el.dom)); + this.updateIndexes(0); } - this.tpl.overwrite(this.el, this.collectData(records, 0)); - this.all.fill(Ext.query(this.itemSelector, this.el.dom)); - this.updateIndexes(0); + this.hasSkippedEmptyText = true; + }, + + getTemplateTarget: function(){ + return this.el; }, @@ -17720,35 +29704,42 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { collectData : function(records, startIndex){ - var r = []; - for(var i = 0, len = records.length; i < len; i++){ - r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]); + var r = [], + i = 0, + len = records.length; + for(; i < len; i++){ + r[r.length] = this.prepareData(records[i].data, startIndex + i, records[i]); } return r; }, - bufferRender : function(records){ + + bufferRender : function(records, index){ var div = document.createElement('div'); - this.tpl.overwrite(div, this.collectData(records)); + this.tpl.overwrite(div, this.collectData(records, index)); return Ext.query(this.itemSelector, div); }, - onUpdate : function(ds, record){ + + onUpdate : function(ds, record){ var index = this.store.indexOf(record); - var sel = this.isSelected(index); - var original = this.all.elements[index]; - var node = this.bufferRender([record], index)[0]; + if(index > -1){ + var sel = this.isSelected(index), + original = this.all.elements[index], + node = this.bufferRender([record], index)[0]; - this.all.replaceElement(index, node, true); - if(sel){ - this.selected.replaceElement(original, node); - this.all.item(index).addClass(this.selectedClass); + this.all.replaceElement(index, node, true); + if(sel){ + this.selected.replaceElement(original, node); + this.all.item(index).addClass(this.selectedClass); + } + this.updateIndexes(index, index); } - this.updateIndexes(index, index); }, - onAdd : function(ds, records, index){ - if(this.all.getCount() == 0){ + + onAdd : function(ds, records, index){ + if(this.all.getCount() === 0){ this.refresh(); return; } @@ -17763,10 +29754,14 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { this.updateIndexes(index); }, - onRemove : function(ds, record, index){ + + onRemove : function(ds, record, index){ this.deselect(index); this.all.removeElement(index, true); this.updateIndexes(index); + if (this.store.getCount() === 0){ + this.refresh(); + } }, @@ -17774,7 +29769,8 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { this.onUpdate(this.store, this.store.getAt(index)); }, - updateIndexes : function(startIndex, endIndex){ + + updateIndexes : function(startIndex, endIndex){ var ns = this.all.elements; startIndex = startIndex || 0; endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1)); @@ -17782,67 +29778,100 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { ns[i].viewIndex = i; } }, + + + getStore : function(){ + return this.store; + }, - setStore : function(store, initial){ + bindStore : function(store, initial){ if(!initial && this.store){ - this.store.un("beforeload", this.onBeforeLoad, this); - this.store.un("datachanged", this.refresh, this); - this.store.un("add", this.onAdd, this); - this.store.un("remove", this.onRemove, this); - this.store.un("update", this.onUpdate, this); - this.store.un("clear", this.refresh, this); + if(store !== this.store && this.store.autoDestroy){ + this.store.destroy(); + }else{ + this.store.un("beforeload", this.onBeforeLoad, this); + this.store.un("datachanged", this.onDataChanged, this); + this.store.un("add", this.onAdd, this); + this.store.un("remove", this.onRemove, this); + this.store.un("update", this.onUpdate, this); + this.store.un("clear", this.refresh, this); + } + if(!store){ + this.store = null; + } } if(store){ store = Ext.StoreMgr.lookup(store); - store.on("beforeload", this.onBeforeLoad, this); - store.on("datachanged", this.refresh, this); - store.on("add", this.onAdd, this); - store.on("remove", this.onRemove, this); - store.on("update", this.onUpdate, this); - store.on("clear", this.refresh, this); + store.on({ + scope: this, + beforeload: this.onBeforeLoad, + datachanged: this.onDataChanged, + add: this.onAdd, + remove: this.onRemove, + update: this.onUpdate, + clear: this.refresh + }); } this.store = store; if(store){ this.refresh(); } }, + + + onDataChanged: function() { + if (this.blockRefresh !== true) { + this.refresh.apply(this, arguments); + } + }, findItemFromChild : function(node){ - return Ext.fly(node).findParent(this.itemSelector, this.el); + return Ext.fly(node).findParent(this.itemSelector, this.getTemplateTarget()); }, - onClick : function(e){ - var item = e.getTarget(this.itemSelector, this.el); + + onClick : function(e){ + var item = e.getTarget(this.itemSelector, this.getTemplateTarget()), + index; if(item){ - var index = this.indexOf(item); + index = this.indexOf(item); if(this.onItemClick(item, index, e) !== false){ this.fireEvent("click", this, index, item, e); } }else{ if(this.fireEvent("containerclick", this, e) !== false){ - this.clearSelections(); + this.onContainerClick(e); } } }, - onContextMenu : function(e){ - var item = e.getTarget(this.itemSelector, this.el); + onContainerClick : function(e){ + this.clearSelections(); + }, + + + onContextMenu : function(e){ + var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); if(item){ this.fireEvent("contextmenu", this, this.indexOf(item), item, e); + }else{ + this.fireEvent("containercontextmenu", this, e); } }, - onDblClick : function(e){ - var item = e.getTarget(this.itemSelector, this.el); + + onDblClick : function(e){ + var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); if(item){ this.fireEvent("dblclick", this, this.indexOf(item), item, e); } }, - onMouseOver : function(e){ - var item = e.getTarget(this.itemSelector, this.el); + + onMouseOver : function(e){ + var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); if(item && item !== this.lastItem){ this.lastItem = item; Ext.fly(item).addClass(this.overClass); @@ -17850,9 +29879,10 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { } }, - onMouseOut : function(e){ + + onMouseOut : function(e){ if(this.lastItem){ - if(!e.within(this.lastItem, true)){ + if(!e.within(this.lastItem, true, true)){ Ext.fly(this.lastItem).removeClass(this.overClass); this.fireEvent("mouseleave", this, this.indexOf(this.lastItem), this.lastItem, e); delete this.lastItem; @@ -17860,7 +29890,8 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { } }, - onItemClick : function(item, index, e){ + + onItemClick : function(item, index, e){ if(this.fireEvent("beforeclick", this, index, item, e) === false){ return false; } @@ -17874,7 +29905,8 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { return true; }, - doSingleSelection : function(item, index, e){ + + doSingleSelection : function(item, index, e){ if(e.ctrlKey && this.isSelected(index)){ this.deselect(index); }else{ @@ -17882,11 +29914,13 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { } }, - doMultiSelection : function(item, index, e){ + + doMultiSelection : function(item, index, e){ if(e.shiftKey && this.last !== false){ var last = this.last; this.selectRange(last, index, e.ctrlKey); - this.last = last; }else{ + this.last = last; + }else{ if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){ this.deselect(index); }else{ @@ -17897,7 +29931,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { getSelectionCount : function(){ - return this.selected.getCount() + return this.selected.getCount(); }, @@ -17907,29 +29941,32 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { getSelectedIndexes : function(){ - var indexes = [], s = this.selected.elements; - for(var i = 0, len = s.length; i < len; i++){ - indexes.push(s[i].viewIndex); + var indexes = [], + selected = this.selected.elements, + i = 0, + len = selected.length; + + for(; i < len; i++){ + indexes.push(selected[i].viewIndex); } return indexes; }, getSelectedRecords : function(){ - var r = [], s = this.selected.elements; - for(var i = 0, len = s.length; i < len; i++){ - r[r.length] = this.store.getAt(s[i].viewIndex); - } - return r; + return this.getRecords(this.selected.elements); }, getRecords : function(nodes){ - var r = [], s = nodes; - for(var i = 0, len = s.length; i < len; i++){ - r[r.length] = this.store.getAt(s[i].viewIndex); + var records = [], + i = 0, + len = nodes.length; + + for(; i < len; i++){ + records[records.length] = this.store.getAt(nodes[i].viewIndex); } - return r; + return records; }, @@ -17978,9 +30015,9 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { for(var i = 0, len = nodeInfo.length; i < len; i++){ this.select(nodeInfo[i], true, true); } - if(!suppressEvent){ - this.fireEvent("selectionchange", this, this.selected.elements); - } + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selected.elements); + } } else{ var node = this.getNode(nodeInfo); if(!keepExisting){ @@ -18009,20 +30046,25 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { getNode : function(nodeInfo){ - if(typeof nodeInfo == "string"){ + if(Ext.isString(nodeInfo)){ return document.getElementById(nodeInfo); - }else if(typeof nodeInfo == "number"){ + }else if(Ext.isNumber(nodeInfo)){ return this.all.elements[nodeInfo]; + }else if(nodeInfo instanceof Ext.data.Record){ + var idx = this.store.indexOf(nodeInfo); + return this.all.elements[idx]; } return nodeInfo; }, getNodes : function(start, end){ - var ns = this.all.elements; + var ns = this.all.elements, + nodes = [], + i; + start = start || 0; - end = typeof end == "undefined" ? Math.max(ns.length - 1, 0) : end; - var nodes = [], i; + end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end; if(start <= end){ for(i = start; i <= end && ns[i]; i++){ nodes.push(ns[i]); @@ -18038,755 +30080,573 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { indexOf : function(node){ node = this.getNode(node); - if(typeof node.viewIndex == "number"){ + if(Ext.isNumber(node.viewIndex)){ return node.viewIndex; } return this.all.indexOf(node); }, - onBeforeLoad : function(){ + + onBeforeLoad : function(){ if(this.loadingText){ this.clearSelections(false, true); - this.el.update('
    '+this.loadingText+'
    '); + this.getTemplateTarget().update('
    '+this.loadingText+'
    '); this.all.clear(); } }, onDestroy : function(){ + this.all.clear(); + this.selected.clear(); Ext.DataView.superclass.onDestroy.call(this); - this.setStore(null); + this.bindStore(null); } }); + +Ext.DataView.prototype.setStore = Ext.DataView.prototype.bindStore; + Ext.reg('dataview', Ext.DataView); -Ext.ColorPalette = function(config){ - Ext.ColorPalette.superclass.constructor.call(this, config); - this.addEvents( - - 'select' - ); - - if(this.handler){ - this.on("select", this.handler, this.scope, true); - } -}; -Ext.extend(Ext.ColorPalette, Ext.Component, { - +Ext.list.ListView = Ext.extend(Ext.DataView, { - itemCls : "x-color-palette", - value : null, - clickEvent:'click', - ctype: "Ext.ColorPalette", + + itemSelector: 'dl', + + selectedClass:'x-list-selected', + + overClass:'x-list-over', + + + scrollOffset : undefined, + + columnResize: true, + + + columnSort: true, + - allowReselect : false, + maxColumnWidth: Ext.isIE ? 99 : 100, - - colors : [ - "000000", "993300", "333300", "003300", "003366", "000080", "333399", "333333", - "800000", "FF6600", "808000", "008000", "008080", "0000FF", "666699", "808080", - "FF0000", "FF9900", "99CC00", "339966", "33CCCC", "3366FF", "800080", "969696", - "FF00FF", "FFCC00", "FFFF00", "00FF00", "00FFFF", "00CCFF", "993366", "C0C0C0", - "FF99CC", "FFCC99", "FFFF99", "CCFFCC", "CCFFFF", "99CCFF", "CC99FF", "FFFFFF" - ], - - onRender : function(container, position){ - var t = this.tpl || new Ext.XTemplate( - ' ' - ); - var el = document.createElement("div"); - el.className = this.itemCls; - t.overwrite(el, this.colors); - container.dom.insertBefore(el, position); - this.el = Ext.get(el); - this.el.on(this.clickEvent, this.handleClick, this, {delegate: "a"}); - if(this.clickEvent != 'click'){ - this.el.on('click', Ext.emptyFn, this, {delegate: "a", preventDefault:true}); + initComponent : function(){ + if(this.columnResize){ + this.colResizer = new Ext.list.ColumnResizer(this.colResizer); + this.colResizer.init(this); } - }, - - afterRender : function(){ - Ext.ColorPalette.superclass.afterRender.call(this); - if(this.value){ - var s = this.value; - this.value = null; - this.select(s); + if(this.columnSort){ + this.colSorter = new Ext.list.Sorter(this.columnSort); + this.colSorter.init(this); } - }, - - handleClick : function(e, t){ - e.preventDefault(); - if(!this.disabled){ - var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1]; - this.select(c.toUpperCase()); + if(!this.internalTpl){ + this.internalTpl = new Ext.XTemplate( + '
    ', + '', + '
    ', + '{header}', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ' + ); } - }, + if(!this.tpl){ + this.tpl = new Ext.XTemplate( + '', + '
    ', + '', + '
    ', + ' class="{cls}">', + '{[values.tpl.apply(parent)]}', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ' + ); + }; - - select : function(color){ - color = color.replace("#", ""); - if(color != this.value || this.allowReselect){ - var el = this.el; - if(this.value){ - el.child("a.color-"+this.value).removeClass("x-color-palette-sel"); + var cs = this.columns, + allocatedWidth = 0, + colsWithWidth = 0, + len = cs.length, + columns = []; + + for(var i = 0; i < len; i++){ + var c = cs[i]; + if(!c.isColumn) { + c.xtype = c.xtype ? (/^lv/.test(c.xtype) ? c.xtype : 'lv' + c.xtype) : 'lvcolumn'; + c = Ext.create(c); } - el.child("a.color-"+color).addClass("x-color-palette-sel"); - this.value = color; - this.fireEvent("select", this, color); + if(c.width) { + allocatedWidth += c.width*100; + if(allocatedWidth > this.maxColumnWidth){ + c.width -= (allocatedWidth - this.maxColumnWidth) / 100; + } + colsWithWidth++; + } + columns.push(c); + } + + cs = this.columns = columns; + + + if(colsWithWidth < len){ + var remaining = len - colsWithWidth; + if(allocatedWidth < this.maxColumnWidth){ + var perCol = ((this.maxColumnWidth-allocatedWidth) / remaining)/100; + for(var j = 0; j < len; j++){ + var c = cs[j]; + if(!c.width){ + c.width = perCol; + } + } + } + } + Ext.list.ListView.superclass.initComponent.call(this); + }, + + onRender : function(){ + this.autoEl = { + cls: 'x-list-wrap' + }; + Ext.list.ListView.superclass.onRender.apply(this, arguments); + + this.internalTpl.overwrite(this.el, {columns: this.columns}); + + this.innerBody = Ext.get(this.el.dom.childNodes[1].firstChild); + this.innerHd = Ext.get(this.el.dom.firstChild.firstChild); + + if(this.hideHeaders){ + this.el.dom.firstChild.style.display = 'none'; + } + }, + + getTemplateTarget : function(){ + return this.innerBody; + }, + + + collectData : function(){ + var rs = Ext.list.ListView.superclass.collectData.apply(this, arguments); + return { + columns: this.columns, + rows: rs + }; + }, + + verifyInternalSize : function(){ + if(this.lastSize){ + this.onResize(this.lastSize.width, this.lastSize.height); + } + }, + + + onResize : function(w, h){ + var body = this.innerBody.dom, + header = this.innerHd.dom, + scrollWidth = w - Ext.num(this.scrollOffset, Ext.getScrollBarWidth()) + 'px', + parentNode; + + if(!body){ + return; + } + parentNode = body.parentNode; + if(Ext.isNumber(w)){ + if(this.reserveScrollOffset || ((parentNode.offsetWidth - parentNode.clientWidth) > 10)){ + body.style.width = scrollWidth; + header.style.width = scrollWidth; + }else{ + body.style.width = w + 'px'; + header.style.width = w + 'px'; + setTimeout(function(){ + if((parentNode.offsetWidth - parentNode.clientWidth) > 10){ + body.style.width = scrollWidth; + header.style.width = scrollWidth; + } + }, 10); + } + } + if(Ext.isNumber(h)){ + parentNode.style.height = Math.max(0, h - header.parentNode.offsetHeight) + 'px'; + } + }, + + updateIndexes : function(){ + Ext.list.ListView.superclass.updateIndexes.apply(this, arguments); + this.verifyInternalSize(); + }, + + findHeaderIndex : function(header){ + header = header.dom || header; + var parentNode = header.parentNode, + children = parentNode.parentNode.childNodes, + i = 0, + c; + for(; c = children[i]; i++){ + if(c == parentNode){ + return i; + } + } + return -1; + }, + + setHdWidths : function(){ + var els = this.innerHd.dom.getElementsByTagName('div'), + i = 0, + columns = this.columns, + len = columns.length; + + for(; i < len; i++){ + els[i].style.width = (columns[i].width*100) + '%'; } } - - }); -Ext.reg('colorpalette', Ext.ColorPalette); - -Ext.DatePicker = Ext.extend(Ext.Component, { - - todayText : "Today", - - okText : " OK ", - - cancelText : "Cancel", - - todayTip : "{0} (Spacebar)", - - minText : "This date is before the minimum date", - - maxText : "This date is after the maximum date", - - format : "m/d/y", - - disabledDaysText : "Disabled", - - disabledDatesText : "Disabled", - - constrainToViewport : true, - - monthNames : Date.monthNames, - - dayNames : Date.dayNames, - - nextText: 'Next Month (Control+Right)', - - prevText: 'Previous Month (Control+Left)', - - monthYearText: 'Choose a month (Control+Up/Down to move years)', - - startDay : 0, - - showToday : true, - - - - - - - - initComponent : function(){ - Ext.DatePicker.superclass.initComponent.call(this); - - this.value = this.value ? - this.value.clearTime() : new Date().clearTime(); - - this.addEvents( - - 'select' - ); - - if(this.handler){ - this.on("select", this.handler, this.scope || this); - } - - this.initDisabledDays(); - }, - - - initDisabledDays : function(){ - if(!this.disabledDatesRE && this.disabledDates){ - var dd = this.disabledDates; - var re = "(?:"; - for(var i = 0; i < dd.length; i++){ - re += dd[i]; - if(i != dd.length-1) re += "|"; - } - this.disabledDatesRE = new RegExp(re + ")"); - } - }, - - - setDisabledDates : function(dd){ - if(Ext.isArray(dd)){ - this.disabledDates = dd; - this.disabledDatesRE = null; - }else{ - this.disabledDatesRE = dd; - } - this.initDisabledDays(); - this.update(this.value, true); - }, - - - setDisabledDays : function(dd){ - this.disabledDays = dd; - this.update(this.value, true); - }, - - - setMinDate : function(dt){ - this.minDate = dt; - this.update(this.value, true); - }, - - - setMaxDate : function(dt){ - this.maxDate = dt; - this.update(this.value, true); - }, - - - setValue : function(value){ - var old = this.value; - this.value = value.clearTime(true); - if(this.el){ - this.update(this.value); - } - }, - - - getValue : function(){ - return this.value; - }, - - - focus : function(){ - if(this.el){ - this.update(this.activeDate); - } - }, - - - onRender : function(container, position){ - var m = [ - '', - '', - '', - this.showToday ? '' : '', - '
      
    ']; - var dn = this.dayNames; - for(var i = 0; i < 7; i++){ - var d = this.startDay+i; - if(d > 6){ - d = d-7; - } - m.push(""); - } - m[m.length] = ""; - for(var i = 0; i < 42; i++) { - if(i % 7 == 0 && i != 0){ - m[m.length] = ""; - } - m[m.length] = ''; - } - m.push('
    ", dn[d].substr(0,1), "
    '); - - var el = document.createElement("div"); - el.className = "x-date-picker"; - el.innerHTML = m.join(""); - - container.dom.insertBefore(el, position); - - this.el = Ext.get(el); - this.eventEl = Ext.get(el.firstChild); - - new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"), { - handler: this.showPrevMonth, - scope: this, - preventDefault:true, - stopDefault:true - }); - - new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"), { - handler: this.showNextMonth, - scope: this, - preventDefault:true, - stopDefault:true - }); - - this.eventEl.on("mousewheel", this.handleMouseWheel, this); - - this.monthPicker = this.el.down('div.x-date-mp'); - this.monthPicker.enableDisplayMode('block'); - - var kn = new Ext.KeyNav(this.eventEl, { - "left" : function(e){ - e.ctrlKey ? - this.showPrevMonth() : - this.update(this.activeDate.add("d", -1)); - }, - - "right" : function(e){ - e.ctrlKey ? - this.showNextMonth() : - this.update(this.activeDate.add("d", 1)); - }, - - "up" : function(e){ - e.ctrlKey ? - this.showNextYear() : - this.update(this.activeDate.add("d", -7)); - }, - - "down" : function(e){ - e.ctrlKey ? - this.showPrevYear() : - this.update(this.activeDate.add("d", 7)); - }, - - "pageUp" : function(e){ - this.showNextMonth(); - }, - - "pageDown" : function(e){ - this.showPrevMonth(); - }, - - "enter" : function(e){ - e.stopPropagation(); - return true; - }, - - scope : this - }); - - this.eventEl.on("click", this.handleDateClick, this, {delegate: "a.x-date-date"}); - - this.el.unselectable(); - - this.cells = this.el.select("table.x-date-inner tbody td"); - this.textNodes = this.el.query("table.x-date-inner tbody span"); - - this.mbtn = new Ext.Button({ - text: " ", - tooltip: this.monthYearText, - renderTo: this.el.child("td.x-date-middle", true) - }); - - this.mbtn.on('click', this.showMonthPicker, this); - this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu"); - - if(this.showToday){ - this.todayKeyListener = this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday, this); - var today = (new Date()).dateFormat(this.format); - this.todayBtn = new Ext.Button({ - renderTo: this.el.child("td.x-date-bottom", true), - text: String.format(this.todayText, today), - tooltip: String.format(this.todayTip, today), - handler: this.selectToday, - scope: this - }); - } - - if(Ext.isIE){ - this.el.repaint(); - } - this.update(this.value); - }, - - - createMonthPicker : function(){ - if(!this.monthPicker.dom.firstChild){ - var buf = ['']; - for(var i = 0; i < 6; i++){ - buf.push( - '', - '', - i == 0 ? - '' : - '' - ); - } - buf.push( - '', - '
    ', this.monthNames[i].substr(0, 3), '', this.monthNames[i+6].substr(0, 3), '
    ' - ); - this.monthPicker.update(buf.join('')); - this.monthPicker.on('click', this.onMonthClick, this); - this.monthPicker.on('dblclick', this.onMonthDblClick, this); - - this.mpMonths = this.monthPicker.select('td.x-date-mp-month'); - this.mpYears = this.monthPicker.select('td.x-date-mp-year'); - - this.mpMonths.each(function(m, a, i){ - i += 1; - if((i%2) == 0){ - m.dom.xmonth = 5 + Math.round(i * .5); - }else{ - m.dom.xmonth = Math.round((i-1) * .5); - } - }); - } - }, - - - showMonthPicker : function(){ - this.createMonthPicker(); - var size = this.el.getSize(); - this.monthPicker.setSize(size); - this.monthPicker.child('table').setSize(size); - - this.mpSelMonth = (this.activeDate || this.value).getMonth(); - this.updateMPMonth(this.mpSelMonth); - this.mpSelYear = (this.activeDate || this.value).getFullYear(); - this.updateMPYear(this.mpSelYear); - - this.monthPicker.slideIn('t', {duration:.2}); - }, - - - updateMPYear : function(y){ - this.mpyear = y; - var ys = this.mpYears.elements; - for(var i = 1; i <= 10; i++){ - var td = ys[i-1], y2; - if((i%2) == 0){ - y2 = y + Math.round(i * .5); - td.firstChild.innerHTML = y2; - td.xyear = y2; - }else{ - y2 = y - (5-Math.round(i * .5)); - td.firstChild.innerHTML = y2; - td.xyear = y2; - } - this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel'); - } - }, - - - updateMPMonth : function(sm){ - this.mpMonths.each(function(m, a, i){ - m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel'); - }); - }, - - - selectMPMonth: function(m){ - - }, - - - onMonthClick : function(e, t){ - e.stopEvent(); - var el = new Ext.Element(t), pn; - if(el.is('button.x-date-mp-cancel')){ - this.hideMonthPicker(); - } - else if(el.is('button.x-date-mp-ok')){ - var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate()); - if(d.getMonth() != this.mpSelMonth){ - - d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth(); - } - this.update(d); - this.hideMonthPicker(); - } - else if(pn = el.up('td.x-date-mp-month', 2)){ - this.mpMonths.removeClass('x-date-mp-sel'); - pn.addClass('x-date-mp-sel'); - this.mpSelMonth = pn.dom.xmonth; - } - else if(pn = el.up('td.x-date-mp-year', 2)){ - this.mpYears.removeClass('x-date-mp-sel'); - pn.addClass('x-date-mp-sel'); - this.mpSelYear = pn.dom.xyear; - } - else if(el.is('a.x-date-mp-prev')){ - this.updateMPYear(this.mpyear-10); - } - else if(el.is('a.x-date-mp-next')){ - this.updateMPYear(this.mpyear+10); - } - }, - - - onMonthDblClick : function(e, t){ - e.stopEvent(); - var el = new Ext.Element(t), pn; - if(pn = el.up('td.x-date-mp-month', 2)){ - this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate())); - this.hideMonthPicker(); - } - else if(pn = el.up('td.x-date-mp-year', 2)){ - this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate())); - this.hideMonthPicker(); - } - }, - - - hideMonthPicker : function(disableAnim){ - if(this.monthPicker){ - if(disableAnim === true){ - this.monthPicker.hide(); - }else{ - this.monthPicker.slideOut('t', {duration:.2}); - } - } - }, - - - showPrevMonth : function(e){ - this.update(this.activeDate.add("mo", -1)); - }, - - - showNextMonth : function(e){ - this.update(this.activeDate.add("mo", 1)); - }, - - - showPrevYear : function(){ - this.update(this.activeDate.add("y", -1)); - }, - - - showNextYear : function(){ - this.update(this.activeDate.add("y", 1)); - }, - - - handleMouseWheel : function(e){ - var delta = e.getWheelDelta(); - if(delta > 0){ - this.showPrevMonth(); - e.stopEvent(); - } else if(delta < 0){ - this.showNextMonth(); - e.stopEvent(); - } - }, - - - handleDateClick : function(e, t){ - e.stopEvent(); - if(t.dateValue && !Ext.fly(t.parentNode).hasClass("x-date-disabled")){ - this.setValue(new Date(t.dateValue)); - this.fireEvent("select", this, this.value); - } - }, - - - selectToday : function(){ - if(this.todayBtn && !this.todayBtn.disabled){ - this.setValue(new Date().clearTime()); - this.fireEvent("select", this, this.value); - } - }, - - - update : function(date, forceRefresh){ - var vd = this.activeDate; - this.activeDate = date; - if(!forceRefresh && vd && this.el){ - var t = date.getTime(); - if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){ - this.cells.removeClass("x-date-selected"); - this.cells.each(function(c){ - if(c.dom.firstChild.dateValue == t){ - c.addClass("x-date-selected"); - setTimeout(function(){ - try{c.dom.firstChild.focus();}catch(e){} - }, 50); - return false; - } - }); - return; - } - } - var days = date.getDaysInMonth(); - var firstOfMonth = date.getFirstDateOfMonth(); - var startingPos = firstOfMonth.getDay()-this.startDay; - - if(startingPos <= this.startDay){ - startingPos += 7; - } - - var pm = date.add("mo", -1); - var prevStart = pm.getDaysInMonth()-startingPos; - - var cells = this.cells.elements; - var textEls = this.textNodes; - days += startingPos; - - - var day = 86400000; - var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime(); - var today = new Date().clearTime().getTime(); - var sel = date.clearTime().getTime(); - var min = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY; - var max = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY; - var ddMatch = this.disabledDatesRE; - var ddText = this.disabledDatesText; - var ddays = this.disabledDays ? this.disabledDays.join("") : false; - var ddaysText = this.disabledDaysText; - var format = this.format; - - if(this.showToday){ - var td = new Date().clearTime(); - var disable = (td < min || td > max || - (ddMatch && format && ddMatch.test(td.dateFormat(format))) || - (ddays && ddays.indexOf(td.getDay()) != -1)); - - this.todayBtn.setDisabled(disable); - this.todayKeyListener[disable ? 'disable' : 'enable'](); - } - - var setCellClass = function(cal, cell){ - cell.title = ""; - var t = d.getTime(); - cell.firstChild.dateValue = t; - if(t == today){ - cell.className += " x-date-today"; - cell.title = cal.todayText; - } - if(t == sel){ - cell.className += " x-date-selected"; - setTimeout(function(){ - try{cell.firstChild.focus();}catch(e){} - }, 50); - } - - if(t < min) { - cell.className = " x-date-disabled"; - cell.title = cal.minText; - return; - } - if(t > max) { - cell.className = " x-date-disabled"; - cell.title = cal.maxText; - return; - } - if(ddays){ - if(ddays.indexOf(d.getDay()) != -1){ - cell.title = ddaysText; - cell.className = " x-date-disabled"; - } - } - if(ddMatch && format){ - var fvalue = d.dateFormat(format); - if(ddMatch.test(fvalue)){ - cell.title = ddText.replace("%0", fvalue); - cell.className = " x-date-disabled"; - } - } - }; - - var i = 0; - for(; i < startingPos; i++) { - textEls[i].innerHTML = (++prevStart); - d.setDate(d.getDate()+1); - cells[i].className = "x-date-prevday"; - setCellClass(this, cells[i]); - } - for(; i < days; i++){ - intDay = i - startingPos + 1; - textEls[i].innerHTML = (intDay); - d.setDate(d.getDate()+1); - cells[i].className = "x-date-active"; - setCellClass(this, cells[i]); - } - var extraDays = 0; - for(; i < 42; i++) { - textEls[i].innerHTML = (++extraDays); - d.setDate(d.getDate()+1); - cells[i].className = "x-date-nextday"; - setCellClass(this, cells[i]); - } - - this.mbtn.setText(this.monthNames[date.getMonth()] + " " + date.getFullYear()); - - if(!this.internalRender){ - var main = this.el.dom.firstChild; - var w = main.offsetWidth; - this.el.setWidth(w + this.el.getBorderWidth("lr")); - Ext.fly(main).setWidth(w); - this.internalRender = true; - - - - if(Ext.isOpera && !this.secondPass){ - main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + "px"; - this.secondPass = true; - this.update.defer(10, this, [date]); - } - } - }, - - - beforeDestroy : function() { - if(this.rendered){ - Ext.destroy(this.mbtn, this.todayBtn); - } - } - - -}); -Ext.reg('datepicker', Ext.DatePicker); +Ext.reg('listview', Ext.list.ListView); + + +Ext.ListView = Ext.list.ListView; +Ext.list.Column = Ext.extend(Object, { + + isColumn: true, + + + align: 'left', + + header: '', + + + width: null, + + + cls: '', + + + + + + constructor : function(c){ + if(!c.tpl){ + c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}'); + } + else if(Ext.isString(c.tpl)){ + c.tpl = new Ext.XTemplate(c.tpl); + } + + Ext.apply(this, c); + } +}); + +Ext.reg('lvcolumn', Ext.list.Column); + + +Ext.list.NumberColumn = Ext.extend(Ext.list.Column, { + + format: '0,000.00', + + constructor : function(c) { + c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':number("' + (c.format || this.format) + '")}'); + Ext.list.NumberColumn.superclass.constructor.call(this, c); + } +}); + +Ext.reg('lvnumbercolumn', Ext.list.NumberColumn); + + +Ext.list.DateColumn = Ext.extend(Ext.list.Column, { + format: 'm/d/Y', + constructor : function(c) { + c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':date("' + (c.format || this.format) + '")}'); + Ext.list.DateColumn.superclass.constructor.call(this, c); + } +}); +Ext.reg('lvdatecolumn', Ext.list.DateColumn); + + +Ext.list.BooleanColumn = Ext.extend(Ext.list.Column, { + + trueText: 'true', + + falseText: 'false', + + undefinedText: ' ', + + constructor : function(c) { + c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}'); + + var t = this.trueText, f = this.falseText, u = this.undefinedText; + c.tpl.format = function(v){ + if(v === undefined){ + return u; + } + if(!v || v === 'false'){ + return f; + } + return t; + }; + + Ext.list.DateColumn.superclass.constructor.call(this, c); + } +}); + +Ext.reg('lvbooleancolumn', Ext.list.BooleanColumn); +Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, { + + minPct: .05, + + constructor: function(config){ + Ext.apply(this, config); + Ext.list.ColumnResizer.superclass.constructor.call(this); + }, + init : function(listView){ + this.view = listView; + listView.on('render', this.initEvents, this); + }, + + initEvents : function(view){ + view.mon(view.innerHd, 'mousemove', this.handleHdMove, this); + this.tracker = new Ext.dd.DragTracker({ + onBeforeStart: this.onBeforeStart.createDelegate(this), + onStart: this.onStart.createDelegate(this), + onDrag: this.onDrag.createDelegate(this), + onEnd: this.onEnd.createDelegate(this), + tolerance: 3, + autoStart: 300 + }); + this.tracker.initEl(view.innerHd); + view.on('beforedestroy', this.tracker.destroy, this.tracker); + }, + + handleHdMove : function(e, t){ + var handleWidth = 5, + x = e.getPageX(), + header = e.getTarget('em', 3, true); + if(header){ + var region = header.getRegion(), + style = header.dom.style, + parentNode = header.dom.parentNode; + + if(x - region.left <= handleWidth && parentNode != parentNode.parentNode.firstChild){ + this.activeHd = Ext.get(parentNode.previousSibling.firstChild); + style.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize'; + } else if(region.right - x <= handleWidth && parentNode != parentNode.parentNode.lastChild.previousSibling){ + this.activeHd = header; + style.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize'; + } else{ + delete this.activeHd; + style.cursor = ''; + } + } + }, + + onBeforeStart : function(e){ + this.dragHd = this.activeHd; + return !!this.dragHd; + }, + + onStart: function(e){ + + var me = this, + view = me.view, + dragHeader = me.dragHd, + x = me.tracker.getXY()[0]; + + me.proxy = view.el.createChild({cls:'x-list-resizer'}); + me.dragX = dragHeader.getX(); + me.headerIndex = view.findHeaderIndex(dragHeader); + + me.headersDisabled = view.disableHeaders; + view.disableHeaders = true; + + me.proxy.setHeight(view.el.getHeight()); + me.proxy.setX(me.dragX); + me.proxy.setWidth(x - me.dragX); + + this.setBoundaries(); + + }, + + + setBoundaries: function(relativeX){ + var view = this.view, + headerIndex = this.headerIndex, + width = view.innerHd.getWidth(), + relativeX = view.innerHd.getX(), + minWidth = Math.ceil(width * this.minPct), + maxWidth = width - minWidth, + numColumns = view.columns.length, + headers = view.innerHd.select('em', true), + minX = minWidth + relativeX, + maxX = maxWidth + relativeX, + header; + + if (numColumns == 2) { + this.minX = minX; + this.maxX = maxX; + }else{ + header = headers.item(headerIndex + 2); + this.minX = headers.item(headerIndex).getX() + minWidth; + this.maxX = header ? header.getX() - minWidth : maxX; + if (headerIndex == 0) { + + this.minX = minX; + } else if (headerIndex == numColumns - 2) { + + this.maxX = maxX; + } + } + }, + + onDrag: function(e){ + var me = this, + cursorX = me.tracker.getXY()[0].constrain(me.minX, me.maxX); + + me.proxy.setWidth(cursorX - this.dragX); + }, + + onEnd: function(e){ + + var newWidth = this.proxy.getWidth(), + index = this.headerIndex, + view = this.view, + columns = view.columns, + width = view.innerHd.getWidth(), + newPercent = Math.ceil(newWidth * view.maxColumnWidth / width) / 100, + disabled = this.headersDisabled, + headerCol = columns[index], + otherCol = columns[index + 1], + totalPercent = headerCol.width + otherCol.width; + + this.proxy.remove(); + + headerCol.width = newPercent; + otherCol.width = totalPercent - newPercent; + + delete this.dragHd; + view.setHdWidths(); + view.refresh(); + + setTimeout(function(){ + view.disableHeaders = disabled; + }, 100); + } +}); + + +Ext.ListView.ColumnResizer = Ext.list.ColumnResizer; +Ext.list.Sorter = Ext.extend(Ext.util.Observable, { + + sortClasses : ["sort-asc", "sort-desc"], + + constructor: function(config){ + Ext.apply(this, config); + Ext.list.Sorter.superclass.constructor.call(this); + }, + + init : function(listView){ + this.view = listView; + listView.on('render', this.initEvents, this); + }, + + initEvents : function(view){ + view.mon(view.innerHd, 'click', this.onHdClick, this); + view.innerHd.setStyle('cursor', 'pointer'); + view.mon(view.store, 'datachanged', this.updateSortState, this); + this.updateSortState.defer(10, this, [view.store]); + }, + + updateSortState : function(store){ + var state = store.getSortState(); + if(!state){ + return; + } + this.sortState = state; + var cs = this.view.columns, sortColumn = -1; + for(var i = 0, len = cs.length; i < len; i++){ + if(cs[i].dataIndex == state.field){ + sortColumn = i; + break; + } + } + if(sortColumn != -1){ + var sortDir = state.direction; + this.updateSortIcon(sortColumn, sortDir); + } + }, + + updateSortIcon : function(col, dir){ + var sc = this.sortClasses; + var hds = this.view.innerHd.select('em').removeClass(sc); + hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]); + }, + + onHdClick : function(e){ + var hd = e.getTarget('em', 3); + if(hd && !this.view.disableHeaders){ + var index = this.view.findHeaderIndex(hd); + this.view.store.sort(this.view.columns[index].dataIndex); + } + } +}); + + +Ext.ListView.Sorter = Ext.list.Sorter; Ext.TabPanel = Ext.extend(Ext.Panel, { - monitorResize : true, deferredRender : true, - tabWidth: 120, + tabWidth : 120, - minTabWidth: 30, + minTabWidth : 30, - resizeTabs:false, + resizeTabs : false, - enableTabScroll: false, + enableTabScroll : false, scrollIncrement : 0, scrollRepeatInterval : 400, - scrollDuration : .35, + scrollDuration : 0.35, animScroll : true, - tabPosition: 'top', + tabPosition : 'top', - baseCls: 'x-tab-panel', + baseCls : 'x-tab-panel', autoTabs : false, - autoTabSelector:'div.x-tab', + autoTabSelector : 'div.x-tab', - activeTab : null, + activeTab : undefined, tabMargin : 2, - plain: false, + plain : false, wheelIncrement : 20, idDelimiter : '__', - itemCls : 'x-tab-item', + + itemCls : 'x-tab-item', - elements: 'body', - headerAsText: false, - frame: false, - hideBorders:true, + + elements : 'body', + headerAsText : false, + frame : false, + hideBorders :true, - initComponent : function(){ + + initComponent : function(){ this.frame = false; Ext.TabPanel.superclass.initComponent.call(this); this.addEvents( @@ -18797,9 +30657,12 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { 'contextmenu' ); - this.setLayout(new Ext.layout.CardLayout({ + + this.setLayout(new Ext.layout.CardLayout(Ext.apply({ + layoutOnCardChange: this.layoutOnTabChange, deferredRender: this.deferredRender - })); + }, this.layoutConfig))); + if(this.tabPosition == 'top'){ this.elements += ',header'; this.stripTarget = 'header'; @@ -18813,16 +30676,8 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { this.initItems(); }, - render : function(){ - Ext.TabPanel.superclass.render.apply(this, arguments); - if(this.activeTab !== undefined){ - var item = this.activeTab; - delete this.activeTab; - this.setActiveTab(item); - } - }, - - onRender : function(ct, position){ + + onRender : function(ct, position){ Ext.TabPanel.superclass.onRender.call(this, ct, position); if(this.plain){ @@ -18836,18 +30691,20 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}}); var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null); - this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}, beforeEl); + st.createChild({cls:'x-tab-strip-spacer'}, beforeEl); this.strip = new Ext.Element(this.stripWrap.dom.firstChild); + - this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge'}); + this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge', cn: [{tag: 'span', cls: 'x-tab-strip-text', cn: ' '}]}); this.strip.createChild({cls:'x-clear'}); this.body.addClass('x-tab-panel-body-'+this.tabPosition); + if(!this.itemTpl){ var tt = new Ext.Template( - '
  • ', - '', + '
  • ', + '', '{text}', '
  • ' ); @@ -18859,28 +30716,37 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { this.items.each(this.initTab, this); }, - afterRender : function(){ + + afterRender : function(){ Ext.TabPanel.superclass.afterRender.call(this); if(this.autoTabs){ this.readTabs(false); } - }, - - initEvents : function(){ - Ext.TabPanel.superclass.initEvents.call(this); - this.on('add', this.onAdd, this); - this.on('remove', this.onRemove, this); - - this.strip.on('mousedown', this.onStripMouseDown, this); - this.strip.on('contextmenu', this.onStripContextMenu, this); - if(this.enableTabScroll){ - this.strip.on('mousewheel', this.onWheel, this); + if(this.activeTab !== undefined){ + var item = Ext.isObject(this.activeTab) ? this.activeTab : this.items.get(this.activeTab); + delete this.activeTab; + this.setActiveTab(item); } }, - findTargets : function(e){ - var item = null; - var itemEl = e.getTarget('li', this.strip); + + initEvents : function(){ + Ext.TabPanel.superclass.initEvents.call(this); + this.mon(this.strip, { + scope: this, + mousedown: this.onStripMouseDown, + contextmenu: this.onStripContextMenu + }); + if(this.enableTabScroll){ + this.mon(this.strip, 'mousewheel', this.onWheel, this); + } + }, + + + findTargets : function(e){ + var item = null, + itemEl = e.getTarget('li:not(.x-tab-edge)', this.strip); + if(itemEl){ item = this.getComponent(itemEl.id.split(this.idDelimiter)[1]); if(item.disabled){ @@ -18898,14 +30764,18 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { }; }, - onStripMouseDown : function(e){ - if(e.button != 0){ + + onStripMouseDown : function(e){ + if(e.button !== 0){ return; } e.preventDefault(); var t = this.findTargets(e); if(t.close){ - this.remove(t.item); + if (t.item.fireEvent('beforeclose', t.item) !== false) { + t.item.fireEvent('close', t.item); + this.remove(t.item); + } return; } if(t.item && t.item != this.activeTab){ @@ -18913,7 +30783,8 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { } }, - onStripContextMenu : function(e){ + + onStripContextMenu : function(e){ e.preventDefault(); var t = this.findTargets(e); if(t.item){ @@ -18930,18 +30801,60 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { } var tabs = this.el.query(this.autoTabSelector); for(var i = 0, len = tabs.length; i < len; i++){ - var tab = tabs[i]; - var title = tab.getAttribute('title'); + var tab = tabs[i], + title = tab.getAttribute('title'); tab.removeAttribute('title'); this.add({ title: title, - el: tab + contentEl: tab }); } }, - initTab : function(item, index){ - var before = this.strip.dom.childNodes[index]; + + initTab : function(item, index){ + var before = this.strip.dom.childNodes[index], + p = this.getTemplateArgs(item), + el = before ? + this.itemTpl.insertBefore(before, p) : + this.itemTpl.append(this.strip, p), + cls = 'x-tab-strip-over', + tabEl = Ext.get(el); + + tabEl.hover(function(){ + if(!item.disabled){ + tabEl.addClass(cls); + } + }, function(){ + tabEl.removeClass(cls); + }); + + if(item.tabTip){ + tabEl.child('span.x-tab-strip-text', true).qtip = item.tabTip; + } + item.tabEl = el; + + + tabEl.select('a').on('click', function(e){ + if(!e.getPageX()){ + this.onStripMouseDown(e); + } + }, this, {preventDefault: true}); + + item.on({ + scope: this, + disable: this.onItemDisabled, + enable: this.onItemEnabled, + titlechange: this.onItemTitleChanged, + iconchange: this.onItemIconChanged, + beforeshow: this.onBeforeShowItem + }); + }, + + + + + getTemplateArgs : function(item) { var cls = item.closable ? 'x-tab-strip-closable' : ''; if(item.disabled){ cls += ' x-item-disabled'; @@ -18952,37 +30865,27 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { if(item.tabCls){ cls += ' ' + item.tabCls; } - - var p = { + + return { id: this.id + this.idDelimiter + item.getItemId(), text: item.title, cls: cls, iconCls: item.iconCls || '' }; - var el = before ? - this.itemTpl.insertBefore(before, p) : - this.itemTpl.append(this.strip, p); - - Ext.fly(el).addClassOnOver('x-tab-strip-over'); - - if(item.tabTip){ - Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip; - } - item.on('disable', this.onItemDisabled, this); - item.on('enable', this.onItemEnabled, this); - item.on('titlechange', this.onItemTitleChanged, this); - item.on('beforeshow', this.onBeforeShowItem, this); }, - onAdd : function(tp, item, index){ - this.initTab(item, index); - if(this.items.getCount() == 1){ - this.syncSize(); + + onAdd : function(c){ + Ext.TabPanel.superclass.onAdd.call(this, c); + if(this.rendered){ + var items = this.items; + this.initTab(c, items.indexOf(c)); + this.delegateUpdates(); } - this.delegateUpdates(); }, - onBeforeAdd : function(item){ + + onBeforeAdd : function(item){ var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item); if(existing){ this.setActiveTab(item); @@ -18994,32 +30897,47 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { item.border = (item.border === true); }, - onRemove : function(tp, item){ - Ext.removeNode(this.getTabEl(item)); - this.stack.remove(item); - item.un('disable', this.onItemDisabled, this); - item.un('enable', this.onItemEnabled, this); - item.un('titlechange', this.onItemTitleChanged, this); - item.un('beforeshow', this.onBeforeShowItem, this); - if(item == this.activeTab){ + + onRemove : function(c){ + var te = Ext.get(c.tabEl); + + if(te){ + te.select('a').removeAllListeners(); + Ext.destroy(te); + } + Ext.TabPanel.superclass.onRemove.call(this, c); + this.stack.remove(c); + delete c.tabEl; + c.un('disable', this.onItemDisabled, this); + c.un('enable', this.onItemEnabled, this); + c.un('titlechange', this.onItemTitleChanged, this); + c.un('iconchange', this.onItemIconChanged, this); + c.un('beforeshow', this.onBeforeShowItem, this); + if(c == this.activeTab){ var next = this.stack.next(); if(next){ this.setActiveTab(next); - }else{ + }else if(this.items.getCount() > 0){ this.setActiveTab(0); + }else{ + this.setActiveTab(null); } } - this.delegateUpdates(); + if(!this.destroying){ + this.delegateUpdates(); + } }, - onBeforeShowItem : function(item){ + + onBeforeShowItem : function(item){ if(item != this.activeTab){ this.setActiveTab(item); return false; } }, - onItemDisabled : function(item){ + + onItemDisabled : function(item){ var el = this.getTabEl(item); if(el){ Ext.fly(el).addClass('x-item-disabled'); @@ -19027,14 +30945,16 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { this.stack.remove(item); }, - onItemEnabled : function(item){ + + onItemEnabled : function(item){ var el = this.getTabEl(item); if(el){ Ext.fly(el).removeClass('x-item-disabled'); } }, - onItemTitleChanged : function(item){ + + onItemTitleChanged : function(item){ var el = this.getTabEl(item); if(el){ Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title; @@ -19042,12 +30962,23 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { }, - getTabEl : function(item){ - var itemId = (typeof item === 'number')?this.items.items[item].getItemId() : item.getItemId(); - return document.getElementById(this.id+this.idDelimiter+itemId); + onItemIconChanged : function(item, iconCls, oldCls){ + var el = this.getTabEl(item); + if(el){ + el = Ext.get(el); + el.child('span.x-tab-strip-text').replaceClass(oldCls, iconCls); + el[Ext.isEmpty(iconCls) ? 'removeClass' : 'addClass']('x-tab-with-icon'); + } }, - onResize : function(){ + + getTabEl : function(item){ + var c = this.getComponent(item); + return c ? c.tabEl : null; + }, + + + onResize : function(){ Ext.TabPanel.superclass.onResize.apply(this, arguments); this.delegateUpdates(); }, @@ -19084,38 +31015,45 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { } }, - delegateUpdates : function(){ + + delegateUpdates : function(){ + var rendered = this.rendered; if(this.suspendUpdates){ return; } - if(this.resizeTabs && this.rendered){ + if(this.resizeTabs && rendered){ this.autoSizeTabs(); } - if(this.enableTabScroll && this.rendered){ + if(this.enableTabScroll && rendered){ this.autoScrollTabs(); } }, - autoSizeTabs : function(){ - var count = this.items.length; - var ce = this.tabPosition != 'bottom' ? 'header' : 'footer'; - var ow = this[ce].dom.offsetWidth; - var aw = this[ce].dom.clientWidth; + + autoSizeTabs : function(){ + var count = this.items.length, + ce = this.tabPosition != 'bottom' ? 'header' : 'footer', + ow = this[ce].dom.offsetWidth, + aw = this[ce].dom.clientWidth; - if(!this.resizeTabs || count < 1 || !aw){ return; + if(!this.resizeTabs || count < 1 || !aw){ + return; } - var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); this.lastTabWidth = each; - var lis = this.stripWrap.dom.getElementsByTagName('li'); - for(var i = 0, len = lis.length-1; i < len; i++) { var li = lis[i]; - var inner = li.childNodes[1].firstChild.firstChild; - var tw = li.offsetWidth; - var iw = inner.offsetWidth; + var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); + this.lastTabWidth = each; + var lis = this.strip.query('li:not(.x-tab-edge)'); + for(var i = 0, len = lis.length; i < len; i++) { + var li = lis[i], + inner = Ext.fly(li).child('.x-tab-strip-inner', true), + tw = li.offsetWidth, + iw = inner.offsetWidth; inner.style.width = (each - (tw-iw)) + 'px'; } }, - adjustBodyWidth : function(w){ + + adjustBodyWidth : function(w){ if(this.header){ this.header.setWidth(w); } @@ -19128,7 +31066,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { setActiveTab : function(item){ item = this.getComponent(item); - if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){ + if(this.fireEvent('beforetabchange', this, item, this.activeTab) === false){ return; } if(!this.rendered){ @@ -19141,22 +31079,20 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { if(oldEl){ Ext.fly(oldEl).removeClass('x-tab-strip-active'); } - this.activeTab.fireEvent('deactivate', this.activeTab); } - var el = this.getTabEl(item); - Ext.fly(el).addClass('x-tab-strip-active'); this.activeTab = item; - this.stack.add(item); + if(item){ + var el = this.getTabEl(item); + Ext.fly(el).addClass('x-tab-strip-active'); + this.stack.add(item); - this.layout.setActiveItem(item); - if(this.layoutOnTabChange && item.doLayout){ - item.doLayout(); + this.layout.setActiveItem(item); + + this.delegateUpdates(); + if(this.scrolling){ + this.scrollToTab(item, this.animScroll); + } } - if(this.scrolling){ - this.scrollToTab(item, this.animScroll); - } - - item.fireEvent('activate', item); this.fireEvent('tabchange', this, item); } }, @@ -19171,36 +31107,41 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { return this.getComponent(item); }, - autoScrollTabs : function(){ - var count = this.items.length; - var ow = this.header.dom.offsetWidth; - var tw = this.header.dom.clientWidth; + + autoScrollTabs : function(){ + this.pos = this.tabPosition=='bottom' ? this.footer : this.header; + var count = this.items.length, + ow = this.pos.dom.offsetWidth, + tw = this.pos.dom.clientWidth, + wrap = this.stripWrap, + wd = wrap.dom, + cw = wd.offsetWidth, + pos = this.getScrollPos(), + l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; - var wrap = this.stripWrap; - var wd = wrap.dom; - var cw = wd.offsetWidth; - var pos = this.getScrollPos(); - var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; - - if(!this.enableTabScroll || count < 1 || cw < 20){ return; + if(!this.enableTabScroll || cw < 20){ + return; } - if(l <= tw){ + if(count == 0 || l <= tw){ + wd.scrollLeft = 0; wrap.setWidth(tw); if(this.scrolling){ this.scrolling = false; - this.header.removeClass('x-tab-scrolling'); + this.pos.removeClass('x-tab-scrolling'); this.scrollLeft.hide(); this.scrollRight.hide(); - if(Ext.isAir){ + + if(Ext.isAir || Ext.isWebKit){ wd.style.marginLeft = ''; wd.style.marginRight = ''; } } }else{ if(!this.scrolling){ - this.header.addClass('x-tab-scrolling'); - if(Ext.isAir){ + this.pos.addClass('x-tab-scrolling'); + + if(Ext.isAir || Ext.isWebKit){ wd.style.marginLeft = '18px'; wd.style.marginRight = '18px'; } @@ -19216,17 +31157,22 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { } } this.scrolling = true; - if(pos > (l-tw)){ wd.scrollLeft = l-tw; - }else{ this.scrollToTab(this.activeTab, false); + if(pos > (l-tw)){ + wd.scrollLeft = l-tw; + }else{ + this.scrollToTab(this.activeTab, false); } this.updateScrollButtons(); } }, - createScrollers : function(){ + + createScrollers : function(){ + this.pos.addClass('x-tab-scrolling-' + this.tabPosition); var h = this.stripWrap.dom.offsetHeight; - var sl = this.header.insertFirst({ + + var sl = this.pos.insertFirst({ cls:'x-tab-scroller-left' }); sl.setHeight(h); @@ -19238,7 +31184,8 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { }); this.scrollLeft = sl; - var sr = this.header.insertFirst({ + + var sr = this.pos.insertFirst({ cls:'x-tab-scroller-right' }); sr.setHeight(h); @@ -19251,34 +31198,42 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { this.scrollRight = sr; }, - getScrollWidth : function(){ + + getScrollWidth : function(){ return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos(); }, - getScrollPos : function(){ + + getScrollPos : function(){ return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0; }, - getScrollArea : function(){ + + getScrollArea : function(){ return parseInt(this.stripWrap.dom.clientWidth, 10) || 0; }, - getScrollAnim : function(){ + + getScrollAnim : function(){ return {duration:this.scrollDuration, callback: this.updateScrollButtons, scope: this}; }, - getScrollIncrement : function(){ + + getScrollIncrement : function(){ return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth+2 : 100); }, scrollToTab : function(item, animate){ - if(!item){ return; } - var el = this.getTabEl(item); - var pos = this.getScrollPos(), area = this.getScrollArea(); - var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos; - var right = left + el.offsetWidth; + if(!item){ + return; + } + var el = this.getTabEl(item), + pos = this.getScrollPos(), + area = this.getScrollArea(), + left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos, + right = left + el.offsetWidth; if(left < pos){ this.scrollTo(left, animate); }else if(right > (pos + area)){ @@ -19286,7 +31241,8 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { } }, - scrollTo : function(pos, animate){ + + scrollTo : function(pos, animate){ this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false); if(!animate){ this.updateScrollButtons(); @@ -19297,9 +31253,9 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { var d = e.getWheelDelta()*this.wheelIncrement*-1; e.stopEvent(); - var pos = this.getScrollPos(); - var newpos = pos + d; - var sw = this.getScrollWidth()-this.getScrollArea(); + var pos = this.getScrollPos(), + newpos = pos + d, + sw = this.getScrollWidth()-this.getScrollArea(); var s = Math.max(0, Math.min(sw, newpos)); if(s != pos){ @@ -19307,27 +31263,38 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { } }, - onScrollRight : function(){ - var sw = this.getScrollWidth()-this.getScrollArea(); - var pos = this.getScrollPos(); - var s = Math.min(sw, pos + this.getScrollIncrement()); + + onScrollRight : function(){ + var sw = this.getScrollWidth()-this.getScrollArea(), + pos = this.getScrollPos(), + s = Math.min(sw, pos + this.getScrollIncrement()); if(s != pos){ this.scrollTo(s, this.animScroll); } }, - onScrollLeft : function(){ - var pos = this.getScrollPos(); - var s = Math.max(0, pos - this.getScrollIncrement()); + + onScrollLeft : function(){ + var pos = this.getScrollPos(), + s = Math.max(0, pos - this.getScrollIncrement()); if(s != pos){ this.scrollTo(s, this.animScroll); } }, - updateScrollButtons : function(){ + + updateScrollButtons : function(){ var pos = this.getScrollPos(); - this.scrollLeft[pos == 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled'); + this.scrollLeft[pos === 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled'); this.scrollRight[pos >= (this.getScrollWidth()-this.getScrollArea()) ? 'addClass' : 'removeClass']('x-tab-scroller-right-disabled'); + }, + + + beforeDestroy : function() { + Ext.destroy(this.leftRepeater, this.rightRepeater); + this.deleteMembers('strip', 'edge', 'scrollLeft', 'scrollRight', 'stripWrap'); + this.activeTab = null; + Ext.TabPanel.superclass.beforeDestroy.apply(this); } @@ -19341,13 +31308,14 @@ Ext.TabPanel = Ext.extend(Ext.Panel, { - + }); Ext.reg('tabpanel', Ext.TabPanel); Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab; + Ext.TabPanel.AccessStack = function(){ var items = []; return { @@ -19374,34 +31342,32 @@ Ext.TabPanel.AccessStack = function(){ }; }; - - - -Ext.Button = Ext.extend(Ext.Component, { +Ext.Button = Ext.extend(Ext.BoxComponent, { hidden : false, disabled : false, pressed : false, - - enableToggle: false, + enableToggle : false, - menuAlign : "tl-bl?", + menuAlign : 'tl-bl?', + type : 'button', - menuClassTarget: 'tr', + + menuClassTarget : 'tr:nth(2)', clickEvent : 'click', @@ -19412,19 +31378,50 @@ Ext.Button = Ext.extend(Ext.Component, { tooltipType : 'qtip', - buttonSelector : "button:first", + + buttonSelector : 'button:first-child', + scale : 'small', + + + + + iconAlign : 'left', + + + arrowAlign : 'right', + + + + initComponent : function(){ + if(this.menu){ + + + if (Ext.isArray(this.menu)){ + this.menu = { items: this.menu }; + } + + + + if (Ext.isObject(this.menu)){ + this.menu.ownerCt = this; + } + + this.menu = Ext.menu.MenuMgr.get(this.menu); + this.menu.ownerCt = undefined; + } + Ext.Button.superclass.initComponent.call(this); this.addEvents( - "click", + 'click', - "toggle", + 'toggle', 'mouseover', @@ -19438,138 +31435,185 @@ Ext.Button = Ext.extend(Ext.Component, { 'menutriggerout' ); - if(this.menu){ - this.menu = Ext.menu.MenuMgr.get(this.menu); - } - if(typeof this.toggleGroup === 'string'){ + + if(Ext.isString(this.toggleGroup)){ this.enableToggle = true; } }, - onRender : function(ct, position){ + + getTemplateArgs : function(){ + return [this.type, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass(), this.cls, this.id]; + }, + + + setButtonClass : function(){ + if(this.useSetClass){ + if(!Ext.isEmpty(this.oldCls)){ + this.el.removeClass([this.oldCls, 'x-btn-pressed']); + } + this.oldCls = (this.iconCls || this.icon) ? (this.text ? 'x-btn-text-icon' : 'x-btn-icon') : 'x-btn-noicon'; + this.el.addClass([this.oldCls, this.pressed ? 'x-btn-pressed' : null]); + } + }, + + + getMenuClass : function(){ + return this.menu ? (this.arrowAlign != 'bottom' ? 'x-btn-arrow' : 'x-btn-arrow-bottom') : ''; + }, + + + onRender : function(ct, position){ if(!this.template){ if(!Ext.Button.buttonTemplate){ - Ext.Button.buttonTemplate = new Ext.Template( - '', - '', - "
      
    "); + + Ext.Button.buttonTemplate = new Ext.Template( + '', + '', + '', + '', + '
      
      
      
    '); + Ext.Button.buttonTemplate.compile(); } this.template = Ext.Button.buttonTemplate; } - var btn, targs = [this.text || ' ', this.type]; + + var btn, targs = this.getTemplateArgs(); if(position){ btn = this.template.insertBefore(position, targs, true); }else{ btn = this.template.append(ct, targs, true); } - var btnEl = btn.child(this.buttonSelector); - btnEl.on('focus', this.onFocus, this); - btnEl.on('blur', this.onBlur, this); + + this.btnEl = btn.child(this.buttonSelector); + this.mon(this.btnEl, { + scope: this, + focus: this.onFocus, + blur: this.onBlur + }); - this.initButtonEl(btn, btnEl); + this.initButtonEl(btn, this.btnEl); - if(this.menu){ - this.el.child(this.menuClassTarget).addClass("x-btn-with-menu"); - } Ext.ButtonToggleMgr.register(this); }, - initButtonEl : function(btn, btnEl){ - + + initButtonEl : function(btn, btnEl){ this.el = btn; - btn.addClass("x-btn"); - - if(this.icon){ - btnEl.setStyle('background-image', 'url(' +this.icon +')'); - } - if(this.iconCls){ - btnEl.addClass(this.iconCls); - if(!this.cls){ - btn.addClass(this.text ? 'x-btn-text-icon' : 'x-btn-icon'); - } - } - if(this.tabIndex !== undefined){ + this.setIcon(this.icon); + this.setText(this.text); + this.setIconClass(this.iconCls); + if(Ext.isDefined(this.tabIndex)){ btnEl.dom.tabIndex = this.tabIndex; } if(this.tooltip){ - if(typeof this.tooltip == 'object'){ - Ext.QuickTips.register(Ext.apply({ - target: btnEl.id - }, this.tooltip)); - } else { - btnEl.dom[this.tooltipType] = this.tooltip; - } - } - - if(this.pressed){ - this.el.addClass("x-btn-pressed"); + this.setTooltip(this.tooltip, true); } if(this.handleMouseEvents){ - btn.on("mouseover", this.onMouseOver, this); - btn.on("mousedown", this.onMouseDown, this); + this.mon(btn, { + scope: this, + mouseover: this.onMouseOver, + mousedown: this.onMouseDown + }); + + + } if(this.menu){ - this.menu.on("show", this.onMenuShow, this); - this.menu.on("hide", this.onMenuHide, this); - } - - if(this.id){ - this.el.dom.id = this.el.id = this.id; + this.mon(this.menu, { + scope: this, + show: this.onMenuShow, + hide: this.onMenuHide + }); } if(this.repeat){ - var repeater = new Ext.util.ClickRepeater(btn, - typeof this.repeat == "object" ? this.repeat : {} - ); - repeater.on("click", this.onClick, this); - } - - btn.on(this.clickEvent, this.onClick, this); - }, - - afterRender : function(){ - Ext.Button.superclass.afterRender.call(this); - if(Ext.isIE6){ - this.autoWidth.defer(1, this); + var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {}); + this.mon(repeater, 'click', this.onRepeatClick, this); }else{ - this.autoWidth(); + this.mon(btn, this.clickEvent, this.onClick, this); } }, + afterRender : function(){ + Ext.Button.superclass.afterRender.call(this); + this.useSetClass = true; + this.setButtonClass(); + this.doc = Ext.getDoc(); + this.doAutoWidth(); + }, + + setIconClass : function(cls){ - if(this.el){ - this.el.child(this.buttonSelector).replaceClass(this.iconCls, cls); - } this.iconCls = cls; + if(this.el){ + this.btnEl.dom.className = ''; + this.btnEl.addClass(['x-btn-text', cls || '']); + this.setButtonClass(); + } + return this; }, - beforeDestroy: function(){ - if(this.rendered){ - var btn = this.el.child(this.buttonSelector); - if(btn){ - btn.removeAllListeners(); - } - } - if(this.menu){ - Ext.destroy(this.menu); + + setTooltip : function(tooltip, initial){ + if(this.rendered){ + if(!initial){ + this.clearTip(); + } + if(Ext.isObject(tooltip)){ + Ext.QuickTips.register(Ext.apply({ + target: this.btnEl.id + }, tooltip)); + this.tooltip = tooltip; + }else{ + this.btnEl.dom[this.tooltipType] = tooltip; + } + }else{ + this.tooltip = tooltip; + } + return this; + }, + + + clearTip : function(){ + if(Ext.isObject(this.tooltip)){ + Ext.QuickTips.unregister(this.btnEl); } }, - onDestroy : function(){ + + beforeDestroy : function(){ if(this.rendered){ + this.clearTip(); + } + if(this.menu && this.destroyMenu !== false) { + Ext.destroy(this.btnEl, this.menu); + } + Ext.destroy(this.repeater); + }, + + + onDestroy : function(){ + if(this.rendered){ + this.doc.un('mouseover', this.monitorMouseOver, this); + this.doc.un('mouseup', this.onMouseUp, this); + delete this.doc; + delete this.btnEl; Ext.ButtonToggleMgr.unregister(this); } + Ext.Button.superclass.onDestroy.call(this); }, - autoWidth : function(){ - if(this.el){ - this.el.setWidth("auto"); + + doAutoWidth : function(){ + if(this.autoWidth !== false && this.el && this.text && this.width === undefined){ + this.el.setWidth('auto'); if(Ext.isIE7 && Ext.isStrict){ - var ib = this.el.child(this.buttonSelector); + var ib = this.btnEl; if(ib && ib.getWidth() > 20){ ib.clip(); ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); @@ -19587,15 +31631,28 @@ Ext.Button = Ext.extend(Ext.Component, { setHandler : function(handler, scope){ this.handler = handler; this.scope = scope; + return this; }, setText : function(text){ this.text = text; if(this.el){ - this.el.child("td.x-btn-center " + this.buttonSelector).update(text); + this.btnEl.update(text || ' '); + this.setButtonClass(); } - this.autoWidth(); + this.doAutoWidth(); + return this; + }, + + + setIcon : function(icon){ + this.icon = icon; + if(this.el){ + this.btnEl.setStyle('background-image', icon ? 'url(' + icon + ')' : ''); + this.setButtonClass(); + } + return this; }, @@ -19604,52 +31661,53 @@ Ext.Button = Ext.extend(Ext.Component, { }, - toggle : function(state){ - state = state === undefined ? !this.pressed : state; + toggle : function(state, suppressEvent){ + state = state === undefined ? !this.pressed : !!state; if(state != this.pressed){ - if(state){ - this.el.addClass("x-btn-pressed"); - this.pressed = true; - this.fireEvent("toggle", this, true); - }else{ - this.el.removeClass("x-btn-pressed"); - this.pressed = false; - this.fireEvent("toggle", this, false); + if(this.rendered){ + this.el[state ? 'addClass' : 'removeClass']('x-btn-pressed'); } - if(this.toggleHandler){ - this.toggleHandler.call(this.scope || this, this, state); + this.pressed = state; + if(!suppressEvent){ + this.fireEvent('toggle', this, state); + if(this.toggleHandler){ + this.toggleHandler.call(this.scope || this, this, state); + } } } + return this; }, - focus : function(){ - this.el.child(this.buttonSelector).focus(); + onDisable : function(){ + this.onDisableChange(true); }, - onDisable : function(){ - if(this.el){ - if(!Ext.isIE6 || !this.text){ - this.el.addClass(this.disabledClass); - } - this.el.dom.disabled = true; - } - this.disabled = true; + + onEnable : function(){ + this.onDisableChange(false); }, - onEnable : function(){ + onDisableChange : function(disabled){ if(this.el){ if(!Ext.isIE6 || !this.text){ - this.el.removeClass(this.disabledClass); + this.el[disabled ? 'addClass' : 'removeClass'](this.disabledClass); } - this.el.dom.disabled = false; + this.el.dom.disabled = disabled; } - this.disabled = false; + this.disabled = disabled; }, showMenu : function(){ - if(this.menu){ + if(this.rendered && this.menu){ + if(this.tooltip){ + Ext.QuickTips.getQuickTip().cancelShow(this.btnEl); + } + if(this.menu.isVisible()){ + this.menu.hide(); + } + this.menu.ownerCt = this; this.menu.show(this.el, this.menuAlign); } return this; @@ -19657,7 +31715,7 @@ Ext.Button = Ext.extend(Ext.Component, { hideMenu : function(){ - if(this.menu){ + if(this.hasVisibleMenu()){ this.menu.hide(); } return this; @@ -19665,45 +31723,60 @@ Ext.Button = Ext.extend(Ext.Component, { hasVisibleMenu : function(){ - return this.menu && this.menu.isVisible(); + return this.menu && this.menu.ownerCt == this && this.menu.isVisible(); + }, + + + onRepeatClick : function(repeat, e){ + this.onClick(e); }, - onClick : function(e){ + + onClick : function(e){ if(e){ e.preventDefault(); } - if(e.button != 0){ + if(e.button !== 0){ return; } if(!this.disabled){ - if(this.enableToggle && (this.allowDepress !== false || !this.pressed)){ - this.toggle(); - } - if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + this.doToggle(); + if(this.menu && !this.hasVisibleMenu() && !this.ignoreNextClick){ this.showMenu(); } - this.fireEvent("click", this, e); + this.fireEvent('click', this, e); if(this.handler){ - this.handler.call(this.scope || this, this, e); + + this.handler.call(this.scope || this, this, e); } } }, + + + doToggle: function(){ + if (this.enableToggle && (this.allowDepress !== false || !this.pressed)) { + this.toggle(); + } + }, - isMenuTriggerOver : function(e, internal){ + + isMenuTriggerOver : function(e, internal){ return this.menu && !internal; }, - isMenuTriggerOut : function(e, internal){ + + isMenuTriggerOut : function(e, internal){ return this.menu && !internal; }, - onMouseOver : function(e){ + + onMouseOver : function(e){ if(!this.disabled){ var internal = e.within(this.el, true); if(!internal){ - this.el.addClass("x-btn-over"); + this.el.addClass('x-btn-over'); if(!this.monitoringMouseOver){ - Ext.getDoc().on('mouseover', this.monitorMouseOver, this); + this.doc.on('mouseover', this.monitorMouseOver, this); this.monitoringMouseOver = true; } this.fireEvent('mouseover', this, e); @@ -19714,70 +31787,99 @@ Ext.Button = Ext.extend(Ext.Component, { } }, - monitorMouseOver : function(e){ + + monitorMouseOver : function(e){ if(e.target != this.el.dom && !e.within(this.el)){ if(this.monitoringMouseOver){ - Ext.getDoc().un('mouseover', this.monitorMouseOver, this); + this.doc.un('mouseover', this.monitorMouseOver, this); this.monitoringMouseOver = false; } this.onMouseOut(e); } }, - onMouseOut : function(e){ + + onMouseOut : function(e){ var internal = e.within(this.el) && e.target != this.el.dom; - this.el.removeClass("x-btn-over"); + this.el.removeClass('x-btn-over'); this.fireEvent('mouseout', this, e); if(this.isMenuTriggerOut(e, internal)){ this.fireEvent('menutriggerout', this, this.menu, e); } }, - onFocus : function(e){ - if(!this.disabled){ - this.el.addClass("x-btn-focus"); - } - }, - onBlur : function(e){ - this.el.removeClass("x-btn-focus"); + + focus : function() { + this.btnEl.focus(); }, - getClickEl : function(e, isUp){ + blur : function() { + this.btnEl.blur(); + }, + + + onFocus : function(e){ + if(!this.disabled){ + this.el.addClass('x-btn-focus'); + } + }, + + onBlur : function(e){ + this.el.removeClass('x-btn-focus'); + }, + + + getClickEl : function(e, isUp){ return this.el; }, - onMouseDown : function(e){ - if(!this.disabled && e.button == 0){ - this.getClickEl(e).addClass("x-btn-click"); - Ext.getDoc().on('mouseup', this.onMouseUp, this); + + onMouseDown : function(e){ + if(!this.disabled && e.button === 0){ + this.getClickEl(e).addClass('x-btn-click'); + this.doc.on('mouseup', this.onMouseUp, this); } }, - onMouseUp : function(e){ - if(e.button == 0){ - this.getClickEl(e, true).removeClass("x-btn-click"); - Ext.getDoc().un('mouseup', this.onMouseUp, this); + + onMouseUp : function(e){ + if(e.button === 0){ + this.getClickEl(e, true).removeClass('x-btn-click'); + this.doc.un('mouseup', this.onMouseUp, this); } }, - onMenuShow : function(e){ - this.ignoreNextClick = 0; - this.el.addClass("x-btn-menu-active"); - this.fireEvent('menushow', this, this.menu); + + onMenuShow : function(e){ + if(this.menu.ownerCt == this){ + this.menu.ownerCt = this; + this.ignoreNextClick = 0; + this.el.addClass('x-btn-menu-active'); + this.fireEvent('menushow', this, this.menu); + } }, - onMenuHide : function(e){ - this.el.removeClass("x-btn-menu-active"); - this.ignoreNextClick = this.restoreClick.defer(250, this); - this.fireEvent('menuhide', this, this.menu); + + onMenuHide : function(e){ + if(this.menu.ownerCt == this){ + this.el.removeClass('x-btn-menu-active'); + this.ignoreNextClick = this.restoreClick.defer(250, this); + this.fireEvent('menuhide', this, this.menu); + delete this.menu.ownerCt; + } }, - restoreClick : function(){ + + restoreClick : function(){ this.ignoreNextClick = 0; } - - + + + + + }); Ext.reg('button', Ext.Button); + Ext.ButtonToggleMgr = function(){ var groups = {}; @@ -19802,7 +31904,7 @@ Ext.ButtonToggleMgr = function(){ g = groups[btn.toggleGroup] = []; } g.push(btn); - btn.on("toggle", toggleGroup); + btn.on('toggle', toggleGroup); }, unregister : function(btn){ @@ -19812,764 +31914,687 @@ Ext.ButtonToggleMgr = function(){ var g = groups[btn.toggleGroup]; if(g){ g.remove(btn); - btn.un("toggle", toggleGroup); + btn.un('toggle', toggleGroup); } + }, + + + getPressed : function(group){ + var g = groups[group]; + if(g){ + for(var i = 0, len = g.length; i < len; i++){ + if(g[i].pressed === true){ + return g[i]; + } + } + } + return null; } }; }(); - -Ext.SplitButton = Ext.extend(Ext.Button, { + +Ext.SplitButton = Ext.extend(Ext.Button, { - arrowSelector : 'button:last', - + arrowSelector : 'em', + split: true, + - initComponent : function(){ - Ext.SplitButton.superclass.initComponent.call(this); - - this.addEvents("arrowclick"); - }, - - - onRender : function(ct, position){ + initComponent : function(){ + Ext.SplitButton.superclass.initComponent.call(this); - var tpl = new Ext.Template( - '
    ', - '', - '', - "
     
    ", - '', - '', - "
     
    " - ); - var btn, targs = [this.text || ' ', this.type]; - if(position){ - btn = tpl.insertBefore(position, targs, true); - }else{ - btn = tpl.append(ct, targs, true); - } - var btnEl = btn.child(this.buttonSelector); - - this.initButtonEl(btn, btnEl); - this.arrowBtnTable = btn.child("table:last"); - if(this.arrowTooltip){ - btn.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip; - } - }, - - - autoWidth : function(){ - if(this.el){ - var tbl = this.el.child("table:first"); - var tbl2 = this.el.child("table:last"); - this.el.setWidth("auto"); - tbl.setWidth("auto"); - if(Ext.isIE7 && Ext.isStrict){ - var ib = this.el.child(this.buttonSelector); - if(ib && ib.getWidth() > 20){ - ib.clip(); - ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); - } - } - if(this.minWidth){ - if((tbl.getWidth()+tbl2.getWidth()) < this.minWidth){ - tbl.setWidth(this.minWidth-tbl2.getWidth()); - } - } - this.el.setWidth(tbl.getWidth()+tbl2.getWidth()); - } - }, - - - setArrowHandler : function(handler, scope){ - this.arrowHandler = handler; - this.scope = scope; - }, - - - onClick : function(e){ - e.preventDefault(); - if(!this.disabled){ - if(e.getTarget(".x-btn-menu-arrow-wrap")){ - if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ - this.showMenu(); - } - this.fireEvent("arrowclick", this, e); - if(this.arrowHandler){ - this.arrowHandler.call(this.scope || this, this, e); - } - }else{ - if(this.enableToggle){ - this.toggle(); - } - this.fireEvent("click", this, e); - if(this.handler){ - this.handler.call(this.scope || this, this, e); - } - } - } - }, - - - getClickEl : function(e, isUp){ - if(!isUp){ - return (this.lastClickEl = e.getTarget("table", 10, true)); - } - return this.lastClickEl; - }, - - - onDisable : function(){ - if(this.el){ - if(!Ext.isIE6){ - this.el.addClass("x-item-disabled"); - } - this.el.child(this.buttonSelector).dom.disabled = true; - this.el.child(this.arrowSelector).dom.disabled = true; - } - this.disabled = true; - }, - - - onEnable : function(){ - if(this.el){ - if(!Ext.isIE6){ - this.el.removeClass("x-item-disabled"); - } - this.el.child(this.buttonSelector).dom.disabled = false; - this.el.child(this.arrowSelector).dom.disabled = false; - } - this.disabled = false; - }, - - - isMenuTriggerOver : function(e){ - return this.menu && e.within(this.arrowBtnTable) && !e.within(this.arrowBtnTable, true); - }, - - - isMenuTriggerOut : function(e, internal){ - return this.menu && !e.within(this.arrowBtnTable); - }, - - - onDestroy : function(){ - Ext.destroy(this.arrowBtnTable); - Ext.SplitButton.superclass.onDestroy.call(this); - } -}); - + this.addEvents("arrowclick"); + }, + + + onRender : function(){ + Ext.SplitButton.superclass.onRender.apply(this, arguments); + if(this.arrowTooltip){ + this.el.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip; + } + }, + + + setArrowHandler : function(handler, scope){ + this.arrowHandler = handler; + this.scope = scope; + }, + + getMenuClass : function(){ + return 'x-btn-split' + (this.arrowAlign == 'bottom' ? '-bottom' : ''); + }, + + isClickOnArrow : function(e){ + if (this.arrowAlign != 'bottom') { + var visBtn = this.el.child('em.x-btn-split'); + var right = visBtn.getRegion().right - visBtn.getPadding('r'); + return e.getPageX() > right; + } else { + return e.getPageY() > this.btnEl.getRegion().bottom; + } + }, + + + onClick : function(e, t){ + e.preventDefault(); + if(!this.disabled){ + if(this.isClickOnArrow(e)){ + if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + this.showMenu(); + } + this.fireEvent("arrowclick", this, e); + if(this.arrowHandler){ + this.arrowHandler.call(this.scope || this, this, e); + } + }else{ + this.doToggle(); + this.fireEvent("click", this, e); + if(this.handler){ + this.handler.call(this.scope || this, this, e); + } + } + } + }, + + + isMenuTriggerOver : function(e){ + return this.menu && e.target.tagName == this.arrowSelector; + }, + + + isMenuTriggerOut : function(e, internal){ + return this.menu && e.target.tagName != this.arrowSelector; + } +}); -Ext.MenuButton = Ext.SplitButton; - - Ext.reg('splitbutton', Ext.SplitButton); - -Ext.CycleButton = Ext.extend(Ext.SplitButton, { - - - - - - +Ext.CycleButton = Ext.extend(Ext.SplitButton, { - getItemText : function(item){ - if(item && this.showText === true){ - var text = ''; - if(this.prependText){ - text += this.prependText; - } - text += item.text; - return text; - } - return undefined; - }, - - - setActiveItem : function(item, suppressEvent){ - if(typeof item != 'object'){ - item = this.menu.items.get(item); - } - if(item){ - if(!this.rendered){ - this.text = this.getItemText(item); - this.iconCls = item.iconCls; - }else{ - var t = this.getItemText(item); - if(t){ - this.setText(t); - } - this.setIconClass(item.iconCls); - } - this.activeItem = item; - if(!item.checked){ - item.setChecked(true, true); - } - if(this.forceIcon){ - this.setIconClass(this.forceIcon); - } - if(!suppressEvent){ - this.fireEvent('change', this, item); - } - } - }, - - - getActiveItem : function(){ - return this.activeItem; - }, - - initComponent : function(){ - this.addEvents( - - "change" - ); - - if(this.changeHandler){ - this.on('change', this.changeHandler, this.scope||this); - delete this.changeHandler; - } - - this.itemCount = this.items.length; - - this.menu = {cls:'x-cycle-menu', items:[]}; - var checked; - for(var i = 0, len = this.itemCount; i < len; i++){ - var item = this.items[i]; - item.group = item.group || this.id; - item.itemIndex = i; - item.checkHandler = this.checkHandler; - item.scope = this; - item.checked = item.checked || false; - this.menu.items.push(item); - if(item.checked){ - checked = item; - } - } - this.setActiveItem(checked, true); - Ext.CycleButton.superclass.initComponent.call(this); - - this.on('click', this.toggleSelected, this); - }, - - checkHandler : function(item, pressed){ - if(pressed){ - this.setActiveItem(item); - } - }, - - - toggleSelected : function(){ - this.menu.render(); - - var nextIdx, checkItem; - for (var i = 1; i < this.itemCount; i++) { - nextIdx = (this.activeItem.itemIndex + i) % this.itemCount; - - checkItem = this.menu.items.itemAt(nextIdx); - - if (!checkItem.disabled) { - checkItem.setChecked(true); - break; - } - } - } -}); + + + + + + getItemText : function(item){ + if(item && this.showText === true){ + var text = ''; + if(this.prependText){ + text += this.prependText; + } + text += item.text; + return text; + } + return undefined; + }, + + + setActiveItem : function(item, suppressEvent){ + if(!Ext.isObject(item)){ + item = this.menu.getComponent(item); + } + if(item){ + if(!this.rendered){ + this.text = this.getItemText(item); + this.iconCls = item.iconCls; + }else{ + var t = this.getItemText(item); + if(t){ + this.setText(t); + } + this.setIconClass(item.iconCls); + } + this.activeItem = item; + if(!item.checked){ + item.setChecked(true, suppressEvent); + } + if(this.forceIcon){ + this.setIconClass(this.forceIcon); + } + if(!suppressEvent){ + this.fireEvent('change', this, item); + } + } + }, + + + getActiveItem : function(){ + return this.activeItem; + }, + + + initComponent : function(){ + this.addEvents( + + "change" + ); + + if(this.changeHandler){ + this.on('change', this.changeHandler, this.scope||this); + delete this.changeHandler; + } + + this.itemCount = this.items.length; + + this.menu = {cls:'x-cycle-menu', items:[]}; + var checked = 0; + Ext.each(this.items, function(item, i){ + Ext.apply(item, { + group: item.group || this.id, + itemIndex: i, + checkHandler: this.checkHandler, + scope: this, + checked: item.checked || false + }); + this.menu.items.push(item); + if(item.checked){ + checked = i; + } + }, this); + Ext.CycleButton.superclass.initComponent.call(this); + this.on('click', this.toggleSelected, this); + this.setActiveItem(checked, true); + }, + + + checkHandler : function(item, pressed){ + if(pressed){ + this.setActiveItem(item); + } + }, + + + toggleSelected : function(){ + var m = this.menu; + m.render(); + + if(!m.hasLayout){ + m.doLayout(); + } + + var nextIdx, checkItem; + for (var i = 1; i < this.itemCount; i++) { + nextIdx = (this.activeItem.itemIndex + i) % this.itemCount; + + checkItem = m.items.itemAt(nextIdx); + + if (!checkItem.disabled) { + checkItem.setChecked(true); + break; + } + } + } +}); Ext.reg('cycle', Ext.CycleButton); - - Ext.Toolbar = function(config){ - if(Ext.isArray(config)){ - config = {buttons:config}; - } - Ext.Toolbar.superclass.constructor.call(this, config); -}; - -(function(){ - -var T = Ext.Toolbar; - -Ext.extend(T, Ext.BoxComponent, { - - trackMenus : true, - - - initComponent : function(){ - T.superclass.initComponent.call(this); - - if(this.items){ - this.buttons = this.items; - } - - this.items = new Ext.util.MixedCollection(false, function(o){ - return o.itemId || o.id || Ext.id(); - }); - }, - - - autoCreate: { - cls:'x-toolbar x-small-editor', - html:'
    ' - }, - - - onRender : function(ct, position){ - this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); - this.tr = this.el.child("tr", true); - }, - - - afterRender : function(){ - T.superclass.afterRender.call(this); - if(this.buttons){ - this.add.apply(this, this.buttons); - delete this.buttons; - } - }, - - - add : function(){ - var a = arguments, l = a.length; - for(var i = 0; i < l; i++){ - var el = a[i]; - if(el.isFormField){ - this.addField(el); - }else if(el.render){ - this.addItem(el); - }else if(typeof el == "string"){ - if(el == "separator" || el == "-"){ - this.addSeparator(); - }else if(el == " "){ - this.addSpacer(); - }else if(el == "->"){ - this.addFill(); - }else{ - this.addText(el); - } - }else if(el.tagName){ - this.addElement(el); - }else if(typeof el == "object"){ - if(el.xtype){ - this.addField(Ext.ComponentMgr.create(el, 'button')); - }else{ - this.addButton(el); - } - } - } - }, - - - addSeparator : function(){ - return this.addItem(new T.Separator()); - }, - - - addSpacer : function(){ - return this.addItem(new T.Spacer()); - }, - - - addFill : function(){ - return this.addItem(new T.Fill()); - }, - - - addElement : function(el){ - return this.addItem(new T.Item(el)); - }, - - - addItem : function(item){ - var td = this.nextBlock(); - this.initMenuTracking(item); - item.render(td); - this.items.add(item); - return item; - }, - - - addButton : function(config){ - if(Ext.isArray(config)){ - var buttons = []; - for(var i = 0, len = config.length; i < len; i++) { - buttons.push(this.addButton(config[i])); - } - return buttons; - } - var b = config; - if(!(config instanceof T.Button)){ - b = config.split ? - new T.SplitButton(config) : - new T.Button(config); - } - var td = this.nextBlock(); - this.initMenuTracking(b); - b.render(td); - this.items.add(b); - return b; - }, - - - initMenuTracking : function(item){ - if(this.trackMenus && item.menu){ - item.on({ - 'menutriggerover' : this.onButtonTriggerOver, - 'menushow' : this.onButtonMenuShow, - 'menuhide' : this.onButtonMenuHide, - scope: this - }) - } - }, - - - addText : function(text){ - return this.addItem(new T.TextItem(text)); - }, - - - insertButton : function(index, item){ - if(Ext.isArray(item)){ - var buttons = []; - for(var i = 0, len = item.length; i < len; i++) { - buttons.push(this.insertButton(index + i, item[i])); - } - return buttons; - } - if (!(item instanceof T.Button)){ - item = new T.Button(item); - } - var td = document.createElement("td"); - this.tr.insertBefore(td, this.tr.childNodes[index]); - this.initMenuTracking(item); - item.render(td); - this.items.insert(index, item); - return item; - }, - - - addDom : function(config, returnEl){ - var td = this.nextBlock(); - Ext.DomHelper.overwrite(td, config); - var ti = new T.Item(td.firstChild); - ti.render(td); - this.items.add(ti); - return ti; - }, - - - addField : function(field){ - var td = this.nextBlock(); - field.render(td); - var ti = new T.Item(td.firstChild); - ti.render(td); - this.items.add(field); - return ti; - }, - - - nextBlock : function(){ - var td = document.createElement("td"); - this.tr.appendChild(td); - return td; - }, - - - onDestroy : function(){ - Ext.Toolbar.superclass.onDestroy.call(this); - if(this.rendered){ - if(this.items){ - Ext.destroy.apply(Ext, this.items.items); - } - Ext.Element.uncache(this.tr); - } - }, - - - onDisable : function(){ - this.items.each(function(item){ - if(item.disable){ - item.disable(); - } - }); - }, - - - onEnable : function(){ - this.items.each(function(item){ - if(item.enable){ - item.enable(); - } - }); - }, - - - onButtonTriggerOver : function(btn){ - if(this.activeMenuBtn && this.activeMenuBtn != btn){ - this.activeMenuBtn.hideMenu(); - btn.showMenu(); - this.activeMenuBtn = btn; - } - }, - - - onButtonMenuShow : function(btn){ - this.activeMenuBtn = btn; - }, - - - onButtonMenuHide : function(btn){ - delete this.activeMenuBtn; - } - - -}); -Ext.reg('toolbar', Ext.Toolbar); - - -T.Item = function(el){ - this.el = Ext.getDom(el); - this.id = Ext.id(this.el); - this.hidden = false; -}; - -T.Item.prototype = { - - - getEl : function(){ - return this.el; - }, - - - render : function(td){ - this.td = td; - td.appendChild(this.el); - }, - - - destroy : function(){ - if(this.td && this.td.parentNode){ - this.td.parentNode.removeChild(this.td); - } - }, - - - show: function(){ - this.hidden = false; - this.td.style.display = ""; - }, - - - hide: function(){ - this.hidden = true; - this.td.style.display = "none"; - }, - - - setVisible: function(visible){ - if(visible) { - this.show(); - }else{ - this.hide(); - } - }, - - - focus : function(){ - Ext.fly(this.el).focus(); - }, - - - disable : function(){ - Ext.fly(this.td).addClass("x-item-disabled"); - this.disabled = true; - this.el.disabled = true; - }, - - - enable : function(){ - Ext.fly(this.td).removeClass("x-item-disabled"); - this.disabled = false; - this.el.disabled = false; - } -}; -Ext.reg('tbitem', T.Item); - - - -T.Separator = function(){ - var s = document.createElement("span"); - s.className = "ytb-sep"; - T.Separator.superclass.constructor.call(this, s); -}; -Ext.extend(T.Separator, T.Item, { - enable:Ext.emptyFn, - disable:Ext.emptyFn, - focus:Ext.emptyFn -}); -Ext.reg('tbseparator', T.Separator); - - -T.Spacer = function(){ - var s = document.createElement("div"); - s.className = "ytb-spacer"; - T.Spacer.superclass.constructor.call(this, s); -}; -Ext.extend(T.Spacer, T.Item, { - enable:Ext.emptyFn, - disable:Ext.emptyFn, - focus:Ext.emptyFn -}); - -Ext.reg('tbspacer', T.Spacer); - - -T.Fill = Ext.extend(T.Spacer, { - - render : function(td){ - td.style.width = '100%'; - T.Fill.superclass.render.call(this, td); - } -}); -Ext.reg('tbfill', T.Fill); - - -T.TextItem = function(t){ - var s = document.createElement("span"); - s.className = "ytb-text"; - s.innerHTML = t.text ? t.text : t; - T.TextItem.superclass.constructor.call(this, s); -}; -Ext.extend(T.TextItem, T.Item, { - enable:Ext.emptyFn, - disable:Ext.emptyFn, - focus:Ext.emptyFn -}); -Ext.reg('tbtext', T.TextItem); - - - -T.Button = Ext.extend(Ext.Button, { - hideParent : true, - - onDestroy : function(){ - T.Button.superclass.onDestroy.call(this); - if(this.container){ - this.container.remove(); - } - } -}); -Ext.reg('tbbutton', T.Button); - - -T.SplitButton = Ext.extend(Ext.SplitButton, { - hideParent : true, - - onDestroy : function(){ - T.SplitButton.superclass.onDestroy.call(this); - if(this.container){ - this.container.remove(); - } - } -}); - -Ext.reg('tbsplit', T.SplitButton); +Ext.Toolbar = function(config){ + if(Ext.isArray(config)){ + config = {items: config, layout: 'toolbar'}; + } else { + config = Ext.apply({ + layout: 'toolbar' + }, config); + if(config.buttons) { + config.items = config.buttons; + } + } + Ext.Toolbar.superclass.constructor.call(this, config); +}; -T.MenuButton = T.SplitButton; - -})(); +(function(){ +var T = Ext.Toolbar; + +Ext.extend(T, Ext.Container, { + + defaultType: 'button', + + + + enableOverflow : false, + + + + + trackMenus : true, + internalDefaults: {removeMode: 'container', hideParent: true}, + toolbarCls: 'x-toolbar', + + initComponent : function(){ + T.superclass.initComponent.call(this); + + + this.addEvents('overflowchange'); + }, + + + onRender : function(ct, position){ + if(!this.el){ + if(!this.autoCreate){ + this.autoCreate = { + cls: this.toolbarCls + ' x-small-editor' + }; + } + this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); + Ext.Toolbar.superclass.onRender.apply(this, arguments); + } + }, + + + + + lookupComponent : function(c){ + if(Ext.isString(c)){ + if(c == '-'){ + c = new T.Separator(); + }else if(c == ' '){ + c = new T.Spacer(); + }else if(c == '->'){ + c = new T.Fill(); + }else{ + c = new T.TextItem(c); + } + this.applyDefaults(c); + }else{ + if(c.isFormField || c.render){ + c = this.createComponent(c); + }else if(c.tag){ + c = new T.Item({autoEl: c}); + }else if(c.tagName){ + c = new T.Item({el:c}); + }else if(Ext.isObject(c)){ + c = c.xtype ? this.createComponent(c) : this.constructButton(c); + } + } + return c; + }, + + + applyDefaults : function(c){ + if(!Ext.isString(c)){ + c = Ext.Toolbar.superclass.applyDefaults.call(this, c); + var d = this.internalDefaults; + if(c.events){ + Ext.applyIf(c.initialConfig, d); + Ext.apply(c, d); + }else{ + Ext.applyIf(c, d); + } + } + return c; + }, + + + addSeparator : function(){ + return this.add(new T.Separator()); + }, + + + addSpacer : function(){ + return this.add(new T.Spacer()); + }, + + + addFill : function(){ + this.add(new T.Fill()); + }, + + + addElement : function(el){ + return this.addItem(new T.Item({el:el})); + }, + + + addItem : function(item){ + return this.add.apply(this, arguments); + }, + + + addButton : function(config){ + if(Ext.isArray(config)){ + var buttons = []; + for(var i = 0, len = config.length; i < len; i++) { + buttons.push(this.addButton(config[i])); + } + return buttons; + } + return this.add(this.constructButton(config)); + }, + + + addText : function(text){ + return this.addItem(new T.TextItem(text)); + }, + + + addDom : function(config){ + return this.add(new T.Item({autoEl: config})); + }, + + + addField : function(field){ + return this.add(field); + }, + + + insertButton : function(index, item){ + if(Ext.isArray(item)){ + var buttons = []; + for(var i = 0, len = item.length; i < len; i++) { + buttons.push(this.insertButton(index + i, item[i])); + } + return buttons; + } + return Ext.Toolbar.superclass.insert.call(this, index, item); + }, + + + trackMenu : function(item, remove){ + if(this.trackMenus && item.menu){ + var method = remove ? 'mun' : 'mon'; + this[method](item, 'menutriggerover', this.onButtonTriggerOver, this); + this[method](item, 'menushow', this.onButtonMenuShow, this); + this[method](item, 'menuhide', this.onButtonMenuHide, this); + } + }, + + + constructButton : function(item){ + var b = item.events ? item : this.createComponent(item, item.split ? 'splitbutton' : this.defaultType); + return b; + }, + + + onAdd : function(c){ + Ext.Toolbar.superclass.onAdd.call(this); + this.trackMenu(c); + if(this.disabled){ + c.disable(); + } + }, + + + onRemove : function(c){ + Ext.Toolbar.superclass.onRemove.call(this); + if (c == this.activeMenuBtn) { + delete this.activeMenuBtn; + } + this.trackMenu(c, true); + }, + + + onDisable : function(){ + this.items.each(function(item){ + if(item.disable){ + item.disable(); + } + }); + }, + + + onEnable : function(){ + this.items.each(function(item){ + if(item.enable){ + item.enable(); + } + }); + }, + + + onButtonTriggerOver : function(btn){ + if(this.activeMenuBtn && this.activeMenuBtn != btn){ + this.activeMenuBtn.hideMenu(); + btn.showMenu(); + this.activeMenuBtn = btn; + } + }, + + + onButtonMenuShow : function(btn){ + this.activeMenuBtn = btn; + }, + + + onButtonMenuHide : function(btn){ + delete this.activeMenuBtn; + } +}); +Ext.reg('toolbar', Ext.Toolbar); + + +T.Item = Ext.extend(Ext.BoxComponent, { + hideParent: true, + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn + +}); +Ext.reg('tbitem', T.Item); + + +T.Separator = Ext.extend(T.Item, { + onRender : function(ct, position){ + this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position); + } +}); +Ext.reg('tbseparator', T.Separator); + + +T.Spacer = Ext.extend(T.Item, { + + + onRender : function(ct, position){ + this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position); + } +}); +Ext.reg('tbspacer', T.Spacer); + + +T.Fill = Ext.extend(T.Item, { + + render : Ext.emptyFn, + isFill : true +}); +Ext.reg('tbfill', T.Fill); + + +T.TextItem = Ext.extend(T.Item, { + + + constructor: function(config){ + T.TextItem.superclass.constructor.call(this, Ext.isString(config) ? {text: config} : config); + }, + + + onRender : function(ct, position) { + this.autoEl = {cls: 'xtb-text', html: this.text || ''}; + T.TextItem.superclass.onRender.call(this, ct, position); + }, + + + setText : function(t) { + if(this.rendered){ + this.el.update(t); + }else{ + this.text = t; + } + } +}); +Ext.reg('tbtext', T.TextItem); + + +T.Button = Ext.extend(Ext.Button, {}); +T.SplitButton = Ext.extend(Ext.SplitButton, {}); +Ext.reg('tbbutton', T.Button); +Ext.reg('tbsplit', T.SplitButton); + +})(); + +Ext.ButtonGroup = Ext.extend(Ext.Panel, { + + + baseCls: 'x-btn-group', + + layout:'table', + defaultType: 'button', + + frame: true, + internalDefaults: {removeMode: 'container', hideParent: true}, + + initComponent : function(){ + this.layoutConfig = this.layoutConfig || {}; + Ext.applyIf(this.layoutConfig, { + columns : this.columns + }); + if(!this.title){ + this.addClass('x-btn-group-notitle'); + } + this.on('afterlayout', this.onAfterLayout, this); + Ext.ButtonGroup.superclass.initComponent.call(this); + }, + + applyDefaults : function(c){ + c = Ext.ButtonGroup.superclass.applyDefaults.call(this, c); + var d = this.internalDefaults; + if(c.events){ + Ext.applyIf(c.initialConfig, d); + Ext.apply(c, d); + }else{ + Ext.applyIf(c, d); + } + return c; + }, + + onAfterLayout : function(){ + var bodyWidth = this.body.getFrameWidth('lr') + this.body.dom.firstChild.offsetWidth; + this.body.setWidth(bodyWidth); + this.el.setWidth(bodyWidth + this.getFrameWidth()); + } + +}); + +Ext.reg('buttongroup', Ext.ButtonGroup); + +(function() { + +var T = Ext.Toolbar; Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { - pageSize: 20, + pageSize : 20, + displayMsg : 'Displaying {0} - {1} of {2}', emptyMsg : 'No data to display', - beforePageText : "Page", + beforePageText : 'Page', - afterPageText : "of {0}", + afterPageText : 'of {0}', - firstText : "First Page", + firstText : 'First Page', - prevText : "Previous Page", + prevText : 'Previous Page', - nextText : "Next Page", + nextText : 'Next Page', - lastText : "Last Page", + lastText : 'Last Page', + + refreshText : 'Refresh', + + + - refreshText : "Refresh", - paramNames : {start: 'start', limit: 'limit'}, initComponent : function(){ - this.addEvents('change', 'beforechange'); + var pagingItems = [this.first = new T.Button({ + tooltip: this.firstText, + overflowText: this.firstText, + iconCls: 'x-tbar-page-first', + disabled: true, + handler: this.moveFirst, + scope: this + }), this.prev = new T.Button({ + tooltip: this.prevText, + overflowText: this.prevText, + iconCls: 'x-tbar-page-prev', + disabled: true, + handler: this.movePrevious, + scope: this + }), '-', this.beforePageText, + this.inputItem = new Ext.form.NumberField({ + cls: 'x-tbar-page-number', + allowDecimals: false, + allowNegative: false, + enableKeyEvents: true, + selectOnFocus: true, + submitValue: false, + listeners: { + scope: this, + keydown: this.onPagingKeyDown, + blur: this.onPagingBlur + } + }), this.afterTextItem = new T.TextItem({ + text: String.format(this.afterPageText, 1) + }), '-', this.next = new T.Button({ + tooltip: this.nextText, + overflowText: this.nextText, + iconCls: 'x-tbar-page-next', + disabled: true, + handler: this.moveNext, + scope: this + }), this.last = new T.Button({ + tooltip: this.lastText, + overflowText: this.lastText, + iconCls: 'x-tbar-page-last', + disabled: true, + handler: this.moveLast, + scope: this + }), '-', this.refresh = new T.Button({ + tooltip: this.refreshText, + overflowText: this.refreshText, + iconCls: 'x-tbar-loading', + handler: this.doRefresh, + scope: this + })]; + + + var userItems = this.items || this.buttons || []; + if (this.prependButtons) { + this.items = userItems.concat(pagingItems); + }else{ + this.items = pagingItems.concat(userItems); + } + delete this.buttons; + if(this.displayInfo){ + this.items.push('->'); + this.items.push(this.displayItem = new T.TextItem({})); + } Ext.PagingToolbar.superclass.initComponent.call(this); + this.addEvents( + + 'change', + + 'beforechange' + ); + this.on('afterlayout', this.onFirstLayout, this, {single: true}); this.cursor = 0; - this.bind(this.store); + this.bindStore(this.store, true); }, - onRender : function(ct, position){ - Ext.PagingToolbar.superclass.onRender.call(this, ct, position); - this.first = this.addButton({ - tooltip: this.firstText, - iconCls: "x-tbar-page-first", - disabled: true, - handler: this.onClick.createDelegate(this, ["first"]) - }); - this.prev = this.addButton({ - tooltip: this.prevText, - iconCls: "x-tbar-page-prev", - disabled: true, - handler: this.onClick.createDelegate(this, ["prev"]) - }); - this.addSeparator(); - this.add(this.beforePageText); - this.field = Ext.get(this.addDom({ - tag: "input", - type: "text", - size: "3", - value: "1", - cls: "x-tbar-page-number" - }).el); - this.field.on("keydown", this.onPagingKeydown, this); - this.field.on("focus", function(){this.dom.select();}); - this.afterTextEl = this.addText(String.format(this.afterPageText, 1)); - this.field.setHeight(18); - this.addSeparator(); - this.next = this.addButton({ - tooltip: this.nextText, - iconCls: "x-tbar-page-next", - disabled: true, - handler: this.onClick.createDelegate(this, ["next"]) - }); - this.last = this.addButton({ - tooltip: this.lastText, - iconCls: "x-tbar-page-last", - disabled: true, - handler: this.onClick.createDelegate(this, ["last"]) - }); - this.addSeparator(); - this.loading = this.addButton({ - tooltip: this.refreshText, - iconCls: "x-tbar-loading", - handler: this.onClick.createDelegate(this, ["refresh"]) - }); - - if(this.displayInfo){ - this.displayEl = Ext.fly(this.el.dom).createChild({cls:'x-paging-info'}); - } + + onFirstLayout : function(){ if(this.dsLoaded){ this.onLoad.apply(this, this.dsLoaded); } }, - updateInfo : function(){ - if(this.displayEl){ + + updateInfo : function(){ + if(this.displayItem){ var count = this.store.getCount(); var msg = count == 0 ? this.emptyMsg : @@ -20577,30 +32602,33 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { this.displayMsg, this.cursor+1, this.cursor+count, this.store.getTotalCount() ); - this.displayEl.update(msg); + this.displayItem.setText(msg); } }, - onLoad : function(store, r, o){ + + onLoad : function(store, r, o){ if(!this.rendered){ this.dsLoaded = [store, r, o]; return; } - this.cursor = o.params ? o.params[this.paramNames.start] : 0; - var d = this.getPageData(), ap = d.activePage, ps = d.pages; + var p = this.getParams(); + this.cursor = (o.params && o.params[p.start]) ? o.params[p.start] : 0; + var d = this.getPageData(), ap = d.activePage, ps = d.pages; - this.afterTextEl.el.innerHTML = String.format(this.afterPageText, d.pages); - this.field.dom.value = ap; + this.afterTextItem.setText(String.format(this.afterPageText, d.pages)); + this.inputItem.setValue(ap); this.first.setDisabled(ap == 1); this.prev.setDisabled(ap == 1); this.next.setDisabled(ap == ps); this.last.setDisabled(ap == ps); - this.loading.enable(); + this.refresh.enable(); this.updateInfo(); this.fireEvent('change', this, d); }, - getPageData : function(){ + + getPageData : function(){ var total = this.store.getTotalCount(); return { total : total, @@ -20609,23 +32637,40 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { }; }, - onLoadError : function(){ + + changePage : function(page){ + this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount())); + }, + + + onLoadError : function(){ if(!this.rendered){ return; } - this.loading.enable(); + this.refresh.enable(); }, + readPage : function(d){ - var v = this.field.dom.value, pageNum; + var v = this.inputItem.getValue(), pageNum; if (!v || isNaN(pageNum = parseInt(v, 10))) { - this.field.dom.value = d.activePage; + this.inputItem.setValue(d.activePage); return false; } return pageNum; }, - onPagingKeydown : function(e){ + onPagingFocus : function(){ + this.inputItem.select(); + }, + + + onPagingBlur : function(e){ + this.inputItem.setValue(this.getPageData().activePage); + }, + + + onPagingKeyDown : function(field, e){ var k = e.getKey(), d = this.getPageData(), pageNum; if (k == e.RETURN) { e.stopEvent(); @@ -20637,30 +32682,38 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { }else if (k == e.HOME || k == e.END){ e.stopEvent(); pageNum = k == e.HOME ? 1 : d.pages; - this.field.dom.value = pageNum; + field.setValue(pageNum); }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){ e.stopEvent(); - if(pageNum = this.readPage(d)){ + if((pageNum = this.readPage(d))){ var increment = e.shiftKey ? 10 : 1; if(k == e.DOWN || k == e.PAGEDOWN){ increment *= -1; } pageNum += increment; if(pageNum >= 1 & pageNum <= d.pages){ - this.field.dom.value = pageNum; + field.setValue(pageNum); } } } }, - beforeLoad : function(){ - if(this.rendered && this.loading){ - this.loading.disable(); + + getParams : function(){ + + return this.paramNames || this.store.paramNames; + }, + + + beforeLoad : function(){ + if(this.rendered && this.refresh){ + this.refresh.disable(); } }, + doLoad : function(start){ - var o = {}, pn = this.paramNames; + var o = {}, pn = this.getParams(); o[pn.start] = start; o[pn.limit] = this.pageSize; if(this.fireEvent('beforechange', this, o) !== false){ @@ -20669,4116 +32722,4368 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { }, - changePage: function(page){ - this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount())); + moveFirst : function(){ + this.doLoad(0); }, - onClick : function(which){ - var store = this.store; - switch(which){ - case "first": - this.doLoad(0); - break; - case "prev": - this.doLoad(Math.max(0, this.cursor-this.pageSize)); - break; - case "next": - this.doLoad(this.cursor+this.pageSize); - break; - case "last": - var total = store.getTotalCount(); - var extra = total % this.pageSize; - var lastStart = extra ? (total - extra) : total-this.pageSize; - this.doLoad(lastStart); - break; - case "refresh": - this.doLoad(this.cursor); - break; + + movePrevious : function(){ + this.doLoad(Math.max(0, this.cursor-this.pageSize)); + }, + + + moveNext : function(){ + this.doLoad(this.cursor+this.pageSize); + }, + + + moveLast : function(){ + var total = this.store.getTotalCount(), + extra = total % this.pageSize; + + this.doLoad(extra ? (total - extra) : total - this.pageSize); + }, + + + doRefresh : function(){ + this.doLoad(this.cursor); + }, + + + bindStore : function(store, initial){ + var doLoad; + if(!initial && this.store){ + if(store !== this.store && this.store.autoDestroy){ + this.store.destroy(); + }else{ + this.store.un('beforeload', this.beforeLoad, this); + this.store.un('load', this.onLoad, this); + this.store.un('exception', this.onLoadError, this); + } + if(!store){ + this.store = null; + } + } + if(store){ + store = Ext.StoreMgr.lookup(store); + store.on({ + scope: this, + beforeload: this.beforeLoad, + load: this.onLoad, + exception: this.onLoadError + }); + doLoad = true; + } + this.store = store; + if(doLoad){ + this.onLoad(store, null, {}); } }, unbind : function(store){ - store = Ext.StoreMgr.lookup(store); - store.un("beforeload", this.beforeLoad, this); - store.un("load", this.onLoad, this); - store.un("loadexception", this.onLoadError, this); - this.store = undefined; + this.bindStore(null); }, bind : function(store){ - store = Ext.StoreMgr.lookup(store); - store.on("beforeload", this.beforeLoad, this); - store.on("load", this.onLoad, this); - store.on("loadexception", this.onLoadError, this); - this.store = store; + this.bindStore(store); + }, + + + onDestroy : function(){ + this.bindStore(null); + Ext.PagingToolbar.superclass.onDestroy.call(this); } }); + +})(); Ext.reg('paging', Ext.PagingToolbar); - -Ext.Resizable = function(el, config){ - this.el = Ext.get(el); - - if(config && config.wrap){ - config.resizeChild = this.el; - this.el = this.el.wrap(typeof config.wrap == "object" ? config.wrap : {cls:"xresizable-wrap"}); - this.el.id = this.el.dom.id = config.resizeChild.id + "-rzwrap"; - this.el.setStyle("overflow", "hidden"); - this.el.setPositioning(config.resizeChild.getPositioning()); - config.resizeChild.clearPositioning(); - if(!config.width || !config.height){ - var csize = config.resizeChild.getSize(); - this.el.setSize(csize.width, csize.height); - } - if(config.pinned && !config.adjustments){ - config.adjustments = "auto"; - } - } - - - this.proxy = this.el.createProxy({tag: "div", cls: "x-resizable-proxy", id: this.el.id + "-rzproxy"}, Ext.getBody()); - this.proxy.unselectable(); - this.proxy.enableDisplayMode('block'); - - Ext.apply(this, config); - - if(this.pinned){ - this.disableTrackOver = true; - this.el.addClass("x-resizable-pinned"); - } - - var position = this.el.getStyle("position"); - if(position != "absolute" && position != "fixed"){ - this.el.setStyle("position", "relative"); - } - if(!this.handles){ - this.handles = 's,e,se'; - if(this.multiDirectional){ - this.handles += ',n,w'; - } - } - if(this.handles == "all"){ - this.handles = "n s e w ne nw se sw"; - } - var hs = this.handles.split(/\s*?[,;]\s*?| /); - var ps = Ext.Resizable.positions; - for(var i = 0, len = hs.length; i < len; i++){ - if(hs[i] && ps[hs[i]]){ - var pos = ps[hs[i]]; - this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent); - } - } - - this.corner = this.southeast; - - if(this.handles.indexOf("n") != -1 || this.handles.indexOf("w") != -1){ - this.updateBox = true; - } - - this.activeHandle = null; - - if(this.resizeChild){ - if(typeof this.resizeChild == "boolean"){ - this.resizeChild = Ext.get(this.el.dom.firstChild, true); - }else{ - this.resizeChild = Ext.get(this.resizeChild, true); - } - } - - if(this.adjustments == "auto"){ - var rc = this.resizeChild; - var hw = this.west, he = this.east, hn = this.north, hs = this.south; - if(rc && (hw || hn)){ - rc.position("relative"); - rc.setLeft(hw ? hw.el.getWidth() : 0); - rc.setTop(hn ? hn.el.getHeight() : 0); - } - this.adjustments = [ - (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0), - (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 - ]; - } - - if(this.draggable){ - this.dd = this.dynamic ? - this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id}); - this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id); - } - - - this.addEvents( - "beforeresize", - "resize" - ); - - if(this.width !== null && this.height !== null){ - this.resizeTo(this.width, this.height); - }else{ - this.updateChildSize(); - } - if(Ext.isIE){ - this.el.dom.style.zoom = 1; - } - Ext.Resizable.superclass.constructor.call(this); -}; - -Ext.extend(Ext.Resizable, Ext.util.Observable, { - resizeChild : false, - adjustments : [0, 0], - minWidth : 5, - minHeight : 5, - maxWidth : 10000, - maxHeight : 10000, - enabled : true, - animate : false, - duration : .35, - dynamic : false, - handles : false, - multiDirectional : false, - disableTrackOver : false, - easing : 'easeOutStrong', - widthIncrement : 0, - heightIncrement : 0, - pinned : false, - width : null, - height : null, - preserveRatio : false, - transparent: false, - minX: 0, - minY: 0, - draggable: false, - - - - - - - - - resizeTo : function(width, height){ - this.el.setSize(width, height); - this.updateChildSize(); - this.fireEvent("resize", this, width, height, null); - }, - - - startSizing : function(e, handle){ - this.fireEvent("beforeresize", this, e); - if(this.enabled){ - - if(!this.overlay){ - this.overlay = this.el.createProxy({tag: "div", cls: "x-resizable-overlay", html: " "}, Ext.getBody()); - this.overlay.unselectable(); - this.overlay.enableDisplayMode("block"); - this.overlay.on("mousemove", this.onMouseMove, this); - this.overlay.on("mouseup", this.onMouseUp, this); - } - this.overlay.setStyle("cursor", handle.el.getStyle("cursor")); - - this.resizing = true; - this.startBox = this.el.getBox(); - this.startPoint = e.getXY(); - this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0], - (this.startBox.y + this.startBox.height) - this.startPoint[1]]; - - this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); - this.overlay.show(); - - if(this.constrainTo) { - var ct = Ext.get(this.constrainTo); - this.resizeRegion = ct.getRegion().adjust( - ct.getFrameWidth('t'), - ct.getFrameWidth('l'), - -ct.getFrameWidth('b'), - -ct.getFrameWidth('r') - ); - } - - this.proxy.setStyle('visibility', 'hidden'); - this.proxy.show(); - this.proxy.setBox(this.startBox); - if(!this.dynamic){ - this.proxy.setStyle('visibility', 'visible'); - } - } - }, - - - onMouseDown : function(handle, e){ - if(this.enabled){ - e.stopEvent(); - this.activeHandle = handle; - this.startSizing(e, handle); - } - }, - - - onMouseUp : function(e){ - var size = this.resizeElement(); - this.resizing = false; - this.handleOut(); - this.overlay.hide(); - this.proxy.hide(); - this.fireEvent("resize", this, size.width, size.height, e); - }, - - - updateChildSize : function(){ - if(this.resizeChild){ - var el = this.el; - var child = this.resizeChild; - var adj = this.adjustments; - if(el.dom.offsetWidth){ - var b = el.getSize(true); - child.setSize(b.width+adj[0], b.height+adj[1]); - } - - - - - if(Ext.isIE){ - setTimeout(function(){ - if(el.dom.offsetWidth){ - var b = el.getSize(true); - child.setSize(b.width+adj[0], b.height+adj[1]); - } - }, 10); - } - } - }, - - - snap : function(value, inc, min){ - if(!inc || !value) return value; - var newValue = value; - var m = value % inc; - if(m > 0){ - if(m > (inc/2)){ - newValue = value + (inc-m); - }else{ - newValue = value - m; - } - } - return Math.max(min, newValue); - }, - - - resizeElement : function(){ - var box = this.proxy.getBox(); - if(this.updateBox){ - this.el.setBox(box, false, this.animate, this.duration, null, this.easing); - }else{ - this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing); - } - this.updateChildSize(); - if(!this.dynamic){ - this.proxy.hide(); - } - return box; - }, - - - constrain : function(v, diff, m, mx){ - if(v - diff < m){ - diff = v - m; - }else if(v - diff > mx){ - diff = mx - v; - } - return diff; - }, - - - onMouseMove : function(e){ - if(this.enabled){ - try{ - - if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) { - return; - } - - - var curSize = this.curSize || this.startBox; - var x = this.startBox.x, y = this.startBox.y; - var ox = x, oy = y; - var w = curSize.width, h = curSize.height; - var ow = w, oh = h; - var mw = this.minWidth, mh = this.minHeight; - var mxw = this.maxWidth, mxh = this.maxHeight; - var wi = this.widthIncrement; - var hi = this.heightIncrement; - - var eventXY = e.getXY(); - var diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])); - var diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])); - - var pos = this.activeHandle.position; - - switch(pos){ - case "east": - w += diffX; - w = Math.min(Math.max(mw, w), mxw); - break; - case "south": - h += diffY; - h = Math.min(Math.max(mh, h), mxh); - break; - case "southeast": - w += diffX; - h += diffY; - w = Math.min(Math.max(mw, w), mxw); - h = Math.min(Math.max(mh, h), mxh); - break; - case "north": - diffY = this.constrain(h, diffY, mh, mxh); - y += diffY; - h -= diffY; - break; - case "west": - diffX = this.constrain(w, diffX, mw, mxw); - x += diffX; - w -= diffX; - break; - case "northeast": - w += diffX; - w = Math.min(Math.max(mw, w), mxw); - diffY = this.constrain(h, diffY, mh, mxh); - y += diffY; - h -= diffY; - break; - case "northwest": - diffX = this.constrain(w, diffX, mw, mxw); - diffY = this.constrain(h, diffY, mh, mxh); - y += diffY; - h -= diffY; - x += diffX; - w -= diffX; - break; - case "southwest": - diffX = this.constrain(w, diffX, mw, mxw); - h += diffY; - h = Math.min(Math.max(mh, h), mxh); - x += diffX; - w -= diffX; - break; - } - - var sw = this.snap(w, wi, mw); - var sh = this.snap(h, hi, mh); - if(sw != w || sh != h){ - switch(pos){ - case "northeast": - y -= sh - h; - break; - case "north": - y -= sh - h; - break; - case "southwest": - x -= sw - w; - break; - case "west": - x -= sw - w; - break; - case "northwest": - x -= sw - w; - y -= sh - h; - break; - } - w = sw; - h = sh; - } - - if(this.preserveRatio){ - switch(pos){ - case "southeast": - case "east": - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - w = ow * (h/oh); - break; - case "south": - w = ow * (h/oh); - w = Math.min(Math.max(mw, w), mxw); - h = oh * (w/ow); - break; - case "northeast": - w = ow * (h/oh); - w = Math.min(Math.max(mw, w), mxw); - h = oh * (w/ow); - break; - case "north": - var tw = w; - w = ow * (h/oh); - w = Math.min(Math.max(mw, w), mxw); - h = oh * (w/ow); - x += (tw - w) / 2; - break; - case "southwest": - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - var tw = w; - w = ow * (h/oh); - x += tw - w; - break; - case "west": - var th = h; - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - y += (th - h) / 2; - var tw = w; - w = ow * (h/oh); - x += tw - w; - break; - case "northwest": - var tw = w; - var th = h; - h = oh * (w/ow); - h = Math.min(Math.max(mh, h), mxh); - w = ow * (h/oh); - y += th - h; - x += tw - w; - break; - - } - } - this.proxy.setBounds(x, y, w, h); - if(this.dynamic){ - this.resizeElement(); - } - }catch(e){} - } - }, - - - handleOver : function(){ - if(this.enabled){ - this.el.addClass("x-resizable-over"); - } - }, - - - handleOut : function(){ - if(!this.resizing){ - this.el.removeClass("x-resizable-over"); - } - }, - - - getEl : function(){ - return this.el; - }, - - - getResizeChild : function(){ - return this.resizeChild; - }, - - - destroy : function(removeEl){ - this.proxy.remove(); - if(this.overlay){ - this.overlay.removeAllListeners(); - this.overlay.remove(); - } - var ps = Ext.Resizable.positions; - for(var k in ps){ - if(typeof ps[k] != "function" && this[ps[k]]){ - var h = this[ps[k]]; - h.el.removeAllListeners(); - h.el.remove(); - } - } - if(removeEl){ - this.el.update(""); - this.el.remove(); - } - }, - - syncHandleHeight : function(){ - var h = this.el.getHeight(true); - if(this.west){ - this.west.el.setHeight(h); - } - if(this.east){ - this.east.el.setHeight(h); - } - } -}); - +Ext.History = (function () { + var iframe, hiddenField; + var ready = false; + var currentToken; - -Ext.Resizable.positions = { - n: "north", s: "south", e: "east", w: "west", se: "southeast", sw: "southwest", nw: "northwest", ne: "northeast" -}; - - -Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){ - if(!this.tpl){ - - var tpl = Ext.DomHelper.createTemplate( - {tag: "div", cls: "x-resizable-handle x-resizable-handle-{0}"} - ); - tpl.compile(); - Ext.Resizable.Handle.prototype.tpl = tpl; - } - this.position = pos; - this.rz = rz; - this.el = this.tpl.append(rz.el.dom, [this.position], true); - this.el.unselectable(); - if(transparent){ - this.el.setOpacity(0); - } - this.el.on("mousedown", this.onMouseDown, this); - if(!disableTrackOver){ - this.el.on("mouseover", this.onMouseOver, this); - this.el.on("mouseout", this.onMouseOut, this); - } -}; - - -Ext.Resizable.Handle.prototype = { - afterResize : function(rz){ - - }, - - onMouseDown : function(e){ - this.rz.onMouseDown(this, e); - }, - - onMouseOver : function(e){ - this.rz.handleOver(this, e); - }, - - onMouseOut : function(e){ - this.rz.handleOut(this, e); - } -}; - - - - - -Ext.Editor = function(field, config){ - this.field = field; - Ext.Editor.superclass.constructor.call(this, config); -}; - -Ext.extend(Ext.Editor, Ext.Component, { - - - - - - value : "", - - alignment: "c-c?", - - shadow : "frame", - - constrain : false, - - swallowKeys : true, - - completeOnEnter : false, - - cancelOnEsc : false, - - updateEl : false, - - initComponent : function(){ - Ext.Editor.superclass.initComponent.call(this); - this.addEvents( - - "beforestartedit", - - "startedit", - - "beforecomplete", - - "complete", - - "canceledit", - - "specialkey" - ); - }, - - onRender : function(ct, position){ - this.el = new Ext.Layer({ - shadow: this.shadow, - cls: "x-editor", - parentEl : ct, - shim : this.shim, - shadowOffset:4, - id: this.id, - constrain: this.constrain - }); - this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); - if(this.field.msgTarget != 'title'){ - this.field.msgTarget = 'qtip'; + function getHash() { + var href = location.href, i = href.indexOf("#"), + hash = i >= 0 ? href.substr(i + 1) : null; + + if (Ext.isGecko) { + hash = decodeURIComponent(hash); } - this.field.inEditor = true; - this.field.render(this.el); - if(Ext.isGecko){ - this.field.el.dom.setAttribute('autocomplete', 'off'); - } - this.field.on("specialkey", this.onSpecialKey, this); - if(this.swallowKeys){ - this.field.el.swallowEvent(['keydown','keypress']); - } - this.field.show(); - this.field.on("blur", this.onBlur, this); - if(this.field.grow){ - this.field.on("autosize", this.el.sync, this.el, {delay:1}); - } - }, - - onSpecialKey : function(field, e){ - var key = e.getKey(); - if(this.completeOnEnter && key == e.ENTER){ - e.stopEvent(); - this.completeEdit(); - }else if(this.cancelOnEsc && key == e.ESC){ - this.cancelEdit(); - }else{ - this.fireEvent('specialkey', field, e); - } - if(this.field.triggerBlur && (key == e.ENTER || key == e.ESC || key == e.TAB)){ - this.field.triggerBlur(); - } - }, - - - startEdit : function(el, value){ - if(this.editing){ - this.completeEdit(); - } - this.boundEl = Ext.get(el); - var v = value !== undefined ? value : this.boundEl.dom.innerHTML; - if(!this.rendered){ - this.render(this.parentEl || document.body); - } - if(this.fireEvent("beforestartedit", this, this.boundEl, v) === false){ - return; - } - this.startValue = v; - this.field.setValue(v); - this.doAutoSize(); - this.el.alignTo(this.boundEl, this.alignment); - this.editing = true; - this.show(); - }, - - doAutoSize : function(){ - if(this.autoSize){ - var sz = this.boundEl.getSize(); - switch(this.autoSize){ - case "width": - this.setSize(sz.width, ""); - break; - case "height": - this.setSize("", sz.height); - break; - default: - this.setSize(sz.width, sz.height); - } - } - }, - - - setSize : function(w, h){ - delete this.field.lastSize; - this.field.setSize(w, h); - if(this.el){ - if(Ext.isGecko2 || Ext.isOpera){ - this.el.setSize(w, h); - } - this.el.sync(); - } - }, - - - realign : function(){ - this.el.alignTo(this.boundEl, this.alignment); - }, - - - completeEdit : function(remainVisible){ - if(!this.editing){ - return; - } - var v = this.getValue(); - if(this.revertInvalid !== false && !this.field.isValid()){ - v = this.startValue; - this.cancelEdit(true); - } - if(String(v) === String(this.startValue) && this.ignoreNoChange){ - this.editing = false; - this.hide(); - return; - } - if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){ - this.editing = false; - if(this.updateEl && this.boundEl){ - this.boundEl.update(v); - } - if(remainVisible !== true){ - this.hide(); - } - this.fireEvent("complete", this, v, this.startValue); - } - }, - - onShow : function(){ - this.el.show(); - if(this.hideEl !== false){ - this.boundEl.hide(); - } - this.field.show(); - if(Ext.isIE && !this.fixIEFocus){ this.fixIEFocus = true; - this.deferredFocus.defer(50, this); - }else{ - this.field.focus(); - } - this.fireEvent("startedit", this.boundEl, this.startValue); - }, - - deferredFocus : function(){ - if(this.editing){ - this.field.focus(); - } - }, - - - cancelEdit : function(remainVisible){ - if(this.editing){ - var v = this.getValue(); - this.setValue(this.startValue); - if(remainVisible !== true){ - this.hide(); - } - this.fireEvent("canceledit", this, v, this.startValue); - } - }, - - onBlur : function(){ - if(this.allowBlur !== true && this.editing){ - this.completeEdit(); - } - }, - - onHide : function(){ - if(this.editing){ - this.completeEdit(); - return; - } - this.field.blur(); - if(this.field.collapse){ - this.field.collapse(); - } - this.el.hide(); - if(this.hideEl !== false){ - this.boundEl.show(); - } - }, - - - setValue : function(v){ - this.field.setValue(v); - }, - - - getValue : function(){ - return this.field.getValue(); - }, - - beforeDestroy : function(){ - this.field.destroy(); - this.field = null; + return hash; } -}); -Ext.reg('editor', Ext.Editor); -Ext.MessageBox = function(){ - var dlg, opt, mask, waitTimer; - var bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl; - var buttons, activeTextEl, bwidth, iconCls = ''; + function doSave() { + hiddenField.value = currentToken; + } - var handleButton = function(button){ - if(dlg.isVisible()){ - dlg.hide(); - Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value], 1); - } - }; + function handleStateChange(token) { + currentToken = token; + Ext.History.fireEvent('change', token); + } - var handleHide = function(){ - if(opt && opt.cls){ - dlg.el.removeClass(opt.cls); + function updateIFrame (token) { + var html = ['
    ',Ext.util.Format.htmlEncode(token),'
    '].join(''); + try { + var doc = iframe.contentWindow.document; + doc.open(); + doc.write(html); + doc.close(); + return true; + } catch (e) { + return false; } - progressBar.reset(); - }; + } - var handleEsc = function(d, k, e){ - if(opt && opt.closable !== false){ - dlg.hide(); + function checkIFrame() { + if (!iframe.contentWindow || !iframe.contentWindow.document) { + setTimeout(checkIFrame, 10); + return; } - if(e){ - e.stopEvent(); - } - }; - var updateButtons = function(b){ - var width = 0; - if(!b){ - buttons["ok"].hide(); - buttons["cancel"].hide(); - buttons["yes"].hide(); - buttons["no"].hide(); - return width; - } - dlg.footer.dom.style.display = ''; - for(var k in buttons){ - if(typeof buttons[k] != "function"){ - if(b[k]){ - buttons[k].show(); - buttons[k].setText(typeof b[k] == "string" ? b[k] : Ext.MessageBox.buttonText[k]); - width += buttons[k].el.getWidth()+15; - }else{ - buttons[k].hide(); - } + var doc = iframe.contentWindow.document; + var elem = doc.getElementById("state"); + var token = elem ? elem.innerText : null; + + var hash = getHash(); + + setInterval(function () { + + doc = iframe.contentWindow.document; + elem = doc.getElementById("state"); + + var newtoken = elem ? elem.innerText : null; + + var newHash = getHash(); + + if (newtoken !== token) { + token = newtoken; + handleStateChange(token); + location.hash = token; + hash = token; + doSave(); + } else if (newHash !== hash) { + hash = newHash; + updateIFrame(newHash); } + + }, 50); + + ready = true; + + Ext.History.fireEvent('ready', Ext.History); + } + + function startUp() { + currentToken = hiddenField.value ? hiddenField.value : getHash(); + + if (Ext.isIE) { + checkIFrame(); + } else { + var hash = getHash(); + setInterval(function () { + var newHash = getHash(); + if (newHash !== hash) { + hash = newHash; + handleStateChange(hash); + doSave(); + } + }, 50); + ready = true; + Ext.History.fireEvent('ready', Ext.History); } - return width; - }; + } return { - getDialog : function(titleText){ - if(!dlg){ - dlg = new Ext.Window({ - autoCreate : true, - title:titleText, - resizable:false, - constrain:true, - constrainHeader:true, - minimizable : false, - maximizable : false, - stateful: false, - modal: true, - shim:true, - buttonAlign:"center", - width:400, - height:100, - minHeight: 80, - plain:true, - footer:true, - closable:true, - close : function(){ - if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ - handleButton("no"); - }else{ - handleButton("cancel"); - } + fieldId: 'x-history-field', + + iframeId: 'x-history-frame', + + events:{}, + + + init: function (onReady, scope) { + if(ready) { + Ext.callback(onReady, scope, [this]); + return; + } + if(!Ext.isReady){ + Ext.onReady(function(){ + Ext.History.init(onReady, scope); + }); + return; + } + hiddenField = Ext.getDom(Ext.History.fieldId); + if (Ext.isIE) { + iframe = Ext.getDom(Ext.History.iframeId); + } + this.addEvents( + + 'ready', + + 'change' + ); + if(onReady){ + this.on('ready', onReady, scope, {single:true}); + } + startUp(); + }, + + + add: function (token, preventDup) { + if(preventDup !== false){ + if(this.getToken() == token){ + return true; + } + } + if (Ext.isIE) { + return updateIFrame(token); + } else { + location.hash = token; + return true; + } + }, + + + back: function(){ + history.go(-1); + }, + + + forward: function(){ + history.go(1); + }, + + + getToken: function() { + return ready ? currentToken : getHash(); + } + }; +})(); +Ext.apply(Ext.History, new Ext.util.Observable()); +Ext.Tip = Ext.extend(Ext.Panel, { + + + + minWidth : 40, + + maxWidth : 300, + + shadow : "sides", + + defaultAlign : "tl-bl?", + autoRender: true, + quickShowInterval : 250, + + + frame:true, + hidden:true, + baseCls: 'x-tip', + floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, + autoHeight:true, + + closeAction: 'hide', + + + initComponent : function(){ + Ext.Tip.superclass.initComponent.call(this); + if(this.closable && !this.title){ + this.elements += ',header'; + } + }, + + + afterRender : function(){ + Ext.Tip.superclass.afterRender.call(this); + if(this.closable){ + this.addTool({ + id: 'close', + handler: this[this.closeAction], + scope: this + }); + } + }, + + + showAt : function(xy){ + Ext.Tip.superclass.show.call(this); + if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){ + this.doAutoWidth(); + } + if(this.constrainPosition){ + xy = this.el.adjustForConstraints(xy); + } + this.setPagePosition(xy[0], xy[1]); + }, + + + doAutoWidth : function(adjust){ + adjust = adjust || 0; + var bw = this.body.getTextWidth(); + if(this.title){ + bw = Math.max(bw, this.header.child('span').getTextWidth(this.title)); + } + bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + adjust; + this.setWidth(bw.constrain(this.minWidth, this.maxWidth)); + + + if(Ext.isIE7 && !this.repainted){ + this.el.repaint(); + this.repainted = true; + } + }, + + + showBy : function(el, pos){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign)); + }, + + initDraggable : function(){ + this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); + this.header.addClass('x-tip-draggable'); + } +}); + +Ext.reg('tip', Ext.Tip); + + +Ext.Tip.DD = function(tip, config){ + Ext.apply(this, config); + this.tip = tip; + Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id); + this.setHandleElId(tip.header.id); + this.scroll = false; +}; + +Ext.extend(Ext.Tip.DD, Ext.dd.DD, { + moveOnly:true, + scroll:false, + headerOffsets:[100, 25], + startDrag : function(){ + this.tip.el.disableShadow(); + }, + endDrag : function(e){ + this.tip.el.enableShadow(true); + } +}); +Ext.ToolTip = Ext.extend(Ext.Tip, { + + + + + showDelay : 500, + + hideDelay : 200, + + dismissDelay : 5000, + + + trackMouse : false, + + anchorToTarget : true, + + anchorOffset : 0, + + + + targetCounter : 0, + + constrainPosition : false, + + + initComponent : function(){ + Ext.ToolTip.superclass.initComponent.call(this); + this.lastActive = new Date(); + this.initTarget(this.target); + this.origAnchor = this.anchor; + }, + + + onRender : function(ct, position){ + Ext.ToolTip.superclass.onRender.call(this, ct, position); + this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition(); + this.anchorEl = this.el.createChild({ + cls: 'x-tip-anchor ' + this.anchorCls + }); + }, + + + afterRender : function(){ + Ext.ToolTip.superclass.afterRender.call(this); + this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1).setVisibilityMode(Ext.Element.DISPLAY); + }, + + + initTarget : function(target){ + var t; + if((t = Ext.get(target))){ + if(this.target){ + var tg = Ext.get(this.target); + this.mun(tg, 'mouseover', this.onTargetOver, this); + this.mun(tg, 'mouseout', this.onTargetOut, this); + this.mun(tg, 'mousemove', this.onMouseMove, this); + } + this.mon(t, { + mouseover: this.onTargetOver, + mouseout: this.onTargetOut, + mousemove: this.onMouseMove, + scope: this + }); + this.target = t; + } + if(this.anchor){ + this.anchorTarget = this.target; + } + }, + + + onMouseMove : function(e){ + var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true; + if (t) { + this.targetXY = e.getXY(); + if (t === this.triggerElement) { + if(!this.hidden && this.trackMouse){ + this.setPagePosition(this.getTargetXY()); + } + } else { + this.hide(); + this.lastActive = new Date(0); + this.onTargetOver(e); + } + } else if (!this.closable && this.isVisible()) { + this.hide(); + } + }, + + + getTargetXY : function(){ + if(this.delegate){ + this.anchorTarget = this.triggerElement; + } + if(this.anchor){ + this.targetCounter++; + var offsets = this.getOffsets(), + xy = (this.anchorToTarget && !this.trackMouse) ? this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) : this.targetXY, + dw = Ext.lib.Dom.getViewWidth() - 5, + dh = Ext.lib.Dom.getViewHeight() - 5, + de = document.documentElement, + bd = document.body, + scrollX = (de.scrollLeft || bd.scrollLeft || 0) + 5, + scrollY = (de.scrollTop || bd.scrollTop || 0) + 5, + axy = [xy[0] + offsets[0], xy[1] + offsets[1]], + sz = this.getSize(); + + this.anchorEl.removeClass(this.anchorCls); + + if(this.targetCounter < 2){ + if(axy[0] < scrollX){ + if(this.anchorToTarget){ + this.defaultAlign = 'l-r'; + if(this.mouseOffset){this.mouseOffset[0] *= -1;} } - }); - buttons = {}; - var bt = this.buttonText; - buttons["ok"] = dlg.addButton(bt["ok"], handleButton.createCallback("ok")); - buttons["yes"] = dlg.addButton(bt["yes"], handleButton.createCallback("yes")); - buttons["no"] = dlg.addButton(bt["no"], handleButton.createCallback("no")); - buttons["cancel"] = dlg.addButton(bt["cancel"], handleButton.createCallback("cancel")); - buttons["ok"].hideMode = buttons["yes"].hideMode = buttons["no"].hideMode = buttons["cancel"].hideMode = 'offsets'; - dlg.render(document.body); - dlg.getEl().addClass('x-window-dlg'); - mask = dlg.mask; - bodyEl = dlg.body.createChild({ - html:'

    ' - }); - iconEl = Ext.get(bodyEl.dom.firstChild); - var contentEl = bodyEl.dom.childNodes[1]; - msgEl = Ext.get(contentEl.firstChild); - textboxEl = Ext.get(contentEl.childNodes[2].firstChild); - textboxEl.enableDisplayMode(); - textboxEl.addKeyListener([10,13], function(){ - if(dlg.isVisible() && opt && opt.buttons){ - if(opt.buttons.ok){ - handleButton("ok"); - }else if(opt.buttons.yes){ - handleButton("yes"); - } + this.anchor = 'left'; + return this.getTargetXY(); + } + if(axy[0]+sz.width > dw){ + if(this.anchorToTarget){ + this.defaultAlign = 'r-l'; + if(this.mouseOffset){this.mouseOffset[0] *= -1;} } - }); - textareaEl = Ext.get(contentEl.childNodes[2].childNodes[1]); - textareaEl.enableDisplayMode(); - progressBar = new Ext.ProgressBar({ - renderTo:bodyEl - }); - bodyEl.createChild({cls:'x-clear'}); + this.anchor = 'right'; + return this.getTargetXY(); + } + if(axy[1] < scrollY){ + if(this.anchorToTarget){ + this.defaultAlign = 't-b'; + if(this.mouseOffset){this.mouseOffset[1] *= -1;} + } + this.anchor = 'top'; + return this.getTargetXY(); + } + if(axy[1]+sz.height > dh){ + if(this.anchorToTarget){ + this.defaultAlign = 'b-t'; + if(this.mouseOffset){this.mouseOffset[1] *= -1;} + } + this.anchor = 'bottom'; + return this.getTargetXY(); + } } - return dlg; - }, - - updateText : function(text){ - if(!dlg.isVisible() && !opt.width){ - dlg.setSize(this.maxWidth, 100); } - msgEl.update(text || ' '); + this.anchorCls = 'x-tip-anchor-'+this.getAnchorPosition(); + this.anchorEl.addClass(this.anchorCls); + this.targetCounter = 0; + return axy; + }else{ + var mouseOffset = this.getMouseOffset(); + return [this.targetXY[0]+mouseOffset[0], this.targetXY[1]+mouseOffset[1]]; + } + }, - var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0; - var mw = msgEl.getWidth() + msgEl.getMargins('lr'); - var fw = dlg.getFrameWidth('lr'); - var bw = dlg.body.getFrameWidth('lr'); - if (Ext.isIE && iw > 0){ - iw += 3; + getMouseOffset : function(){ + var offset = this.anchor ? [0,0] : [15,18]; + if(this.mouseOffset){ + offset[0] += this.mouseOffset[0]; + offset[1] += this.mouseOffset[1]; + } + return offset; + }, + + + getAnchorPosition : function(){ + if(this.anchor){ + this.tipAnchor = this.anchor.charAt(0); + }else{ + var m = this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/); + if(!m){ + throw 'AnchorTip.defaultAlign is invalid'; } - var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth), - Math.max(opt.minWidth || this.minWidth, bwidth || 0)); + this.tipAnchor = m[1].charAt(0); + } - if(opt.prompt === true){ - activeTextEl.setWidth(w-iw-fw-bw); + switch(this.tipAnchor){ + case 't': return 'top'; + case 'b': return 'bottom'; + case 'r': return 'right'; + } + return 'left'; + }, + + + getAnchorAlign : function(){ + switch(this.anchor){ + case 'top' : return 'tl-bl'; + case 'left' : return 'tl-tr'; + case 'right': return 'tr-tl'; + default : return 'bl-tl'; + } + }, + + + getOffsets : function(){ + var offsets, + ap = this.getAnchorPosition().charAt(0); + if(this.anchorToTarget && !this.trackMouse){ + switch(ap){ + case 't': + offsets = [0, 9]; + break; + case 'b': + offsets = [0, -13]; + break; + case 'r': + offsets = [-13, 0]; + break; + default: + offsets = [9, 0]; + break; } - if(opt.progress === true || opt.wait === true){ - progressBar.setSize(w-iw-fw-bw); + }else{ + switch(ap){ + case 't': + offsets = [-15-this.anchorOffset, 30]; + break; + case 'b': + offsets = [-19-this.anchorOffset, -13-this.el.dom.offsetHeight]; + break; + case 'r': + offsets = [-15-this.el.dom.offsetWidth, -13-this.anchorOffset]; + break; + default: + offsets = [25, -13-this.anchorOffset]; + break; } - dlg.setSize(w, 'auto').center(); - return this; - }, + } + var mouseOffset = this.getMouseOffset(); + offsets[0] += mouseOffset[0]; + offsets[1] += mouseOffset[1]; - - updateProgress : function(value, progressText, msg){ - progressBar.updateProgress(value, progressText); - if(msg){ - this.updateText(msg); + return offsets; + }, + + + onTargetOver : function(e){ + if(this.disabled || e.within(this.target.dom, true)){ + return; + } + var t = e.getTarget(this.delegate); + if (t) { + this.triggerElement = t; + this.clearTimer('hide'); + this.targetXY = e.getXY(); + this.delayShow(); + } + }, + + + delayShow : function(){ + if(this.hidden && !this.showTimer){ + if(this.lastActive.getElapsed() < this.quickShowInterval){ + this.show(); + }else{ + this.showTimer = this.show.defer(this.showDelay, this); } - return this; - }, + }else if(!this.hidden && this.autoHide !== false){ + this.show(); + } + }, - - isVisible : function(){ - return dlg && dlg.isVisible(); - }, + + onTargetOut : function(e){ + if(this.disabled || e.within(this.target.dom, true)){ + return; + } + this.clearTimer('show'); + if(this.autoHide !== false){ + this.delayHide(); + } + }, - - hide : function(){ - if(this.isVisible()){ - dlg.hide(); - handleHide(); + + delayHide : function(){ + if(!this.hidden && !this.hideTimer){ + this.hideTimer = this.hide.defer(this.hideDelay, this); + } + }, + + + hide: function(){ + this.clearTimer('dismiss'); + this.lastActive = new Date(); + if(this.anchorEl){ + this.anchorEl.hide(); + } + Ext.ToolTip.superclass.hide.call(this); + delete this.triggerElement; + }, + + + show : function(){ + if(this.anchor){ + + + this.showAt([-1000,-1000]); + this.origConstrainPosition = this.constrainPosition; + this.constrainPosition = false; + this.anchor = this.origAnchor; + } + this.showAt(this.getTargetXY()); + + if(this.anchor){ + this.anchorEl.show(); + this.syncAnchor(); + this.constrainPosition = this.origConstrainPosition; + }else{ + this.anchorEl.hide(); + } + }, + + + showAt : function(xy){ + this.lastActive = new Date(); + this.clearTimers(); + Ext.ToolTip.superclass.showAt.call(this, xy); + if(this.dismissDelay && this.autoHide !== false){ + this.dismissTimer = this.hide.defer(this.dismissDelay, this); + } + if(this.anchor && !this.anchorEl.isVisible()){ + this.syncAnchor(); + this.anchorEl.show(); + }else{ + this.anchorEl.hide(); + } + }, + + + syncAnchor : function(){ + var anchorPos, targetPos, offset; + switch(this.tipAnchor.charAt(0)){ + case 't': + anchorPos = 'b'; + targetPos = 'tl'; + offset = [20+this.anchorOffset, 2]; + break; + case 'r': + anchorPos = 'l'; + targetPos = 'tr'; + offset = [-2, 11+this.anchorOffset]; + break; + case 'b': + anchorPos = 't'; + targetPos = 'bl'; + offset = [20+this.anchorOffset, -2]; + break; + default: + anchorPos = 'r'; + targetPos = 'tl'; + offset = [2, 11+this.anchorOffset]; + break; + } + this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset); + }, + + + setPagePosition : function(x, y){ + Ext.ToolTip.superclass.setPagePosition.call(this, x, y); + if(this.anchor){ + this.syncAnchor(); + } + }, + + + clearTimer : function(name){ + name = name + 'Timer'; + clearTimeout(this[name]); + delete this[name]; + }, + + + clearTimers : function(){ + this.clearTimer('show'); + this.clearTimer('dismiss'); + this.clearTimer('hide'); + }, + + + onShow : function(){ + Ext.ToolTip.superclass.onShow.call(this); + Ext.getDoc().on('mousedown', this.onDocMouseDown, this); + }, + + + onHide : function(){ + Ext.ToolTip.superclass.onHide.call(this); + Ext.getDoc().un('mousedown', this.onDocMouseDown, this); + }, + + + onDocMouseDown : function(e){ + if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){ + this.disable(); + this.doEnable.defer(100, this); + } + }, + + + doEnable : function(){ + if(!this.isDestroyed){ + this.enable(); + } + }, + + + onDisable : function(){ + this.clearTimers(); + this.hide(); + }, + + + adjustPosition : function(x, y){ + if(this.constrainPosition){ + var ay = this.targetXY[1], h = this.getSize().height; + if(y <= ay && (y+h) >= ay){ + y = ay-h-5; } - return this; - }, + } + return {x : x, y: y}; + }, + + beforeDestroy : function(){ + this.clearTimers(); + Ext.destroy(this.anchorEl); + delete this.anchorEl; + delete this.target; + delete this.anchorTarget; + delete this.triggerElement; + Ext.ToolTip.superclass.beforeDestroy.call(this); + }, - - show : function(options){ - if(this.isVisible()){ + + onDestroy : function(){ + Ext.getDoc().un('mousedown', this.onDocMouseDown, this); + Ext.ToolTip.superclass.onDestroy.call(this); + } +}); + +Ext.reg('tooltip', Ext.ToolTip); +Ext.QuickTip = Ext.extend(Ext.ToolTip, { + + + interceptTitles : false, + + + tagConfig : { + namespace : "ext", + attribute : "qtip", + width : "qwidth", + target : "target", + title : "qtitle", + hide : "hide", + cls : "qclass", + align : "qalign", + anchor : "anchor" + }, + + + initComponent : function(){ + this.target = this.target || Ext.getDoc(); + this.targets = this.targets || {}; + Ext.QuickTip.superclass.initComponent.call(this); + }, + + + register : function(config){ + var cs = Ext.isArray(config) ? config : arguments; + for(var i = 0, len = cs.length; i < len; i++){ + var c = cs[i]; + var target = c.target; + if(target){ + if(Ext.isArray(target)){ + for(var j = 0, jlen = target.length; j < jlen; j++){ + this.targets[Ext.id(target[j])] = c; + } + } else{ + this.targets[Ext.id(target)] = c; + } + } + } + }, + + + unregister : function(el){ + delete this.targets[Ext.id(el)]; + }, + + + cancelShow: function(el){ + var at = this.activeTarget; + el = Ext.get(el).dom; + if(this.isVisible()){ + if(at && at.el == el){ this.hide(); } - opt = options; - var d = this.getDialog(opt.title || " "); + }else if(at && at.el == el){ + this.clearTimer('show'); + } + }, + + getTipCfg: function(e) { + var t = e.getTarget(), + ttp, + cfg; + if(this.interceptTitles && t.title && Ext.isString(t.title)){ + ttp = t.title; + t.qtip = ttp; + t.removeAttribute("title"); + e.preventDefault(); + }else{ + cfg = this.tagConfig; + ttp = t.qtip || Ext.fly(t).getAttribute(cfg.attribute, cfg.namespace); + } + return ttp; + }, - d.setTitle(opt.title || " "); - var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true); - d.tools.close.setDisplayed(allowClose); - activeTextEl = textboxEl; - opt.prompt = opt.prompt || (opt.multiline ? true : false); - if(opt.prompt){ - if(opt.multiline){ - textboxEl.hide(); - textareaEl.show(); - textareaEl.setHeight(typeof opt.multiline == "number" ? - opt.multiline : this.defaultTextHeight); - activeTextEl = textareaEl; - }else{ - textboxEl.show(); - textareaEl.hide(); - } + + onTargetOver : function(e){ + if(this.disabled){ + return; + } + this.targetXY = e.getXY(); + var t = e.getTarget(); + if(!t || t.nodeType !== 1 || t == document || t == document.body){ + return; + } + if(this.activeTarget && ((t == this.activeTarget.el) || Ext.fly(this.activeTarget.el).contains(t))){ + this.clearTimer('hide'); + this.show(); + return; + } + if(t && this.targets[t.id]){ + this.activeTarget = this.targets[t.id]; + this.activeTarget.el = t; + this.anchor = this.activeTarget.anchor; + if(this.anchor){ + this.anchorTarget = t; + } + this.delayShow(); + return; + } + var ttp, et = Ext.fly(t), cfg = this.tagConfig, ns = cfg.namespace; + if(ttp = this.getTipCfg(e)){ + var autoHide = et.getAttribute(cfg.hide, ns); + this.activeTarget = { + el: t, + text: ttp, + width: et.getAttribute(cfg.width, ns), + autoHide: autoHide != "user" && autoHide !== 'false', + title: et.getAttribute(cfg.title, ns), + cls: et.getAttribute(cfg.cls, ns), + align: et.getAttribute(cfg.align, ns) + + }; + this.anchor = et.getAttribute(cfg.anchor, ns); + if(this.anchor){ + this.anchorTarget = t; + } + this.delayShow(); + } + }, + + + onTargetOut : function(e){ + + + if (this.activeTarget && e.within(this.activeTarget.el) && !this.getTipCfg(e)) { + return; + } + + this.clearTimer('show'); + if(this.autoHide !== false){ + this.delayHide(); + } + }, + + + showAt : function(xy){ + var t = this.activeTarget; + if(t){ + if(!this.rendered){ + this.render(Ext.getBody()); + this.activeTarget = t; + } + if(t.width){ + this.setWidth(t.width); + this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth())); + this.measureWidth = false; + } else{ + this.measureWidth = true; + } + this.setTitle(t.title || ''); + this.body.update(t.text); + this.autoHide = t.autoHide; + this.dismissDelay = t.dismissDelay || this.dismissDelay; + if(this.lastCls){ + this.el.removeClass(this.lastCls); + delete this.lastCls; + } + if(t.cls){ + this.el.addClass(t.cls); + this.lastCls = t.cls; + } + if(this.anchor){ + this.constrainPosition = false; + }else if(t.align){ + xy = this.el.getAlignToXY(t.el, t.align); + this.constrainPosition = false; }else{ - textboxEl.hide(); - textareaEl.hide(); + this.constrainPosition = true; } - activeTextEl.dom.value = opt.value || ""; - if(opt.prompt){ - d.focusEl = activeTextEl; - }else{ - var bs = opt.buttons; - var db = null; - if(bs && bs.ok){ - db = buttons["ok"]; - }else if(bs && bs.yes){ - db = buttons["yes"]; + } + Ext.QuickTip.superclass.showAt.call(this, xy); + }, + + + hide: function(){ + delete this.activeTarget; + Ext.QuickTip.superclass.hide.call(this); + } +}); +Ext.reg('quicktip', Ext.QuickTip); +Ext.QuickTips = function(){ + var tip, + disabled = false; + + return { + + init : function(autoRender){ + if(!tip){ + if(!Ext.isReady){ + Ext.onReady(function(){ + Ext.QuickTips.init(autoRender); + }); + return; } - if (db){ - d.focusEl = db; + tip = new Ext.QuickTip({ + elements:'header,body', + disabled: disabled + }); + if(autoRender !== false){ + tip.render(Ext.getBody()); } } - if(opt.iconCls){ - d.setIconClass(opt.iconCls); + }, + + + ddDisable : function(){ + + if(tip && !disabled){ + tip.disable(); + } + }, + + + ddEnable : function(){ + + if(tip && !disabled){ + tip.enable(); } - this.setIcon(opt.icon); - bwidth = updateButtons(opt.buttons); - progressBar.setVisible(opt.progress === true || opt.wait === true); - this.updateProgress(0, opt.progressText); - this.updateText(opt.msg); - if(opt.cls){ - d.el.addClass(opt.cls); + }, + + + enable : function(){ + if(tip){ + tip.enable(); } - d.proxyDrag = opt.proxyDrag === true; - d.modal = opt.modal !== false; - d.mask = opt.modal !== false ? mask : false; - if(!d.isVisible()){ - document.body.appendChild(dlg.el.dom); - d.setAnimateTarget(opt.animEl); - d.show(opt.animEl); + disabled = false; + }, + + + disable : function(){ + if(tip){ + tip.disable(); } - - d.on('show', function(){ - if(allowClose === true){ - d.keyMap.enable(); - }else{ - d.keyMap.disable(); - } - }, this, {single:true}); - - if(opt.wait === true){ - progressBar.wait(opt.waitConfig); - } - return this; + disabled = true; }, - setIcon : function(icon){ - if(icon && icon != ''){ - iconEl.removeClass('x-hidden'); - iconEl.replaceClass(iconCls, icon); - iconCls = icon; - }else{ - iconEl.replaceClass(iconCls, 'x-hidden'); - iconCls = ''; - } - return this; + isEnabled : function(){ + return tip !== undefined && !tip.disabled; }, - progress : function(title, msg, progressText){ - this.show({ - title : title, - msg : msg, - buttons: false, - progress:true, - closable:false, - minWidth: this.minProgressWidth, - progressText: progressText - }); - return this; + getQuickTip : function(){ + return tip; }, - wait : function(msg, title, config){ - this.show({ - title : title, - msg : msg, - buttons: false, - closable:false, - wait:true, - modal:true, - minWidth: this.minProgressWidth, - waitConfig: config - }); - return this; + register : function(){ + tip.register.apply(tip, arguments); }, - alert : function(title, msg, fn, scope){ - this.show({ - title : title, - msg : msg, - buttons: this.OK, - fn: fn, - scope : scope - }); - return this; + unregister : function(){ + tip.unregister.apply(tip, arguments); }, - confirm : function(title, msg, fn, scope){ - this.show({ - title : title, - msg : msg, - buttons: this.YESNO, - fn: fn, - scope : scope, - icon: this.QUESTION - }); - return this; - }, - - - prompt : function(title, msg, fn, scope, multiline, value){ - this.show({ - title : title, - msg : msg, - buttons: this.OKCANCEL, - fn: fn, - minWidth:250, - scope : scope, - prompt:true, - multiline: multiline, - value: value - }); - return this; - }, - - - OK : {ok:true}, - - CANCEL : {cancel:true}, - - OKCANCEL : {ok:true, cancel:true}, - - YESNO : {yes:true, no:true}, - - YESNOCANCEL : {yes:true, no:true, cancel:true}, - - INFO : 'ext-mb-info', - - WARNING : 'ext-mb-warning', - - QUESTION : 'ext-mb-question', - - ERROR : 'ext-mb-error', - - - defaultTextHeight : 75, - - maxWidth : 600, - - minWidth : 100, - - minProgressWidth : 250, - - buttonText : { - ok : "OK", - cancel : "Cancel", - yes : "Yes", - no : "No" + tips : function(){ + tip.register.apply(tip, arguments); } }; }(); +Ext.slider.Tip = Ext.extend(Ext.Tip, { + minWidth: 10, + offsets : [0, -10], + + init: function(slider) { + slider.on({ + scope : this, + dragstart: this.onSlide, + drag : this.onSlide, + dragend : this.hide, + destroy : this.destroy + }); + }, + + + onSlide : function(slider, e, thumb) { + this.show(); + this.body.update(this.getText(thumb)); + this.doAutoWidth(); + this.el.alignTo(thumb.el, 'b-t?', this.offsets); + }, + + + getText : function(thumb) { + return String(thumb.value); + } +}); -Ext.Msg = Ext.MessageBox; - -Ext.Tip = Ext.extend(Ext.Panel, { - - - - minWidth : 40, - - maxWidth : 300, - - shadow : "sides", - - defaultAlign : "tl-bl?", - autoRender: true, - quickShowInterval : 250, - - - frame:true, - hidden:true, - baseCls: 'x-tip', - floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, - autoHeight:true, - - - initComponent : function(){ - Ext.Tip.superclass.initComponent.call(this); - if(this.closable && !this.title){ - this.elements += ',header'; - } - }, - - - afterRender : function(){ - Ext.Tip.superclass.afterRender.call(this); - if(this.closable){ - this.addTool({ - id: 'close', - handler: this.hide, - scope: this - }); - } - }, - - - showAt : function(xy){ - Ext.Tip.superclass.show.call(this); - if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){ - this.doAutoWidth(); - } - if(this.constrainPosition){ - xy = this.el.adjustForConstraints(xy); - } - this.setPagePosition(xy[0], xy[1]); - }, - - - doAutoWidth : function(){ - var bw = this.body.getTextWidth(); - if(this.title){ - bw = Math.max(bw, this.header.child('span').getTextWidth(this.title)); - } - bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr"); - this.setWidth(bw.constrain(this.minWidth, this.maxWidth)); - - - if(Ext.isIE7 && !this.repainted){ - this.el.repaint(); - this.repainted = true; - } - }, - - - showBy : function(el, pos){ - if(!this.rendered){ - this.render(Ext.getBody()); - } - this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign)); - }, - - initDraggable : function(){ - this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); - this.header.addClass('x-tip-draggable'); - } -}); - +Ext.ux.SliderTip = Ext.slider.Tip; +Ext.tree.TreePanel = Ext.extend(Ext.Panel, { + rootVisible : true, + animate : Ext.enableFx, + lines : true, + enableDD : false, + hlDrop : Ext.enableFx, + pathSeparator : '/', -Ext.Tip.DD = function(tip, config){ - Ext.apply(this, config); - this.tip = tip; - Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id); - this.setHandleElId(tip.header.id); - this.scroll = false; -}; - -Ext.extend(Ext.Tip.DD, Ext.dd.DD, { - moveOnly:true, - scroll:false, - headerOffsets:[100, 25], - startDrag : function(){ - this.tip.el.disableShadow(); - }, - endDrag : function(e){ - this.tip.el.enableShadow(true); - } -}); - -Ext.ToolTip = Ext.extend(Ext.Tip, { - - - - showDelay: 500, - - hideDelay: 200, - - dismissDelay: 5000, - - mouseOffset: [15,18], - - trackMouse : false, - constrainPosition: true, - - initComponent: function(){ - Ext.ToolTip.superclass.initComponent.call(this); - this.lastActive = new Date(); - this.initTarget(); - }, - - - initTarget : function(){ - if(this.target){ - this.target = Ext.get(this.target); - this.target.on('mouseover', this.onTargetOver, this); - this.target.on('mouseout', this.onTargetOut, this); - this.target.on('mousemove', this.onMouseMove, this); - } - }, - - - onMouseMove : function(e){ - this.targetXY = e.getXY(); - if(!this.hidden && this.trackMouse){ - this.setPagePosition(this.getTargetXY()); - } - }, - - - getTargetXY : function(){ - return [this.targetXY[0]+this.mouseOffset[0], this.targetXY[1]+this.mouseOffset[1]]; - }, - - - onTargetOver : function(e){ - if(this.disabled || e.within(this.target.dom, true)){ - return; - } - this.clearTimer('hide'); - this.targetXY = e.getXY(); - this.delayShow(); - }, - - - delayShow : function(){ - if(this.hidden && !this.showTimer){ - if(this.lastActive.getElapsed() < this.quickShowInterval){ - this.show(); - }else{ - this.showTimer = this.show.defer(this.showDelay, this); - } - }else if(!this.hidden && this.autoHide !== false){ - this.show(); - } - }, - - - onTargetOut : function(e){ - if(this.disabled || e.within(this.target.dom, true)){ - return; - } - this.clearTimer('show'); - if(this.autoHide !== false){ - this.delayHide(); - } - }, - - - delayHide : function(){ - if(!this.hidden && !this.hideTimer){ - this.hideTimer = this.hide.defer(this.hideDelay, this); - } - }, - - - hide: function(){ - this.clearTimer('dismiss'); - this.lastActive = new Date(); - Ext.ToolTip.superclass.hide.call(this); - }, - - - show : function(){ - this.showAt(this.getTargetXY()); - }, - - - showAt : function(xy){ - this.lastActive = new Date(); - this.clearTimers(); - Ext.ToolTip.superclass.showAt.call(this, xy); - if(this.dismissDelay && this.autoHide !== false){ - this.dismissTimer = this.hide.defer(this.dismissDelay, this); - } - }, - - - clearTimer : function(name){ - name = name + 'Timer'; - clearTimeout(this[name]); - delete this[name]; - }, - - - clearTimers : function(){ - this.clearTimer('show'); - this.clearTimer('dismiss'); - this.clearTimer('hide'); - }, - - - onShow : function(){ - Ext.ToolTip.superclass.onShow.call(this); - Ext.getDoc().on('mousedown', this.onDocMouseDown, this); - }, - - - onHide : function(){ - Ext.ToolTip.superclass.onHide.call(this); - Ext.getDoc().un('mousedown', this.onDocMouseDown, this); - }, - - - onDocMouseDown : function(e){ - if(this.autoHide !== false && !e.within(this.el.dom)){ - this.disable(); - this.enable.defer(100, this); - } - }, - - - onDisable : function(){ - this.clearTimers(); - this.hide(); - }, - - - adjustPosition : function(x, y){ + bubbleEvents : [], + + initComponent : function(){ + Ext.tree.TreePanel.superclass.initComponent.call(this); + + if(!this.eventModel){ + this.eventModel = new Ext.tree.TreeEventModel(this); + } + - var ay = this.targetXY[1], h = this.getSize().height; - if(this.constrainPosition && y <= ay && (y+h) >= ay){ - y = ay-h-5; - } - return {x : x, y: y}; - }, - - - onDestroy : function(){ - Ext.ToolTip.superclass.onDestroy.call(this); - if(this.target){ - this.target.un('mouseover', this.onTargetOver, this); - this.target.un('mouseout', this.onTargetOut, this); - this.target.un('mousemove', this.onMouseMove, this); - } - } -}); - -Ext.QuickTip = Ext.extend(Ext.ToolTip, { - - - interceptTitles : false, - - - tagConfig : { - namespace : "ext", - attribute : "qtip", - width : "qwidth", - target : "target", - title : "qtitle", - hide : "hide", - cls : "qclass", - align : "qalign" - }, - - - initComponent : function(){ - this.target = this.target || Ext.getDoc(); - this.targets = this.targets || {}; - Ext.QuickTip.superclass.initComponent.call(this); - }, - - - register : function(config){ - var cs = Ext.isArray(config) ? config : arguments; - for(var i = 0, len = cs.length; i < len; i++){ - var c = cs[i]; - var target = c.target; - if(target){ - if(Ext.isArray(target)){ - for(var j = 0, jlen = target.length; j < jlen; j++){ - this.targets[Ext.id(target[j])] = c; - } - } else{ - this.targets[Ext.id(target)] = c; - } - } - } - }, - - - unregister : function(el){ - delete this.targets[Ext.id(el)]; - }, - - - onTargetOver : function(e){ - if(this.disabled){ - return; - } - this.targetXY = e.getXY(); - var t = e.getTarget(); - if(!t || t.nodeType !== 1 || t == document || t == document.body){ - return; - } - if(this.activeTarget && t == this.activeTarget.el){ - this.clearTimer('hide'); - this.show(); - return; - } - if(t && this.targets[t.id]){ - this.activeTarget = this.targets[t.id]; - this.activeTarget.el = t; - this.delayShow(); - return; - } - var ttp, et = Ext.fly(t), cfg = this.tagConfig; - var ns = cfg.namespace; - if(this.interceptTitles && t.title){ - ttp = t.title; - t.qtip = ttp; - t.removeAttribute("title"); - e.preventDefault(); - } else{ - ttp = t.qtip || et.getAttributeNS(ns, cfg.attribute); - } - if(ttp){ - var autoHide = et.getAttributeNS(ns, cfg.hide); - this.activeTarget = { - el: t, - text: ttp, - width: et.getAttributeNS(ns, cfg.width), - autoHide: autoHide != "user" && autoHide !== 'false', - title: et.getAttributeNS(ns, cfg.title), - cls: et.getAttributeNS(ns, cfg.cls), - align: et.getAttributeNS(ns, cfg.align) - }; - this.delayShow(); - } - }, - - - onTargetOut : function(e){ - this.clearTimer('show'); - if(this.autoHide !== false){ - this.delayHide(); - } - }, - - - showAt : function(xy){ - var t = this.activeTarget; - if(t){ - if(!this.rendered){ - this.render(Ext.getBody()); - this.activeTarget = t; - } - if(t.width){ - this.setWidth(t.width); - this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth())); - this.measureWidth = false; - } else{ - this.measureWidth = true; - } - this.setTitle(t.title || ''); - this.body.update(t.text); - this.autoHide = t.autoHide; - this.dismissDelay = t.dismissDelay || this.dismissDelay; - if(this.lastCls){ - this.el.removeClass(this.lastCls); - delete this.lastCls; - } - if(t.cls){ - this.el.addClass(t.cls); - this.lastCls = t.cls; - } - if(t.align){ - xy = this.el.getAlignToXY(t.el, t.align); - this.constrainPosition = false; - } else{ - this.constrainPosition = true; - } - } - Ext.QuickTip.superclass.showAt.call(this, xy); - }, - - - hide: function(){ - delete this.activeTarget; - Ext.QuickTip.superclass.hide.call(this); - } -}); - -Ext.QuickTips = function(){ - var tip, locks = []; - return { - - init : function(autoRender){ - if(!tip){ - if(!Ext.isReady){ - Ext.onReady(function(){ - Ext.QuickTips.init(autoRender); - }); - return; - } - tip = new Ext.QuickTip({elements:'header,body'}); - if(autoRender !== false){ - tip.render(Ext.getBody()); - } - } - }, - - - enable : function(){ - if(tip){ - locks.pop(); - if(locks.length < 1){ - tip.enable(); - } - } - }, - - - disable : function(){ - if(tip){ - tip.disable(); - } - locks.push(1); - }, - - - isEnabled : function(){ - return tip !== undefined && !tip.disabled; - }, - - - getQuickTip : function(){ - return tip; - }, - - - register : function(){ - tip.register.apply(tip, arguments); - }, - - - unregister : function(){ - tip.unregister.apply(tip, arguments); - }, - - - tips :function(){ - tip.register.apply(tip, arguments); - } - } -}(); - -Ext.tree.TreePanel = Ext.extend(Ext.Panel, { - rootVisible : true, - animate: Ext.enableFx, - lines : true, - enableDD : false, - hlDrop : Ext.enableFx, - pathSeparator: "/", - - initComponent : function(){ - Ext.tree.TreePanel.superclass.initComponent.call(this); - - if(!this.eventModel){ - this.eventModel = new Ext.tree.TreeEventModel(this); - } - + var l = this.loader; + if(!l){ + l = new Ext.tree.TreeLoader({ + dataUrl: this.dataUrl, + requestMethod: this.requestMethod + }); + }else if(Ext.isObject(l) && !l.load){ + l = new Ext.tree.TreeLoader(l); + } + this.loader = l; + + this.nodeHash = {}; + - var l = this.loader; - if(!l){ - l = new Ext.tree.TreeLoader({ - dataUrl: this.dataUrl - }); - }else if(typeof l == 'object' && !l.load){ - l = new Ext.tree.TreeLoader(l); - } - this.loader = l; - - this.nodeHash = {}; - - - if(this.root){ - this.setRootNode(this.root); - } - - this.addEvents( - - - "append", - - "remove", - - "movenode", - - "insert", - - "beforeappend", - - "beforeremove", - - "beforemovenode", - - "beforeinsert", - - - "beforeload", - - "load", - - "textchange", - - "beforeexpandnode", - - "beforecollapsenode", - - "expandnode", - - "disabledchange", - - "collapsenode", - - "beforeclick", - - "click", - - "checkchange", - - "dblclick", - - "contextmenu", - - "beforechildrenrendered", - - "startdrag", - - "enddrag", - - "dragdrop", - - "beforenodedrop", - - "nodedrop", - - "nodedragover" - ); - if(this.singleExpand){ - this.on("beforeexpandnode", this.restrictExpand, this); - } - }, - + if(this.root){ + var r = this.root; + delete this.root; + this.setRootNode(r); + } + + + this.addEvents( + + + 'append', + + 'remove', + + 'movenode', + + 'insert', + + 'beforeappend', + + 'beforeremove', + + 'beforemovenode', + + 'beforeinsert', + + + 'beforeload', + + 'load', + + 'textchange', + + 'beforeexpandnode', + + 'beforecollapsenode', + + 'expandnode', + + 'disabledchange', + + 'collapsenode', + + 'beforeclick', + + 'click', + + 'containerclick', + + 'checkchange', + + 'beforedblclick', + + 'dblclick', + + 'containerdblclick', + + 'contextmenu', + + 'containercontextmenu', + + 'beforechildrenrendered', + + 'startdrag', + + 'enddrag', + + 'dragdrop', + + 'beforenodedrop', + + 'nodedrop', + + 'nodedragover' + ); + if(this.singleExpand){ + this.on('beforeexpandnode', this.restrictExpand, this); + } + }, + - proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){ - if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){ - ename = ename+'node'; - } + proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){ + if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){ + ename = ename+'node'; + } - return this.fireEvent(ename, a1, a2, a3, a4, a5, a6); - }, - - - - getRootNode : function(){ - return this.root; - }, - - - setRootNode : function(node){ + return this.fireEvent(ename, a1, a2, a3, a4, a5, a6); + }, + + + + getRootNode : function(){ + return this.root; + }, + + + setRootNode : function(node){ + this.destroyRoot(); if(!node.render){ - node = this.loader.createNode(node); - } - this.root = node; - node.ownerTree = this; - node.isRoot = true; - this.registerNode(node); - if(!this.rootVisible){ - var uiP = node.attributes.uiProvider; - node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node); - } - return node; - }, - - - getNodeById : function(id){ - return this.nodeHash[id]; - }, - + node = this.loader.createNode(node); + } + this.root = node; + node.ownerTree = this; + node.isRoot = true; + this.registerNode(node); + if(!this.rootVisible){ + var uiP = node.attributes.uiProvider; + node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node); + } + if(this.innerCt){ + this.clearInnerCt(); + this.renderRoot(); + } + return node; + }, - registerNode : function(node){ - this.nodeHash[node.id] = node; - }, - + clearInnerCt : function(){ + this.innerCt.update(''); + }, - unregisterNode : function(node){ - delete this.nodeHash[node.id]; - }, - - toString : function(){ - return "[Tree"+(this.id?" "+this.id:"")+"]"; - }, - + renderRoot : function(){ + this.root.render(); + if(!this.rootVisible){ + this.root.renderChildren(); + } + }, + - restrictExpand : function(node){ - var p = node.parentNode; - if(p){ - if(p.expandedChild && p.expandedChild.parentNode == p){ - p.expandedChild.collapse(); - } - p.expandedChild = node; - } - }, - - - getChecked : function(a, startNode){ - startNode = startNode || this.root; - var r = []; - var f = function(){ - if(this.attributes.checked){ - r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a])); - } - } - startNode.cascade(f); - return r; - }, - - - getEl : function(){ - return this.el; - }, - - - getLoader : function(){ - return this.loader; - }, - - - expandAll : function(){ - this.root.expand(true); - }, - - - collapseAll : function(){ - this.root.collapse(true); - }, - - - getSelectionModel : function(){ - if(!this.selModel){ - this.selModel = new Ext.tree.DefaultSelectionModel(); - } - return this.selModel; - }, - - - expandPath : function(path, attr, callback){ - attr = attr || "id"; - var keys = path.split(this.pathSeparator); - var curNode = this.root; + getNodeById : function(id){ + return this.nodeHash[id]; + }, + + + registerNode : function(node){ + this.nodeHash[node.id] = node; + }, + + + unregisterNode : function(node){ + delete this.nodeHash[node.id]; + }, + + + toString : function(){ + return '[Tree'+(this.id?' '+this.id:'')+']'; + }, + + + restrictExpand : function(node){ + var p = node.parentNode; + if(p){ + if(p.expandedChild && p.expandedChild.parentNode == p){ + p.expandedChild.collapse(); + } + p.expandedChild = node; + } + }, + + + getChecked : function(a, startNode){ + startNode = startNode || this.root; + var r = []; + var f = function(){ + if(this.attributes.checked){ + r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a])); + } + }; + startNode.cascade(f); + return r; + }, + + + getLoader : function(){ + return this.loader; + }, + + + expandAll : function(){ + this.root.expand(true); + }, + + + collapseAll : function(){ + this.root.collapse(true); + }, + + + getSelectionModel : function(){ + if(!this.selModel){ + this.selModel = new Ext.tree.DefaultSelectionModel(); + } + return this.selModel; + }, + + + expandPath : function(path, attr, callback){ + if(Ext.isEmpty(path)){ + if(callback){ + callback(false, undefined); + } + return; + } + attr = attr || 'id'; + var keys = path.split(this.pathSeparator); + var curNode = this.root; if(curNode.attributes[attr] != keys[1]){ - if(callback){ - callback(false, null); - } - return; - } - var index = 1; - var f = function(){ - if(++index == keys.length){ - if(callback){ - callback(true, curNode); - } - return; - } - var c = curNode.findChild(attr, keys[index]); - if(!c){ - if(callback){ - callback(false, curNode); - } - return; - } - curNode = c; - c.expand(false, false, f); - }; - curNode.expand(false, false, f); - }, - - - selectPath : function(path, attr, callback){ - attr = attr || "id"; - var keys = path.split(this.pathSeparator); - var v = keys.pop(); - if(keys.length > 0){ - var f = function(success, node){ - if(success && node){ - var n = node.findChild(attr, v); - if(n){ - n.select(); - if(callback){ - callback(true, n); - } - }else if(callback){ - callback(false, n); - } - }else{ - if(callback){ - callback(false, n); - } - } - }; - this.expandPath(keys.join(this.pathSeparator), attr, f); - }else{ - this.root.select(); - if(callback){ - callback(true, this.root); - } - } - }, - - - getTreeEl : function(){ - return this.body; - }, - + if(callback){ + callback(false, null); + } + return; + } + var index = 1; + var f = function(){ + if(++index == keys.length){ + if(callback){ + callback(true, curNode); + } + return; + } + var c = curNode.findChild(attr, keys[index]); + if(!c){ + if(callback){ + callback(false, curNode); + } + return; + } + curNode = c; + c.expand(false, false, f); + }; + curNode.expand(false, false, f); + }, + - onRender : function(ct, position){ - Ext.tree.TreePanel.superclass.onRender.call(this, ct, position); - this.el.addClass('x-tree'); - this.innerCt = this.body.createChild({tag:"ul", - cls:"x-tree-root-ct " + - (this.useArrows ? 'x-tree-arrows' : this.lines ? "x-tree-lines" : "x-tree-no-lines")}); - }, - + selectPath : function(path, attr, callback){ + if(Ext.isEmpty(path)){ + if(callback){ + callback(false, undefined); + } + return; + } + attr = attr || 'id'; + var keys = path.split(this.pathSeparator), + v = keys.pop(); + if(keys.length > 1){ + var f = function(success, node){ + if(success && node){ + var n = node.findChild(attr, v); + if(n){ + n.select(); + if(callback){ + callback(true, n); + } + }else if(callback){ + callback(false, n); + } + }else{ + if(callback){ + callback(false, n); + } + } + }; + this.expandPath(keys.join(this.pathSeparator), attr, f); + }else{ + this.root.select(); + if(callback){ + callback(true, this.root); + } + } + }, + - initEvents : function(){ - Ext.tree.TreePanel.superclass.initEvents.call(this); - - if(this.containerScroll){ - Ext.dd.ScrollManager.register(this.body); - } - if((this.enableDD || this.enableDrop) && !this.dropZone){ - - this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || { - ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true - }); - } - if((this.enableDD || this.enableDrag) && !this.dragZone){ - - this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || { - ddGroup: this.ddGroup || "TreeDD", - scroll: this.ddScroll - }); - } - this.getSelectionModel().init(this); - }, - + getTreeEl : function(){ + return this.body; + }, + - afterRender : function(){ - Ext.tree.TreePanel.superclass.afterRender.call(this); - this.root.render(); - if(!this.rootVisible){ - this.root.renderChildren(); - } - }, - - onDestroy : function(){ - if(this.rendered){ - this.body.removeAllListeners(); - Ext.dd.ScrollManager.unregister(this.body); - if(this.dropZone){ - this.dropZone.unreg(); - } - if(this.dragZone){ - this.dragZone.unreg(); - } - } - this.root.destroy(); - this.nodeHash = null; - Ext.tree.TreePanel.superclass.onDestroy.call(this); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}); - -Ext.tree.TreePanel.nodeTypes = {}; - -Ext.reg('treepanel', Ext.tree.TreePanel); -Ext.tree.TreeEventModel = function(tree){ - this.tree = tree; - this.tree.on('render', this.initEvents, this); -} - -Ext.tree.TreeEventModel.prototype = { - initEvents : function(){ - var el = this.tree.getTreeEl(); - el.on('click', this.delegateClick, this); - if(this.tree.trackMouseOver !== false){ - el.on('mouseover', this.delegateOver, this); - el.on('mouseout', this.delegateOut, this); - } - el.on('dblclick', this.delegateDblClick, this); - el.on('contextmenu', this.delegateContextMenu, this); - }, - - getNode : function(e){ - var t; - if(t = e.getTarget('.x-tree-node-el', 10)){ - var id = Ext.fly(t, '_treeEvents').getAttributeNS('ext', 'tree-node-id'); - if(id){ - return this.tree.getNodeById(id); - } - } - return null; - }, - - getNodeTarget : function(e){ - var t = e.getTarget('.x-tree-node-icon', 1); - if(!t){ - t = e.getTarget('.x-tree-node-el', 6); - } - return t; - }, - - delegateOut : function(e, t){ - if(!this.beforeEvent(e)){ - return; - } - if(e.getTarget('.x-tree-ec-icon', 1)){ - var n = this.getNode(e); - this.onIconOut(e, n); - if(n == this.lastEcOver){ - delete this.lastEcOver; - } - } - if((t = this.getNodeTarget(e)) && !e.within(t, true)){ - this.onNodeOut(e, this.getNode(e)); - } - }, - - delegateOver : function(e, t){ - if(!this.beforeEvent(e)){ - return; - } + onRender : function(ct, position){ + Ext.tree.TreePanel.superclass.onRender.call(this, ct, position); + this.el.addClass('x-tree'); + this.innerCt = this.body.createChild({tag:'ul', + cls:'x-tree-root-ct ' + + (this.useArrows ? 'x-tree-arrows' : this.lines ? 'x-tree-lines' : 'x-tree-no-lines')}); + }, + + + initEvents : function(){ + Ext.tree.TreePanel.superclass.initEvents.call(this); + + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.body); + } + if((this.enableDD || this.enableDrop) && !this.dropZone){ + + this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || { + ddGroup: this.ddGroup || 'TreeDD', appendOnly: this.ddAppendOnly === true + }); + } + if((this.enableDD || this.enableDrag) && !this.dragZone){ + + this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || { + ddGroup: this.ddGroup || 'TreeDD', + scroll: this.ddScroll + }); + } + this.getSelectionModel().init(this); + }, + + + afterRender : function(){ + Ext.tree.TreePanel.superclass.afterRender.call(this); + this.renderRoot(); + }, + + beforeDestroy : function(){ + if(this.rendered){ + Ext.dd.ScrollManager.unregister(this.body); + Ext.destroy(this.dropZone, this.dragZone); + } + this.destroyRoot(); + Ext.destroy(this.loader); + this.nodeHash = this.root = this.loader = null; + Ext.tree.TreePanel.superclass.beforeDestroy.call(this); + }, + + + destroyRoot : function(){ + if(this.root && this.root.destroy){ + this.root.destroy(true); + } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +}); + +Ext.tree.TreePanel.nodeTypes = {}; + +Ext.reg('treepanel', Ext.tree.TreePanel);Ext.tree.TreeEventModel = function(tree){ + this.tree = tree; + this.tree.on('render', this.initEvents, this); +}; + +Ext.tree.TreeEventModel.prototype = { + initEvents : function(){ + var t = this.tree; + + if(t.trackMouseOver !== false){ + t.mon(t.innerCt, { + scope: this, + mouseover: this.delegateOver, + mouseout: this.delegateOut + }); + } + t.mon(t.getTreeEl(), { + scope: this, + click: this.delegateClick, + dblclick: this.delegateDblClick, + contextmenu: this.delegateContextMenu + }); + }, + + getNode : function(e){ + var t; + if(t = e.getTarget('.x-tree-node-el', 10)){ + var id = Ext.fly(t, '_treeEvents').getAttribute('tree-node-id', 'ext'); + if(id){ + return this.tree.getNodeById(id); + } + } + return null; + }, + + getNodeTarget : function(e){ + var t = e.getTarget('.x-tree-node-icon', 1); + if(!t){ + t = e.getTarget('.x-tree-node-el', 6); + } + return t; + }, + + delegateOut : function(e, t){ + if(!this.beforeEvent(e)){ + return; + } + if(e.getTarget('.x-tree-ec-icon', 1)){ + var n = this.getNode(e); + this.onIconOut(e, n); + if(n == this.lastEcOver){ + delete this.lastEcOver; + } + } + if((t = this.getNodeTarget(e)) && !e.within(t, true)){ + this.onNodeOut(e, this.getNode(e)); + } + }, + + delegateOver : function(e, t){ + if(!this.beforeEvent(e)){ + return; + } + if(Ext.isGecko && !this.trackingDoc){ + Ext.getBody().on('mouseover', this.trackExit, this); + this.trackingDoc = true; + } if(this.lastEcOver){ - this.onIconOut(e, this.lastEcOver); - delete this.lastEcOver; - } - if(e.getTarget('.x-tree-ec-icon', 1)){ - this.lastEcOver = this.getNode(e); - this.onIconOver(e, this.lastEcOver); - } - if(t = this.getNodeTarget(e)){ - this.onNodeOver(e, this.getNode(e)); - } - }, - - delegateClick : function(e, t){ - if(!this.beforeEvent(e)){ - return; - } - - if(e.getTarget('input[type=checkbox]', 1)){ - this.onCheckboxClick(e, this.getNode(e)); - } - else if(e.getTarget('.x-tree-ec-icon', 1)){ - this.onIconClick(e, this.getNode(e)); - } - else if(this.getNodeTarget(e)){ - this.onNodeClick(e, this.getNode(e)); - } - }, - - delegateDblClick : function(e, t){ - if(this.beforeEvent(e) && this.getNodeTarget(e)){ - this.onNodeDblClick(e, this.getNode(e)); - } - }, - - delegateContextMenu : function(e, t){ - if(this.beforeEvent(e) && this.getNodeTarget(e)){ - this.onNodeContextMenu(e, this.getNode(e)); - } - }, - - onNodeClick : function(e, node){ - node.ui.onClick(e); - }, - - onNodeOver : function(e, node){ - node.ui.onOver(e); - }, - - onNodeOut : function(e, node){ - node.ui.onOut(e); - }, - - onIconOver : function(e, node){ - node.ui.addClass('x-tree-ec-over'); - }, - - onIconOut : function(e, node){ - node.ui.removeClass('x-tree-ec-over'); - }, - - onIconClick : function(e, node){ - node.ui.ecClick(e); - }, - - onCheckboxClick : function(e, node){ - node.ui.onCheckChange(e); - }, - - onNodeDblClick : function(e, node){ - node.ui.onDblClick(e); - }, - - onNodeContextMenu : function(e, node){ - node.ui.onContextMenu(e); - }, - - beforeEvent : function(e){ - if(this.disabled){ - e.stopEvent(); - return false; - } - return true; - }, - - disable: function(){ - this.disabled = true; - }, - - enable: function(){ - this.disabled = false; - } + this.onIconOut(e, this.lastEcOver); + delete this.lastEcOver; + } + if(e.getTarget('.x-tree-ec-icon', 1)){ + this.lastEcOver = this.getNode(e); + this.onIconOver(e, this.lastEcOver); + } + if(t = this.getNodeTarget(e)){ + this.onNodeOver(e, this.getNode(e)); + } + }, + + trackExit : function(e){ + if(this.lastOverNode){ + if(this.lastOverNode.ui && !e.within(this.lastOverNode.ui.getEl())){ + this.onNodeOut(e, this.lastOverNode); + } + delete this.lastOverNode; + Ext.getBody().un('mouseover', this.trackExit, this); + this.trackingDoc = false; + } + + }, + + delegateClick : function(e, t){ + if(this.beforeEvent(e)){ + if(e.getTarget('input[type=checkbox]', 1)){ + this.onCheckboxClick(e, this.getNode(e)); + }else if(e.getTarget('.x-tree-ec-icon', 1)){ + this.onIconClick(e, this.getNode(e)); + }else if(this.getNodeTarget(e)){ + this.onNodeClick(e, this.getNode(e)); + } + }else{ + this.checkContainerEvent(e, 'click'); + } + }, + + delegateDblClick : function(e, t){ + if(this.beforeEvent(e)){ + if(this.getNodeTarget(e)){ + this.onNodeDblClick(e, this.getNode(e)); + } + }else{ + this.checkContainerEvent(e, 'dblclick'); + } + }, + + delegateContextMenu : function(e, t){ + if(this.beforeEvent(e)){ + if(this.getNodeTarget(e)){ + this.onNodeContextMenu(e, this.getNode(e)); + } + }else{ + this.checkContainerEvent(e, 'contextmenu'); + } + }, + + checkContainerEvent: function(e, type){ + if(this.disabled){ + e.stopEvent(); + return false; + } + this.onContainerEvent(e, type); + }, + + onContainerEvent: function(e, type){ + this.tree.fireEvent('container' + type, this.tree, e); + }, + + onNodeClick : function(e, node){ + node.ui.onClick(e); + }, + + onNodeOver : function(e, node){ + this.lastOverNode = node; + node.ui.onOver(e); + }, + + onNodeOut : function(e, node){ + node.ui.onOut(e); + }, + + onIconOver : function(e, node){ + node.ui.addClass('x-tree-ec-over'); + }, + + onIconOut : function(e, node){ + node.ui.removeClass('x-tree-ec-over'); + }, + + onIconClick : function(e, node){ + node.ui.ecClick(e); + }, + + onCheckboxClick : function(e, node){ + node.ui.onCheckChange(e); + }, + + onNodeDblClick : function(e, node){ + node.ui.onDblClick(e); + }, + + onNodeContextMenu : function(e, node){ + node.ui.onContextMenu(e); + }, + + beforeEvent : function(e){ + var node = this.getNode(e); + if(this.disabled || !node || !node.ui){ + e.stopEvent(); + return false; + } + return true; + }, + + disable: function(){ + this.disabled = true; + }, + + enable: function(){ + this.disabled = false; + } }; - -Ext.tree.DefaultSelectionModel = function(config){ - this.selNode = null; - - this.addEvents( - - "selectionchange", - - - "beforeselect" - ); - - Ext.apply(this, config); - Ext.tree.DefaultSelectionModel.superclass.constructor.call(this); -}; - -Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, { - init : function(tree){ - this.tree = tree; - tree.getTreeEl().on("keydown", this.onKeyDown, this); - tree.on("click", this.onNodeClick, this); - }, - - onNodeClick : function(node, e){ - this.select(node); - }, - - - select : function(node){ - var last = this.selNode; - if(last != node && this.fireEvent('beforeselect', this, node, last) !== false){ - if(last){ - last.ui.onSelectedChange(false); - } - this.selNode = node; - node.ui.onSelectedChange(true); - this.fireEvent("selectionchange", this, node, last); - } - return node; - }, - - - unselect : function(node){ - if(this.selNode == node){ - this.clearSelections(); - } - }, - - - clearSelections : function(){ - var n = this.selNode; - if(n){ - n.ui.onSelectedChange(false); - this.selNode = null; - this.fireEvent("selectionchange", this, null); - } - return n; - }, - - - getSelectedNode : function(){ - return this.selNode; - }, - - - isSelected : function(node){ - return this.selNode == node; - }, - - - selectPrevious : function(){ - var s = this.selNode || this.lastSelNode; - if(!s){ - return null; - } - var ps = s.previousSibling; - if(ps){ - if(!ps.isExpanded() || ps.childNodes.length < 1){ - return this.select(ps); - } else{ - var lc = ps.lastChild; - while(lc && lc.isExpanded() && lc.childNodes.length > 0){ - lc = lc.lastChild; - } - return this.select(lc); - } - } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){ - return this.select(s.parentNode); - } - return null; - }, - - - selectNext : function(){ - var s = this.selNode || this.lastSelNode; - if(!s){ - return null; - } - if(s.firstChild && s.isExpanded()){ - return this.select(s.firstChild); - }else if(s.nextSibling){ - return this.select(s.nextSibling); - }else if(s.parentNode){ - var newS = null; - s.parentNode.bubble(function(){ - if(this.nextSibling){ - newS = this.getOwnerTree().selModel.select(this.nextSibling); - return false; - } - }); - return newS; - } - return null; - }, - - onKeyDown : function(e){ - var s = this.selNode || this.lastSelNode; +Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, { + + constructor : function(config){ + this.selNode = null; + + this.addEvents( + + 'selectionchange', + + + 'beforeselect' + ); + + Ext.apply(this, config); + Ext.tree.DefaultSelectionModel.superclass.constructor.call(this); + }, + + init : function(tree){ + this.tree = tree; + tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this); + tree.on('click', this.onNodeClick, this); + }, + + onNodeClick : function(node, e){ + this.select(node); + }, + + + select : function(node, selectNextNode){ - var sm = this; - if(!s){ - return; - } - var k = e.getKey(); - switch(k){ - case e.DOWN: - e.stopEvent(); - this.selectNext(); - break; - case e.UP: - e.stopEvent(); - this.selectPrevious(); - break; - case e.RIGHT: - e.preventDefault(); - if(s.hasChildNodes()){ - if(!s.isExpanded()){ - s.expand(); - }else if(s.firstChild){ - this.select(s.firstChild, e); - } - } - break; - case e.LEFT: - e.preventDefault(); - if(s.hasChildNodes() && s.isExpanded()){ - s.collapse(); - }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){ - this.select(s.parentNode, e); - } - break; - }; - } -}); - - -Ext.tree.MultiSelectionModel = function(config){ - this.selNodes = []; - this.selMap = {}; - this.addEvents( - - "selectionchange" - ); - Ext.apply(this, config); - Ext.tree.MultiSelectionModel.superclass.constructor.call(this); -}; - -Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, { - init : function(tree){ - this.tree = tree; - tree.getTreeEl().on("keydown", this.onKeyDown, this); - tree.on("click", this.onNodeClick, this); - }, - - onNodeClick : function(node, e){ - this.select(node, e, e.ctrlKey); - }, - - - select : function(node, e, keepExisting){ - if(keepExisting !== true){ - this.clearSelections(true); - } - if(this.isSelected(node)){ - this.lastSelNode = node; - return node; - } - this.selNodes.push(node); - this.selMap[node.id] = node; - this.lastSelNode = node; - node.ui.onSelectedChange(true); - this.fireEvent("selectionchange", this, this.selNodes); - return node; - }, - - - unselect : function(node){ - if(this.selMap[node.id]){ - node.ui.onSelectedChange(false); - var sn = this.selNodes; - var index = sn.indexOf(node); - if(index != -1){ - this.selNodes.splice(index, 1); - } - delete this.selMap[node.id]; - this.fireEvent("selectionchange", this, this.selNodes); - } - }, - - - clearSelections : function(suppressEvent){ - var sn = this.selNodes; - if(sn.length > 0){ - for(var i = 0, len = sn.length; i < len; i++){ - sn[i].ui.onSelectedChange(false); - } - this.selNodes = []; - this.selMap = {}; - if(suppressEvent !== true){ - this.fireEvent("selectionchange", this, this.selNodes); - } - } - }, - - - isSelected : function(node){ - return this.selMap[node.id] ? true : false; - }, - - - getSelectedNodes : function(){ - return this.selNodes; - }, - - onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown, - - selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext, - - selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious + if (!Ext.fly(node.ui.wrap).isVisible() && selectNextNode) { + return selectNextNode.call(this, node); + } + var last = this.selNode; + if(node == last){ + node.ui.onSelectedChange(true); + }else if(this.fireEvent('beforeselect', this, node, last) !== false){ + if(last && last.ui){ + last.ui.onSelectedChange(false); + } + this.selNode = node; + node.ui.onSelectedChange(true); + this.fireEvent('selectionchange', this, node, last); + } + return node; + }, + + + unselect : function(node, silent){ + if(this.selNode == node){ + this.clearSelections(silent); + } + }, + + + clearSelections : function(silent){ + var n = this.selNode; + if(n){ + n.ui.onSelectedChange(false); + this.selNode = null; + if(silent !== true){ + this.fireEvent('selectionchange', this, null); + } + } + return n; + }, + + + getSelectedNode : function(){ + return this.selNode; + }, + + + isSelected : function(node){ + return this.selNode == node; + }, + + + selectPrevious : function( s){ + if(!(s = s || this.selNode || this.lastSelNode)){ + return null; + } + + var ps = s.previousSibling; + if(ps){ + if(!ps.isExpanded() || ps.childNodes.length < 1){ + return this.select(ps, this.selectPrevious); + } else{ + var lc = ps.lastChild; + while(lc && lc.isExpanded() && Ext.fly(lc.ui.wrap).isVisible() && lc.childNodes.length > 0){ + lc = lc.lastChild; + } + return this.select(lc, this.selectPrevious); + } + } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){ + return this.select(s.parentNode, this.selectPrevious); + } + return null; + }, + + + selectNext : function( s){ + if(!(s = s || this.selNode || this.lastSelNode)){ + return null; + } + + if(s.firstChild && s.isExpanded() && Ext.fly(s.ui.wrap).isVisible()){ + return this.select(s.firstChild, this.selectNext); + }else if(s.nextSibling){ + return this.select(s.nextSibling, this.selectNext); + }else if(s.parentNode){ + var newS = null; + s.parentNode.bubble(function(){ + if(this.nextSibling){ + newS = this.getOwnerTree().selModel.select(this.nextSibling, this.selectNext); + return false; + } + }); + return newS; + } + return null; + }, + + onKeyDown : function(e){ + var s = this.selNode || this.lastSelNode; + + var sm = this; + if(!s){ + return; + } + var k = e.getKey(); + switch(k){ + case e.DOWN: + e.stopEvent(); + this.selectNext(); + break; + case e.UP: + e.stopEvent(); + this.selectPrevious(); + break; + case e.RIGHT: + e.preventDefault(); + if(s.hasChildNodes()){ + if(!s.isExpanded()){ + s.expand(); + }else if(s.firstChild){ + this.select(s.firstChild, e); + } + } + break; + case e.LEFT: + e.preventDefault(); + if(s.hasChildNodes() && s.isExpanded()){ + s.collapse(); + }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){ + this.select(s.parentNode, e); + } + break; + }; + } }); - -Ext.tree.TreeNode = function(attributes){ - attributes = attributes || {}; - if(typeof attributes == "string"){ - attributes = {text: attributes}; - } - this.childrenRendered = false; - this.rendered = false; - Ext.tree.TreeNode.superclass.constructor.call(this, attributes); - this.expanded = attributes.expanded === true; - this.isTarget = attributes.isTarget !== false; - this.draggable = attributes.draggable !== false && attributes.allowDrag !== false; - this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false; - - - this.text = attributes.text; - - this.disabled = attributes.disabled === true; - - this.addEvents( - - "textchange", - - "beforeexpand", - - "beforecollapse", - - "expand", - - "disabledchange", - - "collapse", - - "beforeclick", - - "click", - - "checkchange", - - "dblclick", - - "contextmenu", - - "beforechildrenrendered" - ); - - var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; - - - this.ui = new uiClass(this); -}; -Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { - preventHScroll: true, - - isExpanded : function(){ - return this.expanded; - }, - - - getUI : function(){ - return this.ui; - }, - - getLoader : function(){ - var owner; - return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : new Ext.tree.TreeLoader()); - }, - + + +Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, { - setFirstChild : function(node){ - var of = this.firstChild; - Ext.tree.TreeNode.superclass.setFirstChild.call(this, node); - if(this.childrenRendered && of && node != of){ - of.renderIndent(true, true); - } - if(this.rendered){ - this.renderIndent(true, true); - } - }, - + constructor : function(config){ + this.selNodes = []; + this.selMap = {}; + this.addEvents( + + 'selectionchange' + ); + Ext.apply(this, config); + Ext.tree.MultiSelectionModel.superclass.constructor.call(this); + }, - setLastChild : function(node){ - var ol = this.lastChild; - Ext.tree.TreeNode.superclass.setLastChild.call(this, node); - if(this.childrenRendered && ol && node != ol){ - ol.renderIndent(true, true); - } - if(this.rendered){ - this.renderIndent(true, true); - } - }, - + init : function(tree){ + this.tree = tree; + tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this); + tree.on('click', this.onNodeClick, this); + }, + + onNodeClick : function(node, e){ + if(e.ctrlKey && this.isSelected(node)){ + this.unselect(node); + }else{ + this.select(node, e, e.ctrlKey); + } + }, - appendChild : function(n){ - if(!n.render && !Ext.isArray(n)){ - n = this.getLoader().createNode(n); - } - var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n); - if(node && this.childrenRendered){ - node.render(); - } - this.ui.updateExpandIcon(); - return node; - }, - + select : function(node, e, keepExisting){ + if(keepExisting !== true){ + this.clearSelections(true); + } + if(this.isSelected(node)){ + this.lastSelNode = node; + return node; + } + this.selNodes.push(node); + this.selMap[node.id] = node; + this.lastSelNode = node; + node.ui.onSelectedChange(true); + this.fireEvent('selectionchange', this, this.selNodes); + return node; + }, - removeChild : function(node){ - this.ownerTree.getSelectionModel().unselect(node); - Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments); + + unselect : function(node){ + if(this.selMap[node.id]){ + node.ui.onSelectedChange(false); + var sn = this.selNodes; + var index = sn.indexOf(node); + if(index != -1){ + this.selNodes.splice(index, 1); + } + delete this.selMap[node.id]; + this.fireEvent('selectionchange', this, this.selNodes); + } + }, + + + clearSelections : function(suppressEvent){ + var sn = this.selNodes; + if(sn.length > 0){ + for(var i = 0, len = sn.length; i < len; i++){ + sn[i].ui.onSelectedChange(false); + } + this.selNodes = []; + this.selMap = {}; + if(suppressEvent !== true){ + this.fireEvent('selectionchange', this, this.selNodes); + } + } + }, + + + isSelected : function(node){ + return this.selMap[node.id] ? true : false; + }, + + + getSelectedNodes : function(){ + return this.selNodes.concat([]); + }, + + onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown, + + selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext, + + selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious +}); +Ext.data.Tree = Ext.extend(Ext.util.Observable, { + + constructor: function(root){ + this.nodeHash = {}; - if(this.childrenRendered){ - node.ui.remove(); - } - if(this.childNodes.length < 1){ - this.collapse(false, false); - }else{ - this.ui.updateExpandIcon(); - } - if(!this.firstChild && !this.isHiddenRoot()) { - this.childrenRendered = false; - } - return node; - }, - + this.root = null; + if(root){ + this.setRootNode(root); + } + this.addEvents( + + "append", + + "remove", + + "move", + + "insert", + + "beforeappend", + + "beforeremove", + + "beforemove", + + "beforeinsert" + ); + Ext.data.Tree.superclass.constructor.call(this); + }, - insertBefore : function(node, refNode){ - if(!node.render){ - node = this.getLoader().createNode(node); - } - var newNode = Ext.tree.TreeNode.superclass.insertBefore.apply(this, arguments); - if(newNode && refNode && this.childrenRendered){ - node.render(); - } - this.ui.updateExpandIcon(); - return newNode; - }, - - - setText : function(text){ - var oldText = this.text; - this.text = text; - this.attributes.text = text; + + pathSeparator: "/", + + + proxyNodeEvent : function(){ + return this.fireEvent.apply(this, arguments); + }, + + + getRootNode : function(){ + return this.root; + }, + + + setRootNode : function(node){ + this.root = node; + node.ownerTree = this; + node.isRoot = true; + this.registerNode(node); + return node; + }, + + + getNodeById : function(id){ + return this.nodeHash[id]; + }, + + + registerNode : function(node){ + this.nodeHash[node.id] = node; + }, + + + unregisterNode : function(node){ + delete this.nodeHash[node.id]; + }, + + toString : function(){ + return "[Tree"+(this.id?" "+this.id:"")+"]"; + } +}); + + +Ext.data.Node = Ext.extend(Ext.util.Observable, { + + constructor: function(attributes){ + + this.attributes = attributes || {}; + this.leaf = this.attributes.leaf; + + this.id = this.attributes.id; + if(!this.id){ + this.id = Ext.id(null, "xnode-"); + this.attributes.id = this.id; + } + + this.childNodes = []; + + this.parentNode = null; + + this.firstChild = null; + + this.lastChild = null; + + this.previousSibling = null; + + this.nextSibling = null; + + this.addEvents({ + + "append" : true, + + "remove" : true, + + "move" : true, + + "insert" : true, + + "beforeappend" : true, + + "beforeremove" : true, + + "beforemove" : true, + + "beforeinsert" : true + }); + this.listeners = this.attributes.listeners; + Ext.data.Node.superclass.constructor.call(this); + }, + + + fireEvent : function(evtName){ + + if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){ + return false; + } + + var ot = this.getOwnerTree(); + if(ot){ + if(ot.proxyNodeEvent.apply(ot, arguments) === false){ + return false; + } + } + return true; + }, + + + isLeaf : function(){ + return this.leaf === true; + }, + + + setFirstChild : function(node){ + this.firstChild = node; + }, + + + setLastChild : function(node){ + this.lastChild = node; + }, + + + + isLast : function(){ + return (!this.parentNode ? true : this.parentNode.lastChild == this); + }, + + + isFirst : function(){ + return (!this.parentNode ? true : this.parentNode.firstChild == this); + }, + + + hasChildNodes : function(){ + return !this.isLeaf() && this.childNodes.length > 0; + }, + + + isExpandable : function(){ + return this.attributes.expandable || this.hasChildNodes(); + }, + + + appendChild : function(node){ + var multi = false; + if(Ext.isArray(node)){ + multi = node; + }else if(arguments.length > 1){ + multi = arguments; + } + + if(multi){ + for(var i = 0, len = multi.length; i < len; i++) { + this.appendChild(multi[i]); + } + }else{ + if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){ + return false; + } + var index = this.childNodes.length; + var oldParent = node.parentNode; + + if(oldParent){ + if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){ + return false; + } + oldParent.removeChild(node); + } + index = this.childNodes.length; + if(index === 0){ + this.setFirstChild(node); + } + this.childNodes.push(node); + node.parentNode = this; + var ps = this.childNodes[index-1]; + if(ps){ + node.previousSibling = ps; + ps.nextSibling = node; + }else{ + node.previousSibling = null; + } + node.nextSibling = null; + this.setLastChild(node); + node.setOwnerTree(this.getOwnerTree()); + this.fireEvent("append", this.ownerTree, this, node, index); + if(oldParent){ + node.fireEvent("move", this.ownerTree, node, oldParent, this, index); + } + return node; + } + }, + + + removeChild : function(node, destroy){ + var index = this.childNodes.indexOf(node); + if(index == -1){ + return false; + } + if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){ + return false; + } + + + this.childNodes.splice(index, 1); + + + if(node.previousSibling){ + node.previousSibling.nextSibling = node.nextSibling; + } + if(node.nextSibling){ + node.nextSibling.previousSibling = node.previousSibling; + } + + + if(this.firstChild == node){ + this.setFirstChild(node.nextSibling); + } + if(this.lastChild == node){ + this.setLastChild(node.previousSibling); + } + + this.fireEvent("remove", this.ownerTree, this, node); + if(destroy){ + node.destroy(true); + }else{ + node.clear(); + } + return node; + }, + + + clear : function(destroy){ + + this.setOwnerTree(null, destroy); + this.parentNode = this.previousSibling = this.nextSibling = null; + if(destroy){ + this.firstChild = this.lastChild = null; + } + }, + + + destroy : function( silent){ + + if(silent === true){ + this.purgeListeners(); + this.clear(true); + Ext.each(this.childNodes, function(n){ + n.destroy(true); + }); + this.childNodes = null; + }else{ + this.remove(true); + } + }, + + + insertBefore : function(node, refNode){ + if(!refNode){ + return this.appendChild(node); + } + + if(node == refNode){ + return false; + } + + if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){ + return false; + } + var index = this.childNodes.indexOf(refNode); + var oldParent = node.parentNode; + var refIndex = index; + + + if(oldParent == this && this.childNodes.indexOf(node) < index){ + refIndex--; + } + + + if(oldParent){ + if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){ + return false; + } + oldParent.removeChild(node); + } + if(refIndex === 0){ + this.setFirstChild(node); + } + this.childNodes.splice(refIndex, 0, node); + node.parentNode = this; + var ps = this.childNodes[refIndex-1]; + if(ps){ + node.previousSibling = ps; + ps.nextSibling = node; + }else{ + node.previousSibling = null; + } + node.nextSibling = refNode; + refNode.previousSibling = node; + node.setOwnerTree(this.getOwnerTree()); + this.fireEvent("insert", this.ownerTree, this, node, refNode); + if(oldParent){ + node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode); + } + return node; + }, + + + remove : function(destroy){ + if (this.parentNode) { + this.parentNode.removeChild(this, destroy); + } + return this; + }, + + + removeAll : function(destroy){ + var cn = this.childNodes, + n; + while((n = cn[0])){ + this.removeChild(n, destroy); + } + return this; + }, + + + item : function(index){ + return this.childNodes[index]; + }, + + + replaceChild : function(newChild, oldChild){ + var s = oldChild ? oldChild.nextSibling : null; + this.removeChild(oldChild); + this.insertBefore(newChild, s); + return oldChild; + }, + + + indexOf : function(child){ + return this.childNodes.indexOf(child); + }, + + + getOwnerTree : function(){ + + if(!this.ownerTree){ + var p = this; + while(p){ + if(p.ownerTree){ + this.ownerTree = p.ownerTree; + break; + } + p = p.parentNode; + } + } + return this.ownerTree; + }, + + + getDepth : function(){ + var depth = 0; + var p = this; + while(p.parentNode){ + ++depth; + p = p.parentNode; + } + return depth; + }, + + + setOwnerTree : function(tree, destroy){ + + if(tree != this.ownerTree){ + if(this.ownerTree){ + this.ownerTree.unregisterNode(this); + } + this.ownerTree = tree; + + if(destroy !== true){ + Ext.each(this.childNodes, function(n){ + n.setOwnerTree(tree); + }); + } + if(tree){ + tree.registerNode(this); + } + } + }, + + + setId: function(id){ + if(id !== this.id){ + var t = this.ownerTree; + if(t){ + t.unregisterNode(this); + } + this.id = this.attributes.id = id; + if(t){ + t.registerNode(this); + } + this.onIdChange(id); + } + }, + + + onIdChange: Ext.emptyFn, + + + getPath : function(attr){ + attr = attr || "id"; + var p = this.parentNode; + var b = [this.attributes[attr]]; + while(p){ + b.unshift(p.attributes[attr]); + p = p.parentNode; + } + var sep = this.getOwnerTree().pathSeparator; + return sep + b.join(sep); + }, + + + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.parentNode; + } + }, + + + cascade : function(fn, scope, args){ + if(fn.apply(scope || this, args || [this]) !== false){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].cascade(fn, scope, args); + } + } + }, + + + eachChild : function(fn, scope, args){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(fn.apply(scope || cs[i], args || [cs[i]]) === false){ + break; + } + } + }, + + + findChild : function(attribute, value, deep){ + return this.findChildBy(function(){ + return this.attributes[attribute] == value; + }, null, deep); + }, + + + findChildBy : function(fn, scope, deep){ + var cs = this.childNodes, + len = cs.length, + i = 0, + n, + res; + for(; i < len; i++){ + n = cs[i]; + if(fn.call(scope || n, n) === true){ + return n; + }else if (deep){ + res = n.findChildBy(fn, scope, deep); + if(res != null){ + return res; + } + } + + } + return null; + }, + + + sort : function(fn, scope){ + var cs = this.childNodes; + var len = cs.length; + if(len > 0){ + var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn; + cs.sort(sortFn); + for(var i = 0; i < len; i++){ + var n = cs[i]; + n.previousSibling = cs[i-1]; + n.nextSibling = cs[i+1]; + if(i === 0){ + this.setFirstChild(n); + } + if(i == len-1){ + this.setLastChild(n); + } + } + } + }, + + + contains : function(node){ + return node.isAncestor(this); + }, + + + isAncestor : function(node){ + var p = this.parentNode; + while(p){ + if(p == node){ + return true; + } + p = p.parentNode; + } + return false; + }, + + toString : function(){ + return "[Node"+(this.id?" "+this.id:"")+"]"; + } +}); +Ext.tree.TreeNode = Ext.extend(Ext.data.Node, { + + constructor : function(attributes){ + attributes = attributes || {}; + if(Ext.isString(attributes)){ + attributes = {text: attributes}; + } + this.childrenRendered = false; + this.rendered = false; + Ext.tree.TreeNode.superclass.constructor.call(this, attributes); + this.expanded = attributes.expanded === true; + this.isTarget = attributes.isTarget !== false; + this.draggable = attributes.draggable !== false && attributes.allowDrag !== false; + this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false; + + + this.text = attributes.text; + + this.disabled = attributes.disabled === true; + + this.hidden = attributes.hidden === true; + + this.addEvents( + + 'textchange', + + 'beforeexpand', + + 'beforecollapse', + + 'expand', + + 'disabledchange', + + 'collapse', + + 'beforeclick', + + 'click', + + 'checkchange', + + 'beforedblclick', + + 'dblclick', + + 'contextmenu', + + 'beforechildrenrendered' + ); + + var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; + + + this.ui = new uiClass(this); + }, + + preventHScroll : true, + + isExpanded : function(){ + return this.expanded; + }, + + + getUI : function(){ + return this.ui; + }, + + getLoader : function(){ + var owner; + return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : (this.loader = new Ext.tree.TreeLoader())); + }, + + + setFirstChild : function(node){ + var of = this.firstChild; + Ext.tree.TreeNode.superclass.setFirstChild.call(this, node); + if(this.childrenRendered && of && node != of){ + of.renderIndent(true, true); + } + if(this.rendered){ + this.renderIndent(true, true); + } + }, + + + setLastChild : function(node){ + var ol = this.lastChild; + Ext.tree.TreeNode.superclass.setLastChild.call(this, node); + if(this.childrenRendered && ol && node != ol){ + ol.renderIndent(true, true); + } + if(this.rendered){ + this.renderIndent(true, true); + } + }, + + + + appendChild : function(n){ + if(!n.render && !Ext.isArray(n)){ + n = this.getLoader().createNode(n); + } + var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n); + if(node && this.childrenRendered){ + node.render(); + } + this.ui.updateExpandIcon(); + return node; + }, + + + removeChild : function(node, destroy){ + this.ownerTree.getSelectionModel().unselect(node); + Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments); + + if(!destroy){ + var rendered = node.ui.rendered; + + if(rendered){ + node.ui.remove(); + } + if(rendered && this.childNodes.length < 1){ + this.collapse(false, false); + }else{ + this.ui.updateExpandIcon(); + } + if(!this.firstChild && !this.isHiddenRoot()){ + this.childrenRendered = false; + } + } + return node; + }, + + + insertBefore : function(node, refNode){ + if(!node.render){ + node = this.getLoader().createNode(node); + } + var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode); + if(newNode && refNode && this.childrenRendered){ + node.render(); + } + this.ui.updateExpandIcon(); + return newNode; + }, + + + setText : function(text){ + var oldText = this.text; + this.text = this.attributes.text = text; if(this.rendered){ - this.ui.onTextChange(this, text, oldText); - } - this.fireEvent("textchange", this, text, oldText); - }, - - - select : function(){ - this.getOwnerTree().getSelectionModel().select(this); - }, - - - unselect : function(){ - this.getOwnerTree().getSelectionModel().unselect(this); - }, - - - isSelected : function(){ - return this.getOwnerTree().getSelectionModel().isSelected(this); - }, - - - expand : function(deep, anim, callback){ - if(!this.expanded){ - if(this.fireEvent("beforeexpand", this, deep, anim) === false){ - return; - } - if(!this.childrenRendered){ - this.renderChildren(); - } - this.expanded = true; - if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){ - this.ui.animExpand(function(){ - this.fireEvent("expand", this); - if(typeof callback == "function"){ - callback(this); - } - if(deep === true){ - this.expandChildNodes(true); - } - }.createDelegate(this)); - return; - }else{ - this.ui.expand(); - this.fireEvent("expand", this); - if(typeof callback == "function"){ - callback(this); - } - } - }else{ - if(typeof callback == "function"){ - callback(this); - } - } - if(deep === true){ - this.expandChildNodes(true); - } - }, - - isHiddenRoot : function(){ - return this.isRoot && !this.getOwnerTree().rootVisible; - }, - - - collapse : function(deep, anim){ - if(this.expanded && !this.isHiddenRoot()){ - if(this.fireEvent("beforecollapse", this, deep, anim) === false){ - return; - } - this.expanded = false; - if((this.getOwnerTree().animate && anim !== false) || anim){ - this.ui.animCollapse(function(){ - this.fireEvent("collapse", this); - if(deep === true){ - this.collapseChildNodes(true); - } - }.createDelegate(this)); - return; - }else{ - this.ui.collapse(); - this.fireEvent("collapse", this); - } - } - if(deep === true){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].collapse(true, false); - } - } - }, - + this.ui.onTextChange(this, text, oldText); + } + this.fireEvent('textchange', this, text, oldText); + }, - delayedExpand : function(delay){ - if(!this.expandProcId){ - this.expandProcId = this.expand.defer(delay, this); - } - }, - - cancelExpand : function(){ - if(this.expandProcId){ - clearTimeout(this.expandProcId); - } - this.expandProcId = false; - }, - - - toggle : function(){ - if(this.expanded){ - this.collapse(); - }else{ - this.expand(); - } - }, - - - ensureVisible : function(callback){ - var tree = this.getOwnerTree(); - tree.expandPath(this.parentNode.getPath(), false, function(){ + setIconCls : function(cls){ + var old = this.attributes.iconCls; + this.attributes.iconCls = cls; + if(this.rendered){ + this.ui.onIconClsChange(this, cls, old); + } + }, + + + setTooltip : function(tip, title){ + this.attributes.qtip = tip; + this.attributes.qtipTitle = title; + if(this.rendered){ + this.ui.onTipChange(this, tip, title); + } + }, + + + setIcon : function(icon){ + this.attributes.icon = icon; + if(this.rendered){ + this.ui.onIconChange(this, icon); + } + }, + + + setHref : function(href, target){ + this.attributes.href = href; + this.attributes.hrefTarget = target; + if(this.rendered){ + this.ui.onHrefChange(this, href, target); + } + }, + + + setCls : function(cls){ + var old = this.attributes.cls; + this.attributes.cls = cls; + if(this.rendered){ + this.ui.onClsChange(this, cls, old); + } + }, + + + select : function(){ + var t = this.getOwnerTree(); + if(t){ + t.getSelectionModel().select(this); + } + }, + + + unselect : function(silent){ + var t = this.getOwnerTree(); + if(t){ + t.getSelectionModel().unselect(this, silent); + } + }, + + + isSelected : function(){ + var t = this.getOwnerTree(); + return t ? t.getSelectionModel().isSelected(this) : false; + }, + + + expand : function(deep, anim, callback, scope){ + if(!this.expanded){ + if(this.fireEvent('beforeexpand', this, deep, anim) === false){ + return; + } + if(!this.childrenRendered){ + this.renderChildren(); + } + this.expanded = true; + if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){ + this.ui.animExpand(function(){ + this.fireEvent('expand', this); + this.runCallback(callback, scope || this, [this]); + if(deep === true){ + this.expandChildNodes(true, true); + } + }.createDelegate(this)); + return; + }else{ + this.ui.expand(); + this.fireEvent('expand', this); + this.runCallback(callback, scope || this, [this]); + } + }else{ + this.runCallback(callback, scope || this, [this]); + } + if(deep === true){ + this.expandChildNodes(true); + } + }, + + runCallback : function(cb, scope, args){ + if(Ext.isFunction(cb)){ + cb.apply(scope, args); + } + }, + + isHiddenRoot : function(){ + return this.isRoot && !this.getOwnerTree().rootVisible; + }, + + + collapse : function(deep, anim, callback, scope){ + if(this.expanded && !this.isHiddenRoot()){ + if(this.fireEvent('beforecollapse', this, deep, anim) === false){ + return; + } + this.expanded = false; + if((this.getOwnerTree().animate && anim !== false) || anim){ + this.ui.animCollapse(function(){ + this.fireEvent('collapse', this); + this.runCallback(callback, scope || this, [this]); + if(deep === true){ + this.collapseChildNodes(true); + } + }.createDelegate(this)); + return; + }else{ + this.ui.collapse(); + this.fireEvent('collapse', this); + this.runCallback(callback, scope || this, [this]); + } + }else if(!this.expanded){ + this.runCallback(callback, scope || this, [this]); + } + if(deep === true){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].collapse(true, false); + } + } + }, + + + delayedExpand : function(delay){ + if(!this.expandProcId){ + this.expandProcId = this.expand.defer(delay, this); + } + }, + + + cancelExpand : function(){ + if(this.expandProcId){ + clearTimeout(this.expandProcId); + } + this.expandProcId = false; + }, + + + toggle : function(){ + if(this.expanded){ + this.collapse(); + }else{ + this.expand(); + } + }, + + + ensureVisible : function(callback, scope){ + var tree = this.getOwnerTree(); + tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){ var node = tree.getNodeById(this.id); - tree.getTreeEl().scrollChildIntoView(node.ui.anchor); - Ext.callback(callback); - }.createDelegate(this)); - }, - - - expandChildNodes : function(deep){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].expand(deep); - } - }, - - - collapseChildNodes : function(deep){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].collapse(deep); - } - }, - - - disable : function(){ - this.disabled = true; - this.unselect(); + tree.getTreeEl().scrollChildIntoView(node.ui.anchor); + this.runCallback(callback, scope || this, [this]); + }.createDelegate(this)); + }, + + + expandChildNodes : function(deep, anim) { + var cs = this.childNodes, + i, + len = cs.length; + for (i = 0; i < len; i++) { + cs[i].expand(deep, anim); + } + }, + + + collapseChildNodes : function(deep){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].collapse(deep); + } + }, + + + disable : function(){ + this.disabled = true; + this.unselect(); if(this.rendered && this.ui.onDisableChange){ - this.ui.onDisableChange(this, true); - } - this.fireEvent("disabledchange", this, true); - }, - - - enable : function(){ - this.disabled = false; + this.ui.onDisableChange(this, true); + } + this.fireEvent('disabledchange', this, true); + }, + + + enable : function(){ + this.disabled = false; if(this.rendered && this.ui.onDisableChange){ - this.ui.onDisableChange(this, false); - } - this.fireEvent("disabledchange", this, false); - }, - + this.ui.onDisableChange(this, false); + } + this.fireEvent('disabledchange', this, false); + }, + - renderChildren : function(suppressEvent){ - if(suppressEvent !== false){ - this.fireEvent("beforechildrenrendered", this); - } - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].render(true); - } - this.childrenRendered = true; - }, - + renderChildren : function(suppressEvent){ + if(suppressEvent !== false){ + this.fireEvent('beforechildrenrendered', this); + } + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].render(true); + } + this.childrenRendered = true; + }, + - sort : function(fn, scope){ - Ext.tree.TreeNode.superclass.sort.apply(this, arguments); - if(this.childrenRendered){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].render(true); - } - } - }, - + sort : function(fn, scope){ + Ext.tree.TreeNode.superclass.sort.apply(this, arguments); + if(this.childrenRendered){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].render(true); + } + } + }, + - render : function(bulkRender){ - this.ui.render(bulkRender); - if(!this.rendered){ + render : function(bulkRender){ + this.ui.render(bulkRender); + if(!this.rendered){ - this.getOwnerTree().registerNode(this); - this.rendered = true; - if(this.expanded){ - this.expanded = false; - this.expand(false, false); - } - } - }, - + this.getOwnerTree().registerNode(this); + this.rendered = true; + if(this.expanded){ + this.expanded = false; + this.expand(false, false); + } + } + }, + - renderIndent : function(deep, refresh){ - if(refresh){ - this.ui.childIndent = null; - } - this.ui.renderIndent(); - if(deep === true && this.childrenRendered){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].renderIndent(true, refresh); - } - } - }, - - beginUpdate : function(){ - this.childrenRendered = false; - }, - - endUpdate : function(){ - if(this.expanded && this.rendered){ - this.renderChildren(); - } - }, - - destroy : function(){ - if(this.childNodes){ - for(var i = 0,l = this.childNodes.length; i < l; i++){ - this.childNodes[i].destroy(); - } - this.childNodes = null; - } - if(this.ui.destroy){ - this.ui.destroy(); - } - } -}); - + renderIndent : function(deep, refresh){ + if(refresh){ + this.ui.childIndent = null; + } + this.ui.renderIndent(); + if(deep === true && this.childrenRendered){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].renderIndent(true, refresh); + } + } + }, + + beginUpdate : function(){ + this.childrenRendered = false; + }, + + endUpdate : function(){ + if(this.expanded && this.rendered){ + this.renderChildren(); + } + }, + + + destroy : function(silent){ + if(silent === true){ + this.unselect(true); + } + Ext.tree.TreeNode.superclass.destroy.call(this, silent); + Ext.destroy(this.ui, this.loader); + this.ui = this.loader = null; + }, + + + onIdChange : function(id){ + this.ui.onIdChange(id); + } +}); + Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode; - - Ext.tree.AsyncTreeNode = function(config){ - this.loaded = config && config.loaded === true; - this.loading = false; - Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments); - - this.addEvents('beforeload', 'load'); - - -}; -Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, { - expand : function(deep, anim, callback){ - if(this.loading){ - var timer; - var f = function(){ - if(!this.loading){ - clearInterval(timer); - this.expand(deep, anim, callback); - } - }.createDelegate(this); - timer = setInterval(f, 200); - return; - } - if(!this.loaded){ - if(this.fireEvent("beforeload", this) === false){ - return; - } - this.loading = true; - this.ui.beforeLoad(this); - var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader(); - if(loader){ - loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback])); - return; - } - } - Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback); - }, - - - isLoading : function(){ - return this.loading; - }, - - loadComplete : function(deep, anim, callback){ - this.loading = false; - this.loaded = true; - this.ui.afterLoad(this); - this.fireEvent("load", this); - this.expand(deep, anim, callback); - }, - - - isLoaded : function(){ - return this.loaded; - }, - - hasChildNodes : function(){ - if(!this.isLeaf() && !this.loaded){ - return true; - }else{ - return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this); - } - }, - - - reload : function(callback){ - this.collapse(false, false); - while(this.firstChild){ - this.removeChild(this.firstChild); - } - this.childrenRendered = false; - this.loaded = false; - if(this.isHiddenRoot()){ - this.expanded = false; - } - this.expand(false, false, callback); - } -}); - -Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode; - -Ext.tree.TreeNodeUI = function(node){ - this.node = node; - this.rendered = false; - this.animating = false; - this.wasLeaf = true; - this.ecc = 'x-tree-ec-icon x-tree-elbow'; - this.emptyIcon = Ext.BLANK_IMAGE_URL; -}; - -Ext.tree.TreeNodeUI.prototype = { + Ext.tree.AsyncTreeNode = function(config){ + this.loaded = config && config.loaded === true; + this.loading = false; + Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments); - removeChild : function(node){ - if(this.rendered){ - this.ctNode.removeChild(node.ui.getEl()); - } - }, - + this.addEvents('beforeload', 'load'); - beforeLoad : function(){ - this.addClass("x-tree-node-loading"); - }, - - afterLoad : function(){ - this.removeClass("x-tree-node-loading"); - }, - - - onTextChange : function(node, text, oldText){ - if(this.rendered){ - this.textNode.innerHTML = text; - } - }, - - - onDisableChange : function(node, state){ - this.disabled = state; - if (this.checkbox) { - this.checkbox.disabled = state; - } - if(state){ - this.addClass("x-tree-node-disabled"); - }else{ - this.removeClass("x-tree-node-disabled"); - } - }, - - - onSelectedChange : function(state){ - if(state){ - this.focus(); - this.addClass("x-tree-selected"); - }else{ - - this.removeClass("x-tree-selected"); - } - }, - - - onMove : function(tree, node, oldParent, newParent, index, refNode){ - this.childIndent = null; - if(this.rendered){ - var targetNode = newParent.ui.getContainer(); - if(!targetNode){ - this.holder = document.createElement("div"); - this.holder.appendChild(this.wrap); - return; - } - var insertBefore = refNode ? refNode.ui.getEl() : null; - if(insertBefore){ - targetNode.insertBefore(this.wrap, insertBefore); - }else{ - targetNode.appendChild(this.wrap); - } - this.node.renderIndent(true); - } - }, - - - addClass : function(cls){ - if(this.elNode){ - Ext.fly(this.elNode).addClass(cls); - } - }, - - - removeClass : function(cls){ - if(this.elNode){ - Ext.fly(this.elNode).removeClass(cls); - } - }, - - - remove : function(){ - if(this.rendered){ - this.holder = document.createElement("div"); - this.holder.appendChild(this.wrap); - } - }, - - - fireEvent : function(){ - return this.node.fireEvent.apply(this.node, arguments); - }, - - - initEvents : function(){ - this.node.on("move", this.onMove, this); - - if(this.node.disabled){ - this.addClass("x-tree-node-disabled"); - if (this.checkbox) { - this.checkbox.disabled = true; - } - } - if(this.node.hidden){ - this.hide(); - } - var ot = this.node.getOwnerTree(); - var dd = ot.enableDD || ot.enableDrag || ot.enableDrop; - if(dd && (!this.node.isRoot || ot.rootVisible)){ - Ext.dd.Registry.register(this.elNode, { - node: this.node, - handles: this.getDDHandles(), - isHandle: false - }); - } - }, - - - getDDHandles : function(){ - return [this.iconNode, this.textNode, this.elNode]; - }, - - - hide : function(){ - this.node.hidden = true; - if(this.wrap){ - this.wrap.style.display = "none"; - } - }, - - - show : function(){ - this.node.hidden = false; - if(this.wrap){ - this.wrap.style.display = ""; - } - }, - - - onContextMenu : function(e){ - if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) { - e.preventDefault(); - this.focus(); - this.fireEvent("contextmenu", this.node, e); - } - }, - - - onClick : function(e){ - if(this.dropping){ - e.stopEvent(); - return; - } - if(this.fireEvent("beforeclick", this.node, e) !== false){ - var a = e.getTarget('a'); - if(!this.disabled && this.node.attributes.href && a){ - this.fireEvent("click", this.node, e); - return; - }else if(a && e.ctrlKey){ - e.stopEvent(); - } - e.preventDefault(); - if(this.disabled){ - return; - } - - if(this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable()){ - this.node.toggle(); - } - - this.fireEvent("click", this.node, e); - }else{ - e.stopEvent(); - } - }, - - - onDblClick : function(e){ - e.preventDefault(); - if(this.disabled){ - return; - } - if(this.checkbox){ - this.toggleCheck(); - } - if(!this.animating && this.node.isExpandable()){ - this.node.toggle(); - } - this.fireEvent("dblclick", this.node, e); - }, - - onOver : function(e){ - this.addClass('x-tree-node-over'); - }, - - onOut : function(e){ - this.removeClass('x-tree-node-over'); - }, - - - onCheckChange : function(){ - var checked = this.checkbox.checked; - - this.checkbox.defaultChecked = checked; - this.node.attributes.checked = checked; - this.fireEvent('checkchange', this.node, checked); - }, - - - ecClick : function(e){ - if(!this.animating && this.node.isExpandable()){ - this.node.toggle(); - } - }, - - - startDrop : function(){ - this.dropping = true; - }, - - - endDrop : function(){ - setTimeout(function(){ - this.dropping = false; - }.createDelegate(this), 50); - }, - - - expand : function(){ - this.updateExpandIcon(); - this.ctNode.style.display = ""; - }, - - - focus : function(){ - if(!this.node.preventHScroll){ - try{this.anchor.focus(); - }catch(e){} - }else if(!Ext.isIE){ - try{ - var noscroll = this.node.getOwnerTree().getTreeEl().dom; - var l = noscroll.scrollLeft; - this.anchor.focus(); - noscroll.scrollLeft = l; - }catch(e){} - } - }, - - - toggleCheck : function(value){ - var cb = this.checkbox; - if(cb){ - cb.checked = (value === undefined ? !cb.checked : value); - this.onCheckChange(); - } - }, - - - blur : function(){ - try{ - this.anchor.blur(); - }catch(e){} - }, - - - animExpand : function(callback){ - var ct = Ext.get(this.ctNode); - ct.stopFx(); - if(!this.node.isExpandable()){ - this.updateExpandIcon(); - this.ctNode.style.display = ""; - Ext.callback(callback); - return; - } - this.animating = true; - this.updateExpandIcon(); - - ct.slideIn('t', { - callback : function(){ - this.animating = false; - Ext.callback(callback); - }, - scope: this, - duration: this.node.ownerTree.duration || .25 - }); - }, - - - highlight : function(){ - var tree = this.node.getOwnerTree(); - Ext.fly(this.wrap).highlight( - tree.hlColor || "C3DAF9", - {endColor: tree.hlBaseColor} - ); - }, - - - collapse : function(){ - this.updateExpandIcon(); - this.ctNode.style.display = "none"; - }, - - - animCollapse : function(callback){ - var ct = Ext.get(this.ctNode); - ct.enableDisplayMode('block'); - ct.stopFx(); - - this.animating = true; - this.updateExpandIcon(); - - ct.slideOut('t', { - callback : function(){ - this.animating = false; - Ext.callback(callback); - }, - scope: this, - duration: this.node.ownerTree.duration || .25 - }); - }, - - - getContainer : function(){ - return this.ctNode; - }, - - - getEl : function(){ - return this.wrap; - }, - - - appendDDGhost : function(ghostNode){ - ghostNode.appendChild(this.elNode.cloneNode(true)); - }, - - - getDDRepairXY : function(){ - return Ext.lib.Dom.getXY(this.iconNode); - }, - - - onRender : function(){ - this.render(); - }, - - - render : function(bulkRender){ - var n = this.node, a = n.attributes; - var targetNode = n.parentNode ? - n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom; - - if(!this.rendered){ - this.rendered = true; - - this.renderElements(n, a, targetNode, bulkRender); - - if(a.qtip){ - if(this.textNode.setAttributeNS){ - this.textNode.setAttributeNS("ext", "qtip", a.qtip); - if(a.qtipTitle){ - this.textNode.setAttributeNS("ext", "qtitle", a.qtipTitle); - } - }else{ - this.textNode.setAttribute("ext:qtip", a.qtip); - if(a.qtipTitle){ - this.textNode.setAttribute("ext:qtitle", a.qtipTitle); - } - } - }else if(a.qtipCfg){ - a.qtipCfg.target = Ext.id(this.textNode); - Ext.QuickTips.register(a.qtipCfg); - } - this.initEvents(); - if(!this.node.expanded){ - this.updateExpandIcon(true); - } - }else{ - if(bulkRender === true) { - targetNode.appendChild(this.wrap); - } - } - }, - - - renderElements : function(n, a, targetNode, bulkRender){ - - this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : ''; - - var cb = typeof a.checked == 'boolean'; - - var href = a.href ? a.href : Ext.isGecko ? "" : "#"; - var buf = ['
  • ', - '',this.indentMarkup,"", - '', - '', - cb ? ('' : '/>')) : '', - '',n.text,"
    ", - '', - "
  • "].join(''); - - var nel; - if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){ - this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf); - }else{ - this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf); - } - - this.elNode = this.wrap.childNodes[0]; - this.ctNode = this.wrap.childNodes[1]; - var cs = this.elNode.childNodes; - this.indentNode = cs[0]; - this.ecNode = cs[1]; - this.iconNode = cs[2]; - var index = 3; - if(cb){ - this.checkbox = cs[3]; - - this.checkbox.defaultChecked = this.checkbox.checked; - index++; - } - this.anchor = cs[index]; - this.textNode = cs[index].firstChild; - }, - - - getAnchor : function(){ - return this.anchor; - }, - - - getTextEl : function(){ - return this.textNode; - }, - - - getIconEl : function(){ - return this.iconNode; - }, - - - isChecked : function(){ - return this.checkbox ? this.checkbox.checked : false; - }, - - - updateExpandIcon : function(){ - if(this.rendered){ - var n = this.node, c1, c2; - var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow"; - if(n.isExpandable()){ - if(n.expanded){ - cls += "-minus"; - c1 = "x-tree-node-collapsed"; - c2 = "x-tree-node-expanded"; - }else{ - cls += "-plus"; - c1 = "x-tree-node-expanded"; - c2 = "x-tree-node-collapsed"; - } - if(this.wasLeaf){ - this.removeClass("x-tree-node-leaf"); - this.wasLeaf = false; - } - if(this.c1 != c1 || this.c2 != c2){ - Ext.fly(this.elNode).replaceClass(c1, c2); - this.c1 = c1; this.c2 = c2; - } - }else{ - if(!this.wasLeaf){ - Ext.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-leaf"); - delete this.c1; - delete this.c2; - this.wasLeaf = true; - } - } - var ecc = "x-tree-ec-icon "+cls; - if(this.ecc != ecc){ - this.ecNode.className = ecc; - this.ecc = ecc; - } - } - }, - - - getChildIndent : function(){ - if(!this.childIndent){ - var buf = []; - var p = this.node; - while(p){ - if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){ - if(!p.isLast()) { - buf.unshift(''); - } else { - buf.unshift(''); - } - } - p = p.parentNode; - } - this.childIndent = buf.join(""); - } - return this.childIndent; - }, - - - renderIndent : function(){ - if(this.rendered){ - var indent = ""; - var p = this.node.parentNode; - if(p){ - indent = p.ui.getChildIndent(); - } - if(this.indentMarkup != indent){ - this.indentNode.innerHTML = indent; - this.indentMarkup = indent; - } - this.updateExpandIcon(); - } - }, - - destroy : function(){ - if(this.elNode){ - Ext.dd.Registry.unregister(this.elNode.id); - } - delete this.elNode; - delete this.ctNode; - delete this.indentNode; - delete this.ecNode; - delete this.iconNode; - delete this.checkbox; - delete this.anchor; - delete this.textNode; - Ext.removeNode(this.ctNode); - } -}; - - -Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { - - render : function(){ - if(!this.rendered){ - var targetNode = this.node.ownerTree.innerCt.dom; - this.node.expanded = true; - targetNode.innerHTML = '
    '; - this.wrap = this.ctNode = targetNode.firstChild; - } - }, - collapse : Ext.emptyFn, - expand : Ext.emptyFn -}); - -Ext.tree.TreeLoader = function(config){ - this.baseParams = {}; - Ext.apply(this, config); - - this.addEvents( - - "beforeload", - - "load", - - "loadexception" - ); - - Ext.tree.TreeLoader.superclass.constructor.call(this); -}; - -Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, { - - - - - - - - uiProviders : {}, - - - clearOnLoad : true, - - - load : function(node, callback){ - if(this.clearOnLoad){ - while(node.firstChild){ - node.removeChild(node.firstChild); - } - } - if(this.doPreload(node)){ - if(typeof callback == "function"){ - callback(); - } - }else if(this.dataUrl||this.url){ - this.requestData(node, callback); - } - }, - - doPreload : function(node){ - if(node.attributes.children){ - if(node.childNodes.length < 1){ - var cs = node.attributes.children; - node.beginUpdate(); - for(var i = 0, len = cs.length; i < len; i++){ - var cn = node.appendChild(this.createNode(cs[i])); - if(this.preloadChildren){ - this.doPreload(cn); - } - } - node.endUpdate(); - } - return true; - }else { - return false; - } - }, - - getParams: function(node){ - var buf = [], bp = this.baseParams; - for(var key in bp){ - if(typeof bp[key] != "function"){ - buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&"); - } - } - buf.push("node=", encodeURIComponent(node.id)); - return buf.join(""); - }, - - requestData : function(node, callback){ - if(this.fireEvent("beforeload", this, node, callback) !== false){ - this.transId = Ext.Ajax.request({ - method:this.requestMethod, - url: this.dataUrl||this.url, - success: this.handleResponse, - failure: this.handleFailure, - scope: this, - argument: {callback: callback, node: node}, - params: this.getParams(node) - }); - }else{ - - - if(typeof callback == "function"){ - callback(); - } - } - }, - - isLoading : function(){ - return !!this.transId; - }, - - abort : function(){ - if(this.isLoading()){ - Ext.Ajax.abort(this.transId); - } - }, - - - createNode : function(attr){ - - if(this.baseAttrs){ - Ext.applyIf(attr, this.baseAttrs); - } - if(this.applyLoader !== false){ - attr.loader = this; - } - if(typeof attr.uiProvider == 'string'){ - attr.uiProvider = this.uiProviders[attr.uiProvider] || eval(attr.uiProvider); - } - if(attr.nodeType){ - return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); - }else{ - return attr.leaf ? - new Ext.tree.TreeNode(attr) : - new Ext.tree.AsyncTreeNode(attr); - } - }, - - processResponse : function(response, node, callback){ - var json = response.responseText; - try { - var o = eval("("+json+")"); - node.beginUpdate(); - for(var i = 0, len = o.length; i < len; i++){ - var n = this.createNode(o[i]); - if(n){ - node.appendChild(n); - } - } - node.endUpdate(); - if(typeof callback == "function"){ - callback(this, node); - } - }catch(e){ - this.handleFailure(response); - } - }, - - handleResponse : function(response){ - this.transId = false; - var a = response.argument; - this.processResponse(response, a.node, a.callback); - this.fireEvent("load", this, a.node, response); - }, - - handleFailure : function(response){ - this.transId = false; - var a = response.argument; - this.fireEvent("loadexception", this, a.node, response); - if(typeof a.callback == "function"){ - a.callback(this, a.node); - } - } -}); - -Ext.tree.TreeFilter = function(tree, config){ - this.tree = tree; - this.filtered = {}; - Ext.apply(this, config); -}; - -Ext.tree.TreeFilter.prototype = { - clearBlank:false, - reverse:false, - autoClear:false, - remove:false, - - - filter : function(value, attr, startNode){ - attr = attr || "text"; - var f; - if(typeof value == "string"){ - var vlen = value.length; - - if(vlen == 0 && this.clearBlank){ - this.clear(); - return; - } - value = value.toLowerCase(); - f = function(n){ - return n.attributes[attr].substr(0, vlen).toLowerCase() == value; - }; - }else if(value.exec){ - f = function(n){ - return value.test(n.attributes[attr]); - }; - }else{ - throw 'Illegal filter type, must be string or regex'; - } - this.filterBy(f, null, startNode); - }, - - - filterBy : function(fn, scope, startNode){ - startNode = startNode || this.tree.root; - if(this.autoClear){ - this.clear(); - } - var af = this.filtered, rv = this.reverse; - var f = function(n){ - if(n == startNode){ - return true; - } - if(af[n.id]){ - return false; - } - var m = fn.call(scope || n, n); - if(!m || rv){ - af[n.id] = n; - n.ui.hide(); - return false; - } - return true; - }; - startNode.cascade(f); - if(this.remove){ - for(var id in af){ - if(typeof id != "function"){ - var n = af[id]; - if(n && n.parentNode){ - n.parentNode.removeChild(n); - } - } - } - } - }, - - - clear : function(){ - var t = this.tree; - var af = this.filtered; - for(var id in af){ - if(typeof id != "function"){ - var n = af[id]; - if(n){ - n.ui.show(); - } - } - } - this.filtered = {}; - } -}; - - -Ext.tree.TreeSorter = function(tree, config){ - - - - - - - - Ext.apply(this, config); - tree.on("beforechildrenrendered", this.doSort, this); - tree.on("append", this.updateSort, this); - tree.on("insert", this.updateSort, this); - tree.on("textchange", this.updateSortParent, this); - - var dsc = this.dir && this.dir.toLowerCase() == "desc"; - var p = this.property || "text"; - var sortType = this.sortType; - var fs = this.folderSort; - var cs = this.caseSensitive === true; - var leafAttr = this.leafAttr || 'leaf'; - - this.sortFn = function(n1, n2){ - if(fs){ - if(n1.attributes[leafAttr] && !n2.attributes[leafAttr]){ - return 1; - } - if(!n1.attributes[leafAttr] && n2.attributes[leafAttr]){ - return -1; - } - } - var v1 = sortType ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase()); - var v2 = sortType ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase()); - if(v1 < v2){ - return dsc ? +1 : -1; - }else if(v1 > v2){ - return dsc ? -1 : +1; - }else{ - return 0; - } - }; -}; - -Ext.tree.TreeSorter.prototype = { - doSort : function(node){ - node.sort(this.sortFn); - }, - - compareNodes : function(n1, n2){ - return (n1.text.toUpperCase() > n2.text.toUpperCase() ? 1 : -1); - }, - - updateSort : function(tree, node){ - if(node.childrenRendered){ - this.doSort.defer(1, this, [node]); - } - }, - - updateSortParent : function(node){ - var p = node.parentNode; - if(p && p.childrenRendered){ - this.doSort.defer(1, this, [p]); - } - } }; - -if(Ext.dd.DropZone){ - -Ext.tree.TreeDropZone = function(tree, config){ - - this.allowParentInsert = false; - - this.allowContainerDrop = false; - - this.appendOnly = false; - Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.innerCt, config); - - this.tree = tree; - - this.dragOverData = {}; +Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, { + expand : function(deep, anim, callback, scope){ + if(this.loading){ + var timer; + var f = function(){ + if(!this.loading){ + clearInterval(timer); + this.expand(deep, anim, callback, scope); + } + }.createDelegate(this); + timer = setInterval(f, 200); + return; + } + if(!this.loaded){ + if(this.fireEvent("beforeload", this) === false){ + return; + } + this.loading = true; + this.ui.beforeLoad(this); + var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader(); + if(loader){ + loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback, scope]), this); + return; + } + } + Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback, scope); + }, - this.lastInsertClass = "x-tree-no-status"; -}; - -Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, { - - ddGroup : "TreeDD", - - - expandDelay : 1000, - - expandNode : function(node){ - if(node.hasChildNodes() && !node.isExpanded()){ - node.expand(false, null, this.triggerCacheRefresh.createDelegate(this)); - } - }, - + isLoading : function(){ + return this.loading; + }, - queueExpand : function(node){ - this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]); - }, - + loadComplete : function(deep, anim, callback, scope){ + this.loading = false; + this.loaded = true; + this.ui.afterLoad(this); + this.fireEvent("load", this); + this.expand(deep, anim, callback, scope); + }, - cancelExpand : function(){ - if(this.expandProcId){ - clearTimeout(this.expandProcId); - this.expandProcId = false; - } - }, - - isValidDropPoint : function(n, pt, dd, e, data){ - if(!n || !data){ return false; } - var targetNode = n.node; - var dropNode = data.node; - - if(!(targetNode && targetNode.isTarget && pt)){ - return false; - } - if(pt == "append" && targetNode.allowChildren === false){ - return false; - } - if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){ - return false; - } - if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){ - return false; - } - - var overEvent = this.dragOverData; - overEvent.tree = this.tree; - overEvent.target = targetNode; - overEvent.data = data; - overEvent.point = pt; - overEvent.source = dd; - overEvent.rawEvent = e; - overEvent.dropNode = dropNode; - overEvent.cancel = false; - var result = this.tree.fireEvent("nodedragover", overEvent); - return overEvent.cancel === false && result !== false; - }, - + isLoaded : function(){ + return this.loaded; + }, - getDropPoint : function(e, n, dd){ - var tn = n.node; - if(tn.isRoot){ - return tn.allowChildren !== false ? "append" : false; - } - var dragEl = n.ddel; - var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight; - var y = Ext.lib.Event.getPageY(e); - var noAppend = tn.allowChildren === false || tn.isLeaf(); - if(this.appendOnly || tn.parentNode.allowChildren === false){ - return noAppend ? false : "append"; - } - var noBelow = false; - if(!this.allowParentInsert){ - noBelow = tn.hasChildNodes() && tn.isExpanded(); - } - var q = (b - t) / (noAppend ? 2 : 3); - if(y >= t && y < (t + q)){ - return "above"; - }else if(!noBelow && (noAppend || y >= b-q && y <= b)){ - return "below"; - }else{ - return "append"; - } - }, - - - onNodeEnter : function(n, dd, e, data){ - this.cancelExpand(); - }, - - - onNodeOver : function(n, dd, e, data){ - var pt = this.getDropPoint(e, n, dd); - var node = n.node; - - - if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){ - this.queueExpand(node); - }else if(pt != "append"){ - this.cancelExpand(); - } - - - var returnCls = this.dropNotAllowed; - if(this.isValidDropPoint(n, pt, dd, e, data)){ - if(pt){ - var el = n.ddel; - var cls; - if(pt == "above"){ - returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between"; - cls = "x-tree-drag-insert-above"; - }else if(pt == "below"){ - returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between"; - cls = "x-tree-drag-insert-below"; - }else{ - returnCls = "x-tree-drop-ok-append"; - cls = "x-tree-drag-append"; - } - if(this.lastInsertClass != cls){ - Ext.fly(el).replaceClass(this.lastInsertClass, cls); - this.lastInsertClass = cls; - } - } - } - return returnCls; - }, - - - onNodeOut : function(n, dd, e, data){ - this.cancelExpand(); - this.removeDropIndicators(n); - }, - - - onNodeDrop : function(n, dd, e, data){ - var point = this.getDropPoint(e, n, dd); - var targetNode = n.node; - targetNode.ui.startDrop(); - if(!this.isValidDropPoint(n, point, dd, e, data)){ - targetNode.ui.endDrop(); - return false; - } - - var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null); - var dropEvent = { - tree : this.tree, - target: targetNode, - data: data, - point: point, - source: dd, - rawEvent: e, - dropNode: dropNode, - cancel: !dropNode, - dropStatus: false - }; - var retval = this.tree.fireEvent("beforenodedrop", dropEvent); - if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){ - targetNode.ui.endDrop(); - return dropEvent.dropStatus; - } - - targetNode = dropEvent.target; - if(point == "append" && !targetNode.isExpanded()){ - targetNode.expand(false, null, function(){ - this.completeDrop(dropEvent); - }.createDelegate(this)); - }else{ - this.completeDrop(dropEvent); - } - return true; - }, - - - completeDrop : function(de){ - var ns = de.dropNode, p = de.point, t = de.target; - if(!Ext.isArray(ns)){ - ns = [ns]; - } - var n; - for(var i = 0, len = ns.length; i < len; i++){ - n = ns[i]; - if(p == "above"){ - t.parentNode.insertBefore(n, t); - }else if(p == "below"){ - t.parentNode.insertBefore(n, t.nextSibling); - }else{ - t.appendChild(n); - } - } - n.ui.focus(); - if(Ext.enableFx && this.tree.hlDrop){ - n.ui.highlight(); - } - t.ui.endDrop(); - this.tree.fireEvent("nodedrop", de); - }, - - - afterNodeMoved : function(dd, data, e, targetNode, dropNode){ - if(Ext.enableFx && this.tree.hlDrop){ - dropNode.ui.focus(); - dropNode.ui.highlight(); - } - this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e); - }, - - - getTree : function(){ - return this.tree; - }, - - - removeDropIndicators : function(n){ - if(n && n.ddel){ - var el = n.ddel; - Ext.fly(el).removeClass([ - "x-tree-drag-insert-above", - "x-tree-drag-insert-below", - "x-tree-drag-append"]); - this.lastInsertClass = "_noclass"; - } - }, - - - beforeDragDrop : function(target, e, id){ - this.cancelExpand(); - return true; - }, - - - afterRepair : function(data){ - if(data && Ext.enableFx){ - data.node.ui.highlight(); - } - this.hideProxy(); - } -}); - -} - -if(Ext.dd.DragZone){ -Ext.tree.TreeDragZone = function(tree, config){ - Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.getTreeEl(), config); - - this.tree = tree; -}; - -Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, { - - ddGroup : "TreeDD", - - - onBeforeDrag : function(data, e){ - var n = data.node; - return n && n.draggable && !n.disabled; - }, - - - onInitDrag : function(e){ - var data = this.dragData; - this.tree.getSelectionModel().select(data.node); - this.tree.eventModel.disable(); - this.proxy.update(""); - data.node.ui.appendDDGhost(this.proxy.ghost.dom); - this.tree.fireEvent("startdrag", this.tree, data.node, e); - }, - - - getRepairXY : function(e, data){ - return data.node.ui.getDDRepairXY(); - }, - - - onEndDrag : function(data, e){ - this.tree.eventModel.enable.defer(100, this.tree.eventModel); - this.tree.fireEvent("enddrag", this.tree, data.node, e); - }, - - - onValidDrop : function(dd, e, id){ - this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e); - this.hideProxy(); - }, - - - beforeInvalidDrop : function(e, id){ - - var sm = this.tree.getSelectionModel(); - sm.clearSelections(); - sm.select(this.dragData.node); - }, - - - afterRepair : function(){ - if (Ext.enableFx && this.tree.hlDrop) { - Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); - } - this.dragging = false; - } -}); -} + hasChildNodes : function(){ + if(!this.isLeaf() && !this.loaded){ + return true; + }else{ + return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this); + } + }, + + reload : function(callback, scope){ + this.collapse(false, false); + while(this.firstChild){ + this.removeChild(this.firstChild).destroy(); + } + this.childrenRendered = false; + this.loaded = false; + if(this.isHiddenRoot()){ + this.expanded = false; + } + this.expand(false, false, callback, scope); + } +}); + +Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode; +Ext.tree.TreeNodeUI = Ext.extend(Object, { + + constructor : function(node){ + Ext.apply(this, { + node: node, + rendered: false, + animating: false, + wasLeaf: true, + ecc: 'x-tree-ec-icon x-tree-elbow', + emptyIcon: Ext.BLANK_IMAGE_URL + }); + }, + + + removeChild : function(node){ + if(this.rendered){ + this.ctNode.removeChild(node.ui.getEl()); + } + }, + + + beforeLoad : function(){ + this.addClass("x-tree-node-loading"); + }, + + + afterLoad : function(){ + this.removeClass("x-tree-node-loading"); + }, + + + onTextChange : function(node, text, oldText){ + if(this.rendered){ + this.textNode.innerHTML = text; + } + }, + + + onIconClsChange : function(node, cls, oldCls){ + if(this.rendered){ + Ext.fly(this.iconNode).replaceClass(oldCls, cls); + } + }, + + + onIconChange : function(node, icon){ + if(this.rendered){ + + var empty = Ext.isEmpty(icon); + this.iconNode.src = empty ? this.emptyIcon : icon; + Ext.fly(this.iconNode)[empty ? 'removeClass' : 'addClass']('x-tree-node-inline-icon'); + } + }, + + + onTipChange : function(node, tip, title){ + if(this.rendered){ + var hasTitle = Ext.isDefined(title); + if(this.textNode.setAttributeNS){ + this.textNode.setAttributeNS("ext", "qtip", tip); + if(hasTitle){ + this.textNode.setAttributeNS("ext", "qtitle", title); + } + }else{ + this.textNode.setAttribute("ext:qtip", tip); + if(hasTitle){ + this.textNode.setAttribute("ext:qtitle", title); + } + } + } + }, + + + onHrefChange : function(node, href, target){ + if(this.rendered){ + this.anchor.href = this.getHref(href); + if(Ext.isDefined(target)){ + this.anchor.target = target; + } + } + }, + + + onClsChange : function(node, cls, oldCls){ + if(this.rendered){ + Ext.fly(this.elNode).replaceClass(oldCls, cls); + } + }, + + + onDisableChange : function(node, state){ + this.disabled = state; + if (this.checkbox) { + this.checkbox.disabled = state; + } + this[state ? 'addClass' : 'removeClass']('x-tree-node-disabled'); + }, + + + onSelectedChange : function(state){ + if(state){ + this.focus(); + this.addClass("x-tree-selected"); + }else{ + + this.removeClass("x-tree-selected"); + } + }, + + + onMove : function(tree, node, oldParent, newParent, index, refNode){ + this.childIndent = null; + if(this.rendered){ + var targetNode = newParent.ui.getContainer(); + if(!targetNode){ + this.holder = document.createElement("div"); + this.holder.appendChild(this.wrap); + return; + } + var insertBefore = refNode ? refNode.ui.getEl() : null; + if(insertBefore){ + targetNode.insertBefore(this.wrap, insertBefore); + }else{ + targetNode.appendChild(this.wrap); + } + this.node.renderIndent(true, oldParent != newParent); + } + }, + + + addClass : function(cls){ + if(this.elNode){ + Ext.fly(this.elNode).addClass(cls); + } + }, + + + removeClass : function(cls){ + if(this.elNode){ + Ext.fly(this.elNode).removeClass(cls); + } + }, + + + remove : function(){ + if(this.rendered){ + this.holder = document.createElement("div"); + this.holder.appendChild(this.wrap); + } + }, + + + fireEvent : function(){ + return this.node.fireEvent.apply(this.node, arguments); + }, + + + initEvents : function(){ + this.node.on("move", this.onMove, this); + + if(this.node.disabled){ + this.onDisableChange(this.node, true); + } + if(this.node.hidden){ + this.hide(); + } + var ot = this.node.getOwnerTree(); + var dd = ot.enableDD || ot.enableDrag || ot.enableDrop; + if(dd && (!this.node.isRoot || ot.rootVisible)){ + Ext.dd.Registry.register(this.elNode, { + node: this.node, + handles: this.getDDHandles(), + isHandle: false + }); + } + }, + + + getDDHandles : function(){ + return [this.iconNode, this.textNode, this.elNode]; + }, + + + hide : function(){ + this.node.hidden = true; + if(this.wrap){ + this.wrap.style.display = "none"; + } + }, + + + show : function(){ + this.node.hidden = false; + if(this.wrap){ + this.wrap.style.display = ""; + } + }, + + + onContextMenu : function(e){ + if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) { + e.preventDefault(); + this.focus(); + this.fireEvent("contextmenu", this.node, e); + } + }, + + + onClick : function(e){ + if(this.dropping){ + e.stopEvent(); + return; + } + if(this.fireEvent("beforeclick", this.node, e) !== false){ + var a = e.getTarget('a'); + if(!this.disabled && this.node.attributes.href && a){ + this.fireEvent("click", this.node, e); + return; + }else if(a && e.ctrlKey){ + e.stopEvent(); + } + e.preventDefault(); + if(this.disabled){ + return; + } + + if(this.node.attributes.singleClickExpand && !this.animating && this.node.isExpandable()){ + this.node.toggle(); + } + + this.fireEvent("click", this.node, e); + }else{ + e.stopEvent(); + } + }, + + + onDblClick : function(e){ + e.preventDefault(); + if(this.disabled){ + return; + } + if(this.fireEvent("beforedblclick", this.node, e) !== false){ + if(this.checkbox){ + this.toggleCheck(); + } + if(!this.animating && this.node.isExpandable()){ + this.node.toggle(); + } + this.fireEvent("dblclick", this.node, e); + } + }, + + onOver : function(e){ + this.addClass('x-tree-node-over'); + }, + + onOut : function(e){ + this.removeClass('x-tree-node-over'); + }, + + + onCheckChange : function(){ + var checked = this.checkbox.checked; + + this.checkbox.defaultChecked = checked; + this.node.attributes.checked = checked; + this.fireEvent('checkchange', this.node, checked); + }, + + + ecClick : function(e){ + if(!this.animating && this.node.isExpandable()){ + this.node.toggle(); + } + }, + + + startDrop : function(){ + this.dropping = true; + }, + + + endDrop : function(){ + setTimeout(function(){ + this.dropping = false; + }.createDelegate(this), 50); + }, + + + expand : function(){ + this.updateExpandIcon(); + this.ctNode.style.display = ""; + }, + + + focus : function(){ + if(!this.node.preventHScroll){ + try{this.anchor.focus(); + }catch(e){} + }else{ + try{ + var noscroll = this.node.getOwnerTree().getTreeEl().dom; + var l = noscroll.scrollLeft; + this.anchor.focus(); + noscroll.scrollLeft = l; + }catch(e){} + } + }, + + + toggleCheck : function(value){ + var cb = this.checkbox; + if(cb){ + cb.checked = (value === undefined ? !cb.checked : value); + this.onCheckChange(); + } + }, + + + blur : function(){ + try{ + this.anchor.blur(); + }catch(e){} + }, + + + animExpand : function(callback){ + var ct = Ext.get(this.ctNode); + ct.stopFx(); + if(!this.node.isExpandable()){ + this.updateExpandIcon(); + this.ctNode.style.display = ""; + Ext.callback(callback); + return; + } + this.animating = true; + this.updateExpandIcon(); + + ct.slideIn('t', { + callback : function(){ + this.animating = false; + Ext.callback(callback); + }, + scope: this, + duration: this.node.ownerTree.duration || .25 + }); + }, + + + highlight : function(){ + var tree = this.node.getOwnerTree(); + Ext.fly(this.wrap).highlight( + tree.hlColor || "C3DAF9", + {endColor: tree.hlBaseColor} + ); + }, + + + collapse : function(){ + this.updateExpandIcon(); + this.ctNode.style.display = "none"; + }, + + + animCollapse : function(callback){ + var ct = Ext.get(this.ctNode); + ct.enableDisplayMode('block'); + ct.stopFx(); + + this.animating = true; + this.updateExpandIcon(); + + ct.slideOut('t', { + callback : function(){ + this.animating = false; + Ext.callback(callback); + }, + scope: this, + duration: this.node.ownerTree.duration || .25 + }); + }, + + + getContainer : function(){ + return this.ctNode; + }, + + + getEl : function(){ + return this.wrap; + }, + + + appendDDGhost : function(ghostNode){ + ghostNode.appendChild(this.elNode.cloneNode(true)); + }, + + + getDDRepairXY : function(){ + return Ext.lib.Dom.getXY(this.iconNode); + }, + + + onRender : function(){ + this.render(); + }, + + + render : function(bulkRender){ + var n = this.node, a = n.attributes; + var targetNode = n.parentNode ? + n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom; + + if(!this.rendered){ + this.rendered = true; + + this.renderElements(n, a, targetNode, bulkRender); + + if(a.qtip){ + this.onTipChange(n, a.qtip, a.qtipTitle); + }else if(a.qtipCfg){ + a.qtipCfg.target = Ext.id(this.textNode); + Ext.QuickTips.register(a.qtipCfg); + } + this.initEvents(); + if(!this.node.expanded){ + this.updateExpandIcon(true); + } + }else{ + if(bulkRender === true) { + targetNode.appendChild(this.wrap); + } + } + }, + + + renderElements : function(n, a, targetNode, bulkRender){ + + this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : ''; + + var cb = Ext.isBoolean(a.checked), + nel, + href = this.getHref(a.href), + buf = ['
  • ', + '',this.indentMarkup,"", + '', + '', + cb ? ('' : '/>')) : '', + '',n.text,"
    ", + '', + "
  • "].join(''); + + if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){ + this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf); + }else{ + this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf); + } + + this.elNode = this.wrap.childNodes[0]; + this.ctNode = this.wrap.childNodes[1]; + var cs = this.elNode.childNodes; + this.indentNode = cs[0]; + this.ecNode = cs[1]; + this.iconNode = cs[2]; + var index = 3; + if(cb){ + this.checkbox = cs[3]; + + this.checkbox.defaultChecked = this.checkbox.checked; + index++; + } + this.anchor = cs[index]; + this.textNode = cs[index].firstChild; + }, + + + getHref : function(href){ + return Ext.isEmpty(href) ? (Ext.isGecko ? '' : '#') : href; + }, + + + getAnchor : function(){ + return this.anchor; + }, + + + getTextEl : function(){ + return this.textNode; + }, + + + getIconEl : function(){ + return this.iconNode; + }, + + + isChecked : function(){ + return this.checkbox ? this.checkbox.checked : false; + }, + + + updateExpandIcon : function(){ + if(this.rendered){ + var n = this.node, + c1, + c2, + cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow", + hasChild = n.hasChildNodes(); + if(hasChild || n.attributes.expandable){ + if(n.expanded){ + cls += "-minus"; + c1 = "x-tree-node-collapsed"; + c2 = "x-tree-node-expanded"; + }else{ + cls += "-plus"; + c1 = "x-tree-node-expanded"; + c2 = "x-tree-node-collapsed"; + } + if(this.wasLeaf){ + this.removeClass("x-tree-node-leaf"); + this.wasLeaf = false; + } + if(this.c1 != c1 || this.c2 != c2){ + Ext.fly(this.elNode).replaceClass(c1, c2); + this.c1 = c1; this.c2 = c2; + } + }else{ + if(!this.wasLeaf){ + Ext.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-collapsed"); + delete this.c1; + delete this.c2; + this.wasLeaf = true; + } + } + var ecc = "x-tree-ec-icon "+cls; + if(this.ecc != ecc){ + this.ecNode.className = ecc; + this.ecc = ecc; + } + } + }, + + + onIdChange: function(id){ + if(this.rendered){ + this.elNode.setAttribute('ext:tree-node-id', id); + } + }, + + + getChildIndent : function(){ + if(!this.childIndent){ + var buf = [], + p = this.node; + while(p){ + if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){ + if(!p.isLast()) { + buf.unshift(''); + } else { + buf.unshift(''); + } + } + p = p.parentNode; + } + this.childIndent = buf.join(""); + } + return this.childIndent; + }, + + + renderIndent : function(){ + if(this.rendered){ + var indent = "", + p = this.node.parentNode; + if(p){ + indent = p.ui.getChildIndent(); + } + if(this.indentMarkup != indent){ + this.indentNode.innerHTML = indent; + this.indentMarkup = indent; + } + this.updateExpandIcon(); + } + }, + + destroy : function(){ + if(this.elNode){ + Ext.dd.Registry.unregister(this.elNode.id); + } + + Ext.each(['textnode', 'anchor', 'checkbox', 'indentNode', 'ecNode', 'iconNode', 'elNode', 'ctNode', 'wrap', 'holder'], function(el){ + if(this[el]){ + Ext.fly(this[el]).remove(); + delete this[el]; + } + }, this); + delete this.node; + } +}); + + +Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { + + render : function(){ + if(!this.rendered){ + var targetNode = this.node.ownerTree.innerCt.dom; + this.node.expanded = true; + targetNode.innerHTML = '
    '; + this.wrap = this.ctNode = targetNode.firstChild; + } + }, + collapse : Ext.emptyFn, + expand : Ext.emptyFn +}); +Ext.tree.TreeLoader = function(config){ + this.baseParams = {}; + Ext.apply(this, config); + + this.addEvents( + + "beforeload", + + "load", + + "loadexception" + ); + Ext.tree.TreeLoader.superclass.constructor.call(this); + if(Ext.isString(this.paramOrder)){ + this.paramOrder = this.paramOrder.split(/[\s,|]/); + } +}; + +Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, { + + + + + + + + uiProviders : {}, + + + clearOnLoad : true, + + + paramOrder: undefined, + + + paramsAsHash: false, + + + nodeParameter: 'node', + + + directFn : undefined, + + + load : function(node, callback, scope){ + if(this.clearOnLoad){ + while(node.firstChild){ + node.removeChild(node.firstChild); + } + } + if(this.doPreload(node)){ + this.runCallback(callback, scope || node, [node]); + }else if(this.directFn || this.dataUrl || this.url){ + this.requestData(node, callback, scope || node); + } + }, + + doPreload : function(node){ + if(node.attributes.children){ + if(node.childNodes.length < 1){ + var cs = node.attributes.children; + node.beginUpdate(); + for(var i = 0, len = cs.length; i < len; i++){ + var cn = node.appendChild(this.createNode(cs[i])); + if(this.preloadChildren){ + this.doPreload(cn); + } + } + node.endUpdate(); + } + return true; + } + return false; + }, + + getParams: function(node){ + var bp = Ext.apply({}, this.baseParams), + np = this.nodeParameter, + po = this.paramOrder; + + np && (bp[ np ] = node.id); + + if(this.directFn){ + var buf = [node.id]; + if(po){ + + if(np && po.indexOf(np) > -1){ + buf = []; + } + + for(var i = 0, len = po.length; i < len; i++){ + buf.push(bp[ po[i] ]); + } + }else if(this.paramsAsHash){ + buf = [bp]; + } + return buf; + }else{ + return bp; + } + }, + + requestData : function(node, callback, scope){ + if(this.fireEvent("beforeload", this, node, callback) !== false){ + if(this.directFn){ + var args = this.getParams(node); + args.push(this.processDirectResponse.createDelegate(this, [{callback: callback, node: node, scope: scope}], true)); + this.directFn.apply(window, args); + }else{ + this.transId = Ext.Ajax.request({ + method:this.requestMethod, + url: this.dataUrl||this.url, + success: this.handleResponse, + failure: this.handleFailure, + scope: this, + argument: {callback: callback, node: node, scope: scope}, + params: this.getParams(node) + }); + } + }else{ + + + this.runCallback(callback, scope || node, []); + } + }, + + processDirectResponse: function(result, response, args){ + if(response.status){ + this.handleResponse({ + responseData: Ext.isArray(result) ? result : null, + responseText: result, + argument: args + }); + }else{ + this.handleFailure({ + argument: args + }); + } + }, + + + runCallback: function(cb, scope, args){ + if(Ext.isFunction(cb)){ + cb.apply(scope, args); + } + }, + + isLoading : function(){ + return !!this.transId; + }, + + abort : function(){ + if(this.isLoading()){ + Ext.Ajax.abort(this.transId); + } + }, + + + createNode : function(attr){ + + if(this.baseAttrs){ + Ext.applyIf(attr, this.baseAttrs); + } + if(this.applyLoader !== false && !attr.loader){ + attr.loader = this; + } + if(Ext.isString(attr.uiProvider)){ + attr.uiProvider = this.uiProviders[attr.uiProvider] || eval(attr.uiProvider); + } + if(attr.nodeType){ + return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr); + }else{ + return attr.leaf ? + new Ext.tree.TreeNode(attr) : + new Ext.tree.AsyncTreeNode(attr); + } + }, + + processResponse : function(response, node, callback, scope){ + var json = response.responseText; + try { + var o = response.responseData || Ext.decode(json); + node.beginUpdate(); + for(var i = 0, len = o.length; i < len; i++){ + var n = this.createNode(o[i]); + if(n){ + node.appendChild(n); + } + } + node.endUpdate(); + this.runCallback(callback, scope || node, [node]); + }catch(e){ + this.handleFailure(response); + } + }, + + handleResponse : function(response){ + this.transId = false; + var a = response.argument; + this.processResponse(response, a.node, a.callback, a.scope); + this.fireEvent("load", this, a.node, response); + }, + + handleFailure : function(response){ + this.transId = false; + var a = response.argument; + this.fireEvent("loadexception", this, a.node, response); + this.runCallback(a.callback, a.scope || a.node, [a.node]); + }, + + destroy : function(){ + this.abort(); + this.purgeListeners(); + } +}); +Ext.tree.TreeFilter = function(tree, config){ + this.tree = tree; + this.filtered = {}; + Ext.apply(this, config); +}; + +Ext.tree.TreeFilter.prototype = { + clearBlank:false, + reverse:false, + autoClear:false, + remove:false, + + + filter : function(value, attr, startNode){ + attr = attr || "text"; + var f; + if(typeof value == "string"){ + var vlen = value.length; + + if(vlen == 0 && this.clearBlank){ + this.clear(); + return; + } + value = value.toLowerCase(); + f = function(n){ + return n.attributes[attr].substr(0, vlen).toLowerCase() == value; + }; + }else if(value.exec){ + f = function(n){ + return value.test(n.attributes[attr]); + }; + }else{ + throw 'Illegal filter type, must be string or regex'; + } + this.filterBy(f, null, startNode); + }, + + + filterBy : function(fn, scope, startNode){ + startNode = startNode || this.tree.root; + if(this.autoClear){ + this.clear(); + } + var af = this.filtered, rv = this.reverse; + var f = function(n){ + if(n == startNode){ + return true; + } + if(af[n.id]){ + return false; + } + var m = fn.call(scope || n, n); + if(!m || rv){ + af[n.id] = n; + n.ui.hide(); + return false; + } + return true; + }; + startNode.cascade(f); + if(this.remove){ + for(var id in af){ + if(typeof id != "function"){ + var n = af[id]; + if(n && n.parentNode){ + n.parentNode.removeChild(n); + } + } + } + } + }, + + + clear : function(){ + var t = this.tree; + var af = this.filtered; + for(var id in af){ + if(typeof id != "function"){ + var n = af[id]; + if(n){ + n.ui.show(); + } + } + } + this.filtered = {}; + } +}; + +Ext.tree.TreeSorter = Ext.extend(Object, { + + constructor: function(tree, config){ + + + + + + + + Ext.apply(this, config); + tree.on({ + scope: this, + beforechildrenrendered: this.doSort, + append: this.updateSort, + insert: this.updateSort, + textchange: this.updateSortParent + }); + + var desc = this.dir && this.dir.toLowerCase() == 'desc', + prop = this.property || 'text', + sortType = this.sortType, + folderSort = this.folderSort, + caseSensitive = this.caseSensitive === true, + leafAttr = this.leafAttr || 'leaf'; + + if(Ext.isString(sortType)){ + sortType = Ext.data.SortTypes[sortType]; + } + this.sortFn = function(n1, n2){ + var attr1 = n1.attributes, + attr2 = n2.attributes; + + if(folderSort){ + if(attr1[leafAttr] && !attr2[leafAttr]){ + return 1; + } + if(!attr1[leafAttr] && attr2[leafAttr]){ + return -1; + } + } + var prop1 = attr1[prop], + prop2 = attr2[prop], + v1 = sortType ? sortType(prop1) : (caseSensitive ? prop1 : prop1.toUpperCase()), + v2 = sortType ? sortType(prop2) : (caseSensitive ? prop2 : prop2.toUpperCase()); + + if(v1 < v2){ + return desc ? 1 : -1; + }else if(v1 > v2){ + return desc ? -1 : 1; + } + return 0; + }; + }, + + doSort : function(node){ + node.sort(this.sortFn); + }, + + updateSort : function(tree, node){ + if(node.childrenRendered){ + this.doSort.defer(1, this, [node]); + } + }, + + updateSortParent : function(node){ + var p = node.parentNode; + if(p && p.childrenRendered){ + this.doSort.defer(1, this, [p]); + } + } +}); + +if(Ext.dd.DropZone){ + +Ext.tree.TreeDropZone = function(tree, config){ + + this.allowParentInsert = config.allowParentInsert || false; + + this.allowContainerDrop = config.allowContainerDrop || false; + + this.appendOnly = config.appendOnly || false; + + Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.getTreeEl(), config); + + this.tree = tree; + + this.dragOverData = {}; + + this.lastInsertClass = "x-tree-no-status"; +}; + +Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, { + + ddGroup : "TreeDD", + + + expandDelay : 1000, + + + expandNode : function(node){ + if(node.hasChildNodes() && !node.isExpanded()){ + node.expand(false, null, this.triggerCacheRefresh.createDelegate(this)); + } + }, + + + queueExpand : function(node){ + this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]); + }, + + + cancelExpand : function(){ + if(this.expandProcId){ + clearTimeout(this.expandProcId); + this.expandProcId = false; + } + }, + + + isValidDropPoint : function(n, pt, dd, e, data){ + if(!n || !data){ return false; } + var targetNode = n.node; + var dropNode = data.node; + + if(!(targetNode && targetNode.isTarget && pt)){ + return false; + } + if(pt == "append" && targetNode.allowChildren === false){ + return false; + } + if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){ + return false; + } + if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){ + return false; + } + + var overEvent = this.dragOverData; + overEvent.tree = this.tree; + overEvent.target = targetNode; + overEvent.data = data; + overEvent.point = pt; + overEvent.source = dd; + overEvent.rawEvent = e; + overEvent.dropNode = dropNode; + overEvent.cancel = false; + var result = this.tree.fireEvent("nodedragover", overEvent); + return overEvent.cancel === false && result !== false; + }, + + + getDropPoint : function(e, n, dd){ + var tn = n.node; + if(tn.isRoot){ + return tn.allowChildren !== false ? "append" : false; + } + var dragEl = n.ddel; + var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight; + var y = Ext.lib.Event.getPageY(e); + var noAppend = tn.allowChildren === false || tn.isLeaf(); + if(this.appendOnly || tn.parentNode.allowChildren === false){ + return noAppend ? false : "append"; + } + var noBelow = false; + if(!this.allowParentInsert){ + noBelow = tn.hasChildNodes() && tn.isExpanded(); + } + var q = (b - t) / (noAppend ? 2 : 3); + if(y >= t && y < (t + q)){ + return "above"; + }else if(!noBelow && (noAppend || y >= b-q && y <= b)){ + return "below"; + }else{ + return "append"; + } + }, + + + onNodeEnter : function(n, dd, e, data){ + this.cancelExpand(); + }, + + onContainerOver : function(dd, e, data) { + if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) { + return this.dropAllowed; + } + return this.dropNotAllowed; + }, + + + onNodeOver : function(n, dd, e, data){ + var pt = this.getDropPoint(e, n, dd); + var node = n.node; + + + if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){ + this.queueExpand(node); + }else if(pt != "append"){ + this.cancelExpand(); + } + + + var returnCls = this.dropNotAllowed; + if(this.isValidDropPoint(n, pt, dd, e, data)){ + if(pt){ + var el = n.ddel; + var cls; + if(pt == "above"){ + returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between"; + cls = "x-tree-drag-insert-above"; + }else if(pt == "below"){ + returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between"; + cls = "x-tree-drag-insert-below"; + }else{ + returnCls = "x-tree-drop-ok-append"; + cls = "x-tree-drag-append"; + } + if(this.lastInsertClass != cls){ + Ext.fly(el).replaceClass(this.lastInsertClass, cls); + this.lastInsertClass = cls; + } + } + } + return returnCls; + }, + + + onNodeOut : function(n, dd, e, data){ + this.cancelExpand(); + this.removeDropIndicators(n); + }, + + + onNodeDrop : function(n, dd, e, data){ + var point = this.getDropPoint(e, n, dd); + var targetNode = n.node; + targetNode.ui.startDrop(); + if(!this.isValidDropPoint(n, point, dd, e, data)){ + targetNode.ui.endDrop(); + return false; + } + + var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null); + return this.processDrop(targetNode, data, point, dd, e, dropNode); + }, + + onContainerDrop : function(dd, e, data){ + if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) { + var targetNode = this.tree.getRootNode(); + targetNode.ui.startDrop(); + var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, 'append', e) : null); + return this.processDrop(targetNode, data, 'append', dd, e, dropNode); + } + return false; + }, + + + processDrop: function(target, data, point, dd, e, dropNode){ + var dropEvent = { + tree : this.tree, + target: target, + data: data, + point: point, + source: dd, + rawEvent: e, + dropNode: dropNode, + cancel: !dropNode, + dropStatus: false + }; + var retval = this.tree.fireEvent("beforenodedrop", dropEvent); + if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){ + target.ui.endDrop(); + return dropEvent.dropStatus; + } + + target = dropEvent.target; + if(point == 'append' && !target.isExpanded()){ + target.expand(false, null, function(){ + this.completeDrop(dropEvent); + }.createDelegate(this)); + }else{ + this.completeDrop(dropEvent); + } + return true; + }, + + + completeDrop : function(de){ + var ns = de.dropNode, p = de.point, t = de.target; + if(!Ext.isArray(ns)){ + ns = [ns]; + } + var n; + for(var i = 0, len = ns.length; i < len; i++){ + n = ns[i]; + if(p == "above"){ + t.parentNode.insertBefore(n, t); + }else if(p == "below"){ + t.parentNode.insertBefore(n, t.nextSibling); + }else{ + t.appendChild(n); + } + } + n.ui.focus(); + if(Ext.enableFx && this.tree.hlDrop){ + n.ui.highlight(); + } + t.ui.endDrop(); + this.tree.fireEvent("nodedrop", de); + }, + + + afterNodeMoved : function(dd, data, e, targetNode, dropNode){ + if(Ext.enableFx && this.tree.hlDrop){ + dropNode.ui.focus(); + dropNode.ui.highlight(); + } + this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e); + }, + + + getTree : function(){ + return this.tree; + }, + + + removeDropIndicators : function(n){ + if(n && n.ddel){ + var el = n.ddel; + Ext.fly(el).removeClass([ + "x-tree-drag-insert-above", + "x-tree-drag-insert-below", + "x-tree-drag-append"]); + this.lastInsertClass = "_noclass"; + } + }, + + + beforeDragDrop : function(target, e, id){ + this.cancelExpand(); + return true; + }, + + + afterRepair : function(data){ + if(data && Ext.enableFx){ + data.node.ui.highlight(); + } + this.hideProxy(); + } +}); + +} +if(Ext.dd.DragZone){ +Ext.tree.TreeDragZone = function(tree, config){ + Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.innerCt, config); + + this.tree = tree; +}; + +Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, { + + ddGroup : "TreeDD", + + + onBeforeDrag : function(data, e){ + var n = data.node; + return n && n.draggable && !n.disabled; + }, + + + onInitDrag : function(e){ + var data = this.dragData; + this.tree.getSelectionModel().select(data.node); + this.tree.eventModel.disable(); + this.proxy.update(""); + data.node.ui.appendDDGhost(this.proxy.ghost.dom); + this.tree.fireEvent("startdrag", this.tree, data.node, e); + }, + + + getRepairXY : function(e, data){ + return data.node.ui.getDDRepairXY(); + }, + + + onEndDrag : function(data, e){ + this.tree.eventModel.enable.defer(100, this.tree.eventModel); + this.tree.fireEvent("enddrag", this.tree, data.node, e); + }, + + + onValidDrop : function(dd, e, id){ + this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e); + this.hideProxy(); + }, + + + beforeInvalidDrop : function(e, id){ + + var sm = this.tree.getSelectionModel(); + sm.clearSelections(); + sm.select(this.dragData.node); + }, + + + afterRepair : function(){ + if (Ext.enableFx && this.tree.hlDrop) { + Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); + } + this.dragging = false; + } +}); +} Ext.tree.TreeEditor = function(tree, fc, config){ fc = fc || {}; var field = fc.events ? fc : new Ext.form.TextField(fc); + Ext.tree.TreeEditor.superclass.constructor.call(this, field, config); this.tree = tree; @@ -24793,31 +37098,43 @@ Ext.tree.TreeEditor = function(tree, fc, config){ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, { alignment: "l-l", - autoSize: false, + + autoSize: false, hideEl : false, cls: "x-small-editor x-tree-editor", shim:false, - shadow:"frame", + + shadow:"frame", maxWidth: 250, editDelay : 350, initEditor : function(tree){ - tree.on('beforeclick', this.beforeNodeClick, this); - tree.on('dblclick', this.onNodeDblClick, this); - this.on('complete', this.updateNode, this); - this.on('beforestartedit', this.fitToTree, this); + tree.on({ + scope : this, + beforeclick: this.beforeNodeClick, + dblclick : this.onNodeDblClick + }); + + this.on({ + scope : this, + complete : this.updateNode, + beforestartedit: this.fitToTree, + specialkey : this.onSpecialKey + }); + this.on('startedit', this.bindScroll, this, {delay:10}); - this.on('specialkey', this.onSpecialKey, this); }, - fitToTree : function(ed, el){ + + fitToTree : function(ed, el){ var td = this.tree.getTreeEl().dom, nd = el.dom; - if(td.scrollLeft > nd.offsetLeft){ td.scrollLeft = nd.offsetLeft; + if(td.scrollLeft > nd.offsetLeft){ + td.scrollLeft = nd.offsetLeft; } var w = Math.min( this.maxWidth, @@ -24825,24 +37142,31 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, { this.setSize(w, ''); }, - triggerEdit : function(node, defer){ + + triggerEdit : function(node, defer){ this.completeEdit(); if(node.attributes.editable !== false){ - + this.editNode = node; if(this.tree.autoScroll){ - node.ui.getEl().scrollIntoView(this.tree.body); + Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body); } - this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, node.text]); + var value = node.text || ''; + if (!Ext.isGecko && Ext.isEmpty(node.text)){ + node.setText(' '); + } + this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]); return false; } }, - bindScroll : function(){ + + bindScroll : function(){ this.tree.getTreeEl().on('scroll', this.cancelEdit, this); }, - beforeNodeClick : function(node, e){ + + beforeNodeClick : function(node, e){ clearTimeout(this.autoEditTimer); if(this.tree.getSelectionModel().isSelected(node)){ e.stopEvent(); @@ -24854,19 +37178,22 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, { clearTimeout(this.autoEditTimer); }, - updateNode : function(ed, value){ + + updateNode : function(ed, value){ this.tree.getTreeEl().un('scroll', this.cancelEdit, this); this.editNode.setText(value); }, - onHide : function(){ + + onHide : function(){ Ext.tree.TreeEditor.superclass.onHide.call(this); if(this.editNode){ this.editNode.ui.focus.defer(50, this.editNode.ui); } }, - onSpecialKey : function(field, e){ + + onSpecialKey : function(field, e){ var k = e.getKey(); if(k == e.ESC){ e.stopEvent(); @@ -24875,163 +37202,1657 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, { e.stopEvent(); this.completeEdit(); } + }, + + onDestroy : function(){ + clearTimeout(this.autoEditTimer); + Ext.tree.TreeEditor.superclass.onDestroy.call(this); + var tree = this.tree; + tree.un('beforeclick', this.beforeNodeClick, this); + tree.un('dblclick', this.onNodeDblClick, this); } }); -Ext.menu.Menu = function(config){ - if(Ext.isArray(config)){ - config = {items:config}; - } - Ext.apply(this, config); - this.id = this.id || Ext.id(); - this.addEvents( - - 'beforeshow', - - 'beforehide', - - 'show', - - 'hide', - - 'click', - - 'mouseover', - - 'mouseout', - - 'itemclick' - ); - Ext.menu.MenuMgr.register(this); - Ext.menu.Menu.superclass.constructor.call(this); - var mis = this.items; +var swfobject = function() { + var UNDEF = "undefined", + OBJECT = "object", + SHOCKWAVE_FLASH = "Shockwave Flash", + SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", + FLASH_MIME_TYPE = "application/x-shockwave-flash", + EXPRESS_INSTALL_ID = "SWFObjectExprInst", + ON_READY_STATE_CHANGE = "onreadystatechange", + + win = window, + doc = document, + nav = navigator, + + plugin = false, + domLoadFnArr = [main], + regObjArr = [], + objIdArr = [], + listenersArr = [], + storedAltContent, + storedAltContentId, + storedCallbackFn, + storedCallbackObj, + isDomLoaded = false, + isExpressInstallActive = false, + dynamicStylesheet, + dynamicStylesheetMedia, + autoHideShow = true, + + + ua = function() { + var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, + u = nav.userAgent.toLowerCase(), + p = nav.platform.toLowerCase(), + windows = p ? (/win/).test(p) : /win/.test(u), + mac = p ? (/mac/).test(p) : /mac/.test(u), + webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, + ie = !+"\v1", + playerVersion = [0,0,0], + d = null; + if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { + d = nav.plugins[SHOCKWAVE_FLASH].description; + if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { + plugin = true; + ie = false; + d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); + playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); + playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); + playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; + } + } + else if (typeof win.ActiveXObject != UNDEF) { + try { + var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); + if (a) { + d = a.GetVariable("$version"); + if (d) { + ie = true; + d = d.split(" ")[1].split(","); + playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + } + catch(e) {} + } + return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; + }(), + + + onDomLoad = function() { + if (!ua.w3) { return; } + if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { + callDomLoadFunctions(); + } + if (!isDomLoaded) { + if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); + } + if (ua.ie && ua.win) { + doc.attachEvent(ON_READY_STATE_CHANGE, function() { + if (doc.readyState == "complete") { + doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee); + callDomLoadFunctions(); + } + }); + if (win == top) { + (function(){ + if (isDomLoaded) { return; } + try { + doc.documentElement.doScroll("left"); + } + catch(e) { + setTimeout(arguments.callee, 0); + return; + } + callDomLoadFunctions(); + })(); + } + } + if (ua.wk) { + (function(){ + if (isDomLoaded) { return; } + if (!(/loaded|complete/).test(doc.readyState)) { + setTimeout(arguments.callee, 0); + return; + } + callDomLoadFunctions(); + })(); + } + addLoadEvent(callDomLoadFunctions); + } + }(); + + function callDomLoadFunctions() { + if (isDomLoaded) { return; } + try { + var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span")); + t.parentNode.removeChild(t); + } + catch (e) { return; } + isDomLoaded = true; + var dl = domLoadFnArr.length; + for (var i = 0; i < dl; i++) { + domLoadFnArr[i](); + } + } + + function addDomLoadEvent(fn) { + if (isDomLoaded) { + fn(); + } + else { + domLoadFnArr[domLoadFnArr.length] = fn; + } + } + + + function addLoadEvent(fn) { + if (typeof win.addEventListener != UNDEF) { + win.addEventListener("load", fn, false); + } + else if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("load", fn, false); + } + else if (typeof win.attachEvent != UNDEF) { + addListener(win, "onload", fn); + } + else if (typeof win.onload == "function") { + var fnOld = win.onload; + win.onload = function() { + fnOld(); + fn(); + }; + } + else { + win.onload = fn; + } + } + + + function main() { + if (plugin) { + testPlayerVersion(); + } + else { + matchVersions(); + } + } + + + function testPlayerVersion() { + var b = doc.getElementsByTagName("body")[0]; + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + var t = b.appendChild(o); + if (t) { + var counter = 0; + (function(){ + if (typeof t.GetVariable != UNDEF) { + var d = t.GetVariable("$version"); + if (d) { + d = d.split(" ")[1].split(","); + ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + else if (counter < 10) { + counter++; + setTimeout(arguments.callee, 10); + return; + } + b.removeChild(o); + t = null; + matchVersions(); + })(); + } + else { + matchVersions(); + } + } + + + function matchVersions() { + var rl = regObjArr.length; + if (rl > 0) { + for (var i = 0; i < rl; i++) { + var id = regObjArr[i].id; + var cb = regObjArr[i].callbackFn; + var cbObj = {success:false, id:id}; + if (ua.pv[0] > 0) { + var obj = getElementById(id); + if (obj) { + if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { + setVisibility(id, true); + if (cb) { + cbObj.success = true; + cbObj.ref = getObjectById(id); + cb(cbObj); + } + } + else if (regObjArr[i].expressInstall && canExpressInstall()) { + var att = {}; + att.data = regObjArr[i].expressInstall; + att.width = obj.getAttribute("width") || "0"; + att.height = obj.getAttribute("height") || "0"; + if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); } + if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); } + + var par = {}; + var p = obj.getElementsByTagName("param"); + var pl = p.length; + for (var j = 0; j < pl; j++) { + if (p[j].getAttribute("name").toLowerCase() != "movie") { + par[p[j].getAttribute("name")] = p[j].getAttribute("value"); + } + } + showExpressInstall(att, par, id, cb); + } + else { + displayAltContent(obj); + if (cb) { cb(cbObj); } + } + } + } + else { + setVisibility(id, true); + if (cb) { + var o = getObjectById(id); + if (o && typeof o.SetVariable != UNDEF) { + cbObj.success = true; + cbObj.ref = o; + } + cb(cbObj); + } + } + } + } + } + + function getObjectById(objectIdStr) { + var r = null; + var o = getElementById(objectIdStr); + if (o && o.nodeName == "OBJECT") { + if (typeof o.SetVariable != UNDEF) { + r = o; + } + else { + var n = o.getElementsByTagName(OBJECT)[0]; + if (n) { + r = n; + } + } + } + return r; + } + + + function canExpressInstall() { + return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); + } + + + function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { + isExpressInstallActive = true; + storedCallbackFn = callbackFn || null; + storedCallbackObj = {success:false, id:replaceElemIdStr}; + var obj = getElementById(replaceElemIdStr); + if (obj) { + if (obj.nodeName == "OBJECT") { + storedAltContent = abstractAltContent(obj); + storedAltContentId = null; + } + else { + storedAltContent = obj; + storedAltContentId = replaceElemIdStr; + } + att.id = EXPRESS_INSTALL_ID; + if (typeof att.width == UNDEF || (!(/%$/).test(att.width) && parseInt(att.width, 10) < 310)) { + att.width = "310"; + } + + if (typeof att.height == UNDEF || (!(/%$/).test(att.height) && parseInt(att.height, 10) < 137)) { + att.height = "137"; + } + doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; + var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", + fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + fv; + } + else { + par.flashvars = fv; + } + + + if (ua.ie && ua.win && obj.readyState != 4) { + var newObj = createElement("div"); + replaceElemIdStr += "SWFObjectNew"; + newObj.setAttribute("id", replaceElemIdStr); + obj.parentNode.insertBefore(newObj, obj); + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + obj.parentNode.removeChild(obj); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + createSWF(att, par, replaceElemIdStr); + } + } + + + function displayAltContent(obj) { + if (ua.ie && ua.win && obj.readyState != 4) { + + + var el = createElement("div"); + obj.parentNode.insertBefore(el, obj); + el.parentNode.replaceChild(abstractAltContent(obj), el); + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + obj.parentNode.removeChild(obj); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + else { + obj.parentNode.replaceChild(abstractAltContent(obj), obj); + } + } - this.items = new Ext.util.MixedCollection(); - if(mis){ - this.add.apply(this, mis); + function abstractAltContent(obj) { + var ac = createElement("div"); + if (ua.win && ua.ie) { + ac.innerHTML = obj.innerHTML; + } + else { + var nestedObj = obj.getElementsByTagName(OBJECT)[0]; + if (nestedObj) { + var c = nestedObj.childNodes; + if (c) { + var cl = c.length; + for (var i = 0; i < cl; i++) { + if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { + ac.appendChild(c[i].cloneNode(true)); + } + } + } + } + } + return ac; + } + + + function createSWF(attObj, parObj, id) { + var r, el = getElementById(id); + if (ua.wk && ua.wk < 312) { return r; } + if (el) { + if (typeof attObj.id == UNDEF) { + attObj.id = id; + } + if (ua.ie && ua.win) { + var att = ""; + for (var i in attObj) { + if (attObj[i] != Object.prototype[i]) { + if (i.toLowerCase() == "data") { + parObj.movie = attObj[i]; + } + else if (i.toLowerCase() == "styleclass") { + att += ' class="' + attObj[i] + '"'; + } + else if (i.toLowerCase() != "classid") { + att += ' ' + i + '="' + attObj[i] + '"'; + } + } + } + var par = ""; + for (var j in parObj) { + if (parObj[j] != Object.prototype[j]) { + par += ''; + } + } + el.outerHTML = '' + par + ''; + objIdArr[objIdArr.length] = attObj.id; + r = getElementById(attObj.id); + } + else { + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + for (var m in attObj) { + if (attObj[m] != Object.prototype[m]) { + if (m.toLowerCase() == "styleclass") { + o.setAttribute("class", attObj[m]); + } + else if (m.toLowerCase() != "classid") { + o.setAttribute(m, attObj[m]); + } + } + } + for (var n in parObj) { + if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { + createObjParam(o, n, parObj[n]); + } + } + el.parentNode.replaceChild(o, el); + r = o; + } + } + return r; + } + + function createObjParam(el, pName, pValue) { + var p = createElement("param"); + p.setAttribute("name", pName); + p.setAttribute("value", pValue); + el.appendChild(p); + } + + + function removeSWF(id) { + var obj = getElementById(id); + if (obj && obj.nodeName == "OBJECT") { + if (ua.ie && ua.win) { + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + removeObjectInIE(id); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + else { + obj.parentNode.removeChild(obj); + } + } + } + + function removeObjectInIE(id) { + var obj = getElementById(id); + if (obj) { + for (var i in obj) { + if (typeof obj[i] == "function") { + obj[i] = null; + } + } + obj.parentNode.removeChild(obj); + } + } + + + function getElementById(id) { + var el = null; + try { + el = doc.getElementById(id); + } + catch (e) {} + return el; + } + + function createElement(el) { + return doc.createElement(el); + } + + + function addListener(target, eventType, fn) { + target.attachEvent(eventType, fn); + listenersArr[listenersArr.length] = [target, eventType, fn]; + } + + + function hasPlayerVersion(rv) { + var pv = ua.pv, v = rv.split("."); + v[0] = parseInt(v[0], 10); + v[1] = parseInt(v[1], 10) || 0; + v[2] = parseInt(v[2], 10) || 0; + return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; + } + + + function createCSS(sel, decl, media, newStyle) { + if (ua.ie && ua.mac) { return; } + var h = doc.getElementsByTagName("head")[0]; + if (!h) { return; } + var m = (media && typeof media == "string") ? media : "screen"; + if (newStyle) { + dynamicStylesheet = null; + dynamicStylesheetMedia = null; + } + if (!dynamicStylesheet || dynamicStylesheetMedia != m) { + + var s = createElement("style"); + s.setAttribute("type", "text/css"); + s.setAttribute("media", m); + dynamicStylesheet = h.appendChild(s); + if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { + dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1]; + } + dynamicStylesheetMedia = m; + } + + if (ua.ie && ua.win) { + if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) { + dynamicStylesheet.addRule(sel, decl); + } + } + else { + if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) { + dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}")); + } + } + } + + function setVisibility(id, isVisible) { + if (!autoHideShow) { return; } + var v = isVisible ? "visible" : "hidden"; + if (isDomLoaded && getElementById(id)) { + getElementById(id).style.visibility = v; + } + else { + createCSS("#" + id, "visibility:" + v); + } + } + + + function urlEncodeIfNecessary(s) { + var regex = /[\\\"<>\.;]/; + var hasBadChars = regex.exec(s) != null; + return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; + } + + + var cleanup = function() { + if (ua.ie && ua.win) { + window.attachEvent("onunload", function() { + + var ll = listenersArr.length; + for (var i = 0; i < ll; i++) { + listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); + } + + var il = objIdArr.length; + for (var j = 0; j < il; j++) { + removeSWF(objIdArr[j]); + } + + for (var k in ua) { + ua[k] = null; + } + ua = null; + for (var l in swfobject) { + swfobject[l] = null; + } + swfobject = null; + window.detachEvent('onunload', arguments.callee); + }); + } + }(); + + return { + + registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { + if (ua.w3 && objectIdStr && swfVersionStr) { + var regObj = {}; + regObj.id = objectIdStr; + regObj.swfVersion = swfVersionStr; + regObj.expressInstall = xiSwfUrlStr; + regObj.callbackFn = callbackFn; + regObjArr[regObjArr.length] = regObj; + setVisibility(objectIdStr, false); + } + else if (callbackFn) { + callbackFn({success:false, id:objectIdStr}); + } + }, + + getObjectById: function(objectIdStr) { + if (ua.w3) { + return getObjectById(objectIdStr); + } + }, + + embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { + var callbackObj = {success:false, id:replaceElemIdStr}; + if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { + setVisibility(replaceElemIdStr, false); + addDomLoadEvent(function() { + widthStr += ""; + heightStr += ""; + var att = {}; + if (attObj && typeof attObj === OBJECT) { + for (var i in attObj) { + att[i] = attObj[i]; + } + } + att.data = swfUrlStr; + att.width = widthStr; + att.height = heightStr; + var par = {}; + if (parObj && typeof parObj === OBJECT) { + for (var j in parObj) { + par[j] = parObj[j]; + } + } + if (flashvarsObj && typeof flashvarsObj === OBJECT) { + for (var k in flashvarsObj) { + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + k + "=" + flashvarsObj[k]; + } + else { + par.flashvars = k + "=" + flashvarsObj[k]; + } + } + } + if (hasPlayerVersion(swfVersionStr)) { + var obj = createSWF(att, par, replaceElemIdStr); + if (att.id == replaceElemIdStr) { + setVisibility(replaceElemIdStr, true); + } + callbackObj.success = true; + callbackObj.ref = obj; + } + else if (xiSwfUrlStr && canExpressInstall()) { + att.data = xiSwfUrlStr; + showExpressInstall(att, par, replaceElemIdStr, callbackFn); + return; + } + else { + setVisibility(replaceElemIdStr, true); + } + if (callbackFn) { callbackFn(callbackObj); } + }); + } + else if (callbackFn) { callbackFn(callbackObj); } + }, + + switchOffAutoHideShow: function() { + autoHideShow = false; + }, + + ua: ua, + + getFlashPlayerVersion: function() { + return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; + }, + + hasFlashPlayerVersion: hasPlayerVersion, + + createSWF: function(attObj, parObj, replaceElemIdStr) { + if (ua.w3) { + return createSWF(attObj, parObj, replaceElemIdStr); + } + else { + return undefined; + } + }, + + showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { + if (ua.w3 && canExpressInstall()) { + showExpressInstall(att, par, replaceElemIdStr, callbackFn); + } + }, + + removeSWF: function(objElemIdStr) { + if (ua.w3) { + removeSWF(objElemIdStr); + } + }, + + createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { + if (ua.w3) { + createCSS(selStr, declStr, mediaStr, newStyleBoolean); + } + }, + + addDomLoadEvent: addDomLoadEvent, + + addLoadEvent: addLoadEvent, + + getQueryParamValue: function(param) { + var q = doc.location.search || doc.location.hash; + if (q) { + if (/\?/.test(q)) { q = q.split("?")[1]; } + if (param == null) { + return urlEncodeIfNecessary(q); + } + var pairs = q.split("&"); + for (var i = 0; i < pairs.length; i++) { + if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { + return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); + } + } + } + return ""; + }, + + + expressInstallCallback: function() { + if (isExpressInstallActive) { + var obj = getElementById(EXPRESS_INSTALL_ID); + if (obj && storedAltContent) { + obj.parentNode.replaceChild(storedAltContent, obj); + if (storedAltContentId) { + setVisibility(storedAltContentId, true); + if (ua.ie && ua.win) { storedAltContent.style.display = "block"; } + } + if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } + } + isExpressInstallActive = false; + } + } + }; +}(); + +Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { + + flashVersion : '9.0.115', + + + backgroundColor: '#ffffff', + + + wmode: 'opaque', + + + flashVars: undefined, + + + flashParams: undefined, + + + url: undefined, + swfId : undefined, + swfWidth: '100%', + swfHeight: '100%', + + + expressInstall: false, + + initComponent : function(){ + Ext.FlashComponent.superclass.initComponent.call(this); + + this.addEvents( + + 'initialize' + ); + }, + + onRender : function(){ + Ext.FlashComponent.superclass.onRender.apply(this, arguments); + + var params = Ext.apply({ + allowScriptAccess: 'always', + bgcolor: this.backgroundColor, + wmode: this.wmode + }, this.flashParams), vars = Ext.apply({ + allowedDomain: document.location.hostname, + YUISwfId: this.getId(), + YUIBridgeCallback: 'Ext.FlashEventProxy.onEvent' + }, this.flashVars); + + new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion, + this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params); + + this.swf = Ext.getDom(this.id); + this.el = Ext.get(this.swf); + }, + + getSwfId : function(){ + return this.swfId || (this.swfId = "extswf" + (++Ext.Component.AUTO_ID)); + }, + + getId : function(){ + return this.id || (this.id = "extflashcmp" + (++Ext.Component.AUTO_ID)); + }, + + onFlashEvent : function(e){ + switch(e.type){ + case "swfReady": + this.initSwf(); + return; + case "log": + return; + } + e.component = this; + this.fireEvent(e.type.toLowerCase().replace(/event$/, ''), e); + }, + + initSwf : function(){ + this.onSwfReady(!!this.isInitialized); + this.isInitialized = true; + this.fireEvent('initialize', this); + }, + + beforeDestroy: function(){ + if(this.rendered){ + swfobject.removeSWF(this.swf.id); + } + Ext.FlashComponent.superclass.beforeDestroy.call(this); + }, + + onSwfReady : Ext.emptyFn +}); + + +Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf'; + +Ext.reg('flash', Ext.FlashComponent); +Ext.FlashEventProxy = { + onEvent : function(id, e){ + var fp = Ext.getCmp(id); + if(fp){ + fp.onFlashEvent(e); + }else{ + arguments.callee.defer(10, this, [id, e]); + } } }; -Ext.extend(Ext.menu.Menu, Ext.util.Observable, { + Ext.chart.Chart = Ext.extend(Ext.FlashComponent, { + refreshBuffer: 100, + + + + + chartStyle: { + padding: 10, + animationEnabled: true, + font: { + name: 'Tahoma', + color: 0x444444, + size: 11 + }, + dataTip: { + padding: 5, + border: { + color: 0x99bbe8, + size:1 + }, + background: { + color: 0xDAE7F6, + alpha: .9 + }, + font: { + name: 'Tahoma', + color: 0x15428B, + size: 10, + bold: true + } + } + }, + + + + + extraStyle: null, + + + seriesStyles: null, + + + disableCaching: Ext.isIE || Ext.isOpera, + disableCacheParam: '_dc', + + initComponent : function(){ + Ext.chart.Chart.superclass.initComponent.call(this); + if(!this.url){ + this.url = Ext.chart.Chart.CHART_URL; + } + if(this.disableCaching){ + this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime())); + } + this.addEvents( + 'itemmouseover', + 'itemmouseout', + 'itemclick', + 'itemdoubleclick', + 'itemdragstart', + 'itemdrag', + 'itemdragend', + + 'beforerefresh', + + 'refresh' + ); + this.store = Ext.StoreMgr.lookup(this.store); + }, + + + setStyle: function(name, value){ + this.swf.setStyle(name, Ext.encode(value)); + }, + + + setStyles: function(styles){ + this.swf.setStyles(Ext.encode(styles)); + }, + + + setSeriesStyles: function(styles){ + this.seriesStyles = styles; + var s = []; + Ext.each(styles, function(style){ + s.push(Ext.encode(style)); + }); + this.swf.setSeriesStyles(s); + }, + + setCategoryNames : function(names){ + this.swf.setCategoryNames(names); + }, + + setLegendRenderer : function(fn, scope){ + var chart = this; + scope = scope || chart; + chart.removeFnProxy(chart.legendFnName); + chart.legendFnName = chart.createFnProxy(function(name){ + return fn.call(scope, name); + }); + chart.swf.setLegendLabelFunction(chart.legendFnName); + }, + + setTipRenderer : function(fn, scope){ + var chart = this; + scope = scope || chart; + chart.removeFnProxy(chart.tipFnName); + chart.tipFnName = chart.createFnProxy(function(item, index, series){ + var record = chart.store.getAt(index); + return fn.call(scope, chart, record, index, series); + }); + chart.swf.setDataTipFunction(chart.tipFnName); + }, + + setSeries : function(series){ + this.series = series; + this.refresh(); + }, + + + bindStore : function(store, initial){ + if(!initial && this.store){ + if(store !== this.store && this.store.autoDestroy){ + this.store.destroy(); + }else{ + this.store.un("datachanged", this.refresh, this); + this.store.un("add", this.delayRefresh, this); + this.store.un("remove", this.delayRefresh, this); + this.store.un("update", this.delayRefresh, this); + this.store.un("clear", this.refresh, this); + } + } + if(store){ + store = Ext.StoreMgr.lookup(store); + store.on({ + scope: this, + datachanged: this.refresh, + add: this.delayRefresh, + remove: this.delayRefresh, + update: this.delayRefresh, + clear: this.refresh + }); + } + this.store = store; + if(store && !initial){ + this.refresh(); + } + }, + + onSwfReady : function(isReset){ + Ext.chart.Chart.superclass.onSwfReady.call(this, isReset); + var ref; + this.swf.setType(this.type); + + if(this.chartStyle){ + this.setStyles(Ext.apply({}, this.extraStyle, this.chartStyle)); + } + + if(this.categoryNames){ + this.setCategoryNames(this.categoryNames); + } + + if(this.tipRenderer){ + ref = this.getFunctionRef(this.tipRenderer); + this.setTipRenderer(ref.fn, ref.scope); + } + if(this.legendRenderer){ + ref = this.getFunctionRef(this.legendRenderer); + this.setLegendRenderer(ref.fn, ref.scope); + } + if(!isReset){ + this.bindStore(this.store, true); + } + this.refresh.defer(10, this); + }, + + delayRefresh : function(){ + if(!this.refreshTask){ + this.refreshTask = new Ext.util.DelayedTask(this.refresh, this); + } + this.refreshTask.delay(this.refreshBuffer); + }, + + refresh : function(){ + if(this.fireEvent('beforerefresh', this) !== false){ + var styleChanged = false; + + var data = [], rs = this.store.data.items; + for(var j = 0, len = rs.length; j < len; j++){ + data[j] = rs[j].data; + } + + + var dataProvider = []; + var seriesCount = 0; + var currentSeries = null; + var i = 0; + if(this.series){ + seriesCount = this.series.length; + for(i = 0; i < seriesCount; i++){ + currentSeries = this.series[i]; + var clonedSeries = {}; + for(var prop in currentSeries){ + if(prop == "style" && currentSeries.style !== null){ + clonedSeries.style = Ext.encode(currentSeries.style); + styleChanged = true; + + + + + } else{ + clonedSeries[prop] = currentSeries[prop]; + } + } + dataProvider.push(clonedSeries); + } + } + + if(seriesCount > 0){ + for(i = 0; i < seriesCount; i++){ + currentSeries = dataProvider[i]; + if(!currentSeries.type){ + currentSeries.type = this.type; + } + currentSeries.dataProvider = data; + } + } else{ + dataProvider.push({type: this.type, dataProvider: data}); + } + this.swf.setDataProvider(dataProvider); + if(this.seriesStyles){ + this.setSeriesStyles(this.seriesStyles); + } + this.fireEvent('refresh', this); + } + }, + + + createFnProxy : function(fn){ + var fnName = 'extFnProxy' + (++Ext.chart.Chart.PROXY_FN_ID); + Ext.chart.Chart.proxyFunction[fnName] = fn; + return 'Ext.chart.Chart.proxyFunction.' + fnName; + }, + + + removeFnProxy : function(fn){ + if(!Ext.isEmpty(fn)){ + fn = fn.replace('Ext.chart.Chart.proxyFunction.', ''); + delete Ext.chart.Chart.proxyFunction[fn]; + } + }, + + + getFunctionRef : function(val){ + if(Ext.isFunction(val)){ + return { + fn: val, + scope: this + }; + }else{ + return { + fn: val.fn, + scope: val.scope || this + }; + } + }, + + + onDestroy: function(){ + if (this.refreshTask && this.refreshTask.cancel){ + this.refreshTask.cancel(); + } + Ext.chart.Chart.superclass.onDestroy.call(this); + this.bindStore(null); + this.removeFnProxy(this.tipFnName); + this.removeFnProxy(this.legendFnName); + } +}); +Ext.reg('chart', Ext.chart.Chart); +Ext.chart.Chart.PROXY_FN_ID = 0; +Ext.chart.Chart.proxyFunction = {}; + + +Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.8.2/build/charts/assets/charts.swf'; + + +Ext.chart.PieChart = Ext.extend(Ext.chart.Chart, { + type: 'pie', + + onSwfReady : function(isReset){ + Ext.chart.PieChart.superclass.onSwfReady.call(this, isReset); + + this.setDataField(this.dataField); + this.setCategoryField(this.categoryField); + }, + + setDataField : function(field){ + this.dataField = field; + this.swf.setDataField(field); + }, + + setCategoryField : function(field){ + this.categoryField = field; + this.swf.setCategoryField(field); + } +}); +Ext.reg('piechart', Ext.chart.PieChart); + + +Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, { + onSwfReady : function(isReset){ + Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset); + this.labelFn = []; + if(this.xField){ + this.setXField(this.xField); + } + if(this.yField){ + this.setYField(this.yField); + } + if(this.xAxis){ + this.setXAxis(this.xAxis); + } + if(this.xAxes){ + this.setXAxes(this.xAxes); + } + if(this.yAxis){ + this.setYAxis(this.yAxis); + } + if(this.yAxes){ + this.setYAxes(this.yAxes); + } + if(Ext.isDefined(this.constrainViewport)){ + this.swf.setConstrainViewport(this.constrainViewport); + } + }, + + setXField : function(value){ + this.xField = value; + this.swf.setHorizontalField(value); + }, + + setYField : function(value){ + this.yField = value; + this.swf.setVerticalField(value); + }, + + setXAxis : function(value){ + this.xAxis = this.createAxis('xAxis', value); + this.swf.setHorizontalAxis(this.xAxis); + }, + + setXAxes : function(value){ + var axis; + for(var i = 0; i < value.length; i++) { + axis = this.createAxis('xAxis' + i, value[i]); + this.swf.setHorizontalAxis(axis); + } + }, + + setYAxis : function(value){ + this.yAxis = this.createAxis('yAxis', value); + this.swf.setVerticalAxis(this.yAxis); + }, + + setYAxes : function(value){ + var axis; + for(var i = 0; i < value.length; i++) { + axis = this.createAxis('yAxis' + i, value[i]); + this.swf.setVerticalAxis(axis); + } + }, + + createAxis : function(axis, value){ + var o = Ext.apply({}, value), + ref, + old; + + if(this[axis]){ + old = this[axis].labelFunction; + this.removeFnProxy(old); + this.labelFn.remove(old); + } + if(o.labelRenderer){ + ref = this.getFunctionRef(o.labelRenderer); + o.labelFunction = this.createFnProxy(function(v){ + return ref.fn.call(ref.scope, v); + }); + delete o.labelRenderer; + this.labelFn.push(o.labelFunction); + } + if(axis.indexOf('xAxis') > -1 && o.position == 'left'){ + o.position = 'bottom'; + } + return o; + }, + + onDestroy : function(){ + Ext.chart.CartesianChart.superclass.onDestroy.call(this); + Ext.each(this.labelFn, function(fn){ + this.removeFnProxy(fn); + }, this); + } +}); +Ext.reg('cartesianchart', Ext.chart.CartesianChart); + + +Ext.chart.LineChart = Ext.extend(Ext.chart.CartesianChart, { + type: 'line' +}); +Ext.reg('linechart', Ext.chart.LineChart); + + +Ext.chart.ColumnChart = Ext.extend(Ext.chart.CartesianChart, { + type: 'column' +}); +Ext.reg('columnchart', Ext.chart.ColumnChart); + + +Ext.chart.StackedColumnChart = Ext.extend(Ext.chart.CartesianChart, { + type: 'stackcolumn' +}); +Ext.reg('stackedcolumnchart', Ext.chart.StackedColumnChart); + + +Ext.chart.BarChart = Ext.extend(Ext.chart.CartesianChart, { + type: 'bar' +}); +Ext.reg('barchart', Ext.chart.BarChart); + + +Ext.chart.StackedBarChart = Ext.extend(Ext.chart.CartesianChart, { + type: 'stackbar' +}); +Ext.reg('stackedbarchart', Ext.chart.StackedBarChart); + + + + +Ext.chart.Axis = function(config){ + Ext.apply(this, config); +}; + +Ext.chart.Axis.prototype = +{ + + type: null, + + + orientation: "horizontal", + + + reverse: false, + + + labelFunction: null, + + + hideOverlappingLabels: true, + + + labelSpacing: 2 +}; + + +Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { + type: "numeric", + + + minimum: NaN, + + + maximum: NaN, + + + majorUnit: NaN, + + + minorUnit: NaN, + + + snapToUnits: true, + + + alwaysShowZero: true, + + + scale: "linear", + + + roundMajorUnit: true, + + + calculateByLabelSize: true, + + + position: 'left', + + + adjustMaximumByMajorUnit: true, + + + adjustMinimumByMajorUnit: true + +}); + + +Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, { + type: "time", + + + minimum: null, + + + maximum: null, + + + majorUnit: NaN, + + + majorTimeUnit: null, + + + minorUnit: NaN, + + + minorTimeUnit: null, + + + snapToUnits: true, + + + stackingEnabled: false, + + + calculateByLabelSize: true + +}); + + +Ext.chart.CategoryAxis = Ext.extend(Ext.chart.Axis, { + type: "category", + + + categoryNames: null, + + + calculateCategoryCount: false + +}); + + +Ext.chart.Series = function(config) { Ext.apply(this, config); }; + +Ext.chart.Series.prototype = +{ + + type: null, + + + displayName: null +}; + + +Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, { + + xField: null, + + + yField: null, + + + showInLegend: true, + + + axis: 'primary' +}); + + +Ext.chart.ColumnSeries = Ext.extend(Ext.chart.CartesianSeries, { + type: "column" +}); + + +Ext.chart.LineSeries = Ext.extend(Ext.chart.CartesianSeries, { + type: "line" +}); + + +Ext.chart.BarSeries = Ext.extend(Ext.chart.CartesianSeries, { + type: "bar" +}); + + + +Ext.chart.PieSeries = Ext.extend(Ext.chart.Series, { + type: "pie", + dataField: null, + categoryField: null +}); +Ext.menu.Menu = Ext.extend(Ext.Container, { minWidth : 120, - shadow : "sides", + shadow : 'sides', - subMenuAlign : "tl-tr?", + subMenuAlign : 'tl-tr?', - defaultAlign : "tl-bl?", + defaultAlign : 'tl-bl?', allowOtherMenus : false, ignoreParentClicks : false, + + enableScrolling : true, + + maxHeight : null, + + scrollIncrement : 24, + + showSeparator : true, + + defaultOffsets : [0, 0], - hidden:true, + + plain : false, - createEl : function(){ - return new Ext.Layer({ - cls: "x-menu", - shadow:this.shadow, - constrain: false, - parentEl: this.parentEl || document.body, - zindex:15000 - }); + + floating : true, + + + + zIndex: 15000, + + + hidden : true, + + + layout : 'menu', + hideMode : 'offsets', + scrollerHeight : 8, + autoLayout : true, + defaultType : 'menuitem', + bufferResize : false, + + initComponent : function(){ + if(Ext.isArray(this.initialConfig)){ + Ext.apply(this, {items:this.initialConfig}); + } + this.addEvents( + + 'click', + + 'mouseover', + + 'mouseout', + + 'itemclick' + ); + Ext.menu.MenuMgr.register(this); + if(this.floating){ + Ext.EventManager.onWindowResize(this.hide, this); + }else{ + if(this.initialConfig.hidden !== false){ + this.hidden = false; + } + this.internalDefaults = {hideOnClick: false}; + } + Ext.menu.Menu.superclass.initComponent.call(this); + if(this.autoLayout){ + var fn = this.doLayout.createDelegate(this, []); + this.on({ + add: fn, + remove: fn + }); + } }, - render : function(){ - if(this.el){ - return; + + getLayoutTarget : function() { + return this.ul; + }, + + + onRender : function(ct, position){ + if(!ct){ + ct = Ext.getBody(); } - var el = this.el = this.createEl(); + + var dh = { + id: this.getId(), + cls: 'x-menu ' + ((this.floating) ? 'x-menu-floating x-layer ' : '') + (this.cls || '') + (this.plain ? ' x-menu-plain' : '') + (this.showSeparator ? '' : ' x-menu-nosep'), + style: this.style, + cn: [ + {tag: 'a', cls: 'x-menu-focus', href: '#', onclick: 'return false;', tabIndex: '-1'}, + {tag: 'ul', cls: 'x-menu-list'} + ] + }; + if(this.floating){ + this.el = new Ext.Layer({ + shadow: this.shadow, + dh: dh, + constrain: false, + parentEl: ct, + zindex: this.zIndex + }); + }else{ + this.el = ct.createChild(dh); + } + Ext.menu.Menu.superclass.onRender.call(this, ct, position); if(!this.keyNav){ this.keyNav = new Ext.menu.MenuNav(this); } - if(this.plain){ - el.addClass("x-menu-plain"); - } - if(this.cls){ - el.addClass(this.cls); - } - this.focusEl = el.createChild({ - tag: "a", cls: "x-menu-focus", href: "#", onclick: "return false;", tabIndex:"-1" + + this.focusEl = this.el.child('a.x-menu-focus'); + this.ul = this.el.child('ul.x-menu-list'); + this.mon(this.ul, { + scope: this, + click: this.onClick, + mouseover: this.onMouseOver, + mouseout: this.onMouseOut }); - var ul = el.createChild({tag: "ul", cls: "x-menu-list"}); - ul.on("click", this.onClick, this); - ul.on("mouseover", this.onMouseOver, this); - ul.on("mouseout", this.onMouseOut, this); - this.items.each(function(item){ - var li = document.createElement("li"); - li.className = "x-menu-list-item"; - ul.dom.appendChild(li); - item.render(li, this); - }, this); - this.ul = ul; - this.autoWidth(); - }, - - autoWidth : function(){ - var el = this.el, ul = this.ul; - if(!el){ - return; - } - var w = this.width; - if(w){ - el.setWidth(w); - }else if(Ext.isIE){ - el.setWidth(this.minWidth); - var t = el.dom.offsetWidth; el.setWidth(ul.getWidth()+el.getFrameWidth("lr")); + if(this.enableScrolling){ + this.mon(this.el, { + scope: this, + delegate: '.x-menu-scroller', + click: this.onScroll, + mouseover: this.deactivateActive + }); } }, - delayAutoWidth : function(){ - if(this.el){ - if(!this.awTask){ - this.awTask = new Ext.util.DelayedTask(this.autoWidth, this); - } - this.awTask.delay(20); - } - }, - - findTargetItem : function(e){ - var t = e.getTarget(".x-menu-list-item", this.ul, true); + + findTargetItem : function(e){ + var t = e.getTarget('.x-menu-list-item', this.ul, true); if(t && t.menuItemId){ return this.items.get(t.menuItemId); } }, - onClick : function(e){ - var t; - if(t = this.findTargetItem(e)){ - if(t.menu && this.ignoreParentClicks){ - t.expandMenu(); - }else{ - t.onClick(e); - this.fireEvent("click", this, t, e); + + onClick : function(e){ + var t = this.findTargetItem(e); + if(t){ + if(t.isFormField){ + this.setActiveItem(t); + }else if(t instanceof Ext.menu.BaseItem){ + if(t.menu && this.ignoreParentClicks){ + t.expandMenu(); + e.preventDefault(); + }else if(t.onClick){ + t.onClick(e); + this.fireEvent('click', this, t, e); + } } } }, - setActiveItem : function(item, autoExpand){ + + setActiveItem : function(item, autoExpand){ if(item != this.activeItem){ - if(this.activeItem){ - this.activeItem.deactivate(); + this.deactivateActive(); + if((this.activeItem = item).isFormField){ + item.focus(); + }else{ + item.activate(autoExpand); } - this.activeItem = item; - item.activate(autoExpand); }else if(autoExpand){ item.expandMenu(); } }, - tryActivate : function(start, step){ + deactivateActive : function(){ + var a = this.activeItem; + if(a){ + if(a.isFormField){ + + if(a.collapse){ + a.collapse(); + } + }else{ + a.deactivate(); + } + delete this.activeItem; + } + }, + + + tryActivate : function(start, step){ var items = this.items; for(var i = start, len = items.length; i >= 0 && i < len; i+= step){ var item = items.get(i); - if(!item.disabled && item.canActivate){ + if(item.isVisible() && !item.disabled && (item.canActivate || item.isFormField)){ this.setActiveItem(item, false); return item; } @@ -25039,62 +38860,182 @@ Ext.extend(Ext.menu.Menu, Ext.util.Observable, { return false; }, - onMouseOver : function(e){ - var t; - if(t = this.findTargetItem(e)){ + + onMouseOver : function(e){ + var t = this.findTargetItem(e); + if(t){ if(t.canActivate && !t.disabled){ this.setActiveItem(t, true); } } this.over = true; - this.fireEvent("mouseover", this, e, t); + this.fireEvent('mouseover', this, e, t); }, - onMouseOut : function(e){ - var t; - if(t = this.findTargetItem(e)){ - if(t == this.activeItem && t.shouldDeactivate(e)){ + + onMouseOut : function(e){ + var t = this.findTargetItem(e); + if(t){ + if(t == this.activeItem && t.shouldDeactivate && t.shouldDeactivate(e)){ this.activeItem.deactivate(); delete this.activeItem; } } this.over = false; - this.fireEvent("mouseout", this, e, t); + this.fireEvent('mouseout', this, e, t); }, - isVisible : function(){ - return this.el && !this.hidden; + onScroll : function(e, t){ + if(e){ + e.stopEvent(); + } + var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top'); + ul.scrollTop += this.scrollIncrement * (top ? -1 : 1); + if(top ? ul.scrollTop <= 0 : ul.scrollTop + this.activeMax >= ul.scrollHeight){ + this.onScrollerOut(null, t); + } + }, + + + onScrollerIn : function(e, t){ + var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top'); + if(top ? ul.scrollTop > 0 : ul.scrollTop + this.activeMax < ul.scrollHeight){ + Ext.fly(t).addClass(['x-menu-item-active', 'x-menu-scroller-active']); + } + }, + + + onScrollerOut : function(e, t){ + Ext.fly(t).removeClass(['x-menu-item-active', 'x-menu-scroller-active']); }, show : function(el, pos, parentMenu){ - this.parentMenu = parentMenu; - if(!this.el){ - this.render(); + if(this.floating){ + this.parentMenu = parentMenu; + if(!this.el){ + this.render(); + this.doLayout(false, true); + } + this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign, this.defaultOffsets), parentMenu); + }else{ + Ext.menu.Menu.superclass.show.call(this); } - this.fireEvent("beforeshow", this); - this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign), parentMenu, false); }, - showAt : function(xy, parentMenu, _e){ - this.parentMenu = parentMenu; - if(!this.el){ - this.render(); + showAt : function(xy, parentMenu){ + if(this.fireEvent('beforeshow', this) !== false){ + this.parentMenu = parentMenu; + if(!this.el){ + this.render(); + } + if(this.enableScrolling){ + + this.el.setXY(xy); + + xy[1] = this.constrainScroll(xy[1]); + xy = [this.el.adjustForConstraints(xy)[0], xy[1]]; + }else{ + + xy = this.el.adjustForConstraints(xy); + } + this.el.setXY(xy); + this.el.show(); + Ext.menu.Menu.superclass.onShow.call(this); + if(Ext.isIE){ + + this.fireEvent('autosize', this); + if(!Ext.isIE8){ + this.el.repaint(); + } + } + this.hidden = false; + this.focus(); + this.fireEvent('show', this); } - if(_e !== false){ - this.fireEvent("beforeshow", this); - xy = this.el.adjustForConstraints(xy); - } - this.el.setXY(xy); - this.el.show(); - this.hidden = false; - this.focus(); - this.fireEvent("show", this); }, - + constrainScroll : function(y){ + var max, full = this.ul.setHeight('auto').getHeight(), + returnY = y, normalY, parentEl, scrollTop, viewHeight; + if(this.floating){ + parentEl = Ext.fly(this.el.dom.parentNode); + scrollTop = parentEl.getScroll().top; + viewHeight = parentEl.getViewSize().height; + + + normalY = y - scrollTop; + max = this.maxHeight ? this.maxHeight : viewHeight - normalY; + if(full > viewHeight) { + max = viewHeight; + + returnY = y - normalY; + } else if(max < full) { + returnY = y - (full - max); + max = full; + } + }else{ + max = this.getHeight(); + } + + if (this.maxHeight){ + max = Math.min(this.maxHeight, max); + } + if(full > max && max > 0){ + this.activeMax = max - this.scrollerHeight * 2 - this.el.getFrameWidth('tb') - Ext.num(this.el.shadowOffset, 0); + this.ul.setHeight(this.activeMax); + this.createScrollers(); + this.el.select('.x-menu-scroller').setDisplayed(''); + }else{ + this.ul.setHeight(full); + this.el.select('.x-menu-scroller').setDisplayed('none'); + } + this.ul.dom.scrollTop = 0; + return returnY; + }, + + createScrollers : function(){ + if(!this.scroller){ + this.scroller = { + pos: 0, + top: this.el.insertFirst({ + tag: 'div', + cls: 'x-menu-scroller x-menu-scroller-top', + html: ' ' + }), + bottom: this.el.createChild({ + tag: 'div', + cls: 'x-menu-scroller x-menu-scroller-bottom', + html: ' ' + }) + }; + this.scroller.top.hover(this.onScrollerIn, this.onScrollerOut, this); + this.scroller.topRepeater = new Ext.util.ClickRepeater(this.scroller.top, { + listeners: { + click: this.onScroll.createDelegate(this, [null, this.scroller.top], false) + } + }); + this.scroller.bottom.hover(this.onScrollerIn, this.onScrollerOut, this); + this.scroller.bottomRepeater = new Ext.util.ClickRepeater(this.scroller.bottom, { + listeners: { + click: this.onScroll.createDelegate(this, [null, this.scroller.bottom], false) + } + }); + } + }, + + onLayout : function(){ + if(this.isVisible()){ + if(this.enableScrolling){ + this.constrainScroll(this.el.getTop()); + } + if(this.floating){ + this.el.sync(); + } + } + }, focus : function(){ if(!this.hidden){ @@ -25110,233 +39051,257 @@ Ext.extend(Ext.menu.Menu, Ext.util.Observable, { hide : function(deep){ - if(this.el && this.isVisible()){ - this.fireEvent("beforehide", this); - if(this.activeItem){ - this.activeItem.deactivate(); - this.activeItem = null; - } + if (!this.isDestroyed) { + this.deepHide = deep; + Ext.menu.Menu.superclass.hide.call(this); + delete this.deepHide; + } + }, + + + onHide : function(){ + Ext.menu.Menu.superclass.onHide.call(this); + this.deactivateActive(); + if(this.el && this.floating){ this.el.hide(); - this.hidden = true; - this.fireEvent("hide", this); } - if(deep === true && this.parentMenu){ - this.parentMenu.hide(true); - } - }, - - - add : function(){ - var a = arguments, l = a.length, item; - for(var i = 0; i < l; i++){ - var el = a[i]; - if(el.render){ item = this.addItem(el); - }else if(typeof el == "string"){ if(el == "separator" || el == "-"){ - item = this.addSeparator(); - }else{ - item = this.addText(el); - } - }else if(el.tagName || el.el){ item = this.addElement(el); - }else if(typeof el == "object"){ Ext.applyIf(el, this.defaults); - item = this.addMenuItem(el); - } - } - return item; - }, - - - getEl : function(){ - if(!this.el){ - this.render(); - } - return this.el; - }, - - - addSeparator : function(){ - return this.addItem(new Ext.menu.Separator()); - }, - - - addElement : function(el){ - return this.addItem(new Ext.menu.BaseItem(el)); - }, - - - addItem : function(item){ - this.items.add(item); - if(this.ul){ - var li = document.createElement("li"); - li.className = "x-menu-list-item"; - this.ul.dom.appendChild(li); - item.render(li, this); - this.delayAutoWidth(); - } - return item; - }, - - - addMenuItem : function(config){ - if(!(config instanceof Ext.menu.Item)){ - if(typeof config.checked == "boolean"){ config = new Ext.menu.CheckItem(config); + var pm = this.parentMenu; + if(this.deepHide === true && pm){ + if(pm.floating){ + pm.hide(true); }else{ - config = new Ext.menu.Item(config); + pm.deactivateActive(); } } - return this.addItem(config); + }, + + + lookupComponent : function(c){ + if(Ext.isString(c)){ + c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c); + this.applyDefaults(c); + }else{ + if(Ext.isObject(c)){ + c = this.getMenuItem(c); + }else if(c.tagName || c.el){ + c = new Ext.BoxComponent({ + el: c + }); + } + } + return c; + }, + + applyDefaults : function(c) { + if (!Ext.isString(c)) { + c = Ext.menu.Menu.superclass.applyDefaults.call(this, c); + var d = this.internalDefaults; + if(d){ + if(c.events){ + Ext.applyIf(c.initialConfig, d); + Ext.apply(c, d); + }else{ + Ext.applyIf(c, d); + } + } + } + return c; + }, + + + getMenuItem : function(config) { + config.ownerCt = this; + + if (!config.isXType) { + if (!config.xtype && Ext.isBoolean(config.checked)) { + return new Ext.menu.CheckItem(config); + } + return Ext.create(config, this.defaultType); + } + return config; + }, + + + addSeparator : function() { + return this.add(new Ext.menu.Separator()); + }, + + + addElement : function(el) { + return this.add(new Ext.menu.BaseItem({ + el: el + })); + }, + + + addItem : function(item) { + return this.add(item); + }, + + + addMenuItem : function(config) { + return this.add(this.getMenuItem(config)); }, addText : function(text){ - return this.addItem(new Ext.menu.TextItem(text)); + return this.add(new Ext.menu.TextItem(text)); }, - insert : function(index, item){ - this.items.insert(index, item); - if(this.ul){ - var li = document.createElement("li"); - li.className = "x-menu-list-item"; - this.ul.dom.insertBefore(li, this.ul.dom.childNodes[index]); - item.render(li, this); - this.delayAutoWidth(); + onDestroy : function(){ + Ext.EventManager.removeResizeListener(this.hide, this); + var pm = this.parentMenu; + if(pm && pm.activeChild == this){ + delete pm.activeChild; } - return item; - }, - - - remove : function(item){ - this.items.removeKey(item.id); - item.destroy(); - }, - - - removeAll : function(){ - if(this.items){ - var f; - while(f = this.items.first()){ - this.remove(f); - } - } - }, - - - destroy : function(){ - this.beforeDestroy(); + delete this.parentMenu; + Ext.menu.Menu.superclass.onDestroy.call(this); Ext.menu.MenuMgr.unregister(this); - if (this.keyNav) { - this.keyNav.disable(); + if(this.keyNav) { + this.keyNav.disable(); } - this.removeAll(); - if (this.ul) { - this.ul.removeAllListeners(); - } - if (this.el) { - this.el.destroy(); - } - }, - - beforeDestroy : Ext.emptyFn - -}); - -Ext.menu.MenuNav = function(menu){ - Ext.menu.MenuNav.superclass.constructor.call(this, menu.el); - this.scope = this.menu = menu; -}; - -Ext.extend(Ext.menu.MenuNav, Ext.KeyNav, { - doRelay : function(e, h){ - var k = e.getKey(); - if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){ - this.menu.tryActivate(0, 1); - return false; - } - return h.call(this.scope || this, e, this.menu); - }, - - up : function(e, m){ - if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){ - m.tryActivate(m.items.length-1, -1); - } - }, - - down : function(e, m){ - if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){ - m.tryActivate(0, 1); - } - }, - - right : function(e, m){ - if(m.activeItem){ - m.activeItem.expandMenu(true); - } - }, - - left : function(e, m){ - m.hide(); - if(m.parentMenu && m.parentMenu.activeItem){ - m.parentMenu.activeItem.activate(); - } - }, - - enter : function(e, m){ - if(m.activeItem){ - e.stopPropagation(); - m.activeItem.onClick(e); - m.fireEvent("click", this, m.activeItem); - return true; + var s = this.scroller; + if(s){ + Ext.destroy(s.topRepeater, s.bottomRepeater, s.top, s.bottom); } + Ext.destroy( + this.el, + this.focusEl, + this.ul + ); } }); -Ext.menu.MenuMgr = function(){ - var menus, active, groups = {}, attached = false, lastShow = new Date(); +Ext.reg('menu', Ext.menu.Menu); - function init(){ + +Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){ + function up(e, m){ + if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){ + m.tryActivate(m.items.length-1, -1); + } + } + function down(e, m){ + if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){ + m.tryActivate(0, 1); + } + } + return { + constructor : function(menu){ + Ext.menu.MenuNav.superclass.constructor.call(this, menu.el); + this.scope = this.menu = menu; + }, + + doRelay : function(e, h){ + var k = e.getKey(); + + if (this.menu.activeItem && this.menu.activeItem.isFormField && k != e.TAB) { + return false; + } + if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){ + this.menu.tryActivate(0, 1); + return false; + } + return h.call(this.scope || this, e, this.menu); + }, + + tab: function(e, m) { + e.stopEvent(); + if (e.shiftKey) { + up(e, m); + } else { + down(e, m); + } + }, + + up : up, + + down : down, + + right : function(e, m){ + if(m.activeItem){ + m.activeItem.expandMenu(true); + } + }, + + left : function(e, m){ + m.hide(); + if(m.parentMenu && m.parentMenu.activeItem){ + m.parentMenu.activeItem.activate(); + } + }, + + enter : function(e, m){ + if(m.activeItem){ + e.stopPropagation(); + m.activeItem.onClick(e); + m.fireEvent('click', this, m.activeItem); + return true; + } + } + }; +}()); + +Ext.menu.MenuMgr = function(){ + var menus, + active, + map, + groups = {}, + attached = false, + lastShow = new Date(); + + + + function init(){ menus = {}; active = new Ext.util.MixedCollection(); - Ext.getDoc().addKeyListener(27, function(){ - if(active.length > 0){ - hideAll(); - } - }); + map = Ext.getDoc().addKeyListener(27, hideAll); + map.disable(); } - function hideAll(){ + + function hideAll(){ if(active && active.length > 0){ var c = active.clone(); c.each(function(m){ m.hide(); }); + return true; } + return false; } - function onHide(m){ + + function onHide(m){ active.remove(m); if(active.length < 1){ + map.disable(); Ext.getDoc().un("mousedown", onMouseDown); attached = false; } } - function onShow(m){ + + function onShow(m){ var last = active.last(); lastShow = new Date(); active.add(m); if(!attached){ + map.enable(); Ext.getDoc().on("mousedown", onMouseDown); attached = true; } if(m.parentMenu){ m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3); m.parentMenu.activeChild = m; - }else if(last && last.isVisible()){ + }else if(last && !last.isDestroyed && last.isVisible()){ m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3); } } - function onBeforeHide(m){ + + function onBeforeHide(m){ if(m.activeChild){ m.activeChild.hide(); } @@ -25346,7 +39311,8 @@ Ext.menu.MenuMgr = function(){ } } - function onBeforeShow(m){ + + function onBeforeShow(m){ var pm = m.parentMenu; if(!pm && !m.allowOtherMenus){ hideAll(); @@ -25355,89 +39321,92 @@ Ext.menu.MenuMgr = function(){ } } - function onMouseDown(e){ + + function onMouseDown(e){ if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){ hideAll(); } } - function onBeforeCheck(mi, state){ - if(state){ - var g = groups[mi.group]; - for(var i = 0, l = g.length; i < l; i++){ - if(g[i] != mi){ - g[i].setChecked(false); - } - } - } - } - return { hideAll : function(){ - hideAll(); + return hideAll(); }, - register : function(menu){ + + register : function(menu){ if(!menus){ init(); } menus[menu.id] = menu; - menu.on("beforehide", onBeforeHide); - menu.on("hide", onHide); - menu.on("beforeshow", onBeforeShow); - menu.on("show", onShow); - var g = menu.group; - if(g && menu.events["checkchange"]){ - if(!groups[g]){ - groups[g] = []; - } - groups[g].push(menu); - menu.on("checkchange", onCheck); - } + menu.on({ + beforehide: onBeforeHide, + hide: onHide, + beforeshow: onBeforeShow, + show: onShow + }); }, get : function(menu){ - if(typeof menu == "string"){ if(!menus){ return null; + if(typeof menu == "string"){ + if(!menus){ + return null; } return menus[menu]; - }else if(menu.events){ return menu; - }else if(typeof menu.length == 'number'){ return new Ext.menu.Menu({items:menu}); - }else{ return new Ext.menu.Menu(menu); + }else if(menu.events){ + return menu; + }else if(typeof menu.length == 'number'){ + return new Ext.menu.Menu({items:menu}); + }else{ + return Ext.create(menu, 'menu'); } }, - unregister : function(menu){ + + unregister : function(menu){ delete menus[menu.id]; menu.un("beforehide", onBeforeHide); menu.un("hide", onHide); menu.un("beforeshow", onBeforeShow); menu.un("show", onShow); - var g = menu.group; - if(g && menu.events["checkchange"]){ - groups[g].remove(menu); - menu.un("checkchange", onCheck); - } }, - registerCheckable : function(menuItem){ + + registerCheckable : function(menuItem){ var g = menuItem.group; if(g){ if(!groups[g]){ groups[g] = []; } groups[g].push(menuItem); - menuItem.on("beforecheckchange", onBeforeCheck); } }, - unregisterCheckable : function(menuItem){ + + unregisterCheckable : function(menuItem){ var g = menuItem.group; if(g){ groups[g].remove(menuItem); - menuItem.un("beforecheckchange", onBeforeCheck); + } + }, + + + onCheckChange: function(item, state){ + if(item.group && state){ + var group = groups[item.group], + i = 0, + len = group.length, + current; + + for(; i < len; i++){ + current = group[i]; + if(current != item){ + current.setChecked(false); + } + } } }, @@ -25467,25 +39436,8 @@ Ext.menu.MenuMgr = function(){ }; }(); - -Ext.menu.BaseItem = function(config){ - Ext.menu.BaseItem.superclass.constructor.call(this, config); - - this.addEvents( - - 'click', - - 'activate', - - 'deactivate' - ); - - if(this.handler){ - this.on("click", this.handler, this.scope); - } -}; - -Ext.extend(Ext.menu.BaseItem, Ext.Component, { +Ext.menu.BaseItem = Ext.extend(Ext.Component, { + @@ -25495,22 +39447,43 @@ Ext.extend(Ext.menu.BaseItem, Ext.Component, { hideOnClick : true, - hideDelay : 100, + clickHideDelay : 1, - ctype: "Ext.menu.BaseItem", + + ctype : "Ext.menu.BaseItem", - actionMode : "container", + + actionMode : "container", - render : function(container, parentMenu){ - - this.parentMenu = parentMenu; - Ext.menu.BaseItem.superclass.render.call(this, container); - this.container.menuItemId = this.id; + initComponent : function(){ + Ext.menu.BaseItem.superclass.initComponent.call(this); + this.addEvents( + + 'click', + + 'activate', + + 'deactivate' + ); + if(this.handler){ + this.on("click", this.handler, this.scope); + } }, - onRender : function(container, position){ - this.el = Ext.get(this.el); - container.dom.appendChild(this.el.dom); + + onRender : function(container, position){ + Ext.menu.BaseItem.superclass.onRender.apply(this, arguments); + if(this.ownerCt && this.ownerCt instanceof Ext.menu.Menu){ + this.parentMenu = this.ownerCt; + }else{ + this.container.addClass('x-menu-list-item'); + this.mon(this.el, { + scope: this, + click: this.onClick, + mouseenter: this.activate, + mouseleave: this.deactivate + }); + } }, @@ -25521,16 +39494,18 @@ Ext.extend(Ext.menu.BaseItem, Ext.Component, { this.on("click", this.handler = handler, this.scope = scope); }, - onClick : function(e){ + + onClick : function(e){ if(!this.disabled && this.fireEvent("click", this, e) !== false - && this.parentMenu.fireEvent("itemclick", this, e) !== false){ + && (this.parentMenu && this.parentMenu.fireEvent("itemclick", this, e) !== false)){ this.handleClick(e); }else{ e.stopEvent(); } }, - activate : function(){ + + activate : function(){ if(this.disabled){ return false; } @@ -25541,43 +39516,59 @@ Ext.extend(Ext.menu.BaseItem, Ext.Component, { return true; }, - deactivate : function(){ + + deactivate : function(){ this.container.removeClass(this.activeClass); this.fireEvent("deactivate", this); }, - shouldDeactivate : function(e){ + + shouldDeactivate : function(e){ return !this.region || !this.region.contains(e.getPoint()); }, - handleClick : function(e){ + + handleClick : function(e){ + var pm = this.parentMenu; if(this.hideOnClick){ - this.parentMenu.hide.defer(this.hideDelay, this.parentMenu, [true]); + if(pm.floating){ + this.clickHideDelayTimer = pm.hide.defer(this.clickHideDelay, pm, [true]); + }else{ + pm.deactivateActive(); + } } }, + + beforeDestroy: function(){ + clearTimeout(this.clickHideDelayTimer); + Ext.menu.BaseItem.superclass.beforeDestroy.call(this); + }, - expandMenu : function(autoActivate){ - }, + + expandMenu : Ext.emptyFn, - hideMenu : function(){ - } + + hideMenu : Ext.emptyFn }); - -Ext.menu.TextItem = function(cfg){ - if(typeof cfg == 'string'){ - cfg = {text: cfg} - } - Ext.menu.TextItem.superclass.constructor.call(this, cfg); -}; - -Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, { +Ext.reg('menubaseitem', Ext.menu.BaseItem); +Ext.menu.TextItem = Ext.extend(Ext.menu.BaseItem, { hideOnClick : false, itemCls : "x-menu-text", + + constructor : function(config) { + if (typeof config == 'string') { + config = { + text: config + }; + } + Ext.menu.TextItem.superclass.constructor.call(this, config); + }, - onRender : function(){ + + onRender : function() { var s = document.createElement("span"); s.className = this.itemCls; s.innerHTML = this.text; @@ -25585,18 +39576,18 @@ Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, { Ext.menu.TextItem.superclass.onRender.apply(this, arguments); } }); - -Ext.menu.Separator = function(config){ - Ext.menu.Separator.superclass.constructor.call(this, config); -}; - -Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, { +Ext.reg('menutextitem', Ext.menu.TextItem); +Ext.menu.Separator = Ext.extend(Ext.menu.BaseItem, { itemCls : "x-menu-sep", hideOnClick : false, + + + activeClass: '', - onRender : function(li){ + + onRender : function(li){ var s = document.createElement("span"); s.className = this.itemCls; s.innerHTML = " "; @@ -25605,14 +39596,8 @@ Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, { Ext.menu.Separator.superclass.onRender.apply(this, arguments); } }); - -Ext.menu.Item = function(config){ - Ext.menu.Item.superclass.constructor.call(this, config); - if(this.menu){ - this.menu = Ext.menu.MenuMgr.get(this.menu); - } -}; -Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { +Ext.reg('menuseparator', Ext.menu.Separator); +Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { @@ -25620,39 +39605,85 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { - itemCls : "x-menu-item", + + itemCls : 'x-menu-item', canActivate : true, showDelay: 200, - hideDelay: 200, + + + altText: '', + + + hideDelay: 200, - ctype: "Ext.menu.Item", + + ctype: 'Ext.menu.Item', - onRender : function(container, position){ - var el = document.createElement("a"); - el.hideFocus = true; - el.unselectable = "on"; - el.href = this.href || "#"; - if(this.hrefTarget){ - el.target = this.hrefTarget; + initComponent : function(){ + Ext.menu.Item.superclass.initComponent.call(this); + if(this.menu){ + + + if (Ext.isArray(this.menu)){ + this.menu = { items: this.menu }; + } + + + + if (Ext.isObject(this.menu)){ + this.menu.ownerCt = this; + } + + this.menu = Ext.menu.MenuMgr.get(this.menu); + this.menu.ownerCt = undefined; + } + }, + + + onRender : function(container, position){ + if (!this.itemTpl) { + this.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate( + '', + ' target="{hrefTarget}"', + '', + '>', + '{altText}', + '{text}', + '' + ); + } + var a = this.getTemplateArgs(); + this.el = position ? this.itemTpl.insertBefore(position, a, true) : this.itemTpl.append(container, a, true); + this.iconEl = this.el.child('img.x-menu-item-icon'); + this.textEl = this.el.child('.x-menu-item-text'); + if(!this.href) { + this.mon(this.el, 'click', Ext.emptyFn, null, { preventDefault: true }); } - el.className = this.itemCls + (this.menu ? " x-menu-item-arrow" : "") + (this.cls ? " " + this.cls : ""); - el.innerHTML = String.format( - '{1}', - this.icon || Ext.BLANK_IMAGE_URL, this.itemText||this.text, this.iconCls || ''); - this.el = el; Ext.menu.Item.superclass.onRender.call(this, container, position); }, + getTemplateArgs: function() { + return { + id: this.id, + cls: this.itemCls + (this.menu ? ' x-menu-item-arrow' : '') + (this.cls ? ' ' + this.cls : ''), + href: this.href || '#', + hrefTarget: this.hrefTarget, + icon: this.icon || Ext.BLANK_IMAGE_URL, + iconCls: this.iconCls || '', + text: this.itemText||this.text||' ', + altText: this.altText || '' + }; + }, + setText : function(text){ - this.text = text; + this.text = text||' '; if(this.rendered){ - this.el.update(String.format( - '{1}', - this.icon || Ext.BLANK_IMAGE_URL, this.text, this.iconCls || '')); - this.parentMenu.autoWidth(); + this.textEl.update(this.text); + this.parentMenu.layout.doAutoSize(); } }, @@ -25661,17 +39692,31 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { var oldCls = this.iconCls; this.iconCls = cls; if(this.rendered){ - this.el.child('img.x-menu-item-icon').replaceClass(oldCls, this.iconCls); + this.iconEl.replaceClass(oldCls, this.iconCls); } }, - handleClick : function(e){ - if(!this.href){ e.stopEvent(); + + beforeDestroy: function(){ + clearTimeout(this.showTimer); + clearTimeout(this.hideTimer); + if (this.menu){ + delete this.menu.ownerCt; + this.menu.destroy(); + } + Ext.menu.Item.superclass.beforeDestroy.call(this); + }, + + + handleClick : function(e){ + if(!this.href){ + e.stopEvent(); } Ext.menu.Item.superclass.handleClick.apply(this, arguments); }, - activate : function(autoExpand){ + + activate : function(autoExpand){ if(Ext.menu.Item.superclass.activate.apply(this, arguments)){ this.focus(); if(autoExpand){ @@ -25681,7 +39726,8 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { return true; }, - shouldDeactivate : function(e){ + + shouldDeactivate : function(e){ if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){ if(this.menu && this.menu.isVisible()){ return !this.menu.getEl().getRegion().contains(e.getPoint()); @@ -25691,12 +39737,14 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { return false; }, - deactivate : function(){ + + deactivate : function(){ Ext.menu.Item.superclass.deactivate.apply(this, arguments); this.hideMenu(); }, - expandMenu : function(autoActivate){ + + expandMenu : function(autoActivate){ if(!this.disabled && this.menu){ clearTimeout(this.hideTimer); delete this.hideTimer; @@ -25708,15 +39756,17 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { } }, - deferExpand : function(autoActivate){ + + deferExpand : function(autoActivate){ delete this.showTimer; - this.menu.show(this.container, this.parentMenu.subMenuAlign || "tl-tr?", this.parentMenu); + this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu); if(autoActivate){ this.menu.tryActivate(0, 1); } }, - hideMenu : function(){ + + hideMenu : function(){ clearTimeout(this.showTimer); delete this.showTimer; if(!this.hideTimer && this.menu && this.menu.isVisible()){ @@ -25724,7 +39774,8 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { } }, - deferHide : function(){ + + deferHide : function(){ delete this.hideTimer; if(this.menu.over){ this.parentMenu.setActiveItem(this, false); @@ -25733,22 +39784,8 @@ Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { } } }); - -Ext.menu.CheckItem = function(config){ - Ext.menu.CheckItem.superclass.constructor.call(this, config); - this.addEvents( - - "beforecheckchange" , - - "checkchange" - ); - - if(this.checkHandler){ - this.on('checkchange', this.checkHandler, this.scope); - } - Ext.menu.MenuMgr.registerCheckable(this); -}; -Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, { +Ext.reg('menuitem', Ext.menu.Item); +Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, { itemCls : "x-menu-item x-menu-check-item", @@ -25758,9 +39795,26 @@ Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, { checked: false, - ctype: "Ext.menu.CheckItem", + + ctype: "Ext.menu.CheckItem", + + initComponent : function(){ + Ext.menu.CheckItem.superclass.initComponent.call(this); + this.addEvents( + + "beforecheckchange" , + + "checkchange" + ); + + if(this.checkHandler){ + this.on('checkchange', this.checkHandler, this.scope); + } + Ext.menu.MenuMgr.registerCheckable(this); + }, - onRender : function(c){ + + onRender : function(c){ Ext.menu.CheckItem.superclass.onRender.apply(this, arguments); if(this.group){ this.el.addClass(this.groupClass); @@ -25771,134 +39825,148 @@ Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, { } }, - destroy : function(){ + + destroy : function(){ Ext.menu.MenuMgr.unregisterCheckable(this); Ext.menu.CheckItem.superclass.destroy.apply(this, arguments); }, setChecked : function(state, suppressEvent){ - if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){ + var suppress = suppressEvent === true; + if(this.checked != state && (suppress || this.fireEvent("beforecheckchange", this, state) !== false)){ + Ext.menu.MenuMgr.onCheckChange(this, state); if(this.container){ this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked"); } this.checked = state; - if(suppressEvent !== true){ + if(!suppress){ this.fireEvent("checkchange", this, state); } } }, - handleClick : function(e){ - if(!this.disabled && !(this.checked && this.group)){ this.setChecked(!this.checked); + + handleClick : function(e){ + if(!this.disabled && !(this.checked && this.group)){ + this.setChecked(!this.checked); } Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments); } }); +Ext.reg('menucheckitem', Ext.menu.CheckItem); + Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, { + + enableScrolling : false, + + + + hideOnClick : true, + + + pickerId : null, + + + + + cls : 'x-date-menu', + + + + -Ext.menu.Adapter = function(component, config){ - Ext.menu.Adapter.superclass.constructor.call(this, config); - this.component = component; -}; -Ext.extend(Ext.menu.Adapter, Ext.menu.BaseItem, { - canActivate : true, - - onRender : function(container, position){ - this.component.render(container); - this.el = this.component.getEl(); - }, - - activate : function(){ - if(this.disabled){ - return false; + initComponent : function(){ + this.on('beforeshow', this.onBeforeShow, this); + if(this.strict = (Ext.isIE7 && Ext.isStrict)){ + this.on('show', this.onShow, this, {single: true, delay: 20}); + } + Ext.apply(this, { + plain: true, + showSeparator: false, + items: this.picker = new Ext.DatePicker(Ext.applyIf({ + internalRender: this.strict || !Ext.isIE, + ctCls: 'x-menu-date-item', + id: this.pickerId + }, this.initialConfig)) + }); + this.picker.purgeListeners(); + Ext.menu.DateMenu.superclass.initComponent.call(this); + + this.relayEvents(this.picker, ['select']); + this.on('show', this.picker.focus, this.picker); + this.on('select', this.menuHide, this); + if(this.handler){ + this.on('select', this.handler, this.scope || this); } - this.component.focus(); - this.fireEvent("activate", this); - return true; }, - deactivate : function(){ - this.fireEvent("deactivate", this); + menuHide : function() { + if(this.hideOnClick){ + this.hide(true); + } }, - disable : function(){ - this.component.disable(); - Ext.menu.Adapter.superclass.disable.call(this); - }, - - enable : function(){ - this.component.enable(); - Ext.menu.Adapter.superclass.enable.call(this); - } -}); - -Ext.menu.DateItem = function(config){ - Ext.menu.DateItem.superclass.constructor.call(this, new Ext.DatePicker(config), config); - - this.picker = this.component; - this.addEvents('select'); - - this.picker.on("render", function(picker){ - picker.getEl().swallowEvent("click"); - picker.container.addClass("x-menu-date-item"); - }); - - this.picker.on("select", this.onSelect, this); -}; - -Ext.extend(Ext.menu.DateItem, Ext.menu.Adapter, { - onSelect : function(picker, date){ - this.fireEvent("select", this, date, picker); - Ext.menu.DateItem.superclass.handleClick.call(this); - } -}); - -Ext.menu.ColorItem = function(config){ - Ext.menu.ColorItem.superclass.constructor.call(this, new Ext.ColorPalette(config), config); - - this.palette = this.component; - this.relayEvents(this.palette, ["select"]); - if(this.selectHandler){ - this.on('select', this.selectHandler, this.scope); - } -}; -Ext.extend(Ext.menu.ColorItem, Ext.menu.Adapter); - -Ext.menu.DateMenu = function(config){ - Ext.menu.DateMenu.superclass.constructor.call(this, config); - this.plain = true; - var di = new Ext.menu.DateItem(config); - this.add(di); - - this.picker = di.picker; - - this.relayEvents(di, ["select"]); - - this.on('beforeshow', function(){ + onBeforeShow : function(){ if(this.picker){ this.picker.hideMonthPicker(true); } - }, this); -}; -Ext.extend(Ext.menu.DateMenu, Ext.menu.Menu, { - cls:'x-date-menu', + }, - beforeDestroy : function() { - this.picker.destroy(); + onShow : function(){ + var el = this.picker.getEl(); + el.setWidth(el.getWidth()); + } + }); + Ext.reg('datemenu', Ext.menu.DateMenu); + + Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, { + + enableScrolling : false, + + + + + hideOnClick : true, + + cls : 'x-color-menu', + + + paletteId : null, + + + + + + + + + + + initComponent : function(){ + Ext.apply(this, { + plain: true, + showSeparator: false, + items: this.palette = new Ext.ColorPalette(Ext.applyIf({ + id: this.paletteId + }, this.initialConfig)) + }); + this.palette.purgeListeners(); + Ext.menu.ColorMenu.superclass.initComponent.call(this); + + this.relayEvents(this.palette, ['select']); + this.on('select', this.menuHide, this); + if(this.handler){ + this.on('select', this.handler, this.scope || this); + } + }, + + menuHide : function(){ + if(this.hideOnClick){ + this.hide(true); + } } }); - -Ext.menu.ColorMenu = function(config){ - Ext.menu.ColorMenu.superclass.constructor.call(this, config); - this.plain = true; - var ci = new Ext.menu.ColorItem(config); - this.add(ci); - - this.palette = ci.palette; - - this.relayEvents(ci, ["select"]); -}; -Ext.extend(Ext.menu.ColorMenu, Ext.menu.Menu); +Ext.reg('colormenu', Ext.menu.ColorMenu); Ext.form.Field = Ext.extend(Ext.BoxComponent, { @@ -25907,28 +39975,24 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { + + + invalidClass : 'x-form-invalid', + + invalidText : 'The value in this field is invalid', + + focusClass : 'x-form-focus', - - - - - - invalidClass : "x-form-invalid", - - invalidText : "The value in this field is invalid", - - focusClass : "x-form-focus", - - validationEvent : "keyup", + validationEvent : 'keyup', validateOnBlur : true, validationDelay : 250, - defaultAutoCreate : {tag: "input", type: "text", size: "20", autocomplete: "off"}, + defaultAutoCreate : {tag: 'input', type: 'text', size: '20', autocomplete: 'off'}, - fieldClass : "x-form-field", + fieldClass : 'x-form-field', msgTarget : 'qtip', @@ -25938,11 +40002,19 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { disabled : false, - isFormField : true, - - hasFocus : false, + submitValue: true, - initComponent : function(){ + + isFormField : true, + + + msgDisplay: '', + + + hasFocus : false, + + + initComponent : function(){ Ext.form.Field.superclass.initComponent.call(this); this.addEvents( @@ -25961,21 +40033,26 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { }, - getName: function(){ - return this.rendered && this.el.dom.name ? this.el.dom.name : (this.hiddenName || ''); + getName : function(){ + return this.rendered && this.el.dom.name ? this.el.dom.name : this.name || this.id || ''; }, - onRender : function(ct, position){ - Ext.form.Field.superclass.onRender.call(this, ct, position); + + onRender : function(ct, position){ if(!this.el){ var cfg = this.getAutoCreate(); + if(!cfg.name){ cfg.name = this.name || this.id; } if(this.inputType){ cfg.type = this.inputType; } - this.el = ct.createChild(cfg, position); + this.autoEl = cfg; + } + Ext.form.Field.superclass.onRender.call(this, ct, position); + if(this.submitValue === false){ + this.el.dom.removeAttribute('name'); } var type = this.el.dom.type; if(type){ @@ -25985,7 +40062,7 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { this.el.addClass('x-form-'+type); } if(this.readOnly){ - this.el.dom.readOnly = true; + this.setReadOnly(true); } if(this.tabIndex !== undefined){ this.el.dom.setAttribute('tabIndex', this.tabIndex); @@ -25994,32 +40071,49 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { this.el.addClass([this.fieldClass, this.cls]); }, - initValue : function(){ + + getItemCt : function(){ + return this.itemCt; + }, + + + initValue : function(){ if(this.value !== undefined){ this.setValue(this.value); - }else if(this.el.dom.value.length > 0 && this.el.dom.value != this.emptyText){ + }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){ this.setValue(this.el.dom.value); } - this.originalValue = this.getValue(); + + this.originalValue = this.getValue(); }, isDirty : function() { - if(this.disabled) { + if(this.disabled || !this.rendered) { return false; } return String(this.getValue()) !== String(this.originalValue); }, - afterRender : function(){ + + setReadOnly : function(readOnly){ + if(this.rendered){ + this.el.dom.readOnly = readOnly; + } + this.readOnly = readOnly; + }, + + + afterRender : function(){ Ext.form.Field.superclass.afterRender.call(this); this.initEvents(); this.initValue(); }, - fireKey : function(e){ + + fireKey : function(e){ if(e.isSpecialKey()){ - this.fireEvent("specialkey", this, e); + this.fireEvent('specialkey', this, e); } }, @@ -26029,51 +40123,65 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { this.clearInvalid(); }, - initEvents : function(){ - this.el.on(Ext.isIE || Ext.isSafari3 ? "keydown" : "keypress", this.fireKey, this); - this.el.on("focus", this.onFocus, this); - - var o = this.inEditor && Ext.isWindows && Ext.isGecko ? {buffer:10} : null; - this.el.on("blur", this.onBlur, this, o); + + initEvents : function(){ + this.mon(this.el, Ext.EventManager.getKeyEvent(), this.fireKey, this); + this.mon(this.el, 'focus', this.onFocus, this); - this.originalValue = this.getValue(); + + + this.mon(this.el, 'blur', this.onBlur, this, this.inEditor ? {buffer:10} : null); }, - onFocus : function(){ - if(!Ext.isOpera && this.focusClass){ this.el.addClass(this.focusClass); + + preFocus: Ext.emptyFn, + + + onFocus : function(){ + this.preFocus(); + if(this.focusClass){ + this.el.addClass(this.focusClass); } if(!this.hasFocus){ this.hasFocus = true; + this.startValue = this.getValue(); - this.fireEvent("focus", this); + this.fireEvent('focus', this); } }, - beforeBlur : Ext.emptyFn, + + beforeBlur : Ext.emptyFn, - onBlur : function(){ + + onBlur : function(){ this.beforeBlur(); - if(!Ext.isOpera && this.focusClass){ this.el.removeClass(this.focusClass); + if(this.focusClass){ + this.el.removeClass(this.focusClass); } this.hasFocus = false; - if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){ + if(this.validationEvent !== false && (this.validateOnBlur || this.validationEvent == 'blur')){ this.validate(); } var v = this.getValue(); if(String(v) !== String(this.startValue)){ this.fireEvent('change', this, v, this.startValue); } - this.fireEvent("blur", this); + this.fireEvent('blur', this); + this.postBlur(); }, + postBlur : Ext.emptyFn, + + isValid : function(preventMark){ if(this.disabled){ return true; } var restore = this.preventMark; this.preventMark = preventMark === true; - var v = this.validateValue(this.processValue(this.getRawValue())); + var v = this.validateValue(this.processValue(this.getRawValue()), preventMark); this.preventMark = restore; return v; }, @@ -26087,104 +40195,108 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { return false; }, - processValue : function(value){ + + processValue : function(value){ return value; }, - validateValue : function(value){ - return true; + + validateValue : function(value) { + + var error = this.getErrors(value)[0]; + + if (error == undefined) { + return true; + } else { + this.markInvalid(error); + return false; + } + }, + + + getErrors: function() { + return []; + }, + + + getActiveError : function(){ + return this.activeError || ''; }, markInvalid : function(msg){ - if(!this.rendered || this.preventMark){ return; - } - this.el.addClass(this.invalidClass); - msg = msg || this.invalidText; + + if (this.rendered && !this.preventMark) { + msg = msg || this.invalidText; - switch(this.msgTarget){ - case 'qtip': - this.el.dom.qtip = msg; - this.el.dom.qclass = 'x-form-invalid-tip'; - if(Ext.QuickTips){ Ext.QuickTips.enable(); - } - break; - case 'title': - this.el.dom.title = msg; - break; - case 'under': - if(!this.errorEl){ - var elp = this.getErrorCt(); - if(!elp){ this.el.dom.title = msg; - break; - } - this.errorEl = elp.createChild({cls:'x-form-invalid-msg'}); - this.errorEl.setWidth(elp.getWidth(true)-20); - } - this.errorEl.update(msg); - Ext.form.Field.msgFx[this.msgFx].show(this.errorEl, this); - break; - case 'side': - if(!this.errorIcon){ - var elp = this.getErrorCt(); - if(!elp){ this.el.dom.title = msg; - break; - } - this.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); - } - this.alignErrorIcon(); - this.errorIcon.dom.qtip = msg; - this.errorIcon.dom.qclass = 'x-form-invalid-tip'; - this.errorIcon.show(); - this.on('resize', this.alignErrorIcon, this); - break; - default: + var mt = this.getMessageHandler(); + if(mt){ + mt.mark(this, msg); + }else if(this.msgTarget){ + this.el.addClass(this.invalidClass); var t = Ext.getDom(this.msgTarget); - t.innerHTML = msg; - t.style.display = this.msgDisplay; - break; + if(t){ + t.innerHTML = msg; + t.style.display = this.msgDisplay; + } + } } - this.fireEvent('invalid', this, msg); + + this.setActiveError(msg); }, - getErrorCt : function(){ - return this.el.findParent('.x-form-element', 5, true) || this.el.findParent('.x-form-field-wrap', 5, true); }, - - alignErrorIcon : function(){ - this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]); - }, - clearInvalid : function(){ - if(!this.rendered || this.preventMark){ return; - } - this.el.removeClass(this.invalidClass); - switch(this.msgTarget){ - case 'qtip': - this.el.dom.qtip = ''; - break; - case 'title': - this.el.dom.title = ''; - break; - case 'under': - if(this.errorEl){ - Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl, this); - } - break; - case 'side': - if(this.errorIcon){ - this.errorIcon.dom.qtip = ''; - this.errorIcon.hide(); - this.un('resize', this.alignErrorIcon, this); - } - break; - default: + + if (this.rendered && !this.preventMark) { + this.el.removeClass(this.invalidClass); + var mt = this.getMessageHandler(); + if(mt){ + mt.clear(this); + }else if(this.msgTarget){ + this.el.removeClass(this.invalidClass); var t = Ext.getDom(this.msgTarget); - t.innerHTML = ''; - t.style.display = 'none'; - break; + if(t){ + t.innerHTML = ''; + t.style.display = 'none'; + } + } } - this.fireEvent('valid', this); + + this.unsetActiveError(); + }, + + + setActiveError: function(msg, suppressEvent) { + this.activeError = msg; + if (suppressEvent !== true) this.fireEvent('invalid', this, msg); + }, + + + unsetActiveError: function(suppressEvent) { + delete this.activeError; + if (suppressEvent !== true) this.fireEvent('valid', this); + }, + + + getMessageHandler : function(){ + return Ext.form.MessageTargets[this.msgTarget]; + }, + + + getErrorCt : function(){ + return this.el.findParent('.x-form-element', 5, true) || + this.el.findParent('.x-form-field-wrap', 5, true); + }, + + + alignErrorEl : function(){ + this.errorEl.setWidth(this.getErrorCt().getWidth(true) - 20); + }, + + + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]); }, @@ -26210,47 +40322,22 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { setRawValue : function(v){ - return this.el.dom.value = (v === null || v === undefined ? '' : v); + return this.rendered ? (this.el.dom.value = (Ext.isEmpty(v) ? '' : v)) : ''; }, setValue : function(v){ this.value = v; if(this.rendered){ - this.el.dom.value = (v === null || v === undefined ? '' : v); + this.el.dom.value = (Ext.isEmpty(v) ? '' : v); this.validate(); } + return this; }, - adjustSize : function(w, h){ - var s = Ext.form.Field.superclass.adjustSize.call(this, w, h); - s.width = this.adjustWidth(this.el.dom.tagName, s.width); - return s; - }, - - adjustWidth : function(tag, w){ - tag = tag.toLowerCase(); - if(typeof w == 'number' && !Ext.isSafari){ - if(Ext.isIE && (tag == 'input' || tag == 'textarea')){ - if(tag == 'input' && !Ext.isStrict){ - return this.inEditor ? w : w - 3; - } - if(tag == 'input' && Ext.isStrict){ - return w - (Ext.isIE6 ? 4 : 1); - } - if(tag == 'textarea' && Ext.isStrict){ - return w-2; - } - }else if(Ext.isOpera && Ext.isStrict){ - if(tag == 'input'){ - return w + 2; - } - if(tag == 'textarea'){ - return w-2; - } - } - } - return w; + + append : function(v){ + this.setValue([this.getValue(), v].join('')); } @@ -26259,79 +40346,93 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { }); + Ext.form.MessageTargets = { 'qtip' : { - mark: function(f){ - this.el.dom.qtip = msg; - this.el.dom.qclass = 'x-form-invalid-tip'; - if(Ext.QuickTips){ Ext.QuickTips.enable(); + mark: function(field, msg){ + field.el.addClass(field.invalidClass); + field.el.dom.qtip = msg; + field.el.dom.qclass = 'x-form-invalid-tip'; + if(Ext.QuickTips){ + Ext.QuickTips.enable(); } }, - clear: function(f){ - this.el.dom.qtip = ''; + clear: function(field){ + field.el.removeClass(field.invalidClass); + field.el.dom.qtip = ''; } }, 'title' : { - mark: function(f){ - this.el.dom.title = msg; + mark: function(field, msg){ + field.el.addClass(field.invalidClass); + field.el.dom.title = msg; }, - clear: function(f){ - this.el.dom.title = ''; + clear: function(field){ + field.el.dom.title = ''; } }, 'under' : { - mark: function(f){ - if(!this.errorEl){ - var elp = this.getErrorCt(); - if(!elp){ this.el.dom.title = msg; + mark: function(field, msg){ + field.el.addClass(field.invalidClass); + if(!field.errorEl){ + var elp = field.getErrorCt(); + if(!elp){ + field.el.dom.title = msg; return; } - this.errorEl = elp.createChild({cls:'x-form-invalid-msg'}); - this.errorEl.setWidth(elp.getWidth(true)-20); + field.errorEl = elp.createChild({cls:'x-form-invalid-msg'}); + field.on('resize', field.alignErrorEl, field); + field.on('destroy', function(){ + Ext.destroy(this.errorEl); + }, field); } - this.errorEl.update(msg); - Ext.form.Field.msgFx[this.msgFx].show(this.errorEl, this); + field.alignErrorEl(); + field.errorEl.update(msg); + Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field); }, - clear: function(f){ - if(this.errorEl){ - Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl, this); + clear: function(field){ + field.el.removeClass(field.invalidClass); + if(field.errorEl){ + Ext.form.Field.msgFx[field.msgFx].hide(field.errorEl, field); }else{ - this.el.dom.title = ''; + field.el.dom.title = ''; } } }, 'side' : { - mark: function(f){ - if(!this.errorIcon){ - var elp = this.getErrorCt(); - if(!elp){ this.el.dom.title = msg; + mark: function(field, msg){ + field.el.addClass(field.invalidClass); + if(!field.errorIcon){ + var elp = field.getErrorCt(); + + if(!elp){ + field.el.dom.title = msg; return; } - this.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); + field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); + if (field.ownerCt) { + field.ownerCt.on('afterlayout', field.alignErrorIcon, field); + field.ownerCt.on('expand', field.alignErrorIcon, field); + } + field.on('resize', field.alignErrorIcon, field); + field.on('destroy', function(){ + Ext.destroy(this.errorIcon); + }, field); } - this.alignErrorIcon(); - this.errorIcon.dom.qtip = msg; - this.errorIcon.dom.qclass = 'x-form-invalid-tip'; - this.errorIcon.show(); - this.on('resize', this.alignErrorIcon, this); + field.alignErrorIcon(); + field.errorIcon.dom.qtip = msg; + field.errorIcon.dom.qclass = 'x-form-invalid-tip'; + field.errorIcon.show(); }, - clear: function(f){ - if(this.errorIcon){ - this.errorIcon.dom.qtip = ''; - this.errorIcon.hide(); - this.un('resize', this.alignErrorIcon, this); + clear: function(field){ + field.el.removeClass(field.invalidClass); + if(field.errorIcon){ + field.errorIcon.dom.qtip = ''; + field.errorIcon.hide(); }else{ - this.el.dom.title = ''; + field.el.dom.title = ''; } } - }, - 'around' : { - mark: function(f){ - - }, - clear: function(f){ - - } } }; @@ -26371,10 +40472,10 @@ Ext.form.Field.msgFx = { }; Ext.reg('field', Ext.form.Field); - Ext.form.TextField = Ext.extend(Ext.form.Field, { + grow : false, growMin : 30, @@ -26393,19 +40494,19 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { maxLength : Number.MAX_VALUE, - minLengthText : "The minimum length for this field is {0}", + minLengthText : 'The minimum length for this field is {0}', - maxLengthText : "The maximum length for this field is {0}", + maxLengthText : 'The maximum length for this field is {0}', selectOnFocus : false, - blankText : "This field is required", + blankText : 'This field is required', validator : null, regex : null, - regexText : "", + regexText : '', emptyText : null, @@ -26428,41 +40529,43 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { ); }, - initEvents : function(){ + + initEvents : function(){ Ext.form.TextField.superclass.initEvents.call(this); if(this.validationEvent == 'keyup'){ this.validationTask = new Ext.util.DelayedTask(this.validate, this); - this.el.on('keyup', this.filterValidation, this); + this.mon(this.el, 'keyup', this.filterValidation, this); } - else if(this.validationEvent !== false){ - this.el.on(this.validationEvent, this.validate, this, {buffer: this.validationDelay}); + else if(this.validationEvent !== false && this.validationEvent != 'blur'){ + this.mon(this.el, this.validationEvent, this.validate, this, {buffer: this.validationDelay}); } - if(this.selectOnFocus || this.emptyText){ - this.on("focus", this.preFocus, this); - this.el.on('mousedown', function(){ - if(!this.hasFocus){ - this.el.on('mouseup', function(e){ - e.preventDefault(); - }, this, {single:true}); - } - }, this); + if(this.selectOnFocus || this.emptyText){ + this.mon(this.el, 'mousedown', this.onMouseDown, this); + if(this.emptyText){ - this.on('blur', this.postBlur, this); this.applyEmptyText(); } } if(this.maskRe || (this.vtype && this.disableKeyFilter !== true && (this.maskRe = Ext.form.VTypes[this.vtype+'Mask']))){ - this.el.on("keypress", this.filterKeys, this); + this.mon(this.el, 'keypress', this.filterKeys, this); } if(this.grow){ - this.el.on("keyup", this.onKeyUpBuffered, this, {buffer:50}); - this.el.on("click", this.autoSize, this); + this.mon(this.el, 'keyup', this.onKeyUpBuffered, this, {buffer: 50}); + this.mon(this.el, 'click', this.autoSize, this); } - if(this.enableKeyEvents){ - this.el.on("keyup", this.onKeyUp, this); - this.el.on("keydown", this.onKeyDown, this); - this.el.on("keypress", this.onKeyPress, this); + this.mon(this.el, { + scope: this, + keyup: this.onKeyUp, + keydown: this.onKeyDown, + keypress: this.onKeyPress + }); + } + }, + + onMouseDown: function(e){ + if(!this.hasFocus){ + this.mon(this.el, 'mouseup', Ext.emptyFn, this, { single: true, preventDefault: true }); } }, @@ -26482,22 +40585,47 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { this.validationTask.delay(this.validationDelay); } }, - - onKeyUpBuffered : function(e){ - if(!e.isNavKeyPress()){ - this.autoSize(); + + + onDisable: function(){ + Ext.form.TextField.superclass.onDisable.call(this); + if(Ext.isIE){ + this.el.dom.unselectable = 'on'; + } + }, + + + onEnable: function(){ + Ext.form.TextField.superclass.onEnable.call(this); + if(Ext.isIE){ + this.el.dom.unselectable = ''; } }, - onKeyUp : function(e){ + + onKeyUpBuffered : function(e){ + if(this.doAutoSize(e)){ + this.autoSize(); + } + }, + + + doAutoSize : function(e){ + return !e.isNavKeyPress(); + }, + + + onKeyUp : function(e){ this.fireEvent('keyup', this, e); }, - onKeyDown : function(e){ + + onKeyDown : function(e){ this.fireEvent('keydown', this, e); }, - onKeyPress : function(e){ + + onKeyPress : function(e){ this.fireEvent('keypress', this, e); }, @@ -26508,29 +40636,35 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { }, applyEmptyText : function(){ - if(this.rendered && this.emptyText && this.getRawValue().length < 1){ + if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){ this.setRawValue(this.emptyText); this.el.addClass(this.emptyClass); } }, - preFocus : function(){ + + preFocus : function(){ + var el = this.el, + isEmpty; if(this.emptyText){ - if(this.el.dom.value == this.emptyText){ + if(el.dom.value == this.emptyText){ this.setRawValue(''); + isEmpty = true; } - this.el.removeClass(this.emptyClass); + el.removeClass(this.emptyClass); } - if(this.selectOnFocus){ - this.el.dom.select(); + if(this.selectOnFocus || isEmpty){ + el.dom.select(); } }, - postBlur : function(){ + + postBlur : function(){ this.applyEmptyText(); }, - filterKeys : function(e){ + + filterKeys : function(e){ if(e.ctrlKey){ return; } @@ -26538,7 +40672,7 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { if(Ext.isGecko && (e.isNavKeyPress() || k == e.BACKSPACE || (k == e.DELETE && e.button == -1))){ return; } - var c = e.getCharCode(), cc = String.fromCharCode(c); + var cc = String.fromCharCode(e.getCharCode()); if(!Ext.isGecko && e.isSpecialKey() && !cc){ return; } @@ -26548,56 +40682,67 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { }, setValue : function(v){ - if(this.emptyText && this.el && v !== undefined && v !== null && v !== ''){ + if(this.emptyText && this.el && !Ext.isEmpty(v)){ this.el.removeClass(this.emptyClass); } Ext.form.TextField.superclass.setValue.apply(this, arguments); this.applyEmptyText(); this.autoSize(); + return this; }, - validateValue : function(value){ - if(value.length < 1 || value === this.emptyText){ if(this.allowBlank){ - this.clearInvalid(); - return true; - }else{ - this.markInvalid(this.blankText); - return false; - } + getErrors: function(value) { + var errors = Ext.form.TextField.superclass.getErrors.apply(this, arguments); + + value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); + + if (Ext.isFunction(this.validator)) { + var msg = this.validator(value); + if (msg !== true) { + errors.push(msg); + } } - if(value.length < this.minLength){ - this.markInvalid(String.format(this.minLengthText, this.minLength)); - return false; + + if (value.length < 1 || value === this.emptyText) { + if (this.allowBlank) { + + return errors; + } else { + errors.push(this.blankText); + } } - if(value.length > this.maxLength){ - this.markInvalid(String.format(this.maxLengthText, this.maxLength)); - return false; + + if (!this.allowBlank && (value.length < 1 || value === this.emptyText)) { + errors.push(this.blankText); } - if(this.vtype){ + + if (value.length < this.minLength) { + errors.push(String.format(this.minLengthText, this.minLength)); + } + + if (value.length > this.maxLength) { + errors.push(String.format(this.maxLengthText, this.maxLength)); + } + + if (this.vtype) { var vt = Ext.form.VTypes; if(!vt[this.vtype](value, this)){ - this.markInvalid(this.vtypeText || vt[this.vtype +'Text']); - return false; + errors.push(this.vtypeText || vt[this.vtype +'Text']); } } - if(typeof this.validator == "function"){ - var msg = this.validator(value); - if(msg !== true){ - this.markInvalid(msg); - return false; - } + + if (this.regex && !this.regex.test(value)) { + errors.push(this.regexText); } - if(this.regex && !this.regex.test(value)){ - this.markInvalid(this.regexText); - return false; - } - return true; + + return errors; }, selectText : function(start, end){ var v = this.getRawValue(); + var doFocus = false; if(v.length > 0){ start = start === undefined ? 0 : start; end = end === undefined ? v.length : end; @@ -26606,10 +40751,16 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { d.setSelectionRange(start, end); }else if(d.createTextRange){ var range = d.createTextRange(); - range.moveStart("character", start); - range.moveEnd("character", end-v.length); + range.moveStart('character', start); + range.moveEnd('character', end-v.length); range.select(); } + doFocus = Ext.isGecko || Ext.isOpera; + }else{ + doFocus = true; + } + if(doFocus){ + this.focus(); } }, @@ -26626,163 +40777,214 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { var d = document.createElement('div'); d.appendChild(document.createTextNode(v)); v = d.innerHTML; + Ext.removeNode(d); d = null; - v += " "; + v += ' '; var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + 10, this.growMin)); this.el.setWidth(w); - this.fireEvent("autosize", this, w); - } + this.fireEvent('autosize', this, w); + }, + + onDestroy: function(){ + if(this.validationTask){ + this.validationTask.cancel(); + this.validationTask = null; + } + Ext.form.TextField.superclass.onDestroy.call(this); + } }); Ext.reg('textfield', Ext.form.TextField); - Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { + defaultAutoCreate : {tag: "input", type: "text", size: "16", autocomplete: "off"}, hideTrigger:false, - + + editable: true, + + readOnly: false, + + wrapFocusClass: 'x-trigger-wrap-focus', autoSize: Ext.emptyFn, - monitorTab : true, - deferHeight : true, - mimicing : false, + + monitorTab : true, + + deferHeight : true, + + mimicing : false, - onResize : function(w, h){ + actionMode: 'wrap', + + defaultTriggerWidth: 17, + + + onResize : function(w, h){ Ext.form.TriggerField.superclass.onResize.call(this, w, h); - if(typeof w == 'number'){ - this.el.setWidth(this.adjustWidth('input', w - this.trigger.getWidth())); + var tw = this.getTriggerWidth(); + if(Ext.isNumber(w)){ + this.el.setWidth(w - tw); } - this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); + this.wrap.setWidth(this.el.getWidth() + tw); }, - adjustSize : Ext.BoxComponent.prototype.adjustSize, - - getResizeEl : function(){ - return this.wrap; + getTriggerWidth: function(){ + var tw = this.trigger.getWidth(); + if(!this.hideTrigger && !this.readOnly && tw === 0){ + tw = this.defaultTriggerWidth; + } + return tw; }, - getPositionEl : function(){ - return this.wrap; - }, - - alignErrorIcon : function(){ + + alignErrorIcon : function(){ if(this.wrap){ this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]); } }, - onRender : function(ct, position){ + + onRender : function(ct, position){ + this.doc = Ext.isIE ? Ext.getBody() : Ext.getDoc(); Ext.form.TriggerField.superclass.onRender.call(this, ct, position); - this.wrap = this.el.wrap({cls: "x-form-field-wrap"}); + + this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-wrap'}); this.trigger = this.wrap.createChild(this.triggerConfig || - {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}); - if(this.hideTrigger){ - this.trigger.setDisplayed(false); - } + {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.triggerClass}); this.initTrigger(); if(!this.width){ this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); } + this.resizeEl = this.positionEl = this.wrap; + }, + + getWidth: function() { + return(this.el.getWidth() + this.trigger.getWidth()); + }, + + updateEditState: function(){ + if(this.rendered){ + if (this.readOnly) { + this.el.dom.readOnly = true; + this.el.addClass('x-trigger-noedit'); + this.mun(this.el, 'click', this.onTriggerClick, this); + this.trigger.setDisplayed(false); + } else { + if (!this.editable) { + this.el.dom.readOnly = true; + this.el.addClass('x-trigger-noedit'); + this.mon(this.el, 'click', this.onTriggerClick, this); + } else { + this.el.dom.readOnly = false; + this.el.removeClass('x-trigger-noedit'); + this.mun(this.el, 'click', this.onTriggerClick, this); + } + this.trigger.setDisplayed(!this.hideTrigger); + } + this.onResize(this.width || this.wrap.getWidth()); + } + }, + + + setHideTrigger: function(hideTrigger){ + if(hideTrigger != this.hideTrigger){ + this.hideTrigger = hideTrigger; + this.updateEditState(); + } + }, + + + setEditable: function(editable){ + if(editable != this.editable){ + this.editable = editable; + this.updateEditState(); + } + }, + + + setReadOnly: function(readOnly){ + if(readOnly != this.readOnly){ + this.readOnly = readOnly; + this.updateEditState(); + } }, afterRender : function(){ Ext.form.TriggerField.superclass.afterRender.call(this); - var y; - if(Ext.isIE && this.el.getY() != (y = this.trigger.getY())){ - this.el.position(); - this.el.setY(y); - } + this.updateEditState(); }, - initTrigger : function(){ - this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true}); + + initTrigger : function(){ + this.mon(this.trigger, 'click', this.onTriggerClick, this, {preventDefault:true}); this.trigger.addClassOnOver('x-form-trigger-over'); this.trigger.addClassOnClick('x-form-trigger-click'); }, - onDestroy : function(){ - if(this.trigger){ - this.trigger.removeAllListeners(); - this.trigger.remove(); - } - if(this.wrap){ - this.wrap.remove(); + + onDestroy : function(){ + Ext.destroy(this.trigger, this.wrap); + if (this.mimicing){ + this.doc.un('mousedown', this.mimicBlur, this); } + delete this.doc; Ext.form.TriggerField.superclass.onDestroy.call(this); }, - onFocus : function(){ + + onFocus : function(){ Ext.form.TriggerField.superclass.onFocus.call(this); if(!this.mimicing){ - this.wrap.addClass('x-trigger-wrap-focus'); + this.wrap.addClass(this.wrapFocusClass); this.mimicing = true; - Ext.get(Ext.isIE ? document.body : document).on("mousedown", this.mimicBlur, this, {delay: 10}); + this.doc.on('mousedown', this.mimicBlur, this, {delay: 10}); if(this.monitorTab){ - this.el.on("keydown", this.checkTab, this); + this.on('specialkey', this.checkTab, this); } } }, - checkTab : function(e){ + + checkTab : function(me, e){ if(e.getKey() == e.TAB){ this.triggerBlur(); } }, - onBlur : function(){ - }, + + onBlur : Ext.emptyFn, - mimicBlur : function(e){ - if(!this.wrap.contains(e.target) && this.validateBlur(e)){ + + mimicBlur : function(e){ + if(!this.isDestroyed && !this.wrap.contains(e.target) && this.validateBlur(e)){ this.triggerBlur(); } }, - triggerBlur : function(){ + + triggerBlur : function(){ this.mimicing = false; - Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this); - if(this.monitorTab){ - this.el.un("keydown", this.checkTab, this); + this.doc.un('mousedown', this.mimicBlur, this); + if(this.monitorTab && this.el){ + this.un('specialkey', this.checkTab, this); } - this.beforeBlur(); - this.wrap.removeClass('x-trigger-wrap-focus'); Ext.form.TriggerField.superclass.onBlur.call(this); + if(this.wrap){ + this.wrap.removeClass(this.wrapFocusClass); + } }, - beforeBlur : Ext.emptyFn, + beforeBlur : Ext.emptyFn, - validateBlur : function(e){ + + + validateBlur : function(e){ return true; }, - onDisable : function(){ - Ext.form.TriggerField.superclass.onDisable.call(this); - if(this.wrap){ - this.wrap.addClass(this.disabledClass); - this.el.removeClass(this.disabledClass); - } - }, - - onEnable : function(){ - Ext.form.TriggerField.superclass.onEnable.call(this); - if(this.wrap){ - this.wrap.removeClass(this.disabledClass); - } - }, - - onShow : function(){ - if(this.wrap){ - this.wrap.dom.style.display = ''; - this.wrap.dom.style.visibility = 'visible'; - } - }, - - onHide : function(){ - this.wrap.dom.style.display = 'none'; - }, - onTriggerClick : Ext.emptyFn @@ -26791,49 +40993,88 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { }); + Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, { + + + + initComponent : function(){ Ext.form.TwinTriggerField.superclass.initComponent.call(this); this.triggerConfig = { tag:'span', cls:'x-form-twin-triggers', cn:[ - {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.trigger1Class}, - {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.trigger2Class} + {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger1Class}, + {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger2Class} ]}; }, getTrigger : function(index){ return this.triggers[index]; }, + + afterRender: function(){ + Ext.form.TwinTriggerField.superclass.afterRender.call(this); + var triggers = this.triggers, + i = 0, + len = triggers.length; + + for(; i < len; ++i){ + if(this['hideTrigger' + (i + 1)]){ + triggers[i].hide(); + } + + } + }, initTrigger : function(){ - var ts = this.trigger.select('.x-form-trigger', true); - this.wrap.setStyle('overflow', 'hidden'); - var triggerField = this; + var ts = this.trigger.select('.x-form-trigger', true), + triggerField = this; + ts.each(function(t, all, index){ + var triggerIndex = 'Trigger'+(index+1); t.hide = function(){ var w = triggerField.wrap.getWidth(); this.dom.style.display = 'none'; triggerField.el.setWidth(w-triggerField.trigger.getWidth()); + triggerField['hidden' + triggerIndex] = true; }; t.show = function(){ var w = triggerField.wrap.getWidth(); this.dom.style.display = ''; triggerField.el.setWidth(w-triggerField.trigger.getWidth()); + triggerField['hidden' + triggerIndex] = false; }; - var triggerIndex = 'Trigger'+(index+1); - - if(this['hide'+triggerIndex]){ - t.dom.style.display = 'none'; - } - t.on("click", this['on'+triggerIndex+'Click'], this, {preventDefault:true}); + this.mon(t, 'click', this['on'+triggerIndex+'Click'], this, {preventDefault:true}); t.addClassOnOver('x-form-trigger-over'); t.addClassOnClick('x-form-trigger-click'); }, this); this.triggers = ts.elements; }, + getTriggerWidth: function(){ + var tw = 0; + Ext.each(this.triggers, function(t, index){ + var triggerIndex = 'Trigger' + (index + 1), + w = t.getWidth(); + if(w === 0 && !this['hidden' + triggerIndex]){ + tw += this.defaultTriggerWidth; + }else{ + tw += w; + } + }, this); + return tw; + }, + + + onDestroy : function() { + Ext.destroy(this.triggers); + Ext.form.TwinTriggerField.superclass.onDestroy.call(this); + }, + + onTrigger1Click : Ext.emptyFn, + onTrigger2Click : Ext.emptyFn }); Ext.reg('trigger', Ext.form.TriggerField); @@ -26844,7 +41085,6 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, { growMax: 1000, growAppend : ' \n ', - growPad : 0, enterIsSpecial : false, @@ -26852,7 +41092,8 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, { preventScrollbars: false, - onRender : function(ct, position){ + + onRender : function(ct, position){ if(!this.el){ this.defaultAutoCreate = { tag: "textarea", @@ -26873,9 +41114,7 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, { }, onDestroy : function(){ - if(this.textSizeEl){ - Ext.removeNode(this.textSizeEl); - } + Ext.removeNode(this.textSizeEl); Ext.form.TextArea.superclass.onDestroy.call(this); }, @@ -26884,37 +41123,40 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, { this.fireEvent("specialkey", this, e); } }, - - onKeyUp : function(e){ - if(!e.isNavKeyPress() || e.getKey() == e.ENTER){ - this.autoSize(); + + + doAutoSize : function(e){ + return !e.isNavKeyPress() || e.getKey() == e.ENTER; + }, + + + filterValidation: function(e) { + if(!e.isNavKeyPress() || (!this.enterIsSpecial && e.keyCode == e.ENTER)){ + this.validationTask.delay(this.validationDelay); } - Ext.form.TextArea.superclass.onKeyUp.call(this, e); }, - autoSize : function(){ + autoSize: function(){ if(!this.grow || !this.textSizeEl){ return; } - var el = this.el; - var v = el.dom.value; - var ts = this.textSizeEl; - ts.innerHTML = ''; - ts.appendChild(document.createTextNode(v)); - v = ts.innerHTML; - + var el = this.el, + v = Ext.util.Format.htmlEncode(el.dom.value), + ts = this.textSizeEl, + h; + Ext.fly(ts).setWidth(this.el.getWidth()); if(v.length < 1){ v = "  "; }else{ - if(Ext.isIE){ - v = v.replace(/\n/g, '

     

    '); - } v += this.growAppend; + if(Ext.isIE){ + v = v.replace(/\n/g, ' 
    '); + } } ts.innerHTML = v; - var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin)+this.growPad); + h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin)); if(h != this.lastHeight){ this.lastHeight = h; this.el.setHeight(h); @@ -26923,114 +41165,146 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, { } }); Ext.reg('textarea', Ext.form.TextArea); - Ext.form.NumberField = Ext.extend(Ext.form.TextField, { + + fieldClass: "x-form-field x-form-num-field", + allowDecimals : true, + decimalSeparator : ".", + decimalPrecision : 2, + allowNegative : true, + minValue : Number.NEGATIVE_INFINITY, + maxValue : Number.MAX_VALUE, + minText : "The minimum value for this field is {0}", + maxText : "The maximum value for this field is {0}", + nanText : "{0} is not a valid number", + baseChars : "0123456789", + + + autoStripChars: false, - initEvents : function(){ - Ext.form.NumberField.superclass.initEvents.call(this); - var allowed = this.baseChars+''; - if(this.allowDecimals){ + + initEvents : function() { + var allowed = this.baseChars + ''; + if (this.allowDecimals) { allowed += this.decimalSeparator; } - if(this.allowNegative){ - allowed += "-"; + if (this.allowNegative) { + allowed += '-'; } - this.stripCharsRe = new RegExp('[^'+allowed+']', 'gi'); - var keyPress = function(e){ - var k = e.getKey(); - if(!Ext.isIE && (e.isSpecialKey() || k == e.BACKSPACE || k == e.DELETE)){ - return; - } - var c = e.getCharCode(); - if(allowed.indexOf(String.fromCharCode(c)) === -1){ - e.stopEvent(); - } - }; - this.el.on("keypress", keyPress, this); + allowed = Ext.escapeRe(allowed); + this.maskRe = new RegExp('[' + allowed + ']'); + if (this.autoStripChars) { + this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi'); + } + + Ext.form.NumberField.superclass.initEvents.call(this); }, - - validateValue : function(value){ - if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){ - return false; - } - if(value.length < 1){ return true; + + + getErrors: function(value) { + var errors = Ext.form.NumberField.superclass.getErrors.apply(this, arguments); + + value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); + + if (value.length < 1) { + return errors; } + value = String(value).replace(this.decimalSeparator, "."); + if(isNaN(value)){ - this.markInvalid(String.format(this.nanText, value)); - return false; + errors.push(String.format(this.nanText, value)); } + var num = this.parseValue(value); - if(num < this.minValue){ - this.markInvalid(String.format(this.minText, this.minValue)); - return false; + + if (num < this.minValue) { + errors.push(String.format(this.minText, this.minValue)); } - if(num > this.maxValue){ - this.markInvalid(String.format(this.maxText, this.maxValue)); - return false; + + if (num > this.maxValue) { + errors.push(String.format(this.maxText, this.maxValue)); } - return true; + + return errors; }, - getValue : function(){ + getValue : function() { return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this))); }, - setValue : function(v){ - v = typeof v == 'number' ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); + setValue : function(v) { + v = Ext.isNumber(v) ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); + v = this.fixPrecision(v); v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator); - Ext.form.NumberField.superclass.setValue.call(this, v); + return Ext.form.NumberField.superclass.setValue.call(this, v); + }, + + + setMinValue : function(value) { + this.minValue = Ext.num(value, Number.NEGATIVE_INFINITY); + }, + + + setMaxValue : function(value) { + this.maxValue = Ext.num(value, Number.MAX_VALUE); }, - parseValue : function(value){ + + parseValue : function(value) { value = parseFloat(String(value).replace(this.decimalSeparator, ".")); return isNaN(value) ? '' : value; }, - fixPrecision : function(value){ + + fixPrecision : function(value) { var nan = isNaN(value); - if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){ - return nan ? '' : value; + + if (!this.allowDecimals || this.decimalPrecision == -1 || nan || !value) { + return nan ? '' : value; } + return parseFloat(parseFloat(value).toFixed(this.decimalPrecision)); }, - beforeBlur : function(){ + beforeBlur : function() { var v = this.parseValue(this.getRawValue()); - if(v){ - this.setValue(this.fixPrecision(v)); + + if (!Ext.isEmpty(v)) { + this.setValue(v); } } }); + Ext.reg('numberfield', Ext.form.NumberField); Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { format : "m/d/Y", - altFormats : "m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d", + altFormats : "m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j", disabledDaysText : "Disabled", @@ -27047,33 +41321,82 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { showToday : true, + startDay : 0, + + + - defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"}, + + defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"}, + + + + initTime: '12', + + initTimeFormat: 'H', + + + safeParse : function(value, format) { + if (Date.formatContainsHourInfo(format)) { + + return Date.parseDate(value, format); + } else { + + var parsedDate = Date.parseDate(value + ' ' + this.initTime, format + ' ' + this.initTimeFormat); + + if (parsedDate) { + return parsedDate.clearTime(); + } + } + }, initComponent : function(){ Ext.form.DateField.superclass.initComponent.call(this); - if(typeof this.minValue == "string"){ + + this.addEvents( + + 'select' + ); + + if(Ext.isString(this.minValue)){ this.minValue = this.parseDate(this.minValue); } - if(typeof this.maxValue == "string"){ + if(Ext.isString(this.maxValue)){ this.maxValue = this.parseDate(this.maxValue); } - this.ddMatch = null; + this.disabledDatesRE = null; this.initDisabledDays(); }, - initDisabledDays : function(){ + initEvents: function() { + Ext.form.DateField.superclass.initEvents.call(this); + this.keyNav = new Ext.KeyNav(this.el, { + "down": function(e) { + this.onTriggerClick(); + }, + scope: this, + forceKeyDown: true + }); + }, + + + + initDisabledDays : function(){ if(this.disabledDates){ - var dd = this.disabledDates; - var re = "(?:"; - for(var i = 0; i < dd.length; i++){ - re += dd[i]; - if(i != dd.length-1) re += "|"; - } - this.disabledDatesRE = new RegExp(re + ")"); + var dd = this.disabledDates, + len = dd.length - 1, + re = "(?:"; + + Ext.each(dd, function(d, i){ + re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i]; + if(i != len){ + re += '|'; + } + }, this); + this.disabledDatesRE = new RegExp(re + ')'); } }, @@ -27096,7 +41419,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { setMinValue : function(dt){ - this.minValue = (typeof dt == "string" ? this.parseDate(dt) : dt); + this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt); if(this.menu){ this.menu.picker.setMinDate(this.minValue); } @@ -27104,52 +41427,60 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { setMaxValue : function(dt){ - this.maxValue = (typeof dt == "string" ? this.parseDate(dt) : dt); + this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt); if(this.menu){ this.menu.picker.setMaxDate(this.maxValue); } }, - validateValue : function(value){ - value = this.formatDate(value); - if(!Ext.form.DateField.superclass.validateValue.call(this, value)){ - return false; - } - if(value.length < 1){ return true; + + getErrors: function(value) { + var errors = Ext.form.DateField.superclass.getErrors.apply(this, arguments); + + value = this.formatDate(value || this.processValue(this.getRawValue())); + + if (value.length < 1) { + return errors; } + var svalue = value; value = this.parseDate(value); - if(!value){ - this.markInvalid(String.format(this.invalidText, svalue, this.format)); - return false; + if (!value) { + errors.push(String.format(this.invalidText, svalue, this.format)); + return errors; } + var time = value.getTime(); - if(this.minValue && time < this.minValue.getTime()){ - this.markInvalid(String.format(this.minText, this.formatDate(this.minValue))); - return false; + if (this.minValue && time < this.minValue.clearTime().getTime()) { + errors.push(String.format(this.minText, this.formatDate(this.minValue))); } - if(this.maxValue && time > this.maxValue.getTime()){ - this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue))); - return false; + + if (this.maxValue && time > this.maxValue.clearTime().getTime()) { + errors.push(String.format(this.maxText, this.formatDate(this.maxValue))); } - if(this.disabledDays){ + + if (this.disabledDays) { var day = value.getDay(); + for(var i = 0; i < this.disabledDays.length; i++) { - if(day === this.disabledDays[i]){ - this.markInvalid(this.disabledDaysText); - return false; - } + if (day === this.disabledDays[i]) { + errors.push(this.disabledDaysText); + break; + } } } + var fvalue = this.formatDate(value); - if(this.ddMatch && this.ddMatch.test(fvalue)){ - this.markInvalid(String.format(this.disabledDatesText, fvalue)); - return false; + if (this.disabledDatesRE && this.disabledDatesRE.test(fvalue)) { + errors.push(String.format(this.disabledDatesText, fvalue)); } - return true; + + return errors; }, - validateBlur : function(){ + + + validateBlur : function(){ return !this.menu || !this.menu.isVisible(); }, @@ -27160,82 +41491,92 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { setValue : function(date){ - Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date))); + return Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date))); }, - parseDate : function(value){ + + parseDate : function(value) { if(!value || Ext.isDate(value)){ return value; } - var v = Date.parseDate(value, this.format); - if(!v && this.altFormats){ - if(!this.altFormatsArray){ - this.altFormatsArray = this.altFormats.split("|"); - } - for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){ - v = Date.parseDate(value, this.altFormatsArray[i]); + + var v = this.safeParse(value, this.format), + af = this.altFormats, + afa = this.altFormatsArray; + + if (!v && af) { + afa = afa || af.split("|"); + + for (var i = 0, len = afa.length; i < len && !v; i++) { + v = this.safeParse(value, afa[i]); } } return v; }, - onDestroy : function(){ - if(this.menu) { - this.menu.destroy(); - } - if(this.wrap){ - this.wrap.remove(); - } + + onDestroy : function(){ + Ext.destroy(this.menu, this.keyNav); Ext.form.DateField.superclass.onDestroy.call(this); }, - formatDate : function(date){ + + formatDate : function(date){ return Ext.isDate(date) ? date.dateFormat(this.format) : date; }, - menuListeners : { - select: function(m, d){ - this.setValue(d); - }, - show : function(){ this.onFocus(); - }, - hide : function(){ - this.focus.defer(10, this); - var ml = this.menuListeners; - this.menu.un("select", ml.select, this); - this.menu.un("show", ml.show, this); - this.menu.un("hide", ml.hide, this); - } - }, - - onTriggerClick : function(){ + + + onTriggerClick : function(){ if(this.disabled){ return; } if(this.menu == null){ - this.menu = new Ext.menu.DateMenu(); + this.menu = new Ext.menu.DateMenu({ + hideOnClick: false, + focusOnSelect: false + }); } + this.onFocus(); Ext.apply(this.menu.picker, { minDate : this.minValue, maxDate : this.maxValue, - disabledDatesRE : this.ddMatch, + disabledDatesRE : this.disabledDatesRE, disabledDatesText : this.disabledDatesText, disabledDays : this.disabledDays, disabledDaysText : this.disabledDaysText, format : this.format, showToday : this.showToday, + startDay: this.startDay, minText : String.format(this.minText, this.formatDate(this.minValue)), maxText : String.format(this.maxText, this.formatDate(this.maxValue)) }); - this.menu.on(Ext.apply({}, this.menuListeners, { - scope:this - })); this.menu.picker.setValue(this.getValue() || new Date()); this.menu.show(this.el, "tl-bl?"); + this.menuEvents('on'); }, - beforeBlur : function(){ + + menuEvents: function(method){ + this.menu[method]('select', this.onSelect, this); + this.menu[method]('hide', this.onMenuHide, this); + this.menu[method]('show', this.onFocus, this); + }, + + onSelect: function(m, d){ + this.setValue(d); + this.fireEvent('select', this, d); + this.menu.hide(); + }, + + onMenuHide: function(){ + this.focus(false, 60); + this.menuEvents('un'); + }, + + + beforeBlur : function(){ var v = this.parseDate(this.getRawValue()); if(v){ this.setValue(v); @@ -27249,6 +41590,66 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { }); Ext.reg('datefield', Ext.form.DateField); +Ext.form.DisplayField = Ext.extend(Ext.form.Field, { + validationEvent : false, + validateOnBlur : false, + defaultAutoCreate : {tag: "div"}, + + fieldClass : "x-form-display-field", + + htmlEncode: false, + + + initEvents : Ext.emptyFn, + + isValid : function(){ + return true; + }, + + validate : function(){ + return true; + }, + + getRawValue : function(){ + var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, ''); + if(v === this.emptyText){ + v = ''; + } + if(this.htmlEncode){ + v = Ext.util.Format.htmlDecode(v); + } + return v; + }, + + getValue : function(){ + return this.getRawValue(); + }, + + getName: function() { + return this.name; + }, + + setRawValue : function(v){ + if(this.htmlEncode){ + v = Ext.util.Format.htmlEncode(v); + } + return this.rendered ? (this.el.dom.innerHTML = (Ext.isEmpty(v) ? '' : v)) : (this.value = v); + }, + + setValue : function(v){ + this.setRawValue(v); + return this; + } + + + + + + +}); + +Ext.reg('displayfield', Ext.form.DisplayField); + Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { @@ -27256,56 +41657,60 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { - defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"}, + + defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"}, - listClass: '', - selectedClass: 'x-combo-selected', + listClass : '', + + selectedClass : 'x-combo-selected', + + listEmptyText: '', triggerClass : 'x-form-arrow-trigger', - shadow:'sides', + shadow : 'sides', - listAlign: 'tl-bl?', + listAlign : 'tl-bl?', - maxHeight: 300, + maxHeight : 300, - minHeight: 90, + minHeight : 90, - triggerAction: 'query', + triggerAction : 'query', minChars : 4, - typeAhead: false, + autoSelect : true, - queryDelay: 500, + typeAhead : false, - pageSize: 0, + queryDelay : 500, - selectOnFocus:false, + pageSize : 0, - queryParam: 'query', + selectOnFocus : false, - loadingText: 'Loading...', + queryParam : 'query', - resizable: false, + loadingText : 'Loading...', + + resizable : false, handleHeight : 8, - editable: true, - allQuery: '', mode: 'remote', minListWidth : 70, - forceSelection:false, + forceSelection : false, typeAheadDelay : 250, @@ -27313,13 +41718,23 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { lazyInit : true, - initComponent : function(){ + + clearFilterOnReset : true, + + + submitValue: undefined, + + + + + initComponent : function(){ Ext.form.ComboBox.superclass.initComponent.call(this); this.addEvents( 'expand', 'collapse', + 'beforeselect', @@ -27328,7 +41743,6 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { 'beforequery' ); if(this.transform){ - this.allowDomMove = false; var s = Ext.getDom(this.transform); if(!this.hiddenName){ this.hiddenName = s.name; @@ -27337,65 +41751,63 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { this.mode = 'local'; var d = [], opts = s.options; for(var i = 0, len = opts.length;i < len; i++){ - var o = opts[i]; - var value = (Ext.isIE ? o.getAttributeNode('value').specified : o.hasAttribute('value')) ? o.value : o.text; - if(o.selected) { + var o = opts[i], + value = (o.hasAttribute ? o.hasAttribute('value') : o.getAttributeNode('value').specified) ? o.value : o.text; + if(o.selected && Ext.isEmpty(this.value, true)) { this.value = value; } d.push([value, o.text]); } - this.store = new Ext.data.SimpleStore({ - 'id': 0, + this.store = new Ext.data.ArrayStore({ + idIndex: 0, fields: ['value', 'text'], - data : d + data : d, + autoDestroy: true }); this.valueField = 'value'; this.displayField = 'text'; } - s.name = Ext.id(); if(!this.lazyRender){ + s.name = Ext.id(); + if(!this.lazyRender){ this.target = true; this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate); - Ext.removeNode(s); this.render(this.el.parentNode); - }else{ - Ext.removeNode(s); } + this.render(this.el.parentNode, s); + } + Ext.removeNode(s); + } + + else if(this.store){ + this.store = Ext.StoreMgr.lookup(this.store); + if(this.store.autoCreated){ + this.displayField = this.valueField = 'field1'; + if(!this.store.expandData){ + this.displayField = 'field2'; + } + this.mode = 'local'; + } } - else if(Ext.isArray(this.store)){ - if (Ext.isArray(this.store[0])){ - this.store = new Ext.data.SimpleStore({ - fields: ['value','text'], - data: this.store - }); - this.valueField = 'value'; - }else{ - this.store = new Ext.data.SimpleStore({ - fields: ['text'], - data: this.store, - expandData: true - }); - this.valueField = 'text'; - } - this.displayField = 'text'; - this.mode = 'local'; - } this.selectedIndex = -1; if(this.mode == 'local'){ - if(this.initialConfig.queryDelay === undefined){ + if(!Ext.isDefined(this.initialConfig.queryDelay)){ this.queryDelay = 10; } - if(this.initialConfig.minChars === undefined){ + if(!Ext.isDefined(this.initialConfig.minChars)){ this.minChars = 0; } } }, - onRender : function(ct, position){ + + onRender : function(ct, position){ + if(this.hiddenName && !Ext.isDefined(this.submitValue)){ + this.submitValue = false; + } Ext.form.ComboBox.superclass.onRender.call(this, ct, position); if(this.hiddenName){ this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName, - id: (this.hiddenId||this.hiddenName)}, 'before', true); + id: (this.hiddenId || Ext.id())}, 'before', true); - this.el.dom.removeAttribute('name'); } if(Ext.isGecko){ this.el.dom.setAttribute('autocomplete', 'off'); @@ -27406,49 +41818,72 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { }else{ this.on('focus', this.initList, this, {single: true}); } - - if(!this.editable){ - this.editable = true; - this.setEditable(false); - } }, - initValue : function(){ + + initValue : function(){ Ext.form.ComboBox.superclass.initValue.call(this); if(this.hiddenField){ - this.hiddenField.value = - this.hiddenValue !== undefined ? this.hiddenValue : - this.value !== undefined ? this.value : ''; + this.hiddenField.value = + Ext.value(Ext.isDefined(this.hiddenValue) ? this.hiddenValue : this.value, ''); } }, - initList : function(){ + getParentZIndex : function(){ + var zindex; + if (this.ownerCt){ + this.findParentBy(function(ct){ + zindex = parseInt(ct.getPositionEl().getStyle('z-index'), 10); + return !!zindex; + }); + } + return zindex; + }, + + getZIndex : function(listParent){ + listParent = listParent || Ext.getDom(this.getListParent() || Ext.getBody()); + var zindex = parseInt(Ext.fly(listParent).getStyle('z-index'), 10); + if(!zindex){ + zindex = this.getParentZIndex(); + } + return (zindex || 12000) + 5; + }, + + + initList : function(){ if(!this.list){ - var cls = 'x-combo-list'; + var cls = 'x-combo-list', + listParent = Ext.getDom(this.getListParent() || Ext.getBody()); this.list = new Ext.Layer({ - shadow: this.shadow, cls: [cls, this.listClass].join(' '), constrain:false + parentEl: listParent, + shadow: this.shadow, + cls: [cls, this.listClass].join(' '), + constrain:false, + zindex: this.getZIndex(listParent) }); var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth); - this.list.setWidth(lw); + this.list.setSize(lw, 0); this.list.swallowEvent('mousewheel'); this.assetHeight = 0; - + if(this.syncFont !== false){ + this.list.setStyle('font-size', this.el.getStyle('font-size')); + } if(this.title){ this.header = this.list.createChild({cls:cls+'-hd', html: this.title}); this.assetHeight += this.header.getHeight(); } this.innerList = this.list.createChild({cls:cls+'-inner'}); - this.innerList.on('mouseover', this.onViewOver, this); - this.innerList.on('mousemove', this.onViewMove, this); + this.mon(this.innerList, 'mouseover', this.onViewOver, this); + this.mon(this.innerList, 'mousemove', this.onViewMove, this); this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); if(this.pageSize){ this.footer = this.list.createChild({cls:cls+'-ft'}); this.pageTb = new Ext.PagingToolbar({ - store:this.store, + store: this.store, pageSize: this.pageSize, renderTo:this.footer }); @@ -27467,10 +41902,16 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { tpl: this.tpl, singleSelect: true, selectedClass: this.selectedClass, - itemSelector: this.itemSelector || '.' + cls + '-item' + itemSelector: this.itemSelector || '.' + cls + '-item', + emptyText: this.listEmptyText, + deferEmptyText: false }); - this.view.on('click', this.onViewClick, this); + this.mon(this.view, { + containerclick : this.onViewClick, + click : this.onViewClick, + scope :this + }); this.bindStore(this.store, true); @@ -27478,45 +41919,82 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { this.resizer = new Ext.Resizable(this.list, { pinned:true, handles:'se' }); - this.resizer.on('resize', function(r, w, h){ + this.mon(this.resizer, 'resize', function(r, w, h){ this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight; this.listWidth = w; this.innerList.setWidth(w - this.list.getFrameWidth('lr')); this.restrictHeight(); }, this); + this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px'); } } }, - bindStore : function(store, initial){ + + getListParent : function() { + return document.body; + }, + + + getStore : function(){ + return this.store; + }, + + + bindStore : function(store, initial){ if(this.store && !initial){ - this.store.un('beforeload', this.onBeforeLoad, this); - this.store.un('load', this.onLoad, this); - this.store.un('loadexception', this.collapse, this); + if(this.store !== store && this.store.autoDestroy){ + this.store.destroy(); + }else{ + this.store.un('beforeload', this.onBeforeLoad, this); + this.store.un('load', this.onLoad, this); + this.store.un('exception', this.collapse, this); + } if(!store){ this.store = null; if(this.view){ - this.view.setStore(null); + this.view.bindStore(null); + } + if(this.pageTb){ + this.pageTb.bindStore(null); } } } if(store){ - this.store = Ext.StoreMgr.lookup(store); + if(!initial) { + this.lastQuery = null; + if(this.pageTb) { + this.pageTb.bindStore(store); + } + } - this.store.on('beforeload', this.onBeforeLoad, this); - this.store.on('load', this.onLoad, this); - this.store.on('loadexception', this.collapse, this); + this.store = Ext.StoreMgr.lookup(store); + this.store.on({ + scope: this, + beforeload: this.onBeforeLoad, + load: this.onLoad, + exception: this.collapse + }); if(this.view){ - this.view.setStore(store); + this.view.bindStore(store); } } }, - initEvents : function(){ + reset : function(){ + if(this.clearFilterOnReset && this.mode == 'local'){ + this.store.clearFilter(); + } + Ext.form.ComboBox.superclass.reset.call(this); + }, + + + initEvents : function(){ Ext.form.ComboBox.superclass.initEvents.call(this); + this.keyNav = new Ext.KeyNav(this.el, { "up" : function(e){ this.inKeyMode = true; @@ -27534,8 +42012,6 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { "enter" : function(e){ this.onViewClick(); - this.delayedCheck = true; - this.unsetDelayCheck.defer(10, this); }, "esc" : function(e){ @@ -27543,20 +42019,31 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { }, "tab" : function(e){ - this.onViewClick(false); + if (this.forceSelection === true) { + this.collapse(); + } else { + this.onViewClick(false); + } return true; }, scope : this, - doRelay : function(foo, bar, hname){ + doRelay : function(e, h, hname){ if(hname == 'down' || this.scope.isExpanded()){ - return Ext.KeyNav.prototype.doRelay.apply(this, arguments); + + var relay = Ext.KeyNav.prototype.doRelay.apply(this, arguments); + if(!Ext.isIE && Ext.EventManager.useKeydown){ + + this.scope.fireKey(e); + } + return relay; } return true; }, - forceKeyDown : true + forceKeyDown : true, + defaultEventAction: 'stopEvent' }); this.queryDelay = Math.max(this.queryDelay || 10, this.mode == 'local' ? 10 : 250); @@ -27564,54 +42051,64 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { if(this.typeAhead){ this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this); } - if(this.editable !== false){ - this.el.on("keyup", this.onKeyUp, this); - } - if(this.forceSelection){ - this.on('blur', this.doForce, this); + if(!this.enableKeyEvents){ + this.mon(this.el, 'keyup', this.onKeyUp, this); } }, - onDestroy : function(){ - if(this.view){ - this.view.el.removeAllListeners(); - this.view.el.remove(); - this.view.purgeListeners(); - } - if(this.list){ - this.list.destroy(); + + + onDestroy : function(){ + if (this.dqTask){ + this.dqTask.cancel(); + this.dqTask = null; } this.bindStore(null); + Ext.destroy( + this.resizer, + this.view, + this.pageTb, + this.list + ); + Ext.destroyMembers(this, 'hiddenField'); Ext.form.ComboBox.superclass.onDestroy.call(this); }, - unsetDelayCheck : function(){ - delete this.delayedCheck; - }, - - fireKey : function(e){ - if(e.isNavKeyPress() && !this.isExpanded() && !this.delayedCheck){ - this.fireEvent("specialkey", this, e); + + fireKey : function(e){ + if (!this.isExpanded()) { + Ext.form.ComboBox.superclass.fireKey.call(this, e); } }, - onResize: function(w, h){ + + onResize : function(w, h){ Ext.form.ComboBox.superclass.onResize.apply(this, arguments); - if(this.list && this.listWidth === undefined){ + if(!isNaN(w) && this.isVisible() && this.list){ + this.doResize(w); + }else{ + this.bufferSize = w; + } + }, + + doResize: function(w){ + if(!Ext.isDefined(this.listWidth)){ var lw = Math.max(w, this.minListWidth); this.list.setWidth(lw); this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); } }, - onEnable: function(){ + + onEnable : function(){ Ext.form.ComboBox.superclass.onEnable.apply(this, arguments); if(this.hiddenField){ this.hiddenField.disabled = false; } }, - onDisable: function(){ + + onDisable : function(){ Ext.form.ComboBox.superclass.onDisable.apply(this, arguments); if(this.hiddenField){ this.hiddenField.disabled = true; @@ -27619,23 +42116,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { }, - setEditable : function(value){ - if(value == this.editable){ - return; - } - this.editable = value; - if(!value){ - this.el.dom.setAttribute('readOnly', true); - this.el.on('mousedown', this.onTriggerClick, this); - this.el.addClass('x-combo-noedit'); - }else{ - this.el.dom.setAttribute('readOnly', false); - this.el.un('mousedown', this.onTriggerClick, this); - this.el.removeClass('x-combo-noedit'); - } - }, - - onBeforeLoad : function(){ + onBeforeLoad : function(){ if(!this.hasFocus){ return; } @@ -27645,32 +42126,38 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { this.selectedIndex = -1; }, - onLoad : function(){ + + onLoad : function(){ if(!this.hasFocus){ return; } - if(this.store.getCount() > 0){ + if(this.store.getCount() > 0 || this.listEmptyText){ this.expand(); this.restrictHeight(); if(this.lastQuery == this.allQuery){ if(this.editable){ this.el.dom.select(); } - if(!this.selectByValue(this.value, true)){ + + if(this.autoSelect !== false && !this.selectByValue(this.value, true)){ this.select(0, true); } }else{ - this.selectNext(); + if(this.autoSelect !== false){ + this.selectNext(); + } if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){ this.taTask.delay(this.typeAheadDelay); } } }else{ - this.onEmptyResults(); + this.collapse(); } - }, - onTypeAhead : function(){ + }, + + + onTypeAhead : function(){ if(this.store.getCount() > 0){ var r = this.store.getAt(0); var newValue = r.data[this.displayField]; @@ -27683,7 +42170,40 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { } }, - onSelect : function(record, index){ + + assertValue : function(){ + var val = this.getRawValue(), + rec; + + if(this.valueField && Ext.isDefined(this.value)){ + rec = this.findRecord(this.valueField, this.value); + } + if(!rec || rec.get(this.displayField) != val){ + rec = this.findRecord(this.displayField, val); + } + if(!rec && this.forceSelection){ + if(val.length > 0 && val != this.emptyText){ + this.el.dom.value = Ext.value(this.lastSelectionText, ''); + this.applyEmptyText(); + }else{ + this.clearValue(); + } + }else{ + if(rec && this.valueField){ + + + + if (this.value == val){ + return; + } + val = rec.get(this.valueField || this.displayField); + } + this.setValue(val); + } + }, + + + onSelect : function(record, index){ if(this.fireEvent('beforeselect', this, record, index) !== false){ this.setValue(record.data[this.valueField || this.displayField]); this.collapse(); @@ -27692,9 +42212,15 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { }, + getName: function(){ + var hf = this.hiddenField; + return hf && hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this); + }, + + getValue : function(){ if(this.valueField){ - return typeof this.value != 'undefined' ? this.value : ''; + return Ext.isDefined(this.value) ? this.value : ''; }else{ return Ext.form.ComboBox.superclass.getValue.call(this); } @@ -27718,19 +42244,21 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { var r = this.findRecord(this.valueField, v); if(r){ text = r.data[this.displayField]; - }else if(this.valueNotFoundText !== undefined){ + }else if(Ext.isDefined(this.valueNotFoundText)){ text = this.valueNotFoundText; } } this.lastSelectionText = text; if(this.hiddenField){ - this.hiddenField.value = v; + this.hiddenField.value = Ext.value(v, ''); } Ext.form.ComboBox.superclass.setValue.call(this, text); this.value = v; + return this; }, - findRecord : function(prop, value){ + + findRecord : function(prop, value){ var record; if(this.store.getCount() > 0){ this.store.each(function(r){ @@ -27743,12 +42271,15 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { return record; }, - onViewMove : function(e, t){ + + onViewMove : function(e, t){ this.inKeyMode = false; }, - onViewOver : function(e, t){ - if(this.inKeyMode){ return; + + onViewOver : function(e, t){ + if(this.inKeyMode){ + return; } var item = this.view.findItemFromChild(t); if(item){ @@ -27757,38 +42288,41 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { } }, - onViewClick : function(doFocus){ - var index = this.view.getSelectedIndexes()[0]; - var r = this.store.getAt(index); + + onViewClick : function(doFocus){ + var index = this.view.getSelectedIndexes()[0], + s = this.store, + r = s.getAt(index); if(r){ this.onSelect(r, index); + }else { + this.collapse(); } if(doFocus !== false){ this.el.focus(); } }, - restrictHeight : function(){ + + + restrictHeight : function(){ this.innerList.dom.style.height = ''; - var inner = this.innerList.dom; - var pad = this.list.getFrameWidth('tb')+(this.resizable?this.handleHeight:0)+this.assetHeight; - var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight); - var ha = this.getPosition()[1]-Ext.getBody().getScroll().top; - var hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height; - var space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5; + var inner = this.innerList.dom, + pad = this.list.getFrameWidth('tb') + (this.resizable ? this.handleHeight : 0) + this.assetHeight, + h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight), + ha = this.getPosition()[1]-Ext.getBody().getScroll().top, + hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height, + space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5; + h = Math.min(h, space, this.maxHeight); this.innerList.setHeight(h); this.list.beginUpdate(); this.list.setHeight(h+pad); - this.list.alignTo(this.wrap, this.listAlign); + this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign)); this.list.endUpdate(); }, - onEmptyResults : function(){ - this.collapse(); - }, - isExpanded : function(){ return this.list && this.list.isVisible(); @@ -27796,7 +42330,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { selectByValue : function(v, scrollIntoView){ - if(v !== undefined && v !== null){ + if(!Ext.isEmpty(v, true)){ var r = this.findRecord(this.valueField || this.displayField, v); if(r){ this.select(this.store.indexOf(r), scrollIntoView); @@ -27816,9 +42350,11 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { this.innerList.scrollChildIntoView(el, false); } } + }, - selectNext : function(){ + + selectNext : function(){ var ct = this.store.getCount(); if(ct > 0){ if(this.selectedIndex == -1){ @@ -27829,45 +42365,54 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { } }, - selectPrev : function(){ + + selectPrev : function(){ var ct = this.store.getCount(); if(ct > 0){ if(this.selectedIndex == -1){ this.select(0); - }else if(this.selectedIndex != 0){ + }else if(this.selectedIndex !== 0){ this.select(this.selectedIndex-1); } } }, - onKeyUp : function(e){ - if(this.editable !== false && !e.isSpecialKey()){ - this.lastKey = e.getKey(); + + onKeyUp : function(e){ + var k = e.getKey(); + if(this.editable !== false && this.readOnly !== true && (k == e.BACKSPACE || !e.isSpecialKey())){ + + this.lastKey = k; this.dqTask.delay(this.queryDelay); } + Ext.form.ComboBox.superclass.onKeyUp.call(this, e); }, - validateBlur : function(){ + + validateBlur : function(){ return !this.list || !this.list.isVisible(); }, - initQuery : function(){ + + initQuery : function(){ this.doQuery(this.getRawValue()); }, - doForce : function(){ - if(this.el.dom.value.length > 0){ - this.el.dom.value = - this.lastSelectionText === undefined ? '' : this.lastSelectionText; - this.applyEmptyText(); - } + + beforeBlur : function(){ + this.assertValue(); + }, + + + postBlur : function(){ + Ext.form.ComboBox.superclass.postBlur.call(this); + this.collapse(); + this.inKeyMode = false; }, doQuery : function(q, forceAll){ - if(q === undefined || q === null){ - q = ''; - } + q = Ext.isEmpty(q) ? '' : q; var qe = { query: q, forceAll: forceAll, @@ -27904,13 +42449,15 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { } }, - getParams : function(q){ - var p = {}; - if(this.pageSize){ - p.start = 0; - p.limit = this.pageSize; + + getParams : function(q){ + var params = {}, + paramNames = this.store.paramNames; + if(this.pageSize){ + params[paramNames.start] = 0; + params[paramNames.limit] = this.pageSize; } - return p; + return params; }, @@ -27924,8 +42471,9 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { this.fireEvent('collapse', this); }, - collapseIf : function(e){ - if(!e.within(this.wrap) && !e.within(this.list)){ + + collapseIf : function(e){ + if(!this.isDestroyed && !e.within(this.wrap) && !e.within(this.list)){ this.collapse(); } }, @@ -27935,16 +42483,42 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { if(this.isExpanded() || !this.hasFocus){ return; } - this.list.alignTo(this.wrap, this.listAlign); + + if(this.title || this.pageSize){ + this.assetHeight = 0; + if(this.title){ + this.assetHeight += this.header.getHeight(); + } + if(this.pageSize){ + this.assetHeight += this.footer.getHeight(); + } + } + + if(this.bufferSize){ + this.doResize(this.bufferSize); + delete this.bufferSize; + } + this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign)); + + + this.list.setZIndex(this.getZIndex()); this.list.show(); - this.innerList.setOverflow('auto'); Ext.getDoc().on('mousewheel', this.collapseIf, this); - Ext.getDoc().on('mousedown', this.collapseIf, this); + if(Ext.isGecko2){ + this.innerList.setOverflow('auto'); + } + this.mon(Ext.getDoc(), { + scope: this, + mousewheel: this.collapseIf, + mousedown: this.collapseIf + }); this.fireEvent('expand', this); }, - onTriggerClick : function(){ - if(this.disabled){ + + + onTriggerClick : function(){ + if(this.readOnly || this.disabled){ return; } if(this.isExpanded()){ @@ -27971,26 +42545,24 @@ Ext.reg('combo', Ext.form.ComboBox); Ext.form.Checkbox = Ext.extend(Ext.form.Field, { - checkedCls: 'x-form-check-checked', + focusClass : undefined, - focusCls: 'x-form-check-focus', + fieldClass : 'x-form-field', - overCls: 'x-form-check-over', + checked : false, - mouseDownCls: 'x-form-check-down', + boxLabel: ' ', - tabIndex: 0, - - checked: false, - - defaultAutoCreate: {tag: 'input', type: 'checkbox', autocomplete: 'off'}, + defaultAutoCreate : { tag: 'input', type: 'checkbox', autocomplete: 'off'}, - baseCls: 'x-form-check', + + actionMode : 'wrap', - initComponent : function(){ + + initComponent : function(){ Ext.form.Checkbox.superclass.initComponent.call(this); this.addEvents( @@ -27998,119 +42570,22 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { ); }, - initEvents : function(){ - Ext.form.Checkbox.superclass.initEvents.call(this); - this.initCheckEvents(); - }, - - initCheckEvents : function(){ - this.innerWrap.removeAllListeners(); - this.innerWrap.addClassOnOver(this.overCls); - this.innerWrap.addClassOnClick(this.mouseDownCls); - this.innerWrap.on('click', this.onClick, this); - this.innerWrap.on('keyup', this.onKeyUp, this); - }, - - onRender : function(ct, position){ - Ext.form.Checkbox.superclass.onRender.call(this, ct, position); - if(this.inputValue !== undefined){ - this.el.dom.value = this.inputValue; - } - this.el.addClass('x-hidden'); - - this.innerWrap = this.el.wrap({ - tabIndex: this.tabIndex, - cls: this.baseCls+'-wrap-inner' - }); - this.wrap = this.innerWrap.wrap({cls: this.baseCls+'-wrap'}); - - if(this.boxLabel){ - this.labelEl = this.innerWrap.createChild({ - tag: 'label', - htmlFor: this.el.id, - cls: 'x-form-cb-label', - html: this.boxLabel - }); - } - - this.imageEl = this.innerWrap.createChild({ - tag: 'img', - src: Ext.BLANK_IMAGE_URL, - cls: this.baseCls - }, this.el); - - if(this.checked){ - this.setValue(true); - }else{ - this.checked = this.el.dom.checked; - } - this.originalValue = this.checked; - }, - - onDestroy : function(){ - if(this.rendered){ - Ext.destroy(this.imageEl, this.labelEl, this.innerWrap, this.wrap); - } - Ext.form.Checkbox.superclass.onDestroy.call(this); - }, - - onFocus: function(e) { - Ext.form.Checkbox.superclass.onFocus.call(this, e); - this.el.addClass(this.focusCls); - }, - - onBlur: function(e) { - Ext.form.Checkbox.superclass.onBlur.call(this, e); - this.el.removeClass(this.focusCls); - }, - - onResize : function(){ + + onResize : function(){ Ext.form.Checkbox.superclass.onResize.apply(this, arguments); if(!this.boxLabel && !this.fieldLabel){ this.el.alignTo(this.wrap, 'c-c'); } }, - onKeyUp : function(e){ - if(e.getKey() == Ext.EventObject.SPACE){ - this.onClick(e); - } - }, - - onClick : function(e){ - if (!this.disabled && !this.readOnly) { - this.toggleValue(); - } - e.stopEvent(); - }, - - onEnable : function(){ - Ext.form.Checkbox.superclass.onEnable.call(this); - this.initCheckEvents(); - }, - - onDisable : function(){ - Ext.form.Checkbox.superclass.onDisable.call(this); - this.innerWrap.removeAllListeners(); - }, - - toggleValue : function(){ - this.setValue(!this.checked); - }, - - getResizeEl : function(){ - if(!this.resizeEl){ - this.resizeEl = Ext.isSafari ? this.wrap : (this.wrap.up('.x-form-element', 5) || this.wrap); - } - return this.resizeEl; - }, - - getPositionEl : function(){ - return this.wrap; - }, - - getActionEl : function(){ - return this.wrap; + + initEvents : function(){ + Ext.form.Checkbox.superclass.initEvents.call(this); + this.mon(this.el, { + scope: this, + click: this.onClick, + change: this.onClick + }); }, @@ -28118,44 +42593,83 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { clearInvalid : Ext.emptyFn, - initValue : Ext.emptyFn, + + onRender : function(ct, position){ + Ext.form.Checkbox.superclass.onRender.call(this, ct, position); + if(this.inputValue !== undefined){ + this.el.dom.value = this.inputValue; + } + this.wrap = this.el.wrap({cls: 'x-form-check-wrap'}); + if(this.boxLabel){ + this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel}); + } + if(this.checked){ + this.setValue(true); + }else{ + this.checked = this.el.dom.checked; + } + + if (Ext.isIE && !Ext.isStrict) { + this.wrap.repaint(); + } + this.resizeEl = this.positionEl = this.wrap; + }, + + + onDestroy : function(){ + Ext.destroy(this.wrap); + Ext.form.Checkbox.superclass.onDestroy.call(this); + }, + + + initValue : function() { + this.originalValue = this.getValue(); + }, getValue : function(){ if(this.rendered){ return this.el.dom.checked; } - return false; + return this.checked; + }, + + + onClick : function(){ + if(this.el.dom.checked != this.checked){ + this.setValue(this.el.dom.checked); + } }, - setValue : function(v) { - var checked = this.checked; - this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on'); + setValue : function(v){ + var checked = this.checked, + inputVal = this.inputValue; + + if (v === false) { + this.checked = false; + } else { + this.checked = (v === true || v === 'true' || v == '1' || (inputVal ? v == inputVal : String(v).toLowerCase() == 'on')); + } - if(this.el && this.el.dom){ + if(this.rendered){ this.el.dom.checked = this.checked; this.el.dom.defaultChecked = this.checked; } - this.wrap[this.checked? 'addClass' : 'removeClass'](this.checkedCls); - if(checked != this.checked){ - this.fireEvent("check", this, this.checked); + this.fireEvent('check', this, this.checked); if(this.handler){ this.handler.call(this.scope || this, this, this.checked); } } + return this; } - - - - }); Ext.reg('checkbox', Ext.form.Checkbox); - Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { + columns : 'auto', vertical : false, @@ -28163,67 +42677,90 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { allowBlank : true, blankText : "You must select at least one item in this group", + - defaultType : 'checkbox', + defaultType : 'checkbox', + - groupCls: 'x-form-check-group', + groupCls : 'x-form-check-group', + - onRender : function(ct, position){ + initComponent: function(){ + this.addEvents( + + 'change' + ); + this.on('change', this.validate, this); + Ext.form.CheckboxGroup.superclass.initComponent.call(this); + }, + + + onRender : function(ct, position){ if(!this.el){ var panelCfg = { + autoEl: { + id: this.id + }, cls: this.groupCls, layout: 'column', - border: false, - renderTo: ct + renderTo: ct, + bufferResize: false }; var colCfg = { + xtype: 'container', defaultType: this.defaultType, layout: 'form', - border: false, defaults: { hideLabel: true, anchor: '100%' } - } - + }; + if(this.items[0].items){ + - + Ext.apply(panelCfg, { layoutConfig: {columns: this.items.length}, defaults: this.defaults, items: this.items - }) + }); for(var i=0, len=this.items.length; i0 && i%rows==0){ @@ -28243,201 +42780,777 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { cols[ci].items.push(this.items[i]); }; } - + Ext.apply(panelCfg, { layoutConfig: {columns: numCols}, items: cols }); } - - this.panel = new Ext.Panel(panelCfg); + + this.panel = new Ext.Container(panelCfg); + this.panel.ownerCt = this; this.el = this.panel.getEl(); - + if(this.forId && this.itemCls){ var l = this.el.up(this.itemCls).child('label', true); if(l){ l.setAttribute('htmlFor', this.forId); } } - + var fields = this.panel.findBy(function(c){ return c.isFormField; }, this); - + this.items = new Ext.util.MixedCollection(); this.items.addAll(fields); } Ext.form.CheckboxGroup.superclass.onRender.call(this, ct, position); }, - - validateValue : function(value){ - if(!this.allowBlank){ - var blank = true; - this.items.each(function(f){ - if(f.checked){ - return blank = false; - } - }, this); - if(blank){ - this.markInvalid(this.blankText); - return false; - } + + initValue : function(){ + if(this.value){ + this.setValue.apply(this, this.buffered ? this.value : [this.value]); + delete this.buffered; + delete this.value; } - return true; - }, - - onDisable : function(){ - this.items.each(function(item){ - item.disable(); - }) }, - onEnable : function(){ - this.items.each(function(item){ - item.enable(); - }) + afterRender : function(){ + Ext.form.CheckboxGroup.superclass.afterRender.call(this); + this.eachItem(function(item){ + item.on('check', this.fireChecked, this); + item.inGroup = true; + }); + }, + + + doLayout: function(){ + + if(this.rendered){ + this.panel.forceLayout = this.ownerCt.forceLayout; + this.panel.doLayout(); + } + }, + + + fireChecked: function(){ + var arr = []; + this.eachItem(function(item){ + if(item.checked){ + arr.push(item); + } + }); + this.fireEvent('change', this, arr); }, - onResize : function(w, h){ + + getErrors: function() { + var errors = Ext.form.CheckboxGroup.superclass.getErrors.apply(this, arguments); + + if (!this.allowBlank) { + var blank = true; + + this.eachItem(function(f){ + if (f.checked) { + return (blank = false); + } + }); + + if (blank) errors.push(this.blankText); + } + + return errors; + }, + + + isDirty: function(){ + + if (this.disabled || !this.rendered) { + return false; + } + + var dirty = false; + + this.eachItem(function(item){ + if(item.isDirty()){ + dirty = true; + return false; + } + }); + + return dirty; + }, + + + setReadOnly : function(readOnly){ + if(this.rendered){ + this.eachItem(function(item){ + item.setReadOnly(readOnly); + }); + } + this.readOnly = readOnly; + }, + + + onDisable : function(){ + this.eachItem(function(item){ + item.disable(); + }); + }, + + + onEnable : function(){ + this.eachItem(function(item){ + item.enable(); + }); + }, + + + onResize : function(w, h){ this.panel.setSize(w, h); this.panel.doLayout(); }, + - reset : function(){ - Ext.form.CheckboxGroup.superclass.reset.call(this); - this.items.each(function(c){ - if(c.reset){ - c.reset(); - } - }, this); + reset : function(){ + if (this.originalValue) { + + this.eachItem(function(c){ + if(c.setValue){ + c.setValue(false); + c.originalValue = c.getValue(); + } + }); + + + this.resetOriginal = true; + this.setValue(this.originalValue); + delete this.resetOriginal; + } else { + this.eachItem(function(c){ + if(c.reset){ + c.reset(); + } + }); + } + + + (function() { + this.clearInvalid(); + }).defer(50, this); }, + + setValue: function(){ + if(this.rendered){ + this.onSetValue.apply(this, arguments); + }else{ + this.buffered = true; + this.value = arguments; + } + return this; + }, + + onSetValue: function(id, value){ + if(arguments.length == 1){ + if(Ext.isArray(id)){ + Ext.each(id, function(val, idx){ + if (Ext.isObject(val) && val.setValue){ + val.setValue(true); + if (this.resetOriginal === true) { + val.originalValue = val.getValue(); + } + } else { + var item = this.items.itemAt(idx); + if(item){ + item.setValue(val); + } + } + }, this); + }else if(Ext.isObject(id)){ + + for(var i in id){ + var f = this.getBox(i); + if(f){ + f.setValue(id[i]); + } + } + }else{ + this.setValueForItem(id); + } + }else{ + var f = this.getBox(id); + if(f){ + f.setValue(value); + } + } + }, + - initValue : Ext.emptyFn, + beforeDestroy: function(){ + Ext.destroy(this.panel); + if (!this.rendered) { + Ext.destroy(this.items); + } + Ext.form.CheckboxGroup.superclass.beforeDestroy.call(this); + + }, + + setValueForItem : function(val){ + val = String(val).split(','); + this.eachItem(function(item){ + if(val.indexOf(item.inputValue)> -1){ + item.setValue(true); + } + }); + }, + - getValue : Ext.emptyFn, + getBox : function(id){ + var box = null; + this.eachItem(function(f){ + if(id == f || f.dataIndex == id || f.id == id || f.getName() == id){ + box = f; + return false; + } + }); + return box; + }, + + + getValue : function(){ + var out = []; + this.eachItem(function(item){ + if(item.checked){ + out.push(item); + } + }); + return out; + }, + + + eachItem: function(fn, scope) { + if(this.items && this.items.each){ + this.items.each(fn, scope || this); + } + }, + + + getRawValue : Ext.emptyFn, - - setValue : Ext.emptyFn, + setRawValue : Ext.emptyFn - + }); Ext.reg('checkboxgroup', Ext.form.CheckboxGroup); +Ext.form.CompositeField = Ext.extend(Ext.form.Field, { -Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { - inputType: 'radio', - baseCls: 'x-form-radio', - - getGroupValue : function(){ - var c = this.getParent().child('input[name='+this.el.dom.name+']:checked', true); - return c ? c.value : null; - }, - - getParent : function(){ - return this.el.up('form') || Ext.getBody(); - }, + defaultMargins: '0 5 0 0', - toggleValue : function() { - if(!this.checked){ - var els = this.getParent().select('input[name='+this.el.dom.name+']'); - els.each(function(el){ - if(el.dom.id == this.id){ - this.setValue(true); - }else{ - Ext.getCmp(el.dom.id).setValue(false); - } - }, this); + + skipLastItemMargin: true, + + + isComposite: true, + + + combineErrors: true, + + + labelConnector: ', ', + + + + + + initComponent: function() { + var labels = [], + items = this.items, + item; + + for (var i=0, j = items.length; i < j; i++) { + item = items[i]; + + if (!Ext.isEmpty(item.ref)){ + item.ref = '../' + item.ref; + } + + labels.push(item.fieldLabel); + + + Ext.applyIf(item, this.defaults); + + + if (!(i == j - 1 && this.skipLastItemMargin)) { + Ext.applyIf(item, {margins: this.defaultMargins}); + } } + + this.fieldLabel = this.fieldLabel || this.buildLabel(labels); + + + this.fieldErrors = new Ext.util.MixedCollection(true, function(item) { + return item.field; + }); + + this.fieldErrors.on({ + scope : this, + add : this.updateInvalidMark, + remove : this.updateInvalidMark, + replace: this.updateInvalidMark + }); + + Ext.form.CompositeField.superclass.initComponent.apply(this, arguments); + + this.innerCt = new Ext.Container({ + layout : 'hbox', + items : this.items, + cls : 'x-form-composite', + defaultMargins: '0 3 0 0', + ownerCt: this + }); + this.innerCt.ownerCt = undefined; + + var fields = this.innerCt.findBy(function(c) { + return c.isFormField; + }, this); + + + this.items = new Ext.util.MixedCollection(); + this.items.addAll(fields); + }, + + onRender: function(ct, position) { + if (!this.el) { + + var innerCt = this.innerCt; + innerCt.render(ct); + + this.el = innerCt.getEl(); + + + + if (this.combineErrors) { + this.eachItem(function(field) { + Ext.apply(field, { + markInvalid : this.onFieldMarkInvalid.createDelegate(this, [field], 0), + clearInvalid: this.onFieldClearInvalid.createDelegate(this, [field], 0) + }); + }); + } + + + var l = this.el.parent().parent().child('label', true); + if (l) { + l.setAttribute('for', this.items.items[0].id); + } + } + + Ext.form.CompositeField.superclass.onRender.apply(this, arguments); + }, + - setValue : function(v){ - if(typeof v=='boolean') { - Ext.form.Radio.superclass.setValue.call(this, v); - }else{ - var r = this.getParent().child('input[name='+this.el.dom.name+'][value='+v+']', true); - if(r && !r.checked){ - Ext.getCmp(r.id).toggleValue(); + onFieldMarkInvalid: function(field, message) { + var name = field.getName(), + error = { + field: name, + errorName: field.fieldLabel || name, + error: message }; + + this.fieldErrors.replace(name, error); + + if (!field.preventMark) { + field.el.addClass(field.invalidClass); } }, + + onFieldClearInvalid: function(field) { + this.fieldErrors.removeKey(field.getName()); + + field.el.removeClass(field.invalidClass); + }, + + + updateInvalidMark: function() { + var ieStrict = Ext.isIE6 && Ext.isStrict; + + if (this.fieldErrors.length == 0) { + this.clearInvalid(); + + + if (ieStrict) { + this.clearInvalid.defer(50, this); + } + } else { + var message = this.buildCombinedErrorMessage(this.fieldErrors.items); + + this.sortErrors(); + this.markInvalid(message); + + + if (ieStrict) { + this.markInvalid(message); + } + } + }, + + + validateValue: function(value, preventMark) { + var valid = true; + + this.eachItem(function(field) { + if (!field.isValid(preventMark)) { + valid = false; + } + }); + + return valid; + }, + + + buildCombinedErrorMessage: function(errors) { + var combined = [], + error; + + for (var i = 0, j = errors.length; i < j; i++) { + error = errors[i]; + + combined.push(String.format("{0}: {1}", error.errorName, error.error)); + } + + return combined.join("
    "); + }, + + + sortErrors: function() { + var fields = this.items; + + this.fieldErrors.sort("ASC", function(a, b) { + var findByName = function(key) { + return function(field) { + return field.getName() == key; + }; + }; + + var aIndex = fields.findIndexBy(findByName(a.field)), + bIndex = fields.findIndexBy(findByName(b.field)); + + return aIndex < bIndex ? -1 : 1; + }); + }, + + + reset: function() { + this.eachItem(function(item) { + item.reset(); + }); + + + + (function() { + this.clearInvalid(); + }).defer(50, this); + }, + + + clearInvalidChildren: function() { + this.eachItem(function(item) { + item.clearInvalid(); + }); + }, + + + buildLabel: function(segments) { + return Ext.clean(segments).join(this.labelConnector); + }, + + + isDirty: function(){ + + if (this.disabled || !this.rendered) { + return false; + } + + var dirty = false; + this.eachItem(function(item){ + if(item.isDirty()){ + dirty = true; + return false; + } + }); + return dirty; + }, + + + eachItem: function(fn, scope) { + if(this.items && this.items.each){ + this.items.each(fn, scope || this); + } + }, + + + onResize: function(adjWidth, adjHeight, rawWidth, rawHeight) { + var innerCt = this.innerCt; + + if (this.rendered && innerCt.rendered) { + innerCt.setSize(adjWidth, adjHeight); + } + + Ext.form.CompositeField.superclass.onResize.apply(this, arguments); + }, + + + doLayout: function(shallow, force) { + if (this.rendered) { + var innerCt = this.innerCt; + + innerCt.forceLayout = this.ownerCt.forceLayout; + innerCt.doLayout(shallow, force); + } + }, + + + beforeDestroy: function(){ + Ext.destroy(this.innerCt); + + Ext.form.CompositeField.superclass.beforeDestroy.call(this); + }, + + + setReadOnly : function(readOnly) { + if (readOnly == undefined) { + readOnly = true; + } + readOnly = !!readOnly; + + if(this.rendered){ + this.eachItem(function(item){ + item.setReadOnly(readOnly); + }); + } + this.readOnly = readOnly; + }, + + onShow : function() { + Ext.form.CompositeField.superclass.onShow.call(this); + this.doLayout(); + }, + + + onDisable : function(){ + this.eachItem(function(item){ + item.disable(); + }); + }, + + + onEnable : function(){ + this.eachItem(function(item){ + item.enable(); + }); + } +}); + +Ext.reg('compositefield', Ext.form.CompositeField); +Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { + inputType: 'radio', + markInvalid : Ext.emptyFn, - clearInvalid : Ext.emptyFn + clearInvalid : Ext.emptyFn, + + getGroupValue : function(){ + var p = this.el.up('form') || Ext.getBody(); + var c = p.child('input[name="'+this.el.dom.name+'"]:checked', true); + return c ? c.value : null; + }, + + + setValue : function(v){ + var checkEl, + els, + radio; + if (typeof v == 'boolean') { + Ext.form.Radio.superclass.setValue.call(this, v); + } else if (this.rendered) { + checkEl = this.getCheckEl(); + radio = checkEl.child('input[name="' + this.el.dom.name + '"][value="' + v + '"]', true); + if(radio){ + Ext.getCmp(radio.id).setValue(true); + } + } + if(this.rendered && this.checked){ + checkEl = checkEl || this.getCheckEl(); + els = this.getCheckEl().select('input[name="' + this.el.dom.name + '"]'); + els.each(function(el){ + if(el.dom.id != this.id){ + Ext.getCmp(el.dom.id).setValue(false); + } + }, this); + } + return this; + }, + + + getCheckEl: function(){ + if(this.inGroup){ + return this.el.up('.x-form-radio-group'); + } + return this.el.up('form') || Ext.getBody(); + } }); Ext.reg('radio', Ext.form.Radio); - Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, { + allowBlank : true, - blankText : "You must select one item in this group", + blankText : 'You must select one item in this group', - defaultType : 'radio', - groupCls: 'x-form-radio-group' + defaultType : 'radio', + + + groupCls : 'x-form-radio-group', + + + + + getValue : function(){ + var out = null; + this.eachItem(function(item){ + if(item.checked){ + out = item; + return false; + } + }); + return out; + }, + + + onSetValue : function(id, value){ + if(arguments.length > 1){ + var f = this.getBox(id); + if(f){ + f.setValue(value); + if(f.checked){ + this.eachItem(function(item){ + if (item !== f){ + item.setValue(false); + } + }); + } + } + }else{ + this.setValueForItem(id); + } + }, + + setValueForItem : function(val){ + val = String(val).split(',')[0]; + this.eachItem(function(item){ + item.setValue(val == item.inputValue); + }); + }, + + + fireChecked : function(){ + if(!this.checkTask){ + this.checkTask = new Ext.util.DelayedTask(this.bufferChecked, this); + } + this.checkTask.delay(10); + }, + + + bufferChecked : function(){ + var out = null; + this.eachItem(function(item){ + if(item.checked){ + out = item; + return false; + } + }); + this.fireEvent('change', this, out); + }, + + onDestroy : function(){ + if(this.checkTask){ + this.checkTask.cancel(); + this.checkTask = null; + } + Ext.form.RadioGroup.superclass.onDestroy.call(this); + } + }); Ext.reg('radiogroup', Ext.form.RadioGroup); - -Ext.form.Hidden = Ext.extend(Ext.form.Field, { +Ext.form.Hidden = Ext.extend(Ext.form.Field, { - inputType : 'hidden', - + inputType : 'hidden', - onRender : function(){ - Ext.form.Hidden.superclass.onRender.apply(this, arguments); - }, - + shouldLayout: false, + - initEvents : function(){ - this.originalValue = this.getValue(); - }, - + onRender : function(){ + Ext.form.Hidden.superclass.onRender.apply(this, arguments); + }, + - setSize : Ext.emptyFn, - setWidth : Ext.emptyFn, - setHeight : Ext.emptyFn, - setPosition : Ext.emptyFn, - setPagePosition : Ext.emptyFn, - markInvalid : Ext.emptyFn, - clearInvalid : Ext.emptyFn -}); + initEvents : function(){ + this.originalValue = this.getValue(); + }, + + + setSize : Ext.emptyFn, + setWidth : Ext.emptyFn, + setHeight : Ext.emptyFn, + setPosition : Ext.emptyFn, + setPagePosition : Ext.emptyFn, + markInvalid : Ext.emptyFn, + clearInvalid : Ext.emptyFn +}); Ext.reg('hidden', Ext.form.Hidden); +Ext.form.BasicForm = Ext.extend(Ext.util.Observable, { -Ext.form.BasicForm = function(el, config){ - Ext.apply(this, config); - - this.items = new Ext.util.MixedCollection(false, function(o){ - return o.id || (o.id = Ext.id()); - }); - this.addEvents( + constructor: function(el, config){ + Ext.apply(this, config); + if(Ext.isString(this.paramOrder)){ + this.paramOrder = this.paramOrder.split(/[\s,|]/); + } - 'beforeaction', - - 'actionfailed', - - 'actioncomplete' - ); + this.items = new Ext.util.MixedCollection(false, function(o){ + return o.getItemId(); + }); + this.addEvents( + + 'beforeaction', + + 'actionfailed', + + 'actioncomplete' + ); - if(el){ - this.initEl(el); - } - Ext.form.BasicForm.superclass.constructor.call(this); -}; + if(el){ + this.initEl(el); + } + Ext.form.BasicForm.superclass.constructor.call(this); + }, -Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { @@ -28447,7 +43560,19 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { timeout: 30, - activeAction : null, + + + + paramOrder: undefined, + + + paramsAsHash: false, + + + waitTitle: 'Please Wait...', + + + activeAction : null, trackResetOnLoad : false, @@ -28455,7 +43580,8 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { - initEl : function(el){ + + initEl : function(el){ this.el = Ext.get(el); this.id = this.el.id || Ext.id(); if(!this.standardSubmit){ @@ -28469,20 +43595,22 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { return this.el; }, - onSubmit : function(e){ + + onSubmit : function(e){ e.stopEvent(); }, - destroy: function() { - this.items.each(function(f){ - Ext.destroy(f); - }); - if(this.el){ - this.el.removeAllListeners(); - this.el.remove(); + + destroy: function(bound){ + if(bound !== true){ + this.items.each(function(f){ + Ext.destroy(f); + }); + Ext.destroy(this.el); } - this.purgeListeners(); - }, + this.items.clear(); + this.purgeListeners(); + }, isValid : function(){ @@ -28509,7 +43637,7 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { doAction : function(action, options){ - if(typeof action == 'string'){ + if(Ext.isString(action)){ action = new Ext.form.Action.ACTION_TYPES[action](this, options); } if(this.fireEvent('beforeaction', this, action) !== false){ @@ -28521,31 +43649,49 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { submit : function(options){ + options = options || {}; if(this.standardSubmit){ - var v = this.isValid(); + var v = options.clientValidation === false || this.isValid(); if(v){ - this.el.dom.submit(); + var el = this.el.dom; + if(this.url && Ext.isEmpty(el.action)){ + el.action = this.url; + } + el.submit(); } return v; } - this.doAction('submit', options); + var submitAction = String.format('{0}submit', this.api ? 'direct' : ''); + this.doAction(submitAction, options); return this; }, load : function(options){ - this.doAction('load', options); + var loadAction = String.format('{0}load', this.api ? 'direct' : ''); + this.doAction(loadAction, options); return this; }, updateRecord : function(record){ record.beginEdit(); - var fs = record.fields; + var fs = record.fields, + field, + value; fs.each(function(f){ - var field = this.findField(f.name); + field = this.findField(f.name); if(field){ - record.set(f.name, field.getValue()); + value = field.getValue(); + if (Ext.type(value) !== false && value.getGroupValue) { + value = value.getGroupValue(); + } else if ( field.eachItem ) { + value = []; + field.eachItem(function(item){ + value.push(item.getValue()); + }); + } + record.set(f.name, value); } }, this); record.endEdit(); @@ -28558,7 +43704,14 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { return this; }, - beforeAction : function(action){ + + beforeAction : function(action){ + + this.items.each(function(f){ + if(f.isFormField && f.syncValue){ + f.syncValue(); + } + }); var o = action.options; if(o.waitMsg){ if(this.waitMsgTarget === true){ @@ -28567,12 +43720,13 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { this.waitMsgTarget = Ext.get(this.waitMsgTarget); this.waitMsgTarget.mask(o.waitMsg, 'x-mask-loading'); }else{ - Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle || 'Please Wait...'); + Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle); } } }, - afterAction : function(action, success){ + + afterAction : function(action, success){ this.activeAction = null; var o = action.options; if(o.waitMsg){ @@ -28598,15 +43752,25 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { }, - findField : function(id){ + findField : function(id) { var field = this.items.get(id); - if(!field){ - this.items.each(function(f){ - if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){ - field = f; - return false; + + if (!Ext.isObject(field)) { + + var findMatchingField = function(f) { + if (f.isFormField) { + if (f.dataIndex == id || f.id == id || f.getName() == id) { + field = f; + return false; + } else if (f.isComposite) { + return f.items.each(findMatchingField); + } else if (f instanceof Ext.form.CheckboxGroup && f.rendered) { + return f.eachItem(findMatchingField); + } } - }); + }; + + this.items.each(findMatchingField); } return field || null; }, @@ -28614,7 +43778,7 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { markInvalid : function(errors){ - if(Ext.isArray(errors)){ + if (Ext.isArray(errors)) { for(var i = 0, len = errors.length; i < len; i++){ var fieldError = errors[i]; var f = this.findField(fieldError.id); @@ -28622,20 +43786,22 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { f.markInvalid(fieldError.msg); } } - }else{ + } else { var field, id; for(id in errors){ - if(typeof errors[id] != 'function' && (field = this.findField(id))){ + if(!Ext.isFunction(errors[id]) && (field = this.findField(id))){ field.markInvalid(errors[id]); } } } + return this; }, setValues : function(values){ - if(Ext.isArray(values)){ for(var i = 0, len = values.length; i < len; i++){ + if(Ext.isArray(values)){ + for(var i = 0, len = values.length; i < len; i++){ var v = values[i]; var f = this.findField(v.id); if(f){ @@ -28645,9 +43811,10 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { } } } - }else{ var field, id; + }else{ + var field, id; for(id in values){ - if(typeof values[id] != 'function' && (field = this.findField(id))){ + if(!Ext.isFunction(values[id]) && (field = this.findField(id))){ field.setValue(values[id]); if(this.trackResetOnLoad){ field.originalValue = field.getValue(); @@ -28668,6 +43835,32 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { }, + getFieldValues : function(dirtyOnly){ + var o = {}, + n, + key, + val; + this.items.each(function(f) { + if (!f.disabled && (dirtyOnly !== true || f.isDirty())) { + n = f.getName(); + key = o[n]; + val = f.getValue(); + + if(Ext.isDefined(key)){ + if(Ext.isArray(key)){ + o[n].push(val); + }else{ + o[n] = [key, val]; + } + }else{ + o[n] = val; + } + } + }); + return o; + }, + + clearInvalid : function(){ this.items.each(function(f){ f.clearInvalid(); @@ -28689,7 +43882,6 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { return this; }, - remove : function(field){ this.items.remove(field); @@ -28697,9 +43889,15 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { }, + cleanDestroyed : function() { + this.items.filterBy(function(o) { return !!o.isDestroyed; }).each(this.remove, this); + }, + + render : function(){ this.items.each(function(f){ - if(f.isFormField && !f.rendered && document.getElementById(f.id)){ f.applyToMarkup(f.id); + if(f.isFormField && !f.rendered && document.getElementById(f.id)){ + f.applyToMarkup(f.id); } }); return this; @@ -28719,23 +43917,37 @@ Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { Ext.applyIf(f, o); }); return this; + }, + + callFieldMethod : function(fnName, args){ + args = args || []; + this.items.each(function(f){ + if(Ext.isFunction(f[fnName])){ + f[fnName].apply(f, args); + } + }); + return this; } }); + Ext.BasicForm = Ext.form.BasicForm; Ext.FormPanel = Ext.extend(Ext.Panel, { - - buttonAlign:'center', + + + + + - minButtonWidth:75, + minButtonWidth : 75, - labelAlign:'left', + labelAlign : 'left', monitorValid : false, @@ -28744,10 +43956,12 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { monitorPoll : 200, - layout: 'form', + layout : 'form', - initComponent :function(){ + + initComponent : function(){ this.form = this.createForm(); + Ext.FormPanel.superclass.initComponent.call(this); this.bodyCfg = { tag: 'form', @@ -28758,8 +43972,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { if(this.fileUpload) { this.bodyCfg.enctype = 'multipart/form-data'; } - - Ext.FormPanel.superclass.initComponent.call(this); + this.initItems(); this.addEvents( @@ -28769,32 +43982,42 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']); }, - createForm: function(){ - delete this.initialConfig.listeners; - return new Ext.form.BasicForm(null, this.initialConfig); + + createForm : function(){ + var config = Ext.applyIf({listeners: {}}, this.initialConfig); + return new Ext.form.BasicForm(null, config); }, - initFields : function(){ + + initFields : function(){ var f = this.form; var formPanel = this; var fn = function(c){ - if(c.isFormField){ + if(formPanel.isField(c)){ f.add(c); - }else if(c.doLayout && c != formPanel){ - Ext.applyIf(c, { - labelAlign: c.ownerCt.labelAlign, - labelWidth: c.ownerCt.labelWidth, - itemCls: c.ownerCt.itemCls - }); - if(c.items){ - c.items.each(fn); + }else if(c.findBy && c != formPanel){ + formPanel.applySettings(c); + + if(c.items && c.items.each){ + c.items.each(fn, this); } } - } - this.items.each(fn); + }; + this.items.each(fn, this); }, - getLayoutTarget : function(){ + + applySettings: function(c){ + var ct = c.ownerCt; + Ext.applyIf(c, { + labelAlign: ct.labelAlign, + labelWidth: ct.labelWidth, + itemCls: ct.itemCls + }); + }, + + + getLayoutTarget : function(){ return this.form.el; }, @@ -28803,45 +44026,96 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { return this.form; }, - onRender : function(ct, position){ + + onRender : function(ct, position){ this.initFields(); - Ext.FormPanel.superclass.onRender.call(this, ct, position); this.form.initEl(this.body); }, + - beforeDestroy: function(){ - Ext.FormPanel.superclass.beforeDestroy.call(this); + beforeDestroy : function(){ this.stopMonitoring(); - Ext.destroy(this.form); + this.form.destroy(true); + Ext.FormPanel.superclass.beforeDestroy.call(this); }, - initEvents : function(){ + + isField : function(c) { + return !!c.setValue && !!c.getValue && !!c.markInvalid && !!c.clearInvalid; + }, + + + initEvents : function(){ Ext.FormPanel.superclass.initEvents.call(this); - this.items.on('remove', this.onRemove, this); - this.items.on('add', this.onAdd, this); - if(this.monitorValid){ this.startMonitoring(); + + this.on({ + scope: this, + add: this.onAddEvent, + remove: this.onRemoveEvent + }); + if(this.monitorValid){ + this.startMonitoring(); } }, + - onAdd : function(ct, c) { - if (c.isFormField) { - this.form.add(c); - } - }, - - onRemove : function(c) { - if (c.isFormField) { - Ext.destroy(c.container.up('.x-form-item')); - this.form.remove(c); - } - }, + onAdd: function(c){ + Ext.FormPanel.superclass.onAdd.call(this, c); + this.processAdd(c); + }, + + + onAddEvent: function(ct, c){ + if(ct !== this){ + this.processAdd(c); + } + }, + + + processAdd : function(c){ + + if(this.isField(c)){ + this.form.add(c); + + }else if(c.findBy){ + this.applySettings(c); + this.form.add.apply(this.form, c.findBy(this.isField)); + } + }, + + + onRemove: function(c){ + Ext.FormPanel.superclass.onRemove.call(this, c); + this.processRemove(c); + }, + + onRemoveEvent: function(ct, c){ + if(ct !== this){ + this.processRemove(c); + } + }, + + + processRemove: function(c){ + if(!this.destroying){ + + if(this.isField(c)){ + this.form.remove(c); + + }else if (c.findBy){ + Ext.each(c.findBy(this.isField), this.form.remove, this.form); + + this.form.cleanDestroyed(); + } + } + }, startMonitoring : function(){ - if(!this.bound){ - this.bound = true; - Ext.TaskMgr.start({ + if(!this.validTask){ + this.validTask = new Ext.util.TaskRunner(); + this.validTask.start({ run : this.bindHandler, interval : this.monitorPoll || 200, scope: this @@ -28851,15 +44125,19 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { stopMonitoring : function(){ - this.bound = false; + if(this.validTask){ + this.validTask.stopAll(); + this.validTask = null; + } }, load : function(){ - this.form.load.apply(this.form, arguments); + this.form.load.apply(this.form, arguments); }, - onDisable : function(){ + + onDisable : function(){ Ext.FormPanel.superclass.onDisable.call(this); if(this.form){ this.form.items.each(function(){ @@ -28868,7 +44146,8 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { } }, - onEnable : function(){ + + onEnable : function(){ Ext.FormPanel.superclass.onEnable.call(this); if(this.form){ this.form.items.each(function(){ @@ -28877,9 +44156,8 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { } }, - bindHandler : function(){ - if(!this.bound){ - return false; } + + bindHandler : function(){ var valid = true; this.form.items.each(function(f){ if(!f.isValid(true)){ @@ -28887,9 +44165,10 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { return false; } }); - if(this.buttons){ - for(var i = 0, len = this.buttons.length; i < len; i++){ - var btn = this.buttons[i]; + if(this.fbar){ + var fitems = this.fbar.items.items; + for(var i = 0, len = fitems.length; i < len; i++){ + var btn = fitems[i]; if(btn.formBind === true && btn.disabled === valid){ btn.setDisabled(!valid); } @@ -28902,1105 +44181,1355 @@ Ext.reg('form', Ext.FormPanel); Ext.form.FormPanel = Ext.FormPanel; +Ext.form.FieldSet = Ext.extend(Ext.Panel, { + + + + + + + baseCls : 'x-fieldset', + + layout : 'form', + + animCollapse : false, - -Ext.form.FieldSet = Ext.extend(Ext.Panel, { - - - - - - baseCls:'x-fieldset', - - layout: 'form', - - onRender : function(ct, position){ - if(!this.el){ - this.el = document.createElement('fieldset'); - this.el.id = this.id; - if (this.title || this.header || this.checkboxToggle) { - this.el.appendChild(document.createElement('legend')).className = 'x-fieldset-header'; - } - } - - Ext.form.FieldSet.superclass.onRender.call(this, ct, position); - - if(this.checkboxToggle){ - var o = typeof this.checkboxToggle == 'object' ? - this.checkboxToggle : - {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}; - this.checkbox = this.header.insertFirst(o); - this.checkbox.dom.checked = !this.collapsed; - this.checkbox.on('click', this.onCheckClick, this); - } - }, - - - onCollapse : function(doAnim, animArg){ - if(this.checkbox){ - this.checkbox.dom.checked = false; - } - this.afterCollapse(); - - }, - - - onExpand : function(doAnim, animArg){ - if(this.checkbox){ - this.checkbox.dom.checked = true; - } - this.afterExpand(); - }, - - - onCheckClick : function(){ - this[this.checkbox.dom.checked ? 'expand' : 'collapse'](); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}); -Ext.reg('fieldset', Ext.form.FieldSet); - + onRender : function(ct, position){ + if(!this.el){ + this.el = document.createElement('fieldset'); + this.el.id = this.id; + if (this.title || this.header || this.checkboxToggle) { + this.el.appendChild(document.createElement('legend')).className = this.baseCls + '-header'; + } + } + + Ext.form.FieldSet.superclass.onRender.call(this, ct, position); + + if(this.checkboxToggle){ + var o = typeof this.checkboxToggle == 'object' ? + this.checkboxToggle : + {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}; + this.checkbox = this.header.insertFirst(o); + this.checkbox.dom.checked = !this.collapsed; + this.mon(this.checkbox, 'click', this.onCheckClick, this); + } + }, - - -Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { - - enableFormat : true, - - enableFontSize : true, - - enableColors : true, - - enableAlignments : true, - - enableLists : true, - - enableSourceEdit : true, - - enableLinks : true, - - enableFont : true, - - createLinkText : 'Please enter the URL for the link:', - - defaultLinkValue : 'http:/'+'/', - - fontFamilies : [ - 'Arial', - 'Courier New', - 'Tahoma', - 'Times New Roman', - 'Verdana' - ], - defaultFont: 'tahoma', - - validationEvent : false, - deferHeight: true, - initialized : false, - activated : false, - sourceEditMode : false, - onFocus : Ext.emptyFn, - iframePad:3, - hideMode:'offsets', - defaultAutoCreate : { - tag: "textarea", - style:"width:500px;height:300px;", - autocomplete: "off" - }, - + onCollapse : function(doAnim, animArg){ + if(this.checkbox){ + this.checkbox.dom.checked = false; + } + Ext.form.FieldSet.superclass.onCollapse.call(this, doAnim, animArg); + + }, + - initComponent : function(){ - this.addEvents( - - 'initialize', - - 'activate', - - 'beforesync', - - 'beforepush', - - 'sync', - - 'push', - - 'editmodechange' - ) - }, - + onExpand : function(doAnim, animArg){ + if(this.checkbox){ + this.checkbox.dom.checked = true; + } + Ext.form.FieldSet.superclass.onExpand.call(this, doAnim, animArg); + }, + - createFontOptions : function(){ - var buf = [], fs = this.fontFamilies, ff, lc; - for(var i = 0, len = fs.length; i< len; i++){ - ff = fs[i]; - lc = ff.toLowerCase(); - buf.push( - '' - ); - } - return buf.join(''); - }, - - - createToolbar : function(editor){ - - var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled(); - - function btn(id, toggle, handler){ - return { - itemId : id, - cls : 'x-btn-icon x-edit-'+id, - enableToggle:toggle !== false, - scope: editor, - handler:handler||editor.relayBtnCmd, - clickEvent:'mousedown', - tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined, - tabIndex:-1 - }; - } - + onCheckClick : function(){ + this[this.checkbox.dom.checked ? 'expand' : 'collapse'](); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +}); +Ext.reg('fieldset', Ext.form.FieldSet); + +Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { + + enableFormat : true, + + enableFontSize : true, + + enableColors : true, + + enableAlignments : true, + + enableLists : true, + + enableSourceEdit : true, + + enableLinks : true, + + enableFont : true, + + createLinkText : 'Please enter the URL for the link:', + + defaultLinkValue : 'http:/'+'/', + + fontFamilies : [ + 'Arial', + 'Courier New', + 'Tahoma', + 'Times New Roman', + 'Verdana' + ], + defaultFont: 'tahoma', + + defaultValue: (Ext.isOpera || Ext.isIE6) ? ' ' : '​', + + + actionMode: 'wrap', + validationEvent : false, + deferHeight: true, + initialized : false, + activated : false, + sourceEditMode : false, + onFocus : Ext.emptyFn, + iframePad:3, + hideMode:'offsets', + defaultAutoCreate : { + tag: "textarea", + style:"width:500px;height:300px;", + autocomplete: "off" + }, + + + initComponent : function(){ + this.addEvents( + + 'initialize', + + 'activate', + + 'beforesync', + + 'beforepush', + + 'sync', + + 'push', + + 'editmodechange' + ); + Ext.form.HtmlEditor.superclass.initComponent.call(this); + }, + + + createFontOptions : function(){ + var buf = [], fs = this.fontFamilies, ff, lc; + for(var i = 0, len = fs.length; i< len; i++){ + ff = fs[i]; + lc = ff.toLowerCase(); + buf.push( + '' + ); + } + return buf.join(''); + }, + + + createToolbar : function(editor){ + var items = []; + var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled(); + + + function btn(id, toggle, handler){ + return { + itemId : id, + cls : 'x-btn-icon', + iconCls: 'x-edit-'+id, + enableToggle:toggle !== false, + scope: editor, + handler:handler||editor.relayBtnCmd, + clickEvent:'mousedown', + tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined, + overflowText: editor.buttonTips[id].title || undefined, + tabIndex:-1 + }; + } + + + if(this.enableFont && !Ext.isSafari2){ + var fontSelectItem = new Ext.Toolbar.Item({ + autoEl: { + tag:'select', + cls:'x-font-select', + html: this.createFontOptions() + } + }); + + items.push( + fontSelectItem, + '-' + ); + } + + if(this.enableFormat){ + items.push( + btn('bold'), + btn('italic'), + btn('underline') + ); + } + + if(this.enableFontSize){ + items.push( + '-', + btn('increasefontsize', false, this.adjustFont), + btn('decreasefontsize', false, this.adjustFont) + ); + } + + if(this.enableColors){ + items.push( + '-', { + itemId:'forecolor', + cls:'x-btn-icon', + iconCls: 'x-edit-forecolor', + clickEvent:'mousedown', + tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined, + tabIndex:-1, + menu : new Ext.menu.ColorMenu({ + allowReselect: true, + focus: Ext.emptyFn, + value:'000000', + plain:true, + listeners: { + scope: this, + select: function(cp, color){ + this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color); + this.deferFocus(); + } + }, + clickEvent:'mousedown' + }) + }, { + itemId:'backcolor', + cls:'x-btn-icon', + iconCls: 'x-edit-backcolor', + clickEvent:'mousedown', + tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined, + tabIndex:-1, + menu : new Ext.menu.ColorMenu({ + focus: Ext.emptyFn, + value:'FFFFFF', + plain:true, + allowReselect: true, + listeners: { + scope: this, + select: function(cp, color){ + if(Ext.isGecko){ + this.execCmd('useCSS', false); + this.execCmd('hilitecolor', color); + this.execCmd('useCSS', true); + this.deferFocus(); + }else{ + this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color); + this.deferFocus(); + } + } + }, + clickEvent:'mousedown' + }) + } + ); + } + + if(this.enableAlignments){ + items.push( + '-', + btn('justifyleft'), + btn('justifycenter'), + btn('justifyright') + ); + } + + if(!Ext.isSafari2){ + if(this.enableLinks){ + items.push( + '-', + btn('createlink', false, this.createLink) + ); + } + + if(this.enableLists){ + items.push( + '-', + btn('insertorderedlist'), + btn('insertunorderedlist') + ); + } + if(this.enableSourceEdit){ + items.push( + '-', + btn('sourceedit', true, function(btn){ + this.toggleSourceEdit(!this.sourceEditMode); + }) + ); + } + } + - var tb = new Ext.Toolbar({ - renderTo:this.wrap.dom.firstChild - }); - + var tb = new Ext.Toolbar({ + renderTo: this.wrap.dom.firstChild, + items: items + }); + + if (fontSelectItem) { + this.fontSelect = fontSelectItem.el; + + this.mon(this.fontSelect, 'change', function(){ + var font = this.fontSelect.dom.value; + this.relayCmd('fontname', font); + this.deferFocus(); + }, this); + } + - tb.el.on('click', function(e){ - e.preventDefault(); - }); - - if(this.enableFont && !Ext.isSafari2){ - this.fontSelect = tb.el.createChild({ - tag:'select', - cls:'x-font-select', - html: this.createFontOptions() - }); - this.fontSelect.on('change', function(){ - var font = this.fontSelect.dom.value; - this.relayCmd('fontname', font); - this.deferFocus(); - }, this); - tb.add( - this.fontSelect.dom, - '-' - ); - }; - - if(this.enableFormat){ - tb.add( - btn('bold'), - btn('italic'), - btn('underline') - ); - }; - - if(this.enableFontSize){ - tb.add( - '-', - btn('increasefontsize', false, this.adjustFont), - btn('decreasefontsize', false, this.adjustFont) - ); - }; - - if(this.enableColors){ - tb.add( - '-', { - itemId:'forecolor', - cls:'x-btn-icon x-edit-forecolor', - clickEvent:'mousedown', - tooltip: tipsEnabled ? editor.buttonTips['forecolor'] || undefined : undefined, - tabIndex:-1, - menu : new Ext.menu.ColorMenu({ - allowReselect: true, - focus: Ext.emptyFn, - value:'000000', - plain:true, - selectHandler: function(cp, color){ - this.execCmd('forecolor', Ext.isSafari || Ext.isIE ? '#'+color : color); - this.deferFocus(); - }, - scope: this, - clickEvent:'mousedown' - }) - }, { - itemId:'backcolor', - cls:'x-btn-icon x-edit-backcolor', - clickEvent:'mousedown', - tooltip: tipsEnabled ? editor.buttonTips['backcolor'] || undefined : undefined, - tabIndex:-1, - menu : new Ext.menu.ColorMenu({ - focus: Ext.emptyFn, - value:'FFFFFF', - plain:true, - allowReselect: true, - selectHandler: function(cp, color){ - if(Ext.isGecko){ - this.execCmd('useCSS', false); - this.execCmd('hilitecolor', color); - this.execCmd('useCSS', true); - this.deferFocus(); - }else{ - this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isSafari || Ext.isIE ? '#'+color : color); - this.deferFocus(); - } - }, - scope:this, - clickEvent:'mousedown' - }) - } - ); - }; - - if(this.enableAlignments){ - tb.add( - '-', - btn('justifyleft'), - btn('justifycenter'), - btn('justifyright') - ); - }; - - if(!Ext.isSafari2){ - if(this.enableLinks){ - tb.add( - '-', - btn('createlink', false, this.createLink) - ); - }; - - if(this.enableLists){ - tb.add( - '-', - btn('insertorderedlist'), - btn('insertunorderedlist') - ); - } - if(this.enableSourceEdit){ - tb.add( - '-', - btn('sourceedit', true, function(btn){ - this.toggleSourceEdit(btn.pressed); - }) - ); - } - } - - this.tb = tb; - }, - - - getDocMarkup : function(){ - return ''; - }, - + this.mon(tb.el, 'click', function(e){ + e.preventDefault(); + }); + + this.tb = tb; + this.tb.doLayout(); + }, + + onDisable: function(){ + this.wrap.mask(); + Ext.form.HtmlEditor.superclass.onDisable.call(this); + }, + + onEnable: function(){ + this.wrap.unmask(); + Ext.form.HtmlEditor.superclass.onEnable.call(this); + }, + + setReadOnly: function(readOnly){ + + Ext.form.HtmlEditor.superclass.setReadOnly.call(this, readOnly); + if(this.initialized){ + if(Ext.isIE){ + this.getEditorBody().contentEditable = !readOnly; + }else{ + this.setDesignMode(!readOnly); + } + var bd = this.getEditorBody(); + if(bd){ + bd.style.cursor = this.readOnly ? 'default' : 'text'; + } + this.disableItems(readOnly); + } + }, + - getEditorBody : function(){ - return this.doc.body || this.doc.documentElement; - }, - + getDocMarkup : function(){ + var h = Ext.fly(this.iframe).getHeight() - this.iframePad * 2; + return String.format('', this.iframePad, h); + }, + - getDoc : function(){ - return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document); - }, - + getEditorBody : function(){ + var doc = this.getDoc(); + return doc.body || doc.documentElement; + }, + - getWin : function(){ - return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name]; - }, - + getDoc : function(){ + return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document); + }, + - onRender : function(ct, position){ - Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position); - this.el.dom.style.border = '0 none'; - this.el.dom.setAttribute('tabIndex', -1); - this.el.addClass('x-hidden'); + getWin : function(){ + return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name]; + }, + + + onRender : function(ct, position){ + Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position); + this.el.dom.style.border = '0 none'; + this.el.dom.setAttribute('tabIndex', -1); + this.el.addClass('x-hidden'); if(Ext.isIE){ - this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;') - } - this.wrap = this.el.wrap({ - cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'} - }); - - this.createToolbar(this); - - this.tb.items.each(function(item){ - if(item.itemId != 'sourceedit'){ - item.disable(); - } - }); - - var iframe = document.createElement('iframe'); - iframe.name = Ext.id(); - iframe.frameBorder = '0'; - - iframe.src = Ext.isIE ? Ext.SSL_SECURE_URL : "javascript:;"; - - this.wrap.dom.appendChild(iframe); - - this.iframe = iframe; - - this.initFrame(); - - if(this.autoMonitorDesignMode !== false){ - this.monitorTask = Ext.TaskMgr.start({ - run: this.checkDesignMode, - scope: this, - interval:100 - }); - } - - if(!this.width){ - var sz = this.el.getSize(); - this.setSize(sz.width, this.height || sz.height); - } - }, - - initFrame : function(){ - this.doc = this.getDoc(); - this.win = this.getWin(); - - this.doc.open(); - this.doc.write(this.getDocMarkup()); - this.doc.close(); - + this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;'); + } + this.wrap = this.el.wrap({ + cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'} + }); + + this.createToolbar(this); + + this.disableItems(true); + + this.tb.doLayout(); + + this.createIFrame(); + + if(!this.width){ + var sz = this.el.getSize(); + this.setSize(sz.width, this.height || sz.height); + } + this.resizeEl = this.positionEl = this.wrap; + }, + + createIFrame: function(){ + var iframe = document.createElement('iframe'); + iframe.name = Ext.id(); + iframe.frameBorder = '0'; + iframe.style.overflow = 'auto'; + iframe.src = Ext.SSL_SECURE_URL; + + this.wrap.dom.appendChild(iframe); + this.iframe = iframe; + + this.monitorTask = Ext.TaskMgr.start({ + run: this.checkDesignMode, + scope: this, + interval:100 + }); + }, + + initFrame : function(){ + Ext.TaskMgr.stop(this.monitorTask); + var doc = this.getDoc(); + this.win = this.getWin(); + + doc.open(); + doc.write(this.getDocMarkup()); + doc.close(); + var task = { - run : function(){ - if(this.doc.body || this.doc.readyState == 'complete'){ - Ext.TaskMgr.stop(task); - this.doc.designMode="on"; - this.initEditor.defer(10, this); - } - }, - interval : 10, - duration:10000, - scope: this - }; - Ext.TaskMgr.start(task); - }, - - - checkDesignMode : function(){ - if(this.wrap && this.wrap.dom.offsetWidth){ - var doc = this.getDoc(); - if(!doc){ - return; - } - if(!doc.editorInitialized || String(doc.designMode).toLowerCase() != 'on'){ - this.initFrame(); - } - } - }, - + run : function(){ + var doc = this.getDoc(); + if(doc.body || doc.readyState == 'complete'){ + Ext.TaskMgr.stop(task); + this.setDesignMode(true); + this.initEditor.defer(10, this); + } + }, + interval : 10, + duration:10000, + scope: this + }; + Ext.TaskMgr.start(task); + }, + + + checkDesignMode : function(){ + if(this.wrap && this.wrap.dom.offsetWidth){ + var doc = this.getDoc(); + if(!doc){ + return; + } + if(!doc.editorInitialized || this.getDesignMode() != 'on'){ + this.initFrame(); + } + } + }, + - onResize : function(w, h){ - Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments); - if(this.el && this.iframe){ - if(typeof w == 'number'){ - var aw = w - this.wrap.getFrameWidth('lr'); - this.el.setWidth(this.adjustWidth('textarea', aw)); - this.iframe.style.width = aw + 'px'; - } - if(typeof h == 'number'){ - var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight(); - this.el.setHeight(this.adjustWidth('textarea', ah)); - this.iframe.style.height = ah + 'px'; - if(this.doc){ - this.getEditorBody().style.height = (ah - (this.iframePad*2)) + 'px'; - } - } - } - }, - - - toggleSourceEdit : function(sourceEditMode){ - if(sourceEditMode === undefined){ - sourceEditMode = !this.sourceEditMode; - } - this.sourceEditMode = sourceEditMode === true; - var btn = this.tb.items.get('sourceedit'); - if(btn.pressed !== this.sourceEditMode){ - btn.toggle(this.sourceEditMode); - return; - } - if(this.sourceEditMode){ - this.tb.items.each(function(item){ - if(item.itemId != 'sourceedit'){ - item.disable(); - } - }); - this.syncValue(); - this.iframe.className = 'x-hidden'; - this.el.removeClass('x-hidden'); - this.el.dom.removeAttribute('tabIndex'); - this.el.focus(); - }else{ - if(this.initialized){ - this.tb.items.each(function(item){ - item.enable(); - }); - } - this.pushValue(); - this.iframe.className = ''; - this.el.addClass('x-hidden'); - this.el.dom.setAttribute('tabIndex', -1); - this.deferFocus(); - } - var lastSize = this.lastSize; - if(lastSize){ - delete this.lastSize; - this.setSize(lastSize); - } - this.fireEvent('editmodechange', this, this.sourceEditMode); - }, - + setDesignMode : function(mode){ + var doc = this.getDoc(); + if (doc) { + if(this.readOnly){ + mode = false; + } + doc.designMode = (/on|true/i).test(String(mode).toLowerCase()) ?'on':'off'; + } + + }, + - createLink : function(){ - var url = prompt(this.createLinkText, this.defaultLinkValue); - if(url && url != 'http:/'+'/'){ - this.relayCmd('createlink', url); - } - }, - + getDesignMode : function(){ + var doc = this.getDoc(); + if(!doc){ return ''; } + return String(doc.designMode).toLowerCase(); + + }, + + disableItems: function(disabled){ + if(this.fontSelect){ + this.fontSelect.dom.disabled = disabled; + } + this.tb.items.each(function(item){ + if(item.getItemId() != 'sourceedit'){ + item.setDisabled(disabled); + } + }); + }, + - adjustSize : Ext.BoxComponent.prototype.adjustSize, - + onResize : function(w, h){ + Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments); + if(this.el && this.iframe){ + if(Ext.isNumber(w)){ + var aw = w - this.wrap.getFrameWidth('lr'); + this.el.setWidth(aw); + this.tb.setWidth(aw); + this.iframe.style.width = Math.max(aw, 0) + 'px'; + } + if(Ext.isNumber(h)){ + var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight(); + this.el.setHeight(ah); + this.iframe.style.height = Math.max(ah, 0) + 'px'; + var bd = this.getEditorBody(); + if(bd){ + bd.style.height = Math.max((ah - (this.iframePad*2)), 0) + 'px'; + } + } + } + }, + - getResizeEl : function(){ - return this.wrap; - }, - + toggleSourceEdit : function(sourceEditMode){ + var iframeHeight, + elHeight; + + if (sourceEditMode === undefined) { + sourceEditMode = !this.sourceEditMode; + } + this.sourceEditMode = sourceEditMode === true; + var btn = this.tb.getComponent('sourceedit'); + + if (btn.pressed !== this.sourceEditMode) { + btn.toggle(this.sourceEditMode); + if (!btn.xtbHidden) { + return; + } + } + if (this.sourceEditMode) { + + this.previousSize = this.getSize(); + + iframeHeight = Ext.get(this.iframe).getHeight(); + + this.disableItems(true); + this.syncValue(); + this.iframe.className = 'x-hidden'; + this.el.removeClass('x-hidden'); + this.el.dom.removeAttribute('tabIndex'); + this.el.focus(); + this.el.dom.style.height = iframeHeight + 'px'; + } + else { + elHeight = parseInt(this.el.dom.style.height, 10); + if (this.initialized) { + this.disableItems(this.readOnly); + } + this.pushValue(); + this.iframe.className = ''; + this.el.addClass('x-hidden'); + this.el.dom.setAttribute('tabIndex', -1); + this.deferFocus(); + + this.setSize(this.previousSize); + delete this.previousSize; + this.iframe.style.height = elHeight + 'px'; + } + this.fireEvent('editmodechange', this, this.sourceEditMode); + }, + - getPositionEl : function(){ - return this.wrap; - }, - + createLink : function() { + var url = prompt(this.createLinkText, this.defaultLinkValue); + if(url && url != 'http:/'+'/'){ + this.relayCmd('createlink', url); + } + }, + - initEvents : function(){ - this.originalValue = this.getValue(); - }, - - - markInvalid : Ext.emptyFn, - - - clearInvalid : Ext.emptyFn, - + initEvents : function(){ + this.originalValue = this.getValue(); + }, + - setValue : function(v){ - Ext.form.HtmlEditor.superclass.setValue.call(this, v); - this.pushValue(); - }, - - - cleanHtml : function(html){ - html = String(html); - if(html.length > 5){ - if(Ext.isSafari){ - html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, ''); - } - } - if(html == ' '){ - html = ''; - } - return html; - }, - - - syncValue : function(){ - if(this.initialized){ - var bd = this.getEditorBody(); - var html = bd.innerHTML; - if(Ext.isSafari){ + markInvalid : Ext.emptyFn, + + + clearInvalid : Ext.emptyFn, + + + setValue : function(v){ + Ext.form.HtmlEditor.superclass.setValue.call(this, v); + this.pushValue(); + return this; + }, + + + cleanHtml: function(html) { + html = String(html); + if(Ext.isWebKit){ + html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, ''); + } + + + if(html.charCodeAt(0) == this.defaultValue.replace(/\D/g, '')){ + html = html.substring(1); + } + return html; + }, + + + syncValue : function(){ + if(this.initialized){ + var bd = this.getEditorBody(); + var html = bd.innerHTML; + if(Ext.isWebKit){ var bs = bd.getAttribute('style'); - var m = bs.match(/text-align:(.*?);/i); - if(m && m[1]){ - html = '
    ' + html + '
    '; - } - } - html = this.cleanHtml(html); - if(this.fireEvent('beforesync', this, html) !== false){ - this.el.dom.value = html; - this.fireEvent('sync', this, html); - } - } - }, - - - pushValue : function(){ - if(this.initialized){ - var v = this.el.dom.value; - if(!this.activated && v.length < 1){ - v = ' '; - } - if(this.fireEvent('beforepush', this, v) !== false){ - this.getEditorBody().innerHTML = v; - this.fireEvent('push', this, v); - } - } - }, - + var m = bs.match(/text-align:(.*?);/i); + if(m && m[1]){ + html = '
    ' + html + '
    '; + } + } + html = this.cleanHtml(html); + if(this.fireEvent('beforesync', this, html) !== false){ + this.el.dom.value = html; + this.fireEvent('sync', this, html); + } + } + }, + - deferFocus : function(){ - this.focus.defer(10, this); - }, - + getValue : function() { + this[this.sourceEditMode ? 'pushValue' : 'syncValue'](); + return Ext.form.HtmlEditor.superclass.getValue.call(this); + }, + - focus : function(){ - if(this.win && !this.sourceEditMode){ - this.win.focus(); - }else{ - this.el.focus(); - } - }, - + pushValue : function(){ + if(this.initialized){ + var v = this.el.dom.value; + if(!this.activated && v.length < 1){ + v = this.defaultValue; + } + if(this.fireEvent('beforepush', this, v) !== false){ + this.getEditorBody().innerHTML = v; + if(Ext.isGecko){ + + this.setDesignMode(false); + this.setDesignMode(true); + } + this.fireEvent('push', this, v); + } + + } + }, + - initEditor : function(){ - var dbody = this.getEditorBody(); - var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat'); - ss['background-attachment'] = 'fixed'; - dbody.bgProperties = 'fixed'; - - Ext.DomHelper.applyStyles(dbody, ss); - - if(this.doc){ - try{ - Ext.EventManager.removeAll(this.doc); - }catch(e){} - } - - this.doc = this.getDoc(); - - Ext.EventManager.on(this.doc, { - 'mousedown': this.onEditorEvent, - 'dblclick': this.onEditorEvent, - 'click': this.onEditorEvent, - 'keyup': this.onEditorEvent, - buffer:100, - scope: this - }); - - if(Ext.isGecko){ - Ext.EventManager.on(this.doc, 'keypress', this.applyCommand, this); - } - if(Ext.isIE || Ext.isSafari || Ext.isOpera){ - Ext.EventManager.on(this.doc, 'keydown', this.fixKeys, this); - } - this.initialized = true; - - this.fireEvent('initialize', this); - - this.doc.editorInitialized = true; - - this.pushValue(); - }, - + deferFocus : function(){ + this.focus.defer(10, this); + }, + - onDestroy : function(){ - if(this.monitorTask){ - Ext.TaskMgr.stop(this.monitorTask); - } - if(this.rendered){ - this.tb.items.each(function(item){ - if(item.menu){ - item.menu.removeAll(); - if(item.menu.el){ - item.menu.el.destroy(); - } - } - item.destroy(); - }); - this.wrap.dom.innerHTML = ''; - this.wrap.remove(); - } - }, - + focus : function(){ + if(this.win && !this.sourceEditMode){ + this.win.focus(); + }else{ + this.el.focus(); + } + }, + - onFirstFocus : function(){ - this.activated = true; - this.tb.items.each(function(item){ - item.enable(); - }); + initEditor : function(){ + + try{ + var dbody = this.getEditorBody(), + ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat', 'background-color', 'color'), + doc, + fn; + + ss['background-attachment'] = 'fixed'; + dbody.bgProperties = 'fixed'; + + Ext.DomHelper.applyStyles(dbody, ss); + + doc = this.getDoc(); + + if(doc){ + try{ + Ext.EventManager.removeAll(doc); + }catch(e){} + } + + + fn = this.onEditorEvent.createDelegate(this); + Ext.EventManager.on(doc, { + mousedown: fn, + dblclick: fn, + click: fn, + keyup: fn, + buffer:100 + }); + + if(Ext.isGecko){ + Ext.EventManager.on(doc, 'keypress', this.applyCommand, this); + } + if(Ext.isIE || Ext.isWebKit || Ext.isOpera){ + Ext.EventManager.on(doc, 'keydown', this.fixKeys, this); + } + doc.editorInitialized = true; + this.initialized = true; + this.pushValue(); + this.setReadOnly(this.readOnly); + this.fireEvent('initialize', this); + }catch(e){} + }, + + + beforeDestroy : function(){ + if(this.monitorTask){ + Ext.TaskMgr.stop(this.monitorTask); + } + if(this.rendered){ + Ext.destroy(this.tb); + var doc = this.getDoc(); + if(doc){ + try{ + Ext.EventManager.removeAll(doc); + for (var prop in doc){ + delete doc[prop]; + } + }catch(e){} + } + if(this.wrap){ + this.wrap.dom.innerHTML = ''; + this.wrap.remove(); + } + } + Ext.form.HtmlEditor.superclass.beforeDestroy.call(this); + }, + + + onFirstFocus : function(){ + this.activated = true; + this.disableItems(this.readOnly); if(Ext.isGecko){ - this.win.focus(); - var s = this.win.getSelection(); - if(!s.focusNode || s.focusNode.nodeType != 3){ - var r = s.getRangeAt(0); - r.selectNodeContents(this.getEditorBody()); - r.collapse(true); - this.deferFocus(); - } - try{ - this.execCmd('useCSS', true); - this.execCmd('styleWithCSS', false); - }catch(e){} - } - this.fireEvent('activate', this); - }, - + this.win.focus(); + var s = this.win.getSelection(); + if(!s.focusNode || s.focusNode.nodeType != 3){ + var r = s.getRangeAt(0); + r.selectNodeContents(this.getEditorBody()); + r.collapse(true); + this.deferFocus(); + } + try{ + this.execCmd('useCSS', true); + this.execCmd('styleWithCSS', false); + }catch(e){} + } + this.fireEvent('activate', this); + }, + - adjustFont: function(btn){ - var adjust = btn.itemId == 'increasefontsize' ? 1 : -1; - - var v = parseInt(this.doc.queryCommandValue('FontSize') || 2, 10); - if(Ext.isSafari3 || Ext.isAir){ + adjustFont: function(btn){ + var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1, + doc = this.getDoc(), + v = parseInt(doc.queryCommandValue('FontSize') || 2, 10); + if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){ - if(v <= 10){ - v = 1 + adjust; - }else if(v <= 13){ - v = 2 + adjust; - }else if(v <= 16){ - v = 3 + adjust; - }else if(v <= 18){ - v = 4 + adjust; - }else if(v <= 24){ - v = 5 + adjust; - }else { - v = 6 + adjust; - } - v = v.constrain(1, 6); - }else{ + if(v <= 10){ + v = 1 + adjust; + }else if(v <= 13){ + v = 2 + adjust; + }else if(v <= 16){ + v = 3 + adjust; + }else if(v <= 18){ + v = 4 + adjust; + }else if(v <= 24){ + v = 5 + adjust; + }else { + v = 6 + adjust; + } + v = v.constrain(1, 6); + }else{ if(Ext.isSafari){ - adjust *= 2; - } - v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0); - } - this.execCmd('FontSize', v); - }, - + adjust *= 2; + } + v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0); + } + this.execCmd('FontSize', v); + }, + - onEditorEvent : function(e){ - this.updateToolbar(); - }, - - - - updateToolbar: function(){ - - if(!this.activated){ - this.onFirstFocus(); - return; - } - - var btns = this.tb.items.map, doc = this.doc; - - if(this.enableFont && !Ext.isSafari2){ - var name = (this.doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase(); - if(name != this.fontSelect.dom.value){ - this.fontSelect.dom.value = name; - } - } - if(this.enableFormat){ - btns.bold.toggle(doc.queryCommandState('bold')); - btns.italic.toggle(doc.queryCommandState('italic')); - btns.underline.toggle(doc.queryCommandState('underline')); - } - if(this.enableAlignments){ - btns.justifyleft.toggle(doc.queryCommandState('justifyleft')); - btns.justifycenter.toggle(doc.queryCommandState('justifycenter')); - btns.justifyright.toggle(doc.queryCommandState('justifyright')); - } - if(!Ext.isSafari2 && this.enableLists){ - btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist')); - btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist')); - } - - Ext.menu.MenuMgr.hideAll(); - - this.syncValue(); - }, - + onEditorEvent : function(e){ + this.updateToolbar(); + }, + + - relayBtnCmd : function(btn){ - this.relayCmd(btn.itemId); - }, - - - relayCmd : function(cmd, value){ - (function(){ - this.focus(); - this.execCmd(cmd, value); - this.updateToolbar(); - }).defer(10, this); - }, - - - execCmd : function(cmd, value){ - this.doc.execCommand(cmd, false, value === undefined ? null : value); - this.syncValue(); - }, - + updateToolbar: function(){ + + if(this.readOnly){ + return; + } + + if(!this.activated){ + this.onFirstFocus(); + return; + } + + var btns = this.tb.items.map, + doc = this.getDoc(); + + if(this.enableFont && !Ext.isSafari2){ + var name = (doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase(); + if(name != this.fontSelect.dom.value){ + this.fontSelect.dom.value = name; + } + } + if(this.enableFormat){ + btns.bold.toggle(doc.queryCommandState('bold')); + btns.italic.toggle(doc.queryCommandState('italic')); + btns.underline.toggle(doc.queryCommandState('underline')); + } + if(this.enableAlignments){ + btns.justifyleft.toggle(doc.queryCommandState('justifyleft')); + btns.justifycenter.toggle(doc.queryCommandState('justifycenter')); + btns.justifyright.toggle(doc.queryCommandState('justifyright')); + } + if(!Ext.isSafari2 && this.enableLists){ + btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist')); + btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist')); + } + + Ext.menu.MenuMgr.hideAll(); + + this.syncValue(); + }, + - applyCommand : function(e){ - if(e.ctrlKey){ - var c = e.getCharCode(), cmd; - if(c > 0){ - c = String.fromCharCode(c); - switch(c){ - case 'b': - cmd = 'bold'; - break; - case 'i': - cmd = 'italic'; - break; - case 'u': - cmd = 'underline'; - break; - } - if(cmd){ - this.win.focus(); - this.execCmd(cmd); - this.deferFocus(); - e.preventDefault(); - } - } - } - }, - - - insertAtCursor : function(text){ - if(!this.activated){ - return; - } - if(Ext.isIE){ - this.win.focus(); - var r = this.doc.selection.createRange(); - if(r){ - r.collapse(true); - r.pasteHTML(text); - this.syncValue(); - this.deferFocus(); - } - }else if(Ext.isGecko || Ext.isOpera){ - this.win.focus(); - this.execCmd('InsertHTML', text); - this.deferFocus(); - }else if(Ext.isSafari){ - this.execCmd('InsertText', text); - this.deferFocus(); - } - }, - + relayBtnCmd : function(btn){ + this.relayCmd(btn.getItemId()); + }, + + + relayCmd : function(cmd, value){ + (function(){ + this.focus(); + this.execCmd(cmd, value); + this.updateToolbar(); + }).defer(10, this); + }, + + + execCmd : function(cmd, value){ + var doc = this.getDoc(); + doc.execCommand(cmd, false, value === undefined ? null : value); + this.syncValue(); + }, + + + applyCommand : function(e){ + if(e.ctrlKey){ + var c = e.getCharCode(), cmd; + if(c > 0){ + c = String.fromCharCode(c); + switch(c){ + case 'b': + cmd = 'bold'; + break; + case 'i': + cmd = 'italic'; + break; + case 'u': + cmd = 'underline'; + break; + } + if(cmd){ + this.win.focus(); + this.execCmd(cmd); + this.deferFocus(); + e.preventDefault(); + } + } + } + }, + + + insertAtCursor : function(text){ + if(!this.activated){ + return; + } + if(Ext.isIE){ + this.win.focus(); + var doc = this.getDoc(), + r = doc.selection.createRange(); + if(r){ + r.pasteHTML(text); + this.syncValue(); + this.deferFocus(); + } + }else{ + this.win.focus(); + this.execCmd('InsertHTML', text); + this.deferFocus(); + } + }, + fixKeys : function(){ - if(Ext.isIE){ - return function(e){ - var k = e.getKey(), r; - if(k == e.TAB){ - e.stopEvent(); - r = this.doc.selection.createRange(); - if(r){ - r.collapse(true); - r.pasteHTML('    '); - this.deferFocus(); - } - }else if(k == e.ENTER){ - r = this.doc.selection.createRange(); - if(r){ - var target = r.parentElement(); - if(!target || target.tagName.toLowerCase() != 'li'){ - e.stopEvent(); - r.pasteHTML('
    '); - r.collapse(false); - r.select(); - } - } - } - }; - }else if(Ext.isOpera){ - return function(e){ - var k = e.getKey(); - if(k == e.TAB){ - e.stopEvent(); - this.win.focus(); - this.execCmd('InsertHTML','    '); - this.deferFocus(); - } - }; - }else if(Ext.isSafari){ - return function(e){ - var k = e.getKey(); - if(k == e.TAB){ - e.stopEvent(); - this.execCmd('InsertText','\t'); - this.deferFocus(); - } - }; - } - }(), - - - getToolbar : function(){ - return this.tb; - }, - - - buttonTips : { - bold : { - title: 'Bold (Ctrl+B)', - text: 'Make the selected text bold.', - cls: 'x-html-editor-tip' - }, - italic : { - title: 'Italic (Ctrl+I)', - text: 'Make the selected text italic.', - cls: 'x-html-editor-tip' - }, - underline : { - title: 'Underline (Ctrl+U)', - text: 'Underline the selected text.', - cls: 'x-html-editor-tip' - }, - increasefontsize : { - title: 'Grow Text', - text: 'Increase the font size.', - cls: 'x-html-editor-tip' - }, - decreasefontsize : { - title: 'Shrink Text', - text: 'Decrease the font size.', - cls: 'x-html-editor-tip' - }, - backcolor : { - title: 'Text Highlight Color', - text: 'Change the background color of the selected text.', - cls: 'x-html-editor-tip' - }, - forecolor : { - title: 'Font Color', - text: 'Change the color of the selected text.', - cls: 'x-html-editor-tip' - }, - justifyleft : { - title: 'Align Text Left', - text: 'Align text to the left.', - cls: 'x-html-editor-tip' - }, - justifycenter : { - title: 'Center Text', - text: 'Center text in the editor.', - cls: 'x-html-editor-tip' - }, - justifyright : { - title: 'Align Text Right', - text: 'Align text to the right.', - cls: 'x-html-editor-tip' - }, - insertunorderedlist : { - title: 'Bullet List', - text: 'Start a bulleted list.', - cls: 'x-html-editor-tip' - }, - insertorderedlist : { - title: 'Numbered List', - text: 'Start a numbered list.', - cls: 'x-html-editor-tip' - }, - createlink : { - title: 'Hyperlink', - text: 'Make the selected text a hyperlink.', - cls: 'x-html-editor-tip' - }, - sourceedit : { - title: 'Source Edit', - text: 'Switch to source editing mode.', - cls: 'x-html-editor-tip' - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}); -Ext.reg('htmleditor', Ext.form.HtmlEditor); - -Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { - - minValue : null, - - maxValue : null, - - minText : "The time in this field must be equal to or after {0}", - - maxText : "The time in this field must be equal to or before {0}", - - invalidText : "{0} is not a valid time", - - format : "g:i A", - - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H", - - increment: 15, - - - mode: 'local', - - triggerAction: 'all', - - typeAhead: false, - - - - - initDate: '1/1/2008', - - - initComponent : function(){ - Ext.form.TimeField.superclass.initComponent.call(this); - - if(typeof this.minValue == "string"){ - this.minValue = this.parseDate(this.minValue); - } - if(typeof this.maxValue == "string"){ - this.maxValue = this.parseDate(this.maxValue); - } - - if(!this.store){ - var min = this.parseDate(this.minValue); - if(!min){ - min = new Date(this.initDate).clearTime(); - } - var max = this.parseDate(this.maxValue); - if(!max){ - max = new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1); - } - var times = []; - while(min <= max){ - times.push([min.dateFormat(this.format)]); - min = min.add('mi', this.increment); - } - this.store = new Ext.data.SimpleStore({ - fields: ['text'], - data : times - }); - this.displayField = 'text'; - } - }, - - - getValue : function(){ - var v = Ext.form.TimeField.superclass.getValue.call(this); - return this.formatDate(this.parseDate(v)) || ''; - }, - - - setValue : function(value){ - Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value))); - }, - - - validateValue : Ext.form.DateField.prototype.validateValue, - parseDate : Ext.form.DateField.prototype.parseDate, - formatDate : Ext.form.DateField.prototype.formatDate, - - - beforeBlur : function(){ - var v = this.parseDate(this.getRawValue()); - if(v){ - this.setValue(v.dateFormat(this.format)); - } - } - - - - - -}); -Ext.reg('timefield', Ext.form.TimeField); + if(Ext.isIE){ + return function(e){ + var k = e.getKey(), + doc = this.getDoc(), + r; + if(k == e.TAB){ + e.stopEvent(); + r = doc.selection.createRange(); + if(r){ + r.collapse(true); + r.pasteHTML('    '); + this.deferFocus(); + } + }else if(k == e.ENTER){ + r = doc.selection.createRange(); + if(r){ + var target = r.parentElement(); + if(!target || target.tagName.toLowerCase() != 'li'){ + e.stopEvent(); + r.pasteHTML('
    '); + r.collapse(false); + r.select(); + } + } + } + }; + }else if(Ext.isOpera){ + return function(e){ + var k = e.getKey(); + if(k == e.TAB){ + e.stopEvent(); + this.win.focus(); + this.execCmd('InsertHTML','    '); + this.deferFocus(); + } + }; + }else if(Ext.isWebKit){ + return function(e){ + var k = e.getKey(); + if(k == e.TAB){ + e.stopEvent(); + this.execCmd('InsertText','\t'); + this.deferFocus(); + }else if(k == e.ENTER){ + e.stopEvent(); + this.execCmd('InsertHtml','

    '); + this.deferFocus(); + } + }; + } + }(), + + getToolbar : function(){ + return this.tb; + }, + + + buttonTips : { + bold : { + title: 'Bold (Ctrl+B)', + text: 'Make the selected text bold.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Make the selected text italic.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Underline (Ctrl+U)', + text: 'Underline the selected text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Grow Text', + text: 'Increase the font size.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Shrink Text', + text: 'Decrease the font size.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text Highlight Color', + text: 'Change the background color of the selected text.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Font Color', + text: 'Change the color of the selected text.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Align Text Left', + text: 'Align text to the left.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Center Text', + text: 'Center text in the editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Bullet List', + text: 'Start a bulleted list.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numbered List', + text: 'Start a numbered list.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Make the selected text a hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source Edit', + text: 'Switch to source editing mode.', + cls: 'x-html-editor-tip' + } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +}); +Ext.reg('htmleditor', Ext.form.HtmlEditor); + +Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { + + minValue : undefined, + + maxValue : undefined, + + minText : "The time in this field must be equal to or after {0}", + + maxText : "The time in this field must be equal to or before {0}", + + invalidText : "{0} is not a valid time", + + format : "g:i A", + + altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A", + + increment: 15, + + + mode: 'local', + + triggerAction: 'all', + + typeAhead: false, + + + + + initDate: '1/1/2008', + + initDateFormat: 'j/n/Y', + + + initComponent : function(){ + if(Ext.isDefined(this.minValue)){ + this.setMinValue(this.minValue, true); + } + if(Ext.isDefined(this.maxValue)){ + this.setMaxValue(this.maxValue, true); + } + if(!this.store){ + this.generateStore(true); + } + Ext.form.TimeField.superclass.initComponent.call(this); + }, + + + setMinValue: function(value, initial){ + this.setLimit(value, true, initial); + return this; + }, + + + setMaxValue: function(value, initial){ + this.setLimit(value, false, initial); + return this; + }, + + + generateStore: function(initial){ + var min = this.minValue || new Date(this.initDate).clearTime(), + max = this.maxValue || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1), + times = []; + + while(min <= max){ + times.push(min.dateFormat(this.format)); + min = min.add('mi', this.increment); + } + this.bindStore(times, initial); + }, + + + setLimit: function(value, isMin, initial){ + var d; + if(Ext.isString(value)){ + d = this.parseDate(value); + }else if(Ext.isDate(value)){ + d = value; + } + if(d){ + var val = new Date(this.initDate).clearTime(); + val.setHours(d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()); + this[isMin ? 'minValue' : 'maxValue'] = val; + if(!initial){ + this.generateStore(); + } + } + }, + + + getValue : function(){ + var v = Ext.form.TimeField.superclass.getValue.call(this); + return this.formatDate(this.parseDate(v)) || ''; + }, + + + setValue : function(value){ + return Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value))); + }, + + + validateValue : Ext.form.DateField.prototype.validateValue, + + formatDate : Ext.form.DateField.prototype.formatDate, + + parseDate: function(value) { + if (!value || Ext.isDate(value)) { + return value; + } + + var id = this.initDate + ' ', + idf = this.initDateFormat + ' ', + v = Date.parseDate(id + value, idf + this.format), + af = this.altFormats; + + if (!v && af) { + if (!this.altFormatsArray) { + this.altFormatsArray = af.split("|"); + } + for (var i = 0, afa = this.altFormatsArray, len = afa.length; i < len && !v; i++) { + v = Date.parseDate(id + value, idf + afa[i]); + } + } + + return v; + } +}); +Ext.reg('timefield', Ext.form.TimeField); +Ext.form.SliderField = Ext.extend(Ext.form.Field, { + + + useTips : true, + + + tipText : null, + + + actionMode: 'wrap', + + + initComponent : function() { + var cfg = Ext.copyTo({ + id: this.id + '-slider' + }, this.initialConfig, ['vertical', 'minValue', 'maxValue', 'decimalPrecision', 'keyIncrement', 'increment', 'clickToChange', 'animate']); + + + if (this.useTips) { + var plug = this.tipText ? {getText: this.tipText} : {}; + cfg.plugins = [new Ext.slider.Tip(plug)]; + } + this.slider = new Ext.Slider(cfg); + Ext.form.SliderField.superclass.initComponent.call(this); + }, + + + onRender : function(ct, position){ + this.autoCreate = { + id: this.id, + name: this.name, + type: 'hidden', + tag: 'input' + }; + Ext.form.SliderField.superclass.onRender.call(this, ct, position); + this.wrap = this.el.wrap({cls: 'x-form-field-wrap'}); + this.resizeEl = this.positionEl = this.wrap; + this.slider.render(this.wrap); + }, + + + onResize : function(w, h, aw, ah){ + Ext.form.SliderField.superclass.onResize.call(this, w, h, aw, ah); + this.slider.setSize(w, h); + }, + + + initEvents : function(){ + Ext.form.SliderField.superclass.initEvents.call(this); + this.slider.on('change', this.onChange, this); + }, + + + onChange : function(slider, v){ + this.setValue(v, undefined, true); + }, + + + onEnable : function(){ + Ext.form.SliderField.superclass.onEnable.call(this); + this.slider.enable(); + }, + + + onDisable : function(){ + Ext.form.SliderField.superclass.onDisable.call(this); + this.slider.disable(); + }, + + + beforeDestroy : function(){ + Ext.destroy(this.slider); + Ext.form.SliderField.superclass.beforeDestroy.call(this); + }, + + + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.slider.el, 'tl-tr', [2, 0]); + }, + + + setMinValue : function(v){ + this.slider.setMinValue(v); + return this; + }, + + + setMaxValue : function(v){ + this.slider.setMaxValue(v); + return this; + }, + + + setValue : function(v, animate, silent){ + + + if(!silent){ + this.slider.setValue(v, animate); + } + return Ext.form.SliderField.superclass.setValue.call(this, this.slider.getValue()); + }, + + + getValue : function(){ + return this.slider.getValue(); + } +}); + +Ext.reg('sliderfield', Ext.form.SliderField); Ext.form.Label = Ext.extend(Ext.BoxComponent, { - onRender : function(ct, position){ + + onRender : function(ct, position){ if(!this.el){ this.el = document.createElement('label'); this.el.id = this.getId(); this.el.innerHTML = this.text ? Ext.util.Format.htmlEncode(this.text) : (this.html || ''); if(this.forId){ - this.el.setAttribute('htmlFor', this.forId); + this.el.setAttribute('for', this.forId); } } Ext.form.Label.superclass.onRender.call(this, ct, position); }, + - - setText: function(t, encode){ - this.text = t; + setText : function(t, encode){ + var e = encode === false; + this[!e ? 'text' : 'html'] = t; + delete this[e ? 'text' : 'html']; if(this.rendered){ this.el.dom.innerHTML = encode !== false ? Ext.util.Format.htmlEncode(t) : t; } @@ -30009,7 +45538,6 @@ Ext.form.Label = Ext.extend(Ext.BoxComponent, { }); Ext.reg('label', Ext.form.Label); - Ext.form.Action = function(form, options){ this.form = form; this.options = options || {}; @@ -30037,52 +45565,74 @@ Ext.form.Action.prototype = { + + type : 'default', + + - run : function(options){ + + run : function(options){ }, - success : function(response){ + + success : function(response){ }, - handleResponse : function(response){ + + handleResponse : function(response){ }, - failure : function(response){ + + failure : function(response){ this.response = response; this.failureType = Ext.form.Action.CONNECT_FAILURE; this.form.afterAction(this, false); }, - processResponse : function(response){ + + + + processResponse : function(response){ this.response = response; - if(!response.responseText){ + if(!response.responseText && !response.responseXML){ return true; } this.result = this.handleResponse(response); return this.result; }, + + decodeResponse: function(response) { + try { + return Ext.decode(response.responseText); + } catch(e) { + return false; + } + }, - getUrl : function(appendParams){ + + getUrl : function(appendParams){ var url = this.options.url || this.form.url || this.form.el.dom.action; if(appendParams){ var p = this.getParams(); if(p){ - url += (url.indexOf('?') != -1 ? '&' : '?') + p; + url = Ext.urlAppend(url, p); } } return url; }, - getMethod : function(){ + + getMethod : function(){ return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase(); }, - getParams : function(){ + + getParams : function(){ var bp = this.form.baseParams; var p = this.options.params; if(p){ @@ -30097,8 +45647,9 @@ Ext.form.Action.prototype = { return p; }, - createCallback : function(opts){ - var opts = opts || {}; + + createCallback : function(opts){ + var opts = opts || {}; return { success: this.success, failure: this.failure, @@ -30119,11 +45670,27 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { type : 'submit', - run : function(){ - var o = this.options; - var method = this.getMethod(); - var isGet = method == 'GET'; + + run : function(){ + var o = this.options, + method = this.getMethod(), + isGet = method == 'GET'; if(o.clientValidation === false || this.form.isValid()){ + if (o.submitEmptyText === false) { + var fields = this.form.items, + emptyFields = [], + setupEmptyFields = function(f){ + if (f.el.getValue() == f.emptyText) { + emptyFields.push(f); + f.el.dom.value = ""; + } + if(f.isComposite && f.rendered){ + f.items.each(setupEmptyFields); + } + }; + + fields.each(setupEmptyFields); + } Ext.Ajax.request(Ext.apply(this.createCallback(o), { form:this.form.el.dom, url:this.getUrl(isGet), @@ -30132,12 +45699,21 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { params:!isGet ? this.getParams() : null, isUpload: this.form.fileUpload })); - }else if (o.clientValidation !== false){ this.failureType = Ext.form.Action.CLIENT_INVALID; + if (o.submitEmptyText === false) { + Ext.each(emptyFields, function(f) { + if (f.applyEmptyText) { + f.applyEmptyText(); + } + }); + } + }else if (o.clientValidation !== false){ + this.failureType = Ext.form.Action.CLIENT_INVALID; this.form.afterAction(this, false); } }, - success : function(response){ + + success : function(response){ var result = this.processResponse(response); if(result === true || result.success){ this.form.afterAction(this, true); @@ -30145,12 +45721,13 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { } if(result.errors){ this.form.markInvalid(result.errors); - this.failureType = Ext.form.Action.SERVER_INVALID; } + this.failureType = Ext.form.Action.SERVER_INVALID; this.form.afterAction(this, false); }, - handleResponse : function(response){ + + handleResponse : function(response){ if(this.form.errorReader){ var rs = this.form.errorReader.read(response); var errors = []; @@ -30168,7 +45745,7 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { errors : errors }; } - return Ext.decode(response.responseText); + return this.decodeResponse(response); } }); @@ -30180,9 +45757,11 @@ Ext.form.Action.Load = function(form, options){ }; Ext.extend(Ext.form.Action.Load, Ext.form.Action, { - type : 'load', + + type : 'load', - run : function(){ + + run : function(){ Ext.Ajax.request(Ext.apply( this.createCallback(this.options), { method:this.getMethod(), @@ -30192,7 +45771,8 @@ Ext.extend(Ext.form.Action.Load, Ext.form.Action, { })); }, - success : function(response){ + + success : function(response){ var result = this.processResponse(response); if(result === true || !result.success || !result.data){ this.failureType = Ext.form.Action.LOAD_FAILURE; @@ -30204,7 +45784,8 @@ Ext.extend(Ext.form.Action.Load, Ext.form.Action, { this.form.afterAction(this, true); }, - handleResponse : function(response){ + + handleResponse : function(response){ if(this.form.reader){ var rs = this.form.reader.read(response); var data = rs.records && rs.records[0] ? rs.records[0].data : null; @@ -30213,1064 +45794,1850 @@ Ext.extend(Ext.form.Action.Load, Ext.form.Action, { data : data }; } - return Ext.decode(response.responseText); + return this.decodeResponse(response); + } +}); + + + + +Ext.form.Action.DirectLoad = Ext.extend(Ext.form.Action.Load, { + constructor: function(form, opts) { + Ext.form.Action.DirectLoad.superclass.constructor.call(this, form, opts); + }, + type : 'directload', + + run : function(){ + var args = this.getParams(); + args.push(this.success, this); + this.form.api.load.apply(window, args); + }, + + getParams : function() { + var buf = [], o = {}; + var bp = this.form.baseParams; + var p = this.options.params; + Ext.apply(o, p, bp); + var paramOrder = this.form.paramOrder; + if(paramOrder){ + for(var i = 0, len = paramOrder.length; i < len; i++){ + buf.push(o[paramOrder[i]]); + } + }else if(this.form.paramsAsHash){ + buf.push(o); + } + return buf; + }, + + + + processResponse : function(result) { + this.result = result; + return result; + }, + + success : function(response, trans){ + if(trans.type == Ext.Direct.exceptions.SERVER){ + response = {}; + } + Ext.form.Action.DirectLoad.superclass.success.call(this, response); + } +}); + + +Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, { + constructor : function(form, opts) { + Ext.form.Action.DirectSubmit.superclass.constructor.call(this, form, opts); + }, + type : 'directsubmit', + + run : function(){ + var o = this.options; + if(o.clientValidation === false || this.form.isValid()){ + + + this.success.params = this.getParams(); + this.form.api.submit(this.form.el.dom, this.success, this); + }else if (o.clientValidation !== false){ + this.failureType = Ext.form.Action.CLIENT_INVALID; + this.form.afterAction(this, false); + } + }, + + getParams : function() { + var o = {}; + var bp = this.form.baseParams; + var p = this.options.params; + Ext.apply(o, p, bp); + return o; + }, + + + + processResponse : function(result) { + this.result = result; + return result; + }, + + success : function(response, trans){ + if(trans.type == Ext.Direct.exceptions.SERVER){ + response = {}; + } + Ext.form.Action.DirectSubmit.superclass.success.call(this, response); } }); Ext.form.Action.ACTION_TYPES = { 'load' : Ext.form.Action.Load, - 'submit' : Ext.form.Action.Submit + 'submit' : Ext.form.Action.Submit, + 'directload' : Ext.form.Action.DirectLoad, + 'directsubmit' : Ext.form.Action.DirectSubmit }; - Ext.form.VTypes = function(){ - var alpha = /^[a-zA-Z_]+$/; - var alphanum = /^[a-zA-Z0-9_]+$/; - var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/; - var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i; + + var alpha = /^[a-zA-Z_]+$/, + alphanum = /^[a-zA-Z0-9_]+$/, + email = /^(\w+)([\-+.\'][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/, + url = /(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i; - return { + + return { 'email' : function(v){ return email.test(v); }, - 'emailText' : 'This field should be an e-mail address in the format "user@domain.com"', + 'emailText' : 'This field should be an e-mail address in the format "user@example.com"', - 'emailMask' : /[a-z0-9_\.\-@]/i, + 'emailMask' : /[a-z0-9_\.\-\+\'@]/i, - + /** + * The function used to validate URLs + * @param {String} value The URL + * @return {Boolean} true if the RegExp test passed, and false if not. + */ 'url' : function(v){ return url.test(v); }, - - 'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"', - - + /** + * The error text to display when the url validation function returns false. Defaults to: + * 'This field should be a URL in the format "http:/'+'/www.example.com"' + * @type String + */ + 'urlText' : 'This field should be a URL in the format "http:/'+'/www.example.com"', + + /** + * The function used to validate alpha values + * @param {String} value The value + * @return {Boolean} true if the RegExp test passed, and false if not. + */ 'alpha' : function(v){ return alpha.test(v); }, - + /** + * The error text to display when the alpha validation function returns false. Defaults to: + * 'This field should only contain letters and _' + * @type String + */ 'alphaText' : 'This field should only contain letters and _', - + /** + * The keystroke filter mask to be applied on alpha input. Defaults to: + * /[a-z_]/i + * @type RegExp + */ 'alphaMask' : /[a-z_]/i, - + /** + * The function used to validate alphanumeric values + * @param {String} value The value + * @return {Boolean} true if the RegExp test passed, and false if not. + */ 'alphanum' : function(v){ return alphanum.test(v); }, - + /** + * The error text to display when the alphanumeric validation function returns false. Defaults to: + * 'This field should only contain letters, numbers and _' + * @type String + */ 'alphanumText' : 'This field should only contain letters, numbers and _', - + /** + * The keystroke filter mask to be applied on alphanumeric input. Defaults to: + * /[a-z0-9_]/i + * @type RegExp + */ 'alphanumMask' : /[a-z0-9_]/i }; }(); - -Ext.grid.GridPanel = Ext.extend(Ext.Panel, { - - - - - - - - - - - - - - - ddText : "{0} selected row{1}", - - minColumnWidth : 25, - - trackMouseOver : true, - - enableDragDrop : false, - - enableColumnMove : true, - - enableColumnHide : true, - - enableHdMenu : true, - - stripeRows : false, - - autoExpandColumn : false, - - autoExpandMin : 50, - - autoExpandMax : 1000, - - view : null, - - loadMask : false, - - - deferRowRender : true, - - - rendered : false, - - viewReady: false, - - stateEvents: ["columnmove", "columnresize", "sortchange"], - - - initComponent : function(){ - Ext.grid.GridPanel.superclass.initComponent.call(this); - - - - this.autoScroll = false; - this.autoWidth = false; - - if(Ext.isArray(this.columns)){ - this.colModel = new Ext.grid.ColumnModel(this.columns); - delete this.columns; - } - - - if(this.ds){ - this.store = this.ds; - delete this.ds; - } - if(this.cm){ - this.colModel = this.cm; - delete this.cm; - } - if(this.sm){ - this.selModel = this.sm; - delete this.sm; - } - this.store = Ext.StoreMgr.lookup(this.store); - - this.addEvents( - - - "click", - - "dblclick", - - "contextmenu", - - "mousedown", - - "mouseup", - - "mouseover", - - "mouseout", - - "keypress", - - "keydown", - - - - "cellmousedown", - - "rowmousedown", - - "headermousedown", - - - "cellclick", - - "celldblclick", - - "rowclick", - - "rowdblclick", - - "headerclick", - - "headerdblclick", - - "rowcontextmenu", - - "cellcontextmenu", - - "headercontextmenu", - - "bodyscroll", - - "columnresize", - - "columnmove", - - "sortchange" - ); - }, - - - onRender : function(ct, position){ - Ext.grid.GridPanel.superclass.onRender.apply(this, arguments); - - var c = this.body; - - this.el.addClass('x-grid-panel'); - - var view = this.getView(); - view.init(this); - - c.on("mousedown", this.onMouseDown, this); - c.on("click", this.onClick, this); - c.on("dblclick", this.onDblClick, this); - c.on("contextmenu", this.onContextMenu, this); - c.on("keydown", this.onKeyDown, this); - - this.relayEvents(c, ["mousedown","mouseup","mouseover","mouseout","keypress"]); - - this.getSelectionModel().init(this); - this.view.render(); - }, - - - initEvents : function(){ - Ext.grid.GridPanel.superclass.initEvents.call(this); - - if(this.loadMask){ - this.loadMask = new Ext.LoadMask(this.bwrap, - Ext.apply({store:this.store}, this.loadMask)); - } - }, - - initStateEvents : function(){ - Ext.grid.GridPanel.superclass.initStateEvents.call(this); - this.colModel.on('hiddenchange', this.saveState, this, {delay: 100}); - }, - - applyState : function(state){ - var cm = this.colModel; - var cs = state.columns; - if(cs){ - for(var i = 0, len = cs.length; i < len; i++){ - var s = cs[i]; - var c = cm.getColumnById(s.id); - if(c){ - c.hidden = s.hidden; - c.width = s.width; - var oldIndex = cm.getIndexById(s.id); - if(oldIndex != i){ - cm.moveColumn(oldIndex, i); - } - } - } - } - if(state.sort){ - this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction); - } - }, - - getState : function(){ - var o = {columns: []}; - for(var i = 0, c; c = this.colModel.config[i]; i++){ - o.columns[i] = { - id: c.id, - width: c.width - }; - if(c.hidden){ - o.columns[i].hidden = true; - } - } - var ss = this.store.getSortState(); - if(ss){ - o.sort = ss; - } - return o; - }, - - - afterRender : function(){ - Ext.grid.GridPanel.superclass.afterRender.call(this); - this.view.layout(); - if(this.deferRowRender){ - this.view.afterRender.defer(10, this.view); - }else{ - this.view.afterRender(); - } - this.viewReady = true; - }, - - - reconfigure : function(store, colModel){ - if(this.loadMask){ - this.loadMask.destroy(); - this.loadMask = new Ext.LoadMask(this.bwrap, - Ext.apply({store:store}, this.initialConfig.loadMask)); - } - this.view.bind(store, colModel); - this.store = store; - this.colModel = colModel; - if(this.rendered){ - this.view.refresh(true); - } - }, - - - onKeyDown : function(e){ - this.fireEvent("keydown", e); - }, - - - onDestroy : function(){ - if(this.rendered){ - if(this.loadMask){ - this.loadMask.destroy(); - } - var c = this.body; - c.removeAllListeners(); - this.view.destroy(); - c.update(""); - } - this.colModel.purgeListeners(); - Ext.grid.GridPanel.superclass.onDestroy.call(this); - }, - - - processEvent : function(name, e){ - this.fireEvent(name, e); - var t = e.getTarget(); - var v = this.view; - var header = v.findHeaderIndex(t); - if(header !== false){ - this.fireEvent("header" + name, this, header, e); - }else{ - var row = v.findRowIndex(t); - var cell = v.findCellIndex(t); - if(row !== false){ - this.fireEvent("row" + name, this, row, e); - if(cell !== false){ - this.fireEvent("cell" + name, this, row, cell, e); - } - } - } - }, - - - onClick : function(e){ - this.processEvent("click", e); - }, - - - onMouseDown : function(e){ - this.processEvent("mousedown", e); - }, - - - onContextMenu : function(e, t){ - this.processEvent("contextmenu", e); - }, - - - onDblClick : function(e){ - this.processEvent("dblclick", e); - }, - - - walkCells : function(row, col, step, fn, scope){ - var cm = this.colModel, clen = cm.getColumnCount(); - var ds = this.store, rlen = ds.getCount(), first = true; - if(step < 0){ - if(col < 0){ - row--; - first = false; - } - while(row >= 0){ - if(!first){ - col = clen-1; - } - first = false; - while(col >= 0){ - if(fn.call(scope || this, row, col, cm) === true){ - return [row, col]; - } - col--; - } - row--; - } - } else { - if(col >= clen){ - row++; - first = false; - } - while(row < rlen){ - if(!first){ - col = 0; - } - first = false; - while(col < clen){ - if(fn.call(scope || this, row, col, cm) === true){ - return [row, col]; - } - col++; - } - row++; - } - } - return null; - }, - - - getSelections : function(){ - return this.selModel.getSelections(); - }, - - - onResize : function(){ - Ext.grid.GridPanel.superclass.onResize.apply(this, arguments); - if(this.viewReady){ - this.view.layout(); - } - }, - - - getGridEl : function(){ - return this.body; - }, - - - stopEditing : function(){}, - - - getSelectionModel : function(){ - if(!this.selModel){ - this.selModel = new Ext.grid.RowSelectionModel( - this.disableSelection ? {selectRow: Ext.emptyFn} : null); - } - return this.selModel; - }, - - - getStore : function(){ - return this.store; - }, - - - getColumnModel : function(){ - return this.colModel; - }, - - - getView : function(){ - if(!this.view){ - this.view = new Ext.grid.GridView(this.viewConfig); - } - return this.view; - }, - - getDragDropText : function(){ - var count = this.selModel.getCount(); - return String.format(this.ddText, count, count == 1 ? '' : 's'); - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}); -Ext.reg('grid', Ext.grid.GridPanel); +/** + * @class Ext.grid.GridPanel + * @extends Ext.Panel + *

    This class represents the primary interface of a component based grid control to represent data + * in a tabular format of rows and columns. The GridPanel is composed of the following:

    + *
      + *
    • {@link Ext.data.Store Store} : The Model holding the data records (rows) + *
    • + *
    • {@link Ext.grid.ColumnModel Column model} : Column makeup + *
    • + *
    • {@link Ext.grid.GridView View} : Encapsulates the user interface + *
    • + *
    • {@link Ext.grid.AbstractSelectionModel selection model} : Selection behavior + *
    • + *
    + *

    Example usage:

    + *
    
    +var grid = new Ext.grid.GridPanel({
    +    {@link #store}: new {@link Ext.data.Store}({
    +        {@link Ext.data.Store#autoDestroy autoDestroy}: true,
    +        {@link Ext.data.Store#reader reader}: reader,
    +        {@link Ext.data.Store#data data}: xg.dummyData
    +    }),
    +    {@link #colModel}: new {@link Ext.grid.ColumnModel}({
    +        {@link Ext.grid.ColumnModel#defaults defaults}: {
    +            width: 120,
    +            sortable: true
    +        },
    +        {@link Ext.grid.ColumnModel#columns columns}: [
    +            {id: 'company', header: 'Company', width: 200, sortable: true, dataIndex: 'company'},
    +            {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
    +            {header: 'Change', dataIndex: 'change'},
    +            {header: '% Change', dataIndex: 'pctChange'},
    +            // instead of specifying renderer: Ext.util.Format.dateRenderer('m/d/Y') use xtype
    +            {
    +                header: 'Last Updated', width: 135, dataIndex: 'lastChange',
    +                xtype: 'datecolumn', format: 'M d, Y'
    +            }
    +        ]
    +    }),
    +    {@link #viewConfig}: {
    +        {@link Ext.grid.GridView#forceFit forceFit}: true,
    +
    +//      Return CSS class to apply to rows depending upon data values
    +        {@link Ext.grid.GridView#getRowClass getRowClass}: function(record, index) {
    +            var c = record.{@link Ext.data.Record#get get}('change');
    +            if (c < 0) {
    +                return 'price-fall';
    +            } else if (c > 0) {
    +                return 'price-rise';
    +            }
    +        }
    +    },
    +    {@link #sm}: new Ext.grid.RowSelectionModel({singleSelect:true}),
    +    width: 600,
    +    height: 300,
    +    frame: true,
    +    title: 'Framed with Row Selection and Horizontal Scrolling',
    +    iconCls: 'icon-grid'
    +});
    + * 
    + *

    Notes:

    + *
      + *
    • Although this class inherits many configuration options from base classes, some of them + * (such as autoScroll, autoWidth, layout, items, etc) are not used by this class, and will + * have no effect.
    • + *
    • A grid requires a width in which to scroll its columns, and a height in which to + * scroll its rows. These dimensions can either be set explicitly through the + * {@link Ext.BoxComponent#height height} and {@link Ext.BoxComponent#width width} + * configuration options or implicitly set by using the grid as a child item of a + * {@link Ext.Container Container} which will have a {@link Ext.Container#layout layout manager} + * provide the sizing of its child items (for example the Container of the Grid may specify + * {@link Ext.Container#layout layout}:'fit').
    • + *
    • To access the data in a Grid, it is necessary to use the data model encapsulated + * by the {@link #store Store}. See the {@link #cellclick} event for more details.
    • + *
    + * @constructor + * @param {Object} config The config object + * @xtype grid + */ +Ext.grid.GridPanel = Ext.extend(Ext.Panel, { + /** + * @cfg {String} autoExpandColumn + *

    The {@link Ext.grid.Column#id id} of a {@link Ext.grid.Column column} in + * this grid that should expand to fill unused space. This value specified here can not + * be 0.

    + *

    Note: If the Grid's {@link Ext.grid.GridView view} is configured with + * {@link Ext.grid.GridView#forceFit forceFit}=true the autoExpandColumn + * is ignored. See {@link Ext.grid.Column}.{@link Ext.grid.Column#width width} + * for additional details.

    + *

    See {@link #autoExpandMax} and {@link #autoExpandMin} also.

    + */ + autoExpandColumn : false, + + + autoExpandMax : 1000, + + + autoExpandMin : 50, + + + columnLines : false, + + + + + + + ddText : '{0} selected row{1}', + + + deferRowRender : true, + + + + + enableColumnHide : true, + + + enableColumnMove : true, + + + enableDragDrop : false, + + + enableHdMenu : true, + + + + loadMask : false, + + + + minColumnWidth : 25, + + + + + + stripeRows : false, + + + trackMouseOver : true, + + + stateEvents : ['columnmove', 'columnresize', 'sortchange', 'groupchange'], + + + view : null, + + + bubbleEvents: [], + + + + + rendered : false, + + + viewReady : false, + + + initComponent : function() { + Ext.grid.GridPanel.superclass.initComponent.call(this); + + if (this.columnLines) { + this.cls = (this.cls || '') + ' x-grid-with-col-lines'; + } + + + this.autoScroll = false; + this.autoWidth = false; + + if(Ext.isArray(this.columns)){ + this.colModel = new Ext.grid.ColumnModel(this.columns); + delete this.columns; + } + + + if(this.ds){ + this.store = this.ds; + delete this.ds; + } + if(this.cm){ + this.colModel = this.cm; + delete this.cm; + } + if(this.sm){ + this.selModel = this.sm; + delete this.sm; + } + this.store = Ext.StoreMgr.lookup(this.store); -Ext.grid.GridView = function(config){ - Ext.apply(this, config); this.addEvents( - - "beforerowremoved", - - "beforerowsinserted", - - "beforerefresh", - - "rowremoved", - - "rowsinserted", - - "rowupdated", - - "refresh" - ); - Ext.grid.GridView.superclass.constructor.call(this); -}; + + + 'click', + + 'dblclick', + + 'contextmenu', + + 'mousedown', + + 'mouseup', + + 'mouseover', + + 'mouseout', + + 'keypress', + + 'keydown', -Ext.extend(Ext.grid.GridView, Ext.util.Observable, { - - - - - - deferEmptyText: true, - - scrollOffset: 19, - - autoFill: false, - - forceFit: false, - - sortClasses : ["sort-asc", "sort-desc"], - - sortAscText : "Sort Ascending", - - sortDescText : "Sort Descending", - - columnsText : "Columns", + + + 'cellmousedown', + + 'rowmousedown', + + 'headermousedown', - borderWidth: 2, - tdClass: 'x-grid3-cell', - hdCls: 'x-grid3-hd', + + 'groupmousedown', + + + 'rowbodymousedown', + + + 'containermousedown', + + + 'cellclick', + + 'celldblclick', + + 'rowclick', + + 'rowdblclick', + + 'headerclick', + + 'headerdblclick', + + 'groupclick', + + 'groupdblclick', + + 'containerclick', + + 'containerdblclick', + + + 'rowbodyclick', + + 'rowbodydblclick', + + + 'rowcontextmenu', + + 'cellcontextmenu', + + 'headercontextmenu', + + 'groupcontextmenu', + + 'containercontextmenu', + + 'rowbodycontextmenu', + + 'bodyscroll', + + 'columnresize', + + 'columnmove', + + 'sortchange', + + 'groupchange', + + 'reconfigure', + + 'viewready' + ); + }, - cellSelectorDepth: 4, - - rowSelectorDepth: 10, + onRender : function(ct, position){ + Ext.grid.GridPanel.superclass.onRender.apply(this, arguments); + + var c = this.getGridEl(); + + this.el.addClass('x-grid-panel'); + + this.mon(c, { + scope: this, + mousedown: this.onMouseDown, + click: this.onClick, + dblclick: this.onDblClick, + contextmenu: this.onContextMenu + }); + + this.relayEvents(c, ['mousedown','mouseup','mouseover','mouseout','keypress', 'keydown']); + + var view = this.getView(); + view.init(this); + view.render(); + this.getSelectionModel().init(this); + }, - cellSelector: 'td.x-grid3-cell', - - rowSelector: 'div.x-grid3-row', + initEvents : function(){ + Ext.grid.GridPanel.superclass.initEvents.call(this); - - - initTemplates : function(){ - var ts = this.templates || {}; - if(!ts.master){ - ts.master = new Ext.Template( - '
    ', - '
    ', - '
    {header}
    ', - '
    {body}
    ', - "
    ", - '
     
    ', - '
     
    ', - "
    " - ); + if(this.loadMask){ + this.loadMask = new Ext.LoadMask(this.bwrap, + Ext.apply({store:this.store}, this.loadMask)); } + }, - if(!ts.header){ - ts.header = new Ext.Template( - '', - '{cells}', - "
    " - ); + initStateEvents : function(){ + Ext.grid.GridPanel.superclass.initStateEvents.call(this); + this.mon(this.colModel, 'hiddenchange', this.saveState, this, {delay: 100}); + }, + + applyState : function(state){ + var cm = this.colModel, + cs = state.columns, + store = this.store, + s, + c, + colIndex; + + if(cs){ + for(var i = 0, len = cs.length; i < len; i++){ + s = cs[i]; + c = cm.getColumnById(s.id); + if(c){ + colIndex = cm.getIndexById(s.id); + cm.setState(colIndex, { + hidden: s.hidden, + width: s.width, + sortable: s.sortable + }); + if(colIndex != i){ + cm.moveColumn(colIndex, i); + } + } + } } + if(store){ + s = state.sort; + if(s){ + store[store.remoteSort ? 'setDefaultSort' : 'sort'](s.field, s.direction); + } + s = state.group; + if(store.groupBy){ + if(s){ + store.groupBy(s); + }else{ + store.clearGrouping(); + } + } - if(!ts.hcell){ - ts.hcell = new Ext.Template( - '
    ', this.grid.enableHdMenu ? '' : '', - '{value}', - "
    " - ); } + var o = Ext.apply({}, state); + delete o.columns; + delete o.sort; + Ext.grid.GridPanel.superclass.applyState.call(this, o); + }, - if(!ts.body){ - ts.body = new Ext.Template('{rows}'); + getState : function(){ + var o = {columns: []}, + store = this.store, + ss, + gs; + + for(var i = 0, c; (c = this.colModel.config[i]); i++){ + o.columns[i] = { + id: c.id, + width: c.width + }; + if(c.hidden){ + o.columns[i].hidden = true; + } + if(c.sortable){ + o.columns[i].sortable = true; + } } - - if(!ts.row){ - ts.row = new Ext.Template( - '
    ', - '{cells}', - (this.enableRowBody ? '' : ''), - '
    {body}
    ' - ); + if(store){ + ss = store.getSortState(); + if(ss){ + o.sort = ss; + } + if(store.getGroupState){ + gs = store.getGroupState(); + if(gs){ + o.group = gs; + } + } } + return o; + }, - if(!ts.cell){ - ts.cell = new Ext.Template( - '', - '
    {value}
    ', - "" - ); + + afterRender : function(){ + Ext.grid.GridPanel.superclass.afterRender.call(this); + var v = this.view; + this.on('bodyresize', v.layout, v); + v.layout(true); + if(this.deferRowRender){ + if (!this.deferRowRenderTask){ + this.deferRowRenderTask = new Ext.util.DelayedTask(v.afterRender, this.view); + } + this.deferRowRenderTask.delay(10); + }else{ + v.afterRender(); } + this.viewReady = true; + }, - for(var k in ts){ - var t = ts[k]; - if(t && typeof t.compile == 'function' && !t.compiled){ - t.disableFormats = true; - t.compile(); + + reconfigure : function(store, colModel){ + var rendered = this.rendered; + if(rendered){ + if(this.loadMask){ + this.loadMask.destroy(); + this.loadMask = new Ext.LoadMask(this.bwrap, + Ext.apply({}, {store:store}, this.initialConfig.loadMask)); + } + } + if(this.view){ + this.view.initData(store, colModel); + } + this.store = store; + this.colModel = colModel; + if(rendered){ + this.view.refresh(true); + } + this.fireEvent('reconfigure', this, store, colModel); + }, + + + onDestroy : function(){ + if (this.deferRowRenderTask && this.deferRowRenderTask.cancel){ + this.deferRowRenderTask.cancel(); + } + if(this.rendered){ + Ext.destroy(this.view, this.loadMask); + }else if(this.store && this.store.autoDestroy){ + this.store.destroy(); + } + Ext.destroy(this.colModel, this.selModel); + this.store = this.selModel = this.colModel = this.view = this.loadMask = null; + Ext.grid.GridPanel.superclass.onDestroy.call(this); + }, + + + processEvent : function(name, e){ + this.view.processEvent(name, e); + }, + + + onClick : function(e){ + this.processEvent('click', e); + }, + + + onMouseDown : function(e){ + this.processEvent('mousedown', e); + }, + + + onContextMenu : function(e, t){ + this.processEvent('contextmenu', e); + }, + + + onDblClick : function(e){ + this.processEvent('dblclick', e); + }, + + + walkCells : function(row, col, step, fn, scope){ + var cm = this.colModel, + clen = cm.getColumnCount(), + ds = this.store, + rlen = ds.getCount(), + first = true; + + if(step < 0){ + if(col < 0){ + row--; + first = false; + } + while(row >= 0){ + if(!first){ + col = clen-1; + } + first = false; + while(col >= 0){ + if(fn.call(scope || this, row, col, cm) === true){ + return [row, col]; + } + col--; + } + row--; + } + } else { + if(col >= clen){ + row++; + first = false; + } + while(row < rlen){ + if(!first){ + col = 0; + } + first = false; + while(col < clen){ + if(fn.call(scope || this, row, col, cm) === true){ + return [row, col]; + } + col++; + } + row++; + } + } + return null; + }, + + + getGridEl : function(){ + return this.body; + }, + + + stopEditing : Ext.emptyFn, + + + getSelectionModel : function(){ + if(!this.selModel){ + this.selModel = new Ext.grid.RowSelectionModel( + this.disableSelection ? {selectRow: Ext.emptyFn} : null); + } + return this.selModel; + }, + + + getStore : function(){ + return this.store; + }, + + + getColumnModel : function(){ + return this.colModel; + }, + + + getView : function() { + if (!this.view) { + this.view = new Ext.grid.GridView(this.viewConfig); + } + + return this.view; + }, + + getDragDropText : function(){ + var count = this.selModel.getCount(); + return String.format(this.ddText, count, count == 1 ? '' : 's'); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +}); +Ext.reg('grid', Ext.grid.GridPanel); +Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, { + + + aggregator: 'sum', + + + renderer: undefined, + + + + + + + + + initComponent: function() { + Ext.grid.PivotGrid.superclass.initComponent.apply(this, arguments); + + this.initAxes(); + + + this.enableColumnResize = false; + + this.viewConfig = Ext.apply(this.viewConfig || {}, { + forceFit: true + }); + + + + this.colModel = new Ext.grid.ColumnModel({}); + }, + + + getAggregator: function() { + if (typeof this.aggregator == 'string') { + return Ext.grid.PivotAggregatorMgr.types[this.aggregator]; + } else { + return this.aggregator; + } + }, + + + setAggregator: function(aggregator) { + this.aggregator = aggregator; + }, + + + setMeasure: function(measure) { + this.measure = measure; + }, + + + setLeftAxis: function(axis, refresh) { + + this.leftAxis = axis; + + if (refresh) { + this.view.refresh(); + } + }, + + + setTopAxis: function(axis, refresh) { + + this.topAxis = axis; + + if (refresh) { + this.view.refresh(); + } + }, + + + initAxes: function() { + var PivotAxis = Ext.grid.PivotAxis; + + if (!(this.leftAxis instanceof PivotAxis)) { + this.setLeftAxis(new PivotAxis({ + orientation: 'vertical', + dimensions : this.leftAxis || [], + store : this.store + })); + }; + + if (!(this.topAxis instanceof PivotAxis)) { + this.setTopAxis(new PivotAxis({ + orientation: 'horizontal', + dimensions : this.topAxis || [], + store : this.store + })); + }; + }, + + + extractData: function() { + var records = this.store.data.items, + recCount = records.length, + cells = [], + record, i, j, k; + + if (recCount == 0) { + return []; + } + + var leftTuples = this.leftAxis.getTuples(), + leftCount = leftTuples.length, + topTuples = this.topAxis.getTuples(), + topCount = topTuples.length, + aggregator = this.getAggregator(); + + for (i = 0; i < recCount; i++) { + record = records[i]; + + for (j = 0; j < leftCount; j++) { + cells[j] = cells[j] || []; + + if (leftTuples[j].matcher(record) === true) { + for (k = 0; k < topCount; k++) { + cells[j][k] = cells[j][k] || []; + + if (topTuples[k].matcher(record)) { + cells[j][k].push(record); + } + } + } + } + } + + var rowCount = cells.length, + colCount, row; + + for (i = 0; i < rowCount; i++) { + row = cells[i]; + colCount = row.length; + + for (j = 0; j < colCount; j++) { + cells[i][j] = aggregator(cells[i][j], this.measure); + } + } + + return cells; + }, + + + getView: function() { + if (!this.view) { + this.view = new Ext.grid.PivotGridView(this.viewConfig); + } + + return this.view; + } +}); + +Ext.reg('pivotgrid', Ext.grid.PivotGrid); + + +Ext.grid.PivotAggregatorMgr = new Ext.AbstractManager(); + +Ext.grid.PivotAggregatorMgr.registerType('sum', function(records, measure) { + var length = records.length, + total = 0, + i; + + for (i = 0; i < length; i++) { + total += records[i].get(measure); + } + + return total; +}); + +Ext.grid.PivotAggregatorMgr.registerType('avg', function(records, measure) { + var length = records.length, + total = 0, + i; + + for (i = 0; i < length; i++) { + total += records[i].get(measure); + } + + return (total / length) || 'n/a'; +}); + +Ext.grid.PivotAggregatorMgr.registerType('min', function(records, measure) { + var data = [], + length = records.length, + i; + + for (i = 0; i < length; i++) { + data.push(records[i].get(measure)); + } + + return Math.min.apply(this, data) || 'n/a'; +}); + +Ext.grid.PivotAggregatorMgr.registerType('max', function(records, measure) { + var data = [], + length = records.length, + i; + + for (i = 0; i < length; i++) { + data.push(records[i].get(measure)); + } + + return Math.max.apply(this, data) || 'n/a'; +}); + +Ext.grid.PivotAggregatorMgr.registerType('count', function(records, measure) { + return records.length; +}); +Ext.grid.GridView = Ext.extend(Ext.util.Observable, { + + + + + + + + + + + + deferEmptyText : true, + + + scrollOffset : undefined, + + + autoFill : false, + + + forceFit : false, + + + sortClasses : ['sort-asc', 'sort-desc'], + + + sortAscText : 'Sort Ascending', + + + sortDescText : 'Sort Descending', + + + columnsText : 'Columns', + + + selectedRowClass : 'x-grid3-row-selected', + + + borderWidth : 2, + tdClass : 'x-grid3-cell', + hdCls : 'x-grid3-hd', + + + + markDirty : true, + + + cellSelectorDepth : 4, + + + rowSelectorDepth : 10, + + + rowBodySelectorDepth : 10, + + + cellSelector : 'td.x-grid3-cell', + + + rowSelector : 'div.x-grid3-row', + + + rowBodySelector : 'div.x-grid3-row-body', + + + firstRowCls: 'x-grid3-row-first', + lastRowCls: 'x-grid3-row-last', + rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g, + + + headerMenuOpenCls: 'x-grid3-hd-menu-open', + + + rowOverCls: 'x-grid3-row-over', + + constructor : function(config) { + Ext.apply(this, config); + + + this.addEvents( + + 'beforerowremoved', + + + 'beforerowsinserted', + + + 'beforerefresh', + + + 'rowremoved', + + + 'rowsinserted', + + + 'rowupdated', + + + 'refresh' + ); + + Ext.grid.GridView.superclass.constructor.call(this); + }, + + + + + masterTpl: new Ext.Template( + '
    ', + '
    ', + '
    ', + '
    ', + '
    {header}
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    {body}
    ', + '', + '
    ', + '
    ', + '
     
    ', + '
     
    ', + '
    ' + ), + + + headerTpl: new Ext.Template( + '', + '', + '{cells}', + '', + '
    ' + ), + + + bodyTpl: new Ext.Template('{rows}'), + + + cellTpl: new Ext.Template( + '', + '
    {value}
    ', + '' + ), + + + initTemplates : function() { + var templates = this.templates || {}, + template, name, + + headerCellTpl = new Ext.Template( + '', + '
    ', + this.grid.enableHdMenu ? '' : '', + '{value}', + '', + '
    ', + '' + ), + + rowBodyText = [ + '', + '', + '
    {body}
    ', + '', + '' + ].join(""), + + innerText = [ + '', + '', + '{cells}', + this.enableRowBody ? rowBodyText : '', + '', + '
    ' + ].join(""); + + Ext.applyIf(templates, { + hcell : headerCellTpl, + cell : this.cellTpl, + body : this.bodyTpl, + header : this.headerTpl, + master : this.masterTpl, + row : new Ext.Template('
    ' + innerText + '
    '), + rowInner: new Ext.Template(innerText) + }); + + for (name in templates) { + template = templates[name]; + + if (template && Ext.isFunction(template.compile) && !template.compiled) { + template.disableFormats = true; + template.compile(); } } - this.templates = ts; - this.colRe = new RegExp("x-grid3-td-([^\\s]+)", ""); + this.templates = templates; + this.colRe = new RegExp('x-grid3-td-([^\\s]+)', ''); }, - fly : function(el){ - if(!this._flyweight){ + + fly : function(el) { + if (!this._flyweight) { this._flyweight = new Ext.Element.Flyweight(document.body); } this._flyweight.dom = el; return this._flyweight; }, - getEditorParent : function(ed){ + + getEditorParent : function() { return this.scroller.dom; }, - initElements : function(){ - var E = Ext.Element; - - var el = this.grid.getGridEl().dom.firstChild; - var cs = el.childNodes; - - this.el = new E(el); - - this.mainWrap = new E(cs[0]); - this.mainHd = new E(this.mainWrap.dom.firstChild); - - if(this.grid.hideHeaders){ - this.mainHd.setDisplayed(false); + + initElements : function() { + var Element = Ext.Element, + el = Ext.get(this.grid.getGridEl().dom.firstChild), + mainWrap = new Element(el.child('div.x-grid3-viewport')), + mainHd = new Element(mainWrap.child('div.x-grid3-header')), + scroller = new Element(mainWrap.child('div.x-grid3-scroller')); + + if (this.grid.hideHeaders) { + mainHd.setDisplayed(false); } - - this.innerHd = this.mainHd.dom.firstChild; - this.scroller = new E(this.mainWrap.dom.childNodes[1]); - if(this.forceFit){ - this.scroller.setStyle('overflow-x', 'hidden'); + + if (this.forceFit) { + scroller.setStyle('overflow-x', 'hidden'); } - this.mainBody = new E(this.scroller.dom.firstChild); - - this.focusEl = new E(this.scroller.dom.childNodes[1]); - this.focusEl.swallowEvent("click", true); - - this.resizeMarker = new E(cs[1]); - this.resizeProxy = new E(cs[2]); + + + + Ext.apply(this, { + el : el, + mainWrap: mainWrap, + scroller: scroller, + mainHd : mainHd, + innerHd : mainHd.child('div.x-grid3-header-inner').dom, + mainBody: new Element(Element.fly(scroller).child('div.x-grid3-body')), + focusEl : new Element(Element.fly(scroller).child('a')), + + resizeMarker: new Element(el.child('div.x-grid3-resize-marker')), + resizeProxy : new Element(el.child('div.x-grid3-resize-proxy')) + }); + + this.focusEl.swallowEvent('click', true); }, - getRows : function(){ + + getRows : function() { return this.hasRows() ? this.mainBody.dom.childNodes : []; }, - findCell : function(el){ - if(!el){ + + + findCell : function(el) { + if (!el) { return false; } return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth); }, - findCellIndex : function(el, requiredCls){ - var cell = this.findCell(el); - if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){ - return this.getCellIndex(cell); - } - return false; - }, - - getCellIndex : function(el){ - if(el){ - var m = el.className.match(this.colRe); - if(m && m[1]){ - return this.cm.getIndexById(m[1]); + + findCellIndex : function(el, requiredCls) { + var cell = this.findCell(el), + hasCls; + + if (cell) { + hasCls = this.fly(cell).hasClass(requiredCls); + if (!requiredCls || hasCls) { + return this.getCellIndex(cell); } } return false; }, - findHeaderCell : function(el){ + + getCellIndex : function(el) { + if (el) { + var match = el.className.match(this.colRe); + + if (match && match[1]) { + return this.cm.getIndexById(match[1]); + } + } + return false; + }, + + + findHeaderCell : function(el) { var cell = this.findCell(el); return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null; }, - findHeaderIndex : function(el){ + + findHeaderIndex : function(el){ return this.findCellIndex(el, this.hdCls); }, - findRow : function(el){ - if(!el){ + + findRow : function(el) { + if (!el) { return false; } return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth); }, - findRowIndex : function(el){ - var r = this.findRow(el); - return r ? r.rowIndex : false; + + findRowIndex : function(el) { + var row = this.findRow(el); + return row ? row.rowIndex : false; + }, + + + findRowBody : function(el) { + if (!el) { + return false; + } + + return this.fly(el).findParent(this.rowBodySelector, this.rowBodySelectorDepth); }, - getRow : function(row){ + + getRow : function(row) { return this.getRows()[row]; }, - - getCell : function(row, col){ - return this.getRow(row).getElementsByTagName('td')[col]; - }, - - - getHeaderCell : function(index){ - return this.mainHd.dom.getElementsByTagName('td')[index]; + + getCell : function(row, col) { + return Ext.fly(this.getRow(row)).query(this.cellSelector)[col]; }, - addRowClass : function(row, cls){ - var r = this.getRow(row); - if(r){ - this.fly(r).addClass(cls); + getHeaderCell : function(index) { + return this.mainHd.dom.getElementsByTagName('td')[index]; + }, + + + + + addRowClass : function(rowId, cls) { + var row = this.getRow(rowId); + if (row) { + this.fly(row).addClass(cls); } }, - removeRowClass : function(row, cls){ + + removeRowClass : function(row, cls) { var r = this.getRow(row); if(r){ this.fly(r).removeClass(cls); } }, - removeRow : function(row){ - Ext.removeNode(this.getRow(row)); - this.focusRow(row); - }, - removeRows : function(firstRow, lastRow){ - var bd = this.mainBody.dom; - for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + removeRow : function(row) { + Ext.removeNode(this.getRow(row)); + this.syncFocusEl(row); + }, + + + removeRows : function(firstRow, lastRow) { + var bd = this.mainBody.dom, + rowIndex; + + for (rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ Ext.removeNode(bd.childNodes[firstRow]); } - this.focusRow(firstRow); + + this.syncFocusEl(firstRow); }, - getScrollState : function(){ + + + getScrollState : function() { var sb = this.scroller.dom; - return {left: sb.scrollLeft, top: sb.scrollTop}; + + return { + left: sb.scrollLeft, + top : sb.scrollTop + }; }, - restoreScroll : function(state){ + + restoreScroll : function(state) { var sb = this.scroller.dom; sb.scrollLeft = state.left; - sb.scrollTop = state.top; + sb.scrollTop = state.top; }, - scrollToTop : function(){ - this.scroller.dom.scrollTop = 0; - this.scroller.dom.scrollLeft = 0; + scrollToTop : function() { + var dom = this.scroller.dom; + + dom.scrollTop = 0; + dom.scrollLeft = 0; }, - syncScroll : function(){ - this.syncHeaderScroll(); - var mb = this.scroller.dom; - this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop); - }, - - syncHeaderScroll : function(){ + + syncScroll : function() { + this.syncHeaderScroll(); var mb = this.scroller.dom; - this.innerHd.scrollLeft = mb.scrollLeft; - this.innerHd.scrollLeft = mb.scrollLeft; }, - - updateSortIcon : function(col, dir){ - var sc = this.sortClasses; - var hds = this.mainHd.select('td').removeClass(sc); - hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]); + this.grid.fireEvent('bodyscroll', mb.scrollLeft, mb.scrollTop); }, - updateAllColumnWidths : function(){ - var tw = this.getTotalWidth(); - var clen = this.cm.getColumnCount(); - var ws = []; - for(var i = 0; i < clen; i++){ - ws[i] = this.getColumnWidth(i); - } - - this.innerHd.firstChild.firstChild.style.width = tw; - - for(var i = 0; i < clen; i++){ - var hd = this.getHeaderCell(i); - hd.style.width = ws[i]; - } - - var ns = this.getRows(); - for(var i = 0, len = ns.length; i < len; i++){ - ns[i].style.width = tw; - ns[i].firstChild.style.width = tw; - var row = ns[i].firstChild.rows[0]; - for(var j = 0; j < clen; j++){ - row.childNodes[j].style.width = ws[j]; - } - } - - this.onAllColumnWidthsUpdated(ws, tw); + + syncHeaderScroll : function() { + var innerHd = this.innerHd, + scrollLeft = this.scroller.dom.scrollLeft; + + innerHd.scrollLeft = scrollLeft; + innerHd.scrollLeft = scrollLeft; + }, + + + updateSortIcon : function(col, dir) { + var sortClasses = this.sortClasses, + sortClass = sortClasses[dir == "DESC" ? 1 : 0], + headers = this.mainHd.select('td').removeClass(sortClasses); + + headers.item(col).addClass(sortClass); }, - updateColumnWidth : function(col, width){ - var w = this.getColumnWidth(col); - var tw = this.getTotalWidth(); - - this.innerHd.firstChild.firstChild.style.width = tw; - var hd = this.getHeaderCell(col); - hd.style.width = w; - - var ns = this.getRows(); - for(var i = 0, len = ns.length; i < len; i++){ - ns[i].style.width = tw; - ns[i].firstChild.style.width = tw; - ns[i].firstChild.rows[0].childNodes[col].style.width = w; + + updateAllColumnWidths : function() { + var totalWidth = this.getTotalWidth(), + colCount = this.cm.getColumnCount(), + rows = this.getRows(), + rowCount = rows.length, + widths = [], + row, rowFirstChild, trow, i, j; + + for (i = 0; i < colCount; i++) { + widths[i] = this.getColumnWidth(i); + this.getHeaderCell(i).style.width = widths[i]; } - - this.onColumnWidthUpdated(col, w, tw); - }, - - updateColumnHidden : function(col, hidden){ - var tw = this.getTotalWidth(); - - this.innerHd.firstChild.firstChild.style.width = tw; - - var display = hidden ? 'none' : ''; - - var hd = this.getHeaderCell(col); - hd.style.display = display; - - var ns = this.getRows(); - for(var i = 0, len = ns.length; i < len; i++){ - ns[i].style.width = tw; - ns[i].firstChild.style.width = tw; - ns[i].firstChild.rows[0].childNodes[col].style.display = display; - } - - this.onColumnHiddenUpdated(col, hidden, tw); - - delete this.lastViewWidth; this.layout(); - }, - - doRender : function(cs, rs, ds, startRow, colCount, stripe){ - var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1; - var tstyle = 'width:'+this.getTotalWidth()+';'; - var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r; - for(var j = 0, len = rs.length; j < len; j++){ - r = rs[j]; cb = []; - var rowIndex = (j+startRow); - for(var i = 0; i < colCount; i++){ - c = cs[i]; - p.id = c.id; - p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); - p.attr = p.cellAttr = ""; - p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds); - p.style = c.style; - if(p.value == undefined || p.value === "") p.value = " "; - if(r.dirty && typeof r.modified[c.name] !== 'undefined'){ - p.css += ' x-grid3-dirty-cell'; + + this.updateHeaderWidth(); + + for (i = 0; i < rowCount; i++) { + row = rows[i]; + row.style.width = totalWidth; + rowFirstChild = row.firstChild; + + if (rowFirstChild) { + rowFirstChild.style.width = totalWidth; + trow = rowFirstChild.rows[0]; + + for (j = 0; j < colCount; j++) { + trow.childNodes[j].style.width = widths[j]; } - cb[cb.length] = ct.apply(p); } - var alt = []; - if(stripe && ((rowIndex+1) % 2 == 0)){ - alt[0] = "x-grid3-row-alt"; - } - if(r.dirty){ - alt[1] = " x-grid3-dirty-row"; - } - rp.cols = colCount; - if(this.getRowClass){ - alt[2] = this.getRowClass(r, rowIndex, rp, ds); - } - rp.alt = alt.join(" "); - rp.cells = cb.join(""); - buf[buf.length] = rt.apply(rp); } - return buf.join(""); + + this.onAllColumnWidthsUpdated(widths, totalWidth); }, - processRows : function(startRow, skipStripe){ - if(this.ds.getCount() < 1){ + + updateColumnWidth : function(column, width) { + var columnWidth = this.getColumnWidth(column), + totalWidth = this.getTotalWidth(), + headerCell = this.getHeaderCell(column), + nodes = this.getRows(), + nodeCount = nodes.length, + row, i, firstChild; + + this.updateHeaderWidth(); + headerCell.style.width = columnWidth; + + for (i = 0; i < nodeCount; i++) { + row = nodes[i]; + firstChild = row.firstChild; + + row.style.width = totalWidth; + if (firstChild) { + firstChild.style.width = totalWidth; + firstChild.rows[0].childNodes[column].style.width = columnWidth; + } + } + + this.onColumnWidthUpdated(column, columnWidth, totalWidth); + }, + + + updateColumnHidden : function(col, hidden) { + var totalWidth = this.getTotalWidth(), + display = hidden ? 'none' : '', + headerCell = this.getHeaderCell(col), + nodes = this.getRows(), + nodeCount = nodes.length, + row, rowFirstChild, i; + + this.updateHeaderWidth(); + headerCell.style.display = display; + + for (i = 0; i < nodeCount; i++) { + row = nodes[i]; + row.style.width = totalWidth; + rowFirstChild = row.firstChild; + + if (rowFirstChild) { + rowFirstChild.style.width = totalWidth; + rowFirstChild.rows[0].childNodes[col].style.display = display; + } + } + + this.onColumnHiddenUpdated(col, hidden, totalWidth); + delete this.lastViewWidth; + this.layout(); + }, + + + doRender : function(columns, records, store, startRow, colCount, stripe) { + var templates = this.templates, + cellTemplate = templates.cell, + rowTemplate = templates.row, + last = colCount - 1, + tstyle = 'width:' + this.getTotalWidth() + ';', + + rowBuffer = [], + colBuffer = [], + rowParams = {tstyle: tstyle}, + meta = {}, + len = records.length, + alt, + column, + record, i, j, rowIndex; + + + for (j = 0; j < len; j++) { + record = records[j]; + colBuffer = []; + + rowIndex = j + startRow; + + + for (i = 0; i < colCount; i++) { + column = columns[i]; + + meta.id = column.id; + meta.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); + meta.attr = meta.cellAttr = ''; + meta.style = column.style; + meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store); + + if (Ext.isEmpty(meta.value)) { + meta.value = ' '; + } + + if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') { + meta.css += ' x-grid3-dirty-cell'; + } + + colBuffer[colBuffer.length] = cellTemplate.apply(meta); + } + + alt = []; + + if (stripe && ((rowIndex + 1) % 2 === 0)) { + alt[0] = 'x-grid3-row-alt'; + } + + if (record.dirty) { + alt[1] = ' x-grid3-dirty-row'; + } + + rowParams.cols = colCount; + + if (this.getRowClass) { + alt[2] = this.getRowClass(record, rowIndex, rowParams, store); + } + + rowParams.alt = alt.join(' '); + rowParams.cells = colBuffer.join(''); + + rowBuffer[rowBuffer.length] = rowTemplate.apply(rowParams); + } + + return rowBuffer.join(''); + }, + + + processRows : function(startRow, skipStripe) { + if (!this.ds || this.ds.getCount() < 1) { return; } + + var rows = this.getRows(), + length = rows.length, + row, i; + skipStripe = skipStripe || !this.grid.stripeRows; - startRow = startRow || 0; - var rows = this.getRows(); - var cls = ' x-grid3-row-alt '; - for(var i = startRow, len = rows.length; i < len; i++){ - var row = rows[i]; - row.rowIndex = i; - if(!skipStripe){ - var isAlt = ((i+1) % 2 == 0); - var hasAlt = (' '+row.className + ' ').indexOf(cls) != -1; - if(isAlt == hasAlt){ - continue; - } - if(isAlt){ - row.className += " x-grid3-row-alt"; - }else{ - row.className = row.className.replace("x-grid3-row-alt", ""); + startRow = startRow || 0; + + for (i = 0; i < length; i++) { + row = rows[i]; + if (row) { + row.rowIndex = i; + if (!skipStripe) { + row.className = row.className.replace(this.rowClsRe, ' '); + if ((i + 1) % 2 === 0){ + row.className += ' x-grid3-row-alt'; + } } } } - }, - afterRender: function(){ - this.mainBody.dom.innerHTML = this.renderRows(); + + if (startRow === 0) { + Ext.fly(rows[0]).addClass(this.firstRowCls); + } + + Ext.fly(rows[length - 1]).addClass(this.lastRowCls); + }, + + + afterRender : function() { + if (!this.ds || !this.cm) { + return; + } + + this.mainBody.dom.innerHTML = this.renderBody() || ' '; this.processRows(0, true); - if(this.deferEmptyText !== true){ + if (this.deferEmptyText !== true) { this.applyEmptyText(); } + + this.grid.fireEvent('viewready', this.grid); }, - - renderUI : function(){ - - var header = this.renderHeaders(); - var body = this.templates.body.apply({rows:''}); - - - var html = this.templates.master.apply({ - body: body, - header: header - }); - - var g = this.grid; - - g.getGridEl().dom.innerHTML = html; - + + + afterRenderUI: function() { + var grid = this.grid; + this.initElements(); - Ext.fly(this.innerHd).on("click", this.handleHdDown, this); - this.mainHd.on("mouseover", this.handleHdOver, this); - this.mainHd.on("mouseout", this.handleHdOut, this); - this.mainHd.on("mousemove", this.handleHdMove, this); + + Ext.fly(this.innerHd).on('click', this.handleHdDown, this); + + this.mainHd.on({ + scope : this, + mouseover: this.handleHdOver, + mouseout : this.handleHdOut, + mousemove: this.handleHdMove + }); this.scroller.on('scroll', this.syncScroll, this); - if(g.enableColumnResize !== false){ - this.splitone = new Ext.grid.GridView.SplitDragZone(g, this.mainHd.dom); + + if (grid.enableColumnResize !== false) { + this.splitZone = new Ext.grid.GridView.SplitDragZone(grid, this.mainHd.dom); } - if(g.enableColumnMove){ - this.columnDrag = new Ext.grid.GridView.ColumnDragZone(g, this.innerHd); - this.columnDrop = new Ext.grid.HeaderDropZone(g, this.mainHd.dom); + if (grid.enableColumnMove) { + this.columnDrag = new Ext.grid.GridView.ColumnDragZone(grid, this.innerHd); + this.columnDrop = new Ext.grid.HeaderDropZone(grid, this.mainHd.dom); } - if(g.enableHdMenu !== false){ - if(g.enableColumnHide !== false){ - this.colMenu = new Ext.menu.Menu({id:g.id + "-hcols-menu"}); - this.colMenu.on("beforeshow", this.beforeColMenuShow, this); - this.colMenu.on("itemclick", this.handleHdMenuClick, this); - } - this.hmenu = new Ext.menu.Menu({id: g.id + "-hctx"}); + if (grid.enableHdMenu !== false) { + this.hmenu = new Ext.menu.Menu({id: grid.id + '-hctx'}); this.hmenu.add( - {id:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"}, - {id:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"} + {itemId:'asc', text: this.sortAscText, cls: 'xg-hmenu-sort-asc'}, + {itemId:'desc', text: this.sortDescText, cls: 'xg-hmenu-sort-desc'} ); - if(g.enableColumnHide !== false){ - this.hmenu.add('-', - {id:"columns", text: this.columnsText, menu: this.colMenu, iconCls: 'x-cols-icon'} - ); + + if (grid.enableColumnHide !== false) { + this.colMenu = new Ext.menu.Menu({id:grid.id + '-hcols-menu'}); + this.colMenu.on({ + scope : this, + beforeshow: this.beforeColMenuShow, + itemclick : this.handleHdMenuClick + }); + this.hmenu.add('-', { + itemId:'columns', + hideOnClick: false, + text: this.columnsText, + menu: this.colMenu, + iconCls: 'x-cols-icon' + }); } - this.hmenu.on("itemclick", this.handleHdMenuClick, this); - } + this.hmenu.on('itemclick', this.handleHdMenuClick, this); + } - if(g.enableDragDrop || g.enableDrag){ - this.dragZone = new Ext.grid.GridDragZone(g, { - ddGroup : g.ddGroup || 'GridDD' + if (grid.trackMouseOver) { + this.mainBody.on({ + scope : this, + mouseover: this.onRowOver, + mouseout : this.onRowOut + }); + } + + if (grid.enableDragDrop || grid.enableDrag) { + this.dragZone = new Ext.grid.GridDragZone(grid, { + ddGroup : grid.ddGroup || 'GridDD' }); } this.updateHeaderSortState(); - }, - layout : function(){ - if(!this.mainBody){ - return; } - var g = this.grid; - var c = g.getGridEl(); - var csize = c.getSize(true); - var vw = csize.width; + + renderUI : function() { + var templates = this.templates; - if(vw < 20 || csize.height < 20){ return; - } + return templates.master.apply({ + body : templates.body.apply({rows:' '}), + header: this.renderHeaders(), + ostyle: 'width:' + this.getOffsetWidth() + ';', + bstyle: 'width:' + this.getTotalWidth() + ';' + }); + }, - if(g.autoHeight){ - this.scroller.dom.style.overflow = 'visible'; - }else{ - this.el.setSize(csize.width, csize.height); + + processEvent : function(name, e) { + var target = e.getTarget(), + grid = this.grid, + header = this.findHeaderIndex(target), + row, cell, col, body; - var hdHeight = this.mainHd.getHeight(); - var vh = csize.height - (hdHeight); + grid.fireEvent(name, e); - this.scroller.setSize(vw, vh); - if(this.innerHd){ - this.innerHd.style.width = (vw)+'px'; + if (header !== false) { + grid.fireEvent('header' + name, grid, header, e); + } else { + row = this.findRowIndex(target); + + + + + if (row !== false) { + cell = this.findCellIndex(target); + if (cell !== false) { + col = grid.colModel.getColumnAt(cell); + if (grid.fireEvent('cell' + name, grid, row, cell, e) !== false) { + if (!col || (col.processEvent && (col.processEvent(name, e, grid, row, cell) !== false))) { + grid.fireEvent('row' + name, grid, row, e); + } + } + } else { + if (grid.fireEvent('row' + name, grid, row, e) !== false) { + (body = this.findRowBody(target)) && grid.fireEvent('rowbody' + name, grid, row, e); + } + } + } else { + grid.fireEvent('container' + name, grid, e); } } - if(this.forceFit){ - if(this.lastViewWidth != vw){ + }, + + + layout : function(initial) { + if (!this.mainBody) { + return; + } + + var grid = this.grid, + gridEl = grid.getGridEl(), + gridSize = gridEl.getSize(true), + gridWidth = gridSize.width, + gridHeight = gridSize.height, + scroller = this.scroller, + scrollStyle, headerHeight, scrollHeight; + + if (gridWidth < 20 || gridHeight < 20) { + return; + } + + if (grid.autoHeight) { + scrollStyle = scroller.dom.style; + scrollStyle.overflow = 'visible'; + + if (Ext.isWebKit) { + scrollStyle.position = 'static'; + } + } else { + this.el.setSize(gridWidth, gridHeight); + + headerHeight = this.mainHd.getHeight(); + scrollHeight = gridHeight - headerHeight; + + scroller.setSize(gridWidth, scrollHeight); + + if (this.innerHd) { + this.innerHd.style.width = (gridWidth) + "px"; + } + } + + if (this.forceFit || (initial === true && this.autoFill)) { + if (this.lastViewWidth != gridWidth) { this.fitColumns(false, false); - this.lastViewWidth = vw; + this.lastViewWidth = gridWidth; } - }else { + } else { this.autoExpand(); this.syncHeaderScroll(); } - this.onLayout(vw, vh); + + this.onLayout(gridWidth, scrollHeight); }, - onLayout : function(vw, vh){ - }, + + + onLayout : function(vw, vh) { + + }, - onColumnWidthUpdated : function(col, w, tw){ - }, + onColumnWidthUpdated : function(col, w, tw) { + + }, - onAllColumnWidthsUpdated : function(ws, tw){ - }, + onAllColumnWidthsUpdated : function(ws, tw) { + + }, - onColumnHiddenUpdated : function(col, hidden, tw){ - }, + onColumnHiddenUpdated : function(col, hidden, tw) { + + }, - updateColumnText : function(col, text){ - }, + updateColumnText : function(col, text) { + + }, - afterMove : function(colIndex){ - }, + afterMove : function(colIndex) { + + }, - init: function(grid){ + + init : function(grid) { this.grid = grid; this.initTemplates(); @@ -31278,726 +47645,1156 @@ Ext.extend(Ext.grid.GridView, Ext.util.Observable, { this.initUI(grid); }, - getColumnId : function(index){ - return this.cm.getColumnId(index); - }, - - renderHeaders : function(){ - var cm = this.cm, ts = this.templates; - var ct = ts.hcell; - - var cb = [], sb = [], p = {}; - - for(var i = 0, len = cm.getColumnCount(); i < len; i++){ - p.id = cm.getColumnId(i); - p.value = cm.getColumnHeader(i) || ""; - p.style = this.getColumnStyle(i, true); - p.tooltip = this.getColumnTooltip(i); - if(cm.config[i].align == 'right'){ - p.istyle = 'padding-right:16px'; - } else { - delete p.istyle; - } - cb[cb.length] = ct.apply(p); - } - return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'}); - }, - - getColumnTooltip : function(i){ - var tt = this.cm.getColumnTooltip(i); - if(tt){ - if(Ext.QuickTips.isEnabled()){ - return 'ext:qtip="'+tt+'"'; - }else{ - return 'title="'+tt+'"'; - } - } - return ""; - }, - - beforeUpdate : function(){ - this.grid.stopEditing(true); - }, - - updateHeaders : function(){ - this.innerHd.firstChild.innerHTML = this.renderHeaders(); + + getColumnId : function(index){ + return this.cm.getColumnId(index); }, - focusRow : function(row){ + getOffsetWidth : function() { + return (this.cm.getTotalWidth() + this.getScrollOffset()) + 'px'; + }, + + + getScrollOffset: function() { + return Ext.num(this.scrollOffset, Ext.getScrollBarWidth()); + }, + + + renderHeaders : function() { + var colModel = this.cm, + templates = this.templates, + headerTpl = templates.hcell, + properties = {}, + colCount = colModel.getColumnCount(), + last = colCount - 1, + cells = [], + i, cssCls; + + for (i = 0; i < colCount; i++) { + if (i == 0) { + cssCls = 'x-grid3-cell-first '; + } else { + cssCls = i == last ? 'x-grid3-cell-last ' : ''; + } + + properties = { + id : colModel.getColumnId(i), + value : colModel.getColumnHeader(i) || '', + style : this.getColumnStyle(i, true), + css : cssCls, + tooltip: this.getColumnTooltip(i) + }; + + if (colModel.config[i].align == 'right') { + properties.istyle = 'padding-right: 16px;'; + } else { + delete properties.istyle; + } + + cells[i] = headerTpl.apply(properties); + } + + return templates.header.apply({ + cells : cells.join(""), + tstyle: String.format("width: {0};", this.getTotalWidth()) + }); + }, + + + getColumnTooltip : function(i) { + var tooltip = this.cm.getColumnTooltip(i); + if (tooltip) { + if (Ext.QuickTips.isEnabled()) { + return 'ext:qtip="' + tooltip + '"'; + } else { + return 'title="' + tooltip + '"'; + } + } + + return ''; + }, + + + beforeUpdate : function() { + this.grid.stopEditing(true); + }, + + + updateHeaders : function() { + this.innerHd.firstChild.innerHTML = this.renderHeaders(); + + this.updateHeaderWidth(false); + }, + + + updateHeaderWidth: function(updateMain) { + var innerHdChild = this.innerHd.firstChild, + totalWidth = this.getTotalWidth(); + + innerHdChild.style.width = this.getOffsetWidth(); + innerHdChild.firstChild.style.width = totalWidth; + + if (updateMain !== false) { + this.mainBody.dom.style.width = totalWidth; + } + }, + + + focusRow : function(row) { this.focusCell(row, 0, false); }, - focusCell : function(row, col, hscroll){ - row = Math.min(row, Math.max(0, this.getRows().length-1)); - var xy = this.ensureVisible(row, col, hscroll); - this.focusEl.setXY(xy||this.scroller.getXY()); + focusCell : function(row, col, hscroll) { + this.syncFocusEl(this.ensureVisible(row, col, hscroll)); - if(Ext.isGecko){ - this.focusEl.focus(); - }else{ - this.focusEl.focus.defer(1, this.focusEl); + var focusEl = this.focusEl; + + if (Ext.isGecko) { + focusEl.focus(); + } else { + focusEl.focus.defer(1, focusEl); } }, - ensureVisible : function(row, col, hscroll){ - if(typeof row != "number"){ + + resolveCell : function(row, col, hscroll) { + if (!Ext.isNumber(row)) { row = row.rowIndex; } - if(!this.ds){ - return; + + if (!this.ds) { + return null; } - if(row < 0 || row >= this.ds.getCount()){ - return; + + if (row < 0 || row >= this.ds.getCount()) { + return null; } col = (col !== undefined ? col : 0); - var rowEl = this.getRow(row), cellEl; - if(!(hscroll === false && col === 0)){ - while(this.cm.isHidden(col)){ + var rowEl = this.getRow(row), + colModel = this.cm, + colCount = colModel.getColumnCount(), + cellEl; + + if (!(hscroll === false && col === 0)) { + while (col < colCount && colModel.isHidden(col)) { col++; } + cellEl = this.getCell(row, col); } - if(!rowEl){ - return; + + return {row: rowEl, cell: cellEl}; + }, + + + getResolvedXY : function(resolved) { + if (!resolved) { + return null; + } + + var cell = resolved.cell, + row = resolved.row; + + if (cell) { + return Ext.fly(cell).getXY(); + } else { + return [this.el.getX(), Ext.fly(row).getY()]; + } + }, + + + syncFocusEl : function(row, col, hscroll) { + var xy = row; + + if (!Ext.isArray(xy)) { + row = Math.min(row, Math.max(0, this.getRows().length-1)); + + if (isNaN(row)) { + return; + } + + xy = this.getResolvedXY(this.resolveCell(row, col, hscroll)); + } + + this.focusEl.setXY(xy || this.scroller.getXY()); + }, + + + ensureVisible : function(row, col, hscroll) { + var resolved = this.resolveCell(row, col, hscroll); + + if (!resolved || !resolved.row) { + return null; } - var c = this.scroller.dom; + var rowEl = resolved.row, + cellEl = resolved.cell, + c = this.scroller.dom, + p = rowEl, + ctop = 0, + stop = this.el.dom; - var ctop = 0; - var p = rowEl, stop = this.el.dom; - while(p && p != stop){ + while (p && p != stop) { ctop += p.offsetTop; p = p.offsetParent; } + ctop -= this.mainHd.dom.offsetHeight; + stop = parseInt(c.scrollTop, 10); - var cbot = ctop + rowEl.offsetHeight; + var cbot = ctop + rowEl.offsetHeight, + ch = c.clientHeight, + sbot = stop + ch; - var ch = c.clientHeight; - var stop = parseInt(c.scrollTop, 10); - var sbot = stop + ch; - if(ctop < stop){ + if (ctop < stop) { c.scrollTop = ctop; - }else if(cbot > sbot){ + } else if(cbot > sbot) { c.scrollTop = cbot-ch; } - if(hscroll !== false){ - var cleft = parseInt(cellEl.offsetLeft, 10); - var cright = cleft + cellEl.offsetWidth; - - var sleft = parseInt(c.scrollLeft, 10); - var sright = sleft + c.clientWidth; - if(cleft < sleft){ + if (hscroll !== false) { + var cleft = parseInt(cellEl.offsetLeft, 10), + cright = cleft + cellEl.offsetWidth, + sleft = parseInt(c.scrollLeft, 10), + sright = sleft + c.clientWidth; + + if (cleft < sleft) { c.scrollLeft = cleft; - }else if(cright > sright){ + } else if(cright > sright) { c.scrollLeft = cright-c.clientWidth; } } - return cellEl ? Ext.fly(cellEl).getXY() : [c.scrollLeft+this.el.getX(), Ext.fly(rowEl).getY()]; + + return this.getResolvedXY(resolved); }, - insertRows : function(dm, firstRow, lastRow, isUpdate){ - if(!isUpdate && firstRow === 0 && lastRow >= dm.getCount()-1){ - this.refresh(); - }else{ - if(!isUpdate){ - this.fireEvent("beforerowsinserted", this, firstRow, lastRow); + + insertRows : function(dm, firstRow, lastRow, isUpdate) { + var last = dm.getCount() - 1; + if( !isUpdate && firstRow === 0 && lastRow >= last) { + this.fireEvent('beforerowsinserted', this, firstRow, lastRow); + this.refresh(); + this.fireEvent('rowsinserted', this, firstRow, lastRow); + } else { + if (!isUpdate) { + this.fireEvent('beforerowsinserted', this, firstRow, lastRow); } - var html = this.renderRows(firstRow, lastRow); - var before = this.getRow(firstRow); - if(before){ + var html = this.renderRows(firstRow, lastRow), + before = this.getRow(firstRow); + if (before) { + if(firstRow === 0){ + Ext.fly(this.getRow(0)).removeClass(this.firstRowCls); + } Ext.DomHelper.insertHtml('beforeBegin', before, html); - }else{ + } else { + var r = this.getRow(last - 1); + if(r){ + Ext.fly(r).removeClass(this.lastRowCls); + } Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); } - if(!isUpdate){ - this.fireEvent("rowsinserted", this, firstRow, lastRow); + if (!isUpdate) { this.processRows(firstRow); + this.fireEvent('rowsinserted', this, firstRow, lastRow); + } else if (firstRow === 0 || firstRow >= last) { + + Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls); } } - this.focusRow(firstRow); + this.syncFocusEl(firstRow); }, - deleteRows : function(dm, firstRow, lastRow){ - if(dm.getRowCount()<1){ + + deleteRows : function(dm, firstRow, lastRow) { + if (dm.getRowCount() < 1) { this.refresh(); - }else{ - this.fireEvent("beforerowsdeleted", this, firstRow, lastRow); + } else { + this.fireEvent('beforerowsdeleted', this, firstRow, lastRow); this.removeRows(firstRow, lastRow); this.processRows(firstRow); - this.fireEvent("rowsdeleted", this, firstRow, lastRow); + this.fireEvent('rowsdeleted', this, firstRow, lastRow); } }, - getColumnStyle : function(col, isHeader){ - var style = !isHeader ? (this.cm.config[col].css || '') : ''; - style += 'width:'+this.getColumnWidth(col)+';'; - if(this.cm.isHidden(col)){ - style += 'display:none;'; + + getColumnStyle : function(colIndex, isHeader) { + var colModel = this.cm, + colConfig = colModel.config, + style = isHeader ? '' : colConfig[colIndex].css || '', + align = colConfig[colIndex].align; + + style += String.format("width: {0};", this.getColumnWidth(colIndex)); + + if (colModel.isHidden(colIndex)) { + style += 'display: none; '; } - var align = this.cm.config[col].align; - if(align){ - style += 'text-align:'+align+';'; + + if (align) { + style += String.format("text-align: {0};", align); } + return style; }, - getColumnWidth : function(col){ - var w = this.cm.getColumnWidth(col); - if(typeof w == 'number'){ - return (Ext.isBorderBox ? w : (w-this.borderWidth > 0 ? w-this.borderWidth:0)) + 'px'; + + getColumnWidth : function(column) { + var columnWidth = this.cm.getColumnWidth(column), + borderWidth = this.borderWidth; + + if (Ext.isNumber(columnWidth)) { + if (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2)) { + return columnWidth + "px"; + } else { + return Math.max(columnWidth - borderWidth, 0) + "px"; + } + } else { + return columnWidth; } - return w; }, - getTotalWidth : function(){ - return this.cm.getTotalWidth()+'px'; + + getTotalWidth : function() { + return this.cm.getTotalWidth() + 'px'; }, - fitColumns : function(preventRefresh, onlyExpand, omitColumn){ - var cm = this.cm, leftOver, dist, i; - var tw = cm.getTotalWidth(false); - var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; - - if(aw < 20){ return; - } - var extra = aw - tw; - - if(extra === 0){ + + fitColumns : function(preventRefresh, onlyExpand, omitColumn) { + var grid = this.grid, + colModel = this.cm, + totalColWidth = colModel.getTotalWidth(false), + gridWidth = this.getGridInnerWidth(), + extraWidth = gridWidth - totalColWidth, + columns = [], + extraCol = 0, + width = 0, + colWidth, fraction, i; + + + if (gridWidth < 20 || extraWidth === 0) { return false; } - - var vc = cm.getColumnCount(true); - var ac = vc-(typeof omitColumn == 'number' ? 1 : 0); - if(ac === 0){ - ac = 1; + + var visibleColCount = colModel.getColumnCount(true), + totalColCount = colModel.getColumnCount(false), + adjCount = visibleColCount - (Ext.isNumber(omitColumn) ? 1 : 0); + + if (adjCount === 0) { + adjCount = 1; omitColumn = undefined; } - var colCount = cm.getColumnCount(); - var cols = []; - var extraCol = 0; - var width = 0; - var w; - for (i = 0; i < colCount; i++){ - if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){ - w = cm.getColumnWidth(i); - cols.push(i); - extraCol = i; - cols.push(w); - width += w; + + + for (i = 0; i < totalColCount; i++) { + if (!colModel.isFixed(i) && i !== omitColumn) { + colWidth = colModel.getColumnWidth(i); + columns.push(i, colWidth); + + if (!colModel.isHidden(i)) { + extraCol = i; + width += colWidth; + } } } - var frac = (aw - cm.getTotalWidth())/width; - while (cols.length){ - w = cols.pop(); - i = cols.pop(); - cm.setColumnWidth(i, Math.max(this.grid.minColumnWidth, Math.floor(w + w*frac)), true); + + fraction = (gridWidth - colModel.getTotalWidth()) / width; + + while (columns.length) { + colWidth = columns.pop(); + i = columns.pop(); + + colModel.setColumnWidth(i, Math.max(grid.minColumnWidth, Math.floor(colWidth + colWidth * fraction)), true); } - - if((tw = cm.getTotalWidth(false)) > aw){ - var adjustCol = ac != vc ? omitColumn : extraCol; - cm.setColumnWidth(adjustCol, Math.max(1, - cm.getColumnWidth(adjustCol)- (tw-aw)), true); + + + totalColWidth = colModel.getTotalWidth(false); + + if (totalColWidth > gridWidth) { + var adjustCol = (adjCount == visibleColCount) ? extraCol : omitColumn, + newWidth = Math.max(1, colModel.getColumnWidth(adjustCol) - (totalColWidth - gridWidth)); + + colModel.setColumnWidth(adjustCol, newWidth, true); } - - if(preventRefresh !== true){ + + if (preventRefresh !== true) { this.updateAllColumnWidths(); } - - + return true; }, - autoExpand : function(preventUpdate){ - var g = this.grid, cm = this.cm; - if(!this.userResized && g.autoExpandColumn){ - var tw = cm.getTotalWidth(false); - var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; - if(tw != aw){ - var ci = cm.getIndexById(g.autoExpandColumn); - var currentWidth = cm.getColumnWidth(ci); - var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax); - if(cw != currentWidth){ - cm.setColumnWidth(ci, cw, true); - if(preventUpdate !== true){ - this.updateColumnWidth(ci, cw); + + autoExpand : function(preventUpdate) { + var grid = this.grid, + colModel = this.cm, + gridWidth = this.getGridInnerWidth(), + totalColumnWidth = colModel.getTotalWidth(false), + autoExpandColumn = grid.autoExpandColumn; + + if (!this.userResized && autoExpandColumn) { + if (gridWidth != totalColumnWidth) { + + var colIndex = colModel.getIndexById(autoExpandColumn), + currentWidth = colModel.getColumnWidth(colIndex), + desiredWidth = gridWidth - totalColumnWidth + currentWidth, + newWidth = Math.min(Math.max(desiredWidth, grid.autoExpandMin), grid.autoExpandMax); + + if (currentWidth != newWidth) { + colModel.setColumnWidth(colIndex, newWidth, true); + + if (preventUpdate !== true) { + this.updateColumnWidth(colIndex, newWidth); } } } } }, - - getColumnData : function(){ - var cs = [], cm = this.cm, colCount = cm.getColumnCount(); - for(var i = 0; i < colCount; i++){ - var name = cm.getDataIndex(i); - cs[i] = { - name : (typeof name == 'undefined' ? this.ds.fields.get(i).name : name), - renderer : cm.getRenderer(i), - id : cm.getColumnId(i), - style : this.getColumnStyle(i) - }; - } - return cs; - }, - - renderRows : function(startRow, endRow){ - var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows; - var colCount = cm.getColumnCount(); - - if(ds.getCount() < 1){ - return ""; - } - - var cs = this.getColumnData(); - - startRow = startRow || 0; - endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow; - - var rs = ds.getRange(startRow, endRow); - - return this.doRender(cs, rs, ds, startRow, colCount, stripe); - }, - - renderBody : function(){ - var markup = this.renderRows(); - return this.templates.body.apply({rows: markup}); - }, - - refreshRow : function(record){ - var ds = this.ds, index; - if(typeof record == 'number'){ - index = record; - record = ds.getAt(index); - }else{ - index = ds.indexOf(record); - } - var cls = []; - this.insertRows(ds, index, index, true); - this.getRow(index).rowIndex = index; - this.onRemove(ds, record, index+1, true); - this.fireEvent("rowupdated", this, index, record); + + + getGridInnerWidth: function() { + return this.grid.getGridEl().getWidth(true) - this.getScrollOffset(); }, - refresh : function(headersToo){ - this.fireEvent("beforerefresh", this); + getColumnData : function() { + var columns = [], + colModel = this.cm, + colCount = colModel.getColumnCount(), + fields = this.ds.fields, + i, name; + + for (i = 0; i < colCount; i++) { + name = colModel.getDataIndex(i); + + columns[i] = { + name : Ext.isDefined(name) ? name : (fields.get(i) ? fields.get(i).name : undefined), + renderer: colModel.getRenderer(i), + scope : colModel.getRendererScope(i), + id : colModel.getColumnId(i), + style : this.getColumnStyle(i) + }; + } + + return columns; + }, + + + renderRows : function(startRow, endRow) { + var grid = this.grid, + store = grid.store, + stripe = grid.stripeRows, + colModel = grid.colModel, + colCount = colModel.getColumnCount(), + rowCount = store.getCount(), + records; + + if (rowCount < 1) { + return ''; + } + + startRow = startRow || 0; + endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1; + records = store.getRange(startRow, endRow); + + return this.doRender(this.getColumnData(), records, store, startRow, colCount, stripe); + }, + + + renderBody : function(){ + var markup = this.renderRows() || ' '; + return this.templates.body.apply({rows: markup}); + }, + + + refreshRow: function(record) { + var store = this.ds, + colCount = this.cm.getColumnCount(), + columns = this.getColumnData(), + last = colCount - 1, + cls = ['x-grid3-row'], + rowParams = { + tstyle: String.format("width: {0};", this.getTotalWidth()) + }, + colBuffer = [], + cellTpl = this.templates.cell, + rowIndex, row, column, meta, css, i; + + if (Ext.isNumber(record)) { + rowIndex = record; + record = store.getAt(rowIndex); + } else { + rowIndex = store.indexOf(record); + } + + + if (!record || rowIndex < 0) { + return; + } + + + for (i = 0; i < colCount; i++) { + column = columns[i]; + + if (i == 0) { + css = 'x-grid3-cell-first'; + } else { + css = (i == last) ? 'x-grid3-cell-last ' : ''; + } + + meta = { + id : column.id, + style : column.style, + css : css, + attr : "", + cellAttr: "" + }; + + meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store); + + if (Ext.isEmpty(meta.value)) { + meta.value = ' '; + } + + if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') { + meta.css += ' x-grid3-dirty-cell'; + } + + colBuffer[i] = cellTpl.apply(meta); + } + + row = this.getRow(rowIndex); + row.className = ''; + + if (this.grid.stripeRows && ((rowIndex + 1) % 2 === 0)) { + cls.push('x-grid3-row-alt'); + } + + if (this.getRowClass) { + rowParams.cols = colCount; + cls.push(this.getRowClass(record, rowIndex, rowParams, store)); + } + + this.fly(row).addClass(cls).setStyle(rowParams.tstyle); + rowParams.cells = colBuffer.join(""); + row.innerHTML = this.templates.rowInner.apply(rowParams); + + this.fireEvent('rowupdated', this, rowIndex, record); + }, + + + refresh : function(headersToo) { + this.fireEvent('beforerefresh', this); this.grid.stopEditing(true); var result = this.renderBody(); - this.mainBody.update(result); - - if(headersToo === true){ + this.mainBody.update(result).setWidth(this.getTotalWidth()); + if (headersToo === true) { this.updateHeaders(); this.updateHeaderSortState(); } this.processRows(0, true); this.layout(); this.applyEmptyText(); - this.fireEvent("refresh", this); + this.fireEvent('refresh', this); }, - applyEmptyText : function(){ - if(this.emptyText && !this.hasRows()){ + + applyEmptyText : function() { + if (this.emptyText && !this.hasRows()) { this.mainBody.update('
    ' + this.emptyText + '
    '); } }, - updateHeaderSortState : function(){ + + updateHeaderSortState : function() { var state = this.ds.getSortState(); - if(!state){ + if (!state) { return; } - if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){ + + if (!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)) { this.grid.fireEvent('sortchange', this.grid, state); } + this.sortState = state; + var sortColumn = this.cm.findColumnIndex(state.field); - if(sortColumn != -1){ + if (sortColumn != -1) { var sortDir = state.direction; this.updateSortIcon(sortColumn, sortDir); } }, - destroy : function(){ - if(this.colMenu){ - this.colMenu.removeAll(); - Ext.menu.MenuMgr.unregister(this.colMenu); - this.colMenu.getEl().remove(); - delete this.colMenu; + + clearHeaderSortState : function() { + if (!this.sortState) { + return; } - if(this.hmenu){ - this.hmenu.removeAll(); - Ext.menu.MenuMgr.unregister(this.hmenu); - this.hmenu.getEl().remove(); - delete this.hmenu; - } - if(this.grid.enableColumnMove){ - var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; - if(dds){ - for(var dd in dds){ - if(!dds[dd].config.isTarget && dds[dd].dragElId){ - var elid = dds[dd].dragElId; - dds[dd].unreg(); - Ext.get(elid).remove(); - } else if(dds[dd].config.isTarget){ - dds[dd].proxyTop.remove(); - dds[dd].proxyBottom.remove(); - dds[dd].unreg(); - } - if(Ext.dd.DDM.locationCache[dd]){ - delete Ext.dd.DDM.locationCache[dd]; - } - } - delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; - } - } - - Ext.destroy(this.resizeMarker, this.resizeProxy); - - if(this.dragZone){ - this.dragZone.unreg(); - } - - this.initData(null, null); - Ext.EventManager.removeResizeListener(this.onWindowResize, this); - }, - - onDenyColumnHide : function(){ - - }, - - render : function(){ - - if(this.autoFill){ - this.fitColumns(true, true); - }else if(this.forceFit){ - this.fitColumns(true, false); - }else if(this.grid.autoExpandColumn){ - this.autoExpand(true); - } - - this.renderUI(); + this.grid.fireEvent('sortchange', this.grid, null); + this.mainHd.select('td').removeClass(this.sortClasses); + delete this.sortState; }, - initData : function(ds, cm){ - if(this.ds){ - this.ds.un("load", this.onLoad, this); - this.ds.un("datachanged", this.onDataChange, this); - this.ds.un("add", this.onAdd, this); - this.ds.un("remove", this.onRemove, this); - this.ds.un("update", this.onUpdate, this); - this.ds.un("clear", this.onClear, this); + destroy : function() { + var me = this, + grid = me.grid, + gridEl = grid.getGridEl(), + dragZone = me.dragZone, + splitZone = me.splitZone, + columnDrag = me.columnDrag, + columnDrop = me.columnDrop, + scrollToTopTask = me.scrollToTopTask, + columnDragData, + columnDragProxy; + + if (scrollToTopTask && scrollToTopTask.cancel) { + scrollToTopTask.cancel(); } - if(ds){ - ds.on("load", this.onLoad, this); - ds.on("datachanged", this.onDataChange, this); - ds.on("add", this.onAdd, this); - ds.on("remove", this.onRemove, this); - ds.on("update", this.onUpdate, this); - ds.on("clear", this.onClear, this); - } - this.ds = ds; + + Ext.destroyMembers(me, 'colMenu', 'hmenu'); - if(this.cm){ - this.cm.un("configchange", this.onColConfigChange, this); - this.cm.un("widthchange", this.onColWidthChange, this); - this.cm.un("headerchange", this.onHeaderChange, this); - this.cm.un("hiddenchange", this.onHiddenChange, this); - this.cm.un("columnmoved", this.onColumnMove, this); - this.cm.un("columnlockchange", this.onColumnLock, this); + me.initData(null, null); + me.purgeListeners(); + + Ext.fly(me.innerHd).un("click", me.handleHdDown, me); + + if (grid.enableColumnMove) { + columnDragData = columnDrag.dragData; + columnDragProxy = columnDrag.proxy; + Ext.destroy( + columnDrag.el, + columnDragProxy.ghost, + columnDragProxy.el, + columnDrop.el, + columnDrop.proxyTop, + columnDrop.proxyBottom, + columnDragData.ddel, + columnDragData.header + ); + + if (columnDragProxy.anim) { + Ext.destroy(columnDragProxy.anim); + } + + delete columnDragProxy.ghost; + delete columnDragData.ddel; + delete columnDragData.header; + columnDrag.destroy(); + + delete Ext.dd.DDM.locationCache[columnDrag.id]; + delete columnDrag._domRef; + + delete columnDrop.proxyTop; + delete columnDrop.proxyBottom; + columnDrop.destroy(); + delete Ext.dd.DDM.locationCache["gridHeader" + gridEl.id]; + delete columnDrop._domRef; + delete Ext.dd.DDM.ids[columnDrop.ddGroup]; } - if(cm){ - delete this.lastViewWidth; - cm.on("configchange", this.onColConfigChange, this); - cm.on("widthchange", this.onColWidthChange, this); - cm.on("headerchange", this.onHeaderChange, this); - cm.on("hiddenchange", this.onHiddenChange, this); - cm.on("columnmoved", this.onColumnMove, this); - cm.on("columnlockchange", this.onColumnLock, this); + + if (splitZone) { + splitZone.destroy(); + delete splitZone._domRef; + delete Ext.dd.DDM.ids["gridSplitters" + gridEl.id]; } - this.cm = cm; + + Ext.fly(me.innerHd).removeAllListeners(); + Ext.removeNode(me.innerHd); + delete me.innerHd; + + Ext.destroy( + me.el, + me.mainWrap, + me.mainHd, + me.scroller, + me.mainBody, + me.focusEl, + me.resizeMarker, + me.resizeProxy, + me.activeHdBtn, + me._flyweight, + dragZone, + splitZone + ); + + delete grid.container; + + if (dragZone) { + dragZone.destroy(); + } + + Ext.dd.DDM.currentTarget = null; + delete Ext.dd.DDM.locationCache[gridEl.id]; + + Ext.EventManager.removeResizeListener(me.onWindowResize, me); }, - onDataChange : function(){ - this.refresh(); + + onDenyColumnHide : function() { + + }, + + + render : function() { + if (this.autoFill) { + var ct = this.grid.ownerCt; + + if (ct && ct.getLayout()) { + ct.on('afterlayout', function() { + this.fitColumns(true, true); + this.updateHeaders(); + this.updateHeaderSortState(); + }, this, {single: true}); + } + } else if (this.forceFit) { + this.fitColumns(true, false); + } else if (this.grid.autoExpandColumn) { + this.autoExpand(true); + } + + this.grid.getGridEl().dom.innerHTML = this.renderUI(); + + this.afterRenderUI(); + }, + + + + + initData : function(newStore, newColModel) { + var me = this; + + if (me.ds) { + var oldStore = me.ds; + + oldStore.un('add', me.onAdd, me); + oldStore.un('load', me.onLoad, me); + oldStore.un('clear', me.onClear, me); + oldStore.un('remove', me.onRemove, me); + oldStore.un('update', me.onUpdate, me); + oldStore.un('datachanged', me.onDataChange, me); + + if (oldStore !== newStore && oldStore.autoDestroy) { + oldStore.destroy(); + } + } + + if (newStore) { + newStore.on({ + scope : me, + load : me.onLoad, + add : me.onAdd, + remove : me.onRemove, + update : me.onUpdate, + clear : me.onClear, + datachanged: me.onDataChange + }); + } + + if (me.cm) { + var oldColModel = me.cm; + + oldColModel.un('configchange', me.onColConfigChange, me); + oldColModel.un('widthchange', me.onColWidthChange, me); + oldColModel.un('headerchange', me.onHeaderChange, me); + oldColModel.un('hiddenchange', me.onHiddenChange, me); + oldColModel.un('columnmoved', me.onColumnMove, me); + } + + if (newColModel) { + delete me.lastViewWidth; + + newColModel.on({ + scope : me, + configchange: me.onColConfigChange, + widthchange : me.onColWidthChange, + headerchange: me.onHeaderChange, + hiddenchange: me.onHiddenChange, + columnmoved : me.onColumnMove + }); + } + + me.ds = newStore; + me.cm = newColModel; + }, + + + onDataChange : function(){ + this.refresh(true); this.updateHeaderSortState(); + this.syncFocusEl(0); }, - onClear : function(){ + + onClear : function() { this.refresh(); + this.syncFocusEl(0); }, - onUpdate : function(ds, record){ + + onUpdate : function(store, record) { this.refreshRow(record); }, - onAdd : function(ds, records, index){ - this.insertRows(ds, index, index + (records.length-1)); + + onAdd : function(store, records, index) { + this.insertRows(store, index, index + (records.length-1)); }, - onRemove : function(ds, record, index, isUpdate){ - if(isUpdate !== true){ - this.fireEvent("beforerowremoved", this, index, record); + + onRemove : function(store, record, index, isUpdate) { + if (isUpdate !== true) { + this.fireEvent('beforerowremoved', this, index, record); } + this.removeRow(index); - if(isUpdate !== true){ + + if (isUpdate !== true) { this.processRows(index); this.applyEmptyText(); - this.fireEvent("rowremoved", this, index, record); + this.fireEvent('rowremoved', this, index, record); } }, - onLoad : function(){ - this.scrollToTop(); + + onLoad : function() { + if (Ext.isGecko) { + if (!this.scrollToTopTask) { + this.scrollToTopTask = new Ext.util.DelayedTask(this.scrollToTop, this); + } + this.scrollToTopTask.delay(1); + } else { + this.scrollToTop(); + } }, - onColWidthChange : function(cm, col, width){ + + onColWidthChange : function(cm, col, width) { this.updateColumnWidth(col, width); }, - onHeaderChange : function(cm, col, text){ + + onHeaderChange : function(cm, col, text) { this.updateHeaders(); }, - onHiddenChange : function(cm, col, hidden){ + + onHiddenChange : function(cm, col, hidden) { this.updateColumnHidden(col, hidden); }, - onColumnMove : function(cm, oldIndex, newIndex){ + + onColumnMove : function(cm, oldIndex, newIndex) { this.indexMap = null; - var s = this.getScrollState(); this.refresh(true); - this.restoreScroll(s); + this.restoreScroll(this.getScrollState()); + this.afterMove(newIndex); + this.grid.fireEvent('columnmove', oldIndex, newIndex); }, - onColConfigChange : function(){ + + onColConfigChange : function() { delete this.lastViewWidth; this.indexMap = null; this.refresh(true); }, - initUI : function(grid){ - grid.on("headerclick", this.onHeaderClick, this); - - if(grid.trackMouseOver){ - grid.on("mouseover", this.onRowOver, this); - grid.on("mouseout", this.onRowOut, this); - } + + initUI : function(grid) { + grid.on('headerclick', this.onHeaderClick, this); }, - initEvents : function(){ + + initEvents : Ext.emptyFn, - }, - - onHeaderClick : function(g, index){ - if(this.headersDisabled || !this.cm.isSortable(index)){ + + onHeaderClick : function(g, index) { + if (this.headersDisabled || !this.cm.isSortable(index)) { return; } g.stopEditing(true); g.store.sort(this.cm.getDataIndex(index)); }, - onRowOver : function(e, t){ - var row; - if((row = this.findRowIndex(t)) !== false){ - this.addRowClass(row, "x-grid3-row-over"); + + onRowOver : function(e, target) { + var row = this.findRowIndex(target); + + if (row !== false) { + this.addRowClass(row, this.rowOverCls); } }, - onRowOut : function(e, t){ - var row; - if((row = this.findRowIndex(t)) !== false && row !== this.findRowIndex(e.getRelatedTarget())){ - this.removeRowClass(row, "x-grid3-row-over"); + + onRowOut : function(e, target) { + var row = this.findRowIndex(target); + + if (row !== false && !e.within(this.getRow(row), true)) { + this.removeRowClass(row, this.rowOverCls); } }, - handleWheel : function(e){ + + onRowSelect : function(row) { + this.addRowClass(row, this.selectedRowClass); + }, + + + onRowDeselect : function(row) { + this.removeRowClass(row, this.selectedRowClass); + }, + + + onCellSelect : function(row, col) { + var cell = this.getCell(row, col); + if (cell) { + this.fly(cell).addClass('x-grid3-cell-selected'); + } + }, + + + onCellDeselect : function(row, col) { + var cell = this.getCell(row, col); + if (cell) { + this.fly(cell).removeClass('x-grid3-cell-selected'); + } + }, + + + handleWheel : function(e) { e.stopPropagation(); }, - onRowSelect : function(row){ - this.addRowClass(row, "x-grid3-row-selected"); - }, - - onRowDeselect : function(row){ - this.removeRowClass(row, "x-grid3-row-selected"); - }, - - onCellSelect : function(row, col){ - var cell = this.getCell(row, col); - if(cell){ - this.fly(cell).addClass("x-grid3-cell-selected"); - } - }, - - onCellDeselect : function(row, col){ - var cell = this.getCell(row, col); - if(cell){ - this.fly(cell).removeClass("x-grid3-cell-selected"); - } - }, - - onColumnSplitterMoved : function(i, w){ + + onColumnSplitterMoved : function(cellIndex, width) { this.userResized = true; - var cm = this.grid.colModel; - cm.setColumnWidth(i, w, true); + this.grid.colModel.setColumnWidth(cellIndex, width, true); - if(this.forceFit){ - this.fitColumns(true, false, i); + if (this.forceFit) { + this.fitColumns(true, false, cellIndex); this.updateAllColumnWidths(); - }else{ - this.updateColumnWidth(i, w); + } else { + this.updateColumnWidth(cellIndex, width); + this.syncHeaderScroll(); } - this.grid.fireEvent("columnresize", i, w); + this.grid.fireEvent('columnresize', cellIndex, width); }, - handleHdMenuClick : function(item){ - var index = this.hdCtxIndex; - var cm = this.cm, ds = this.ds; - switch(item.id){ - case "asc": - ds.sort(cm.getDataIndex(index), "ASC"); - break; - case "desc": - ds.sort(cm.getDataIndex(index), "DESC"); - break; - default: - index = cm.getIndexById(item.id.substr(4)); - if(index != -1){ - if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){ - this.onDenyColumnHide(); - return false; - } - cm.setHidden(index, item.checked); - } - } - return true; - }, + + beforeColMenuShow : function() { + var colModel = this.cm, + colCount = colModel.getColumnCount(), + colMenu = this.colMenu, + i; - isHideableColumn : function(c){ - return !c.hidden && !c.fixed; - }, + colMenu.removeAll(); - beforeColMenuShow : function(){ - var cm = this.cm, colCount = cm.getColumnCount(); - this.colMenu.removeAll(); - for(var i = 0; i < colCount; i++){ - if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){ - this.colMenu.add(new Ext.menu.CheckItem({ - id: "col-"+cm.getColumnId(i), - text: cm.getColumnHeader(i), - checked: !cm.isHidden(i), - hideOnClick:false, - disabled: cm.config[i].hideable === false + for (i = 0; i < colCount; i++) { + if (colModel.config[i].hideable !== false) { + colMenu.add(new Ext.menu.CheckItem({ + text : colModel.getColumnHeader(i), + itemId : 'col-' + colModel.getColumnId(i), + checked : !colModel.isHidden(i), + disabled : colModel.config[i].hideable === false, + hideOnClick: false })); } } }, + + + handleHdMenuClick : function(item) { + var store = this.ds, + dataIndex = this.cm.getDataIndex(this.hdCtxIndex); - handleHdDown : function(e, t){ - if(Ext.fly(t).hasClass('x-grid3-hd-btn')){ - e.stopEvent(); - var hd = this.findHeaderCell(t); - Ext.fly(hd).addClass('x-grid3-hd-menu-open'); - var index = this.getCellIndex(hd); - this.hdCtxIndex = index; - var ms = this.hmenu.items, cm = this.cm; - ms.get("asc").setDisabled(!cm.isSortable(index)); - ms.get("desc").setDisabled(!cm.isSortable(index)); - this.hmenu.on("hide", function(){ - Ext.fly(hd).removeClass('x-grid3-hd-menu-open'); - }, this, {single:true}); - this.hmenu.show(t, "tl-bl?"); + switch (item.getItemId()) { + case 'asc': + store.sort(dataIndex, 'ASC'); + break; + case 'desc': + store.sort(dataIndex, 'DESC'); + break; + default: + this.handleHdMenuClickDefault(item); + } + return true; + }, + + + handleHdMenuClickDefault: function(item) { + var colModel = this.cm, + itemId = item.getItemId(), + index = colModel.getIndexById(itemId.substr(4)); + + if (index != -1) { + if (item.checked && colModel.getColumnsBy(this.isHideableColumn, this).length <= 1) { + this.onDenyColumnHide(); + return; + } + colModel.setHidden(index, item.checked); } }, - handleHdOver : function(e, t){ - var hd = this.findHeaderCell(t); - if(hd && !this.headersDisabled){ - this.activeHd = hd; - this.activeHdIndex = this.getCellIndex(hd); - var fly = this.fly(hd); + + handleHdDown : function(e, target) { + if (Ext.fly(target).hasClass('x-grid3-hd-btn')) { + e.stopEvent(); + + var colModel = this.cm, + header = this.findHeaderCell(target), + index = this.getCellIndex(header), + sortable = colModel.isSortable(index), + menu = this.hmenu, + menuItems = menu.items, + menuCls = this.headerMenuOpenCls; + + this.hdCtxIndex = index; + + Ext.fly(header).addClass(menuCls); + menuItems.get('asc').setDisabled(!sortable); + menuItems.get('desc').setDisabled(!sortable); + + menu.on('hide', function() { + Ext.fly(header).removeClass(menuCls); + }, this, {single:true}); + + menu.show(target, 'tl-bl?'); + } + }, + + + handleHdMove : function(e) { + var header = this.findHeaderCell(this.activeHdRef); + + if (header && !this.headersDisabled) { + var handleWidth = this.splitHandleWidth || 5, + activeRegion = this.activeHdRegion, + headerStyle = header.style, + colModel = this.cm, + cursor = '', + pageX = e.getPageX(); + + if (this.grid.enableColumnResize !== false) { + var activeHeaderIndex = this.activeHdIndex, + previousVisible = this.getPreviousVisible(activeHeaderIndex), + currentResizable = colModel.isResizable(activeHeaderIndex), + previousResizable = previousVisible && colModel.isResizable(previousVisible), + inLeftResizer = pageX - activeRegion.left <= handleWidth, + inRightResizer = activeRegion.right - pageX <= (!this.activeHdBtn ? handleWidth : 2); + + if (inLeftResizer && previousResizable) { + cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; + } else if (inRightResizer && currentResizable) { + cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize'; + } + } + + headerStyle.cursor = cursor; + } + }, + + + getPreviousVisible: function(index) { + while (index > 0) { + if (!this.cm.isHidden(index - 1)) { + return index; + } + index--; + } + return undefined; + }, + + + handleHdOver : function(e, target) { + var header = this.findHeaderCell(target); + + if (header && !this.headersDisabled) { + var fly = this.fly(header); + + this.activeHdRef = target; + this.activeHdIndex = this.getCellIndex(header); this.activeHdRegion = fly.getRegion(); - if(!this.cm.isMenuDisabled(this.activeHdIndex)){ - fly.addClass("x-grid3-hd-over"); + + if (!this.isMenuDisabled(this.activeHdIndex, fly)) { + fly.addClass('x-grid3-hd-over'); this.activeHdBtn = fly.child('.x-grid3-hd-btn'); - if(this.activeHdBtn){ - this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px'; + + if (this.activeHdBtn) { + this.activeHdBtn.dom.style.height = (header.firstChild.offsetHeight - 1) + 'px'; } } } }, - handleHdMove : function(e, t){ - if(this.activeHd && !this.headersDisabled){ - var hw = this.splitHandleWidth || 5; - var r = this.activeHdRegion; - var x = e.getPageX(); - var ss = this.activeHd.style; - if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){ - ss.cursor = Ext.isAir ? 'move' : Ext.isSafari ? 'e-resize' : 'col-resize'; }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){ - ss.cursor = Ext.isAir ? 'move' : Ext.isSafari ? 'w-resize' : 'col-resize'; - }else{ - ss.cursor = ''; - } + + handleHdOut : function(e, target) { + var header = this.findHeaderCell(target); + + if (header && (!Ext.isIE || !e.within(header, true))) { + this.activeHdRef = null; + this.fly(header).removeClass('x-grid3-hd-over'); + header.style.cursor = ''; } }, - - handleHdOut : function(e, t){ - var hd = this.findHeaderCell(t); - if(hd && (!Ext.isIE || !e.within(hd, true))){ - this.activeHd = null; - this.fly(hd).removeClass("x-grid3-hd-over"); - hd.style.cursor = ''; - } + + + isMenuDisabled: function(cellIndex, el) { + return this.cm.isMenuDisabled(cellIndex); }, - hasRows : function(){ + + hasRows : function() { var fc = this.mainBody.dom.firstChild; - return fc && fc.className != 'x-grid-empty'; + return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty'; + }, + + + isHideableColumn : function(c) { + return !c.hidden; }, - bind : function(d, c){ + + bind : function(d, c) { this.initData(d, c); } }); -Ext.grid.GridView.SplitDragZone = function(grid, hd){ - this.grid = grid; - this.view = grid.getView(); - this.marker = this.view.resizeMarker; - this.proxy = this.view.resizeProxy; - Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd, - "gridSplitters" + this.grid.getGridEl().id, { - dragElId : Ext.id(this.proxy.dom), resizeFrame:false - }); - this.scroll = false; - this.hw = this.view.splitHandleWidth || 5; -}; -Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { + + +Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, { + + constructor: function(grid, hd){ + this.grid = grid; + this.view = grid.getView(); + this.marker = this.view.resizeMarker; + this.proxy = this.view.resizeProxy; + Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd, + 'gridSplitters' + this.grid.getGridEl().id, { + dragElId : Ext.id(this.proxy.dom), resizeFrame:false + }); + this.scroll = false; + this.hw = this.view.splitHandleWidth || 5; + }, b4StartDrag : function(x, y){ + this.dragHeadersDisabled = this.view.headersDisabled; this.view.headersDisabled = true; var h = this.view.mainWrap.getHeight(); this.marker.setHeight(h); this.marker.show(); this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]); this.proxy.setHeight(h); - var w = this.cm.getColumnWidth(this.cellIndex); - var minw = Math.max(w-this.grid.minColumnWidth, 0); + var w = this.cm.getColumnWidth(this.cellIndex), + minw = Math.max(w-this.grid.minColumnWidth, 0); this.resetConstraints(); this.setXConstraint(minw, 1000); this.setYConstraint(0, 0); @@ -32007,13 +48804,20 @@ Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); }, + allowHeaderDrag : function(e){ + return true; + }, handleMouseDown : function(e){ var t = this.view.findHeaderCell(e.getTarget()); - if(t){ - var xy = this.view.fly(t).getXY(), x = xy[0], y = xy[1]; - var exy = e.getXY(), ex = exy[0], ey = exy[1]; - var w = t.offsetWidth, adjust = false; + if(t && this.allowHeaderDrag(e)){ + var xy = this.view.fly(t).getXY(), + x = xy[0], + exy = e.getXY(), + ex = exy[0], + w = t.offsetWidth, + adjust = false; + if((ex - x) <= this.hw){ adjust = -1; }else if((x+w) - ex <= this.hw){ @@ -32046,12 +48850,14 @@ Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { endDrag : function(e){ this.marker.hide(); - var v = this.view; - var endX = Math.max(this.minX, e.getPageX()); - var diff = endX - this.startPos; + var v = this.view, + endX = Math.max(this.minX, e.getPageX()), + diff = endX - this.startPos, + disabled = this.dragHeadersDisabled; + v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); setTimeout(function(){ - v.headersDisabled = false; + v.headersDisabled = disabled; }, 50); }, @@ -32060,604 +48866,744 @@ Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { } }); - -Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, { - - hideGroupedColumn:false, - - showGroupName:true, - - startCollapsed:false, - - enableGrouping:true, - - enableGroupingMenu:true, - - enableNoGroups:true, - - emptyGroupText : '(None)', - - ignoreAdd: false, - - groupTextTpl : '{text}', - - - +Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, { - gidSeed : 1000, - - initTemplates : function(){ - Ext.grid.GroupingView.superclass.initTemplates.call(this); - this.state = {}; - - var sm = this.grid.getSelectionModel(); - sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect', - this.onBeforeRowSelect, this); - - if(!this.startGroup){ - this.startGroup = new Ext.XTemplate( - '
    ', - '
    ', this.groupTextTpl ,'
    ', - '
    ' - ); - } - this.startGroup.compile(); - this.endGroup = '
    '; - }, - + colHeaderCellCls: 'grid-hd-group-cell', - findGroup : function(el){ - return Ext.fly(el).up('.x-grid-group', this.mainBody.dom); - }, - - getGroups : function(){ - return this.hasRows() ? this.mainBody.dom.childNodes : []; - }, - + title: '', - onAdd : function(){ - if(this.enableGrouping && !this.ignoreAdd){ - var ss = this.getScrollState(); - this.refresh(); - this.restoreScroll(ss); - }else if(!this.enableGrouping){ - Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments); - } - }, - - onRemove : function(ds, record, index, isUpdate){ - Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments); - var g = document.getElementById(record._groupId); - if(g && g.childNodes[1].childNodes.length < 1){ - Ext.removeNode(g); - } - this.applyEmptyText(); - }, - - refreshRow : function(record){ - if(this.ds.getCount()==1){ - this.refresh(); - }else{ - this.isUpdating = true; - Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments); - this.isUpdating = false; - } - }, - - beforeMenuShow : function(){ - var field = this.getGroupField(); - var g = this.hmenu.items.get('groupBy'); - if(g){ - g.setDisabled(this.cm.config[this.hdCtxIndex].groupable === false); - } - var s = this.hmenu.items.get('showGroups'); - if(s){ - s.setDisabled(!field && this.cm.config[this.hdCtxIndex].groupable === false); - s.setChecked(!!field, true); - } - }, - + getColumnHeaders: function() { + return this.grid.topAxis.buildHeaders();; + }, - renderUI : function(){ - Ext.grid.GroupingView.superclass.renderUI.call(this); - this.mainBody.on('mousedown', this.interceptMouse, this); - - if(this.enableGroupingMenu && this.hmenu){ - this.hmenu.add('-',{ - id:'groupBy', - text: this.groupByText, - handler: this.onGroupByClick, - scope: this, - iconCls:'x-group-by-icon' - }); - if(this.enableNoGroups){ - this.hmenu.add({ - id:'showGroups', - text: this.showGroupsText, - checked: true, - checkHandler: this.onShowGroupsClick, - scope: this - }); - } - this.hmenu.on('beforeshow', this.beforeMenuShow, this); - } - }, - - onGroupByClick : function(){ - this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); - this.beforeMenuShow(); - }, - + getRowHeaders: function() { + return this.grid.leftAxis.buildHeaders(); + }, - onShowGroupsClick : function(mi, checked){ - if(checked){ - this.onGroupByClick(); - }else{ - this.grid.store.clearGrouping(); - } - }, - - - toggleGroup : function(group, expanded){ - this.grid.stopEditing(true); - group = Ext.getDom(group); - var gel = Ext.fly(group); - expanded = expanded !== undefined ? - expanded : gel.hasClass('x-grid-group-collapsed'); - - this.state[gel.dom.id] = expanded; - gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed'); - }, - - - toggleAllGroups : function(expanded){ - var groups = this.getGroups(); - for(var i = 0, len = groups.length; i < len; i++){ - this.toggleGroup(groups[i], expanded); - } - }, - - - expandAllGroups : function(){ - this.toggleAllGroups(true); - }, - - - collapseAllGroups : function(){ - this.toggleAllGroups(false); - }, - - interceptMouse : function(e){ - var hd = e.getTarget('.x-grid-group-hd', this.mainBody); - if(hd){ - e.stopEvent(); - this.toggleGroup(hd.parentNode); - } - }, - - - getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){ - var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v); - if(g === ''){ - g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText; - } - return g; - }, - - - getGroupField : function(){ - return this.grid.store.getGroupState(); - }, - - - renderRows : function(){ - var groupField = this.getGroupField(); - var eg = !!groupField; + renderRows : function(startRow, endRow) { + var grid = this.grid, + rows = grid.extractData(), + rowCount = rows.length, + templates = this.templates, + renderer = grid.renderer, + hasRenderer = typeof renderer == 'function', + getCellCls = this.getCellCls, + hasGetCellCls = typeof getCellCls == 'function', + cellTemplate = templates.cell, + rowTemplate = templates.row, + rowBuffer = [], + meta = {}, + tstyle = 'width:' + this.getGridInnerWidth() + 'px;', + colBuffer, colCount, column, i, row; - if(this.hideGroupedColumn) { - var colIndex = this.cm.findColumnIndex(groupField); - if(!eg && this.lastGroupField !== undefined) { - this.mainBody.update(''); - this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false); - delete this.lastGroupField; - }else if (eg && this.lastGroupField === undefined) { - this.lastGroupField = groupField; - this.cm.setHidden(colIndex, true); - }else if (eg && this.lastGroupField !== undefined && groupField !== this.lastGroupField) { - this.mainBody.update(''); - var oldIndex = this.cm.findColumnIndex(this.lastGroupField); - this.cm.setHidden(oldIndex, false); - this.lastGroupField = groupField; - this.cm.setHidden(colIndex, true); - } - } - return Ext.grid.GroupingView.superclass.renderRows.apply( - this, arguments); - }, - - - doRender : function(cs, rs, ds, startRow, colCount, stripe){ - if(rs.length < 1){ - return ''; - } - var groupField = this.getGroupField(); - var colIndex = this.cm.findColumnIndex(groupField); - - this.enableGrouping = !!groupField; - - if(!this.enableGrouping || this.isUpdating){ - return Ext.grid.GroupingView.superclass.doRender.apply( - this, arguments); - } - var gstyle = 'width:'+this.getTotalWidth()+';'; - - var gidPrefix = this.grid.getGridEl().id; - var cfg = this.cm.config[colIndex]; - var groupRenderer = cfg.groupRenderer || cfg.renderer; - var prefix = this.showGroupName ? - (cfg.groupName || cfg.header)+': ' : ''; - - var groups = [], curGroup, i, len, gid; - for(i = 0, len = rs.length; i < len; i++){ - var rowIndex = startRow + i; - var r = rs[i], - gvalue = r.data[groupField], - g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds); - if(!curGroup || curGroup.group != g){ - gid = gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(g); - - - var isCollapsed = typeof this.state[gid] !== 'undefined' ? !this.state[gid] : this.startCollapsed; - var gcls = isCollapsed ? 'x-grid-group-collapsed' : ''; - curGroup = { - group: g, - gvalue: gvalue, - text: prefix + g, - groupId: gid, - startRow: rowIndex, - rs: [r], - cls: gcls, - style: gstyle - }; - groups.push(curGroup); - }else{ - curGroup.rs.push(r); - } - r._groupId = gid; - } - - var buf = []; - for(i = 0, len = groups.length; i < len; i++){ - var g = groups[i]; - this.doGroupStart(buf, g, cs, ds, colCount); - buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call( - this, cs, g.rs, ds, g.startRow, colCount, stripe); - - this.doGroupEnd(buf, g, cs, ds, colCount); - } - return buf.join(''); - }, - - - getGroupId : function(value){ - var gidPrefix = this.grid.getGridEl().id; - var groupField = this.getGroupField(); - var colIndex = this.cm.findColumnIndex(groupField); - var cfg = this.cm.config[colIndex]; - var groupRenderer = cfg.groupRenderer || cfg.renderer; - var gtext = this.getGroup(value, {data:{}}, groupRenderer, 0, colIndex, this.ds); - return gidPrefix + '-gp-' + groupField + '-' + Ext.util.Format.htmlEncode(value); - }, - - - doGroupStart : function(buf, g, cs, ds, colCount){ - buf[buf.length] = this.startGroup.apply(g); - }, - - - doGroupEnd : function(buf, g, cs, ds, colCount){ - buf[buf.length] = this.endGroup; - }, - - - getRows : function(){ - if(!this.enableGrouping){ - return Ext.grid.GroupingView.superclass.getRows.call(this); - } - var r = []; - var g, gs = this.getGroups(); - for(var i = 0, len = gs.length; i < len; i++){ - g = gs[i].childNodes[1].childNodes; - for(var j = 0, jlen = g.length; j < jlen; j++){ - r[r.length] = g[j]; - } - } - return r; - }, - - - updateGroupWidths : function(){ - if(!this.enableGrouping || !this.hasRows()){ - return; - } - var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.scrollOffset) +'px'; - var gs = this.getGroups(); - for(var i = 0, len = gs.length; i < len; i++){ - gs[i].firstChild.style.width = tw; - } - }, - - - onColumnWidthUpdated : function(col, w, tw){ - this.updateGroupWidths(); - }, - - - onAllColumnWidthsUpdated : function(ws, tw){ - this.updateGroupWidths(); - }, - - - onColumnHiddenUpdated : function(col, hidden, tw){ - this.updateGroupWidths(); - }, - - - onLayout : function(){ - this.updateGroupWidths(); - }, - - - onBeforeRowSelect : function(sm, rowIndex){ - if(!this.enableGrouping){ - return; - } - var row = this.getRow(rowIndex); - if(row && !row.offsetParent){ - var g = this.findGroup(row); - this.toggleGroup(g, true); - } - }, - - - groupByText: 'Group By This Field', - - showGroupsText: 'Show in Groups' -}); + startRow = startRow || 0; + endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1; + + for (i = 0; i < rowCount; i++) { + row = rows[i]; + colCount = row.length; + colBuffer = []; + + + for (var j = 0; j < colCount; j++) { + + meta.id = i + '-' + j; + meta.css = j === 0 ? 'x-grid3-cell-first ' : (j == (colCount - 1) ? 'x-grid3-cell-last ' : ''); + meta.attr = meta.cellAttr = ''; + meta.value = row[j]; -Ext.grid.GroupingView.GROUP_ID = 1000; + if (Ext.isEmpty(meta.value)) { + meta.value = ' '; + } + + if (hasRenderer) { + meta.value = renderer(meta.value); + } + + if (hasGetCellCls) { + meta.css += getCellCls(meta.value) + ' '; + } - -Ext.grid.HeaderDragZone = function(grid, hd, hd2){ - this.grid = grid; - this.view = grid.getView(); - this.ddGroup = "gridHeader" + this.grid.getGridEl().id; - Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd); - if(hd2){ - this.setHandleElId(Ext.id(hd)); - this.setOuterHandleElId(Ext.id(hd2)); - } - this.scroll = false; -}; -Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, { - maxDragWidth: 120, - getDragData : function(e){ - var t = Ext.lib.Event.getTarget(e); - var h = this.view.findHeaderCell(t); - if(h){ - return {ddel: h.firstChild, header:h}; - } - return false; - }, - - onInitDrag : function(e){ - this.view.headersDisabled = true; - var clone = this.dragData.ddel.cloneNode(true); - clone.id = Ext.id(); - clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px"; - this.proxy.update(clone); - return true; - }, - - afterValidDrop : function(){ - var v = this.view; - setTimeout(function(){ - v.headersDisabled = false; - }, 50); - }, - - afterInvalidDrop : function(){ - var v = this.view; - setTimeout(function(){ - v.headersDisabled = false; - }, 50); - } -}); - - - -Ext.grid.HeaderDropZone = function(grid, hd, hd2){ - this.grid = grid; - this.view = grid.getView(); - - this.proxyTop = Ext.DomHelper.append(document.body, { - cls:"col-move-top", html:" " - }, true); - this.proxyBottom = Ext.DomHelper.append(document.body, { - cls:"col-move-bottom", html:" " - }, true); - this.proxyTop.hide = this.proxyBottom.hide = function(){ - this.setLeftTop(-100,-100); - this.setStyle("visibility", "hidden"); - }; - this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + colBuffer[colBuffer.length] = cellTemplate.apply(meta); + } + + rowBuffer[rowBuffer.length] = rowTemplate.apply({ + tstyle: tstyle, + cols : colCount, + cells : colBuffer.join(""), + alt : '' + }); + } + + return rowBuffer.join(""); + }, - Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom); -}; -Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, { - proxyOffsets : [-4, -9], - fly: Ext.Element.fly, - - getTargetFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e); - var cindex = this.view.findCellIndex(t); - if(cindex !== false){ - return this.view.getHeaderCell(cindex); - } - }, - - nextVisible : function(h){ - var v = this.view, cm = this.grid.colModel; - h = h.nextSibling; - while(h){ - if(!cm.isHidden(v.getCellIndex(h))){ - return h; - } - h = h.nextSibling; - } - return null; - }, - - prevVisible : function(h){ - var v = this.view, cm = this.grid.colModel; - h = h.prevSibling; - while(h){ - if(!cm.isHidden(v.getCellIndex(h))){ - return h; - } - h = h.prevSibling; - } - return null; - }, - - positionIndicator : function(h, n, e){ - var x = Ext.lib.Event.getPageX(e); - var r = Ext.lib.Dom.getRegion(n.firstChild); - var px, pt, py = r.top + this.proxyOffsets[1]; - if((r.right - x) <= (r.right-r.left)/2){ - px = r.right+this.view.borderWidth; - pt = "after"; - }else{ - px = r.left; - pt = "before"; - } - var oldIndex = this.view.getCellIndex(h); - var newIndex = this.view.getCellIndex(n); - - if(this.grid.colModel.isFixed(newIndex)){ - return false; - } - - var locked = this.grid.colModel.isLocked(newIndex); - - if(pt == "after"){ - newIndex++; - } - if(oldIndex < newIndex){ - newIndex--; - } - if(oldIndex == newIndex && (locked == this.grid.colModel.isLocked(oldIndex))){ - return false; - } - px += this.proxyOffsets[0]; - this.proxyTop.setLeftTop(px, py); - this.proxyTop.show(); - if(!this.bottomOffset){ - this.bottomOffset = this.view.mainHd.getHeight(); - } - this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset); - this.proxyBottom.show(); - return pt; - }, - - onNodeEnter : function(n, dd, e, data){ - if(data.header != n){ - this.positionIndicator(data.header, n, e); - } - }, - - onNodeOver : function(n, dd, e, data){ - var result = false; - if(data.header != n){ - result = this.positionIndicator(data.header, n, e); - } - if(!result){ - this.proxyTop.hide(); - this.proxyBottom.hide(); - } - return result ? this.dropAllowed : this.dropNotAllowed; - }, - - onNodeOut : function(n, dd, e, data){ - this.proxyTop.hide(); - this.proxyBottom.hide(); - }, - - onNodeDrop : function(n, dd, e, data){ - var h = data.header; - if(h != n){ - var cm = this.grid.colModel; - var x = Ext.lib.Event.getPageX(e); - var r = Ext.lib.Dom.getRegion(n.firstChild); - var pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before"; - var oldIndex = this.view.getCellIndex(h); - var newIndex = this.view.getCellIndex(n); - var locked = cm.isLocked(newIndex); - if(pt == "after"){ - newIndex++; - } - if(oldIndex < newIndex){ - newIndex--; - } - if(oldIndex == newIndex && (locked == cm.isLocked(oldIndex))){ - return false; - } - cm.setLocked(oldIndex, locked, true); - cm.moveColumn(oldIndex, newIndex); - this.grid.fireEvent("columnmove", oldIndex, newIndex); - return true; - } - return false; - } -}); - - -Ext.grid.GridView.ColumnDragZone = function(grid, hd){ - Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null); - this.proxy.el.addClass('x-grid3-col-dd'); -}; - -Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, { - handleMouseDown : function(e){ - - }, - - callHandleMouseDown : function(e){ - Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e); - } + masterTpl: new Ext.Template( + '
    ', + '
    ', + '
    ', + '
    {title}
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    ', + '
    {body}
    ', + '', + '
    ', + '
    ', + '
     
    ', + '
     
    ', + '
    ' + ), + + + initTemplates: function() { + Ext.grid.PivotGridView.superclass.initTemplates.apply(this, arguments); + + var templates = this.templates || {}; + if (!templates.gcell) { + templates.gcell = new Ext.XTemplate( + '', + '
    ', + this.grid.enableHdMenu ? '' : '', '{value}', + '
    ', + '' + ); + } + + this.templates = templates; + this.hrowRe = new RegExp("ux-grid-hd-group-row-(\\d+)", ""); + }, + + + initElements: function() { + Ext.grid.PivotGridView.superclass.initElements.apply(this, arguments); + + + this.rowHeadersEl = new Ext.Element(this.scroller.child('div.x-grid3-row-headers')); + + + this.headerTitleEl = new Ext.Element(this.mainHd.child('div.x-grid3-header-title')); + }, + + + getGridInnerWidth: function() { + var previousWidth = Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this, arguments); + + return previousWidth - this.getTotalRowHeaderWidth(); + }, + + + getTotalRowHeaderWidth: function() { + var headers = this.getRowHeaders(), + length = headers.length, + total = 0, + i; + + for (i = 0; i< length; i++) { + total += headers[i].width; + } + + return total; + }, + + + getTotalColumnHeaderHeight: function() { + return this.getColumnHeaders().length * 21; + }, + + + getCellIndex : function(el) { + if (el) { + var match = el.className.match(this.colRe), + data; + + if (match && (data = match[1])) { + return parseInt(data.split('-')[1], 10); + } + } + return false; + }, + + + + renderUI : function() { + var templates = this.templates, + innerWidth = this.getGridInnerWidth(); + + return templates.master.apply({ + body : templates.body.apply({rows:' '}), + ostyle: 'width:' + innerWidth + 'px', + bstyle: 'width:' + innerWidth + 'px' + }); + }, + + + onLayout: function(width, height) { + Ext.grid.PivotGridView.superclass.onLayout.apply(this, arguments); + + var width = this.getGridInnerWidth(); + + this.resizeColumnHeaders(width); + this.resizeAllRows(width); + }, + + + refresh : function(headersToo) { + this.fireEvent('beforerefresh', this); + this.grid.stopEditing(true); + + var result = this.renderBody(); + this.mainBody.update(result).setWidth(this.getGridInnerWidth()); + if (headersToo === true) { + this.updateHeaders(); + this.updateHeaderSortState(); + } + this.processRows(0, true); + this.layout(); + this.applyEmptyText(); + this.fireEvent('refresh', this); + }, + + + renderHeaders: Ext.emptyFn, + + + fitColumns: Ext.emptyFn, + + + resizeColumnHeaders: function(width) { + var topAxis = this.grid.topAxis; + + if (topAxis.rendered) { + topAxis.el.setWidth(width); + } + }, + + + resizeRowHeaders: function() { + var rowHeaderWidth = this.getTotalRowHeaderWidth(), + marginStyle = String.format("margin-left: {0}px;", rowHeaderWidth); + + this.rowHeadersEl.setWidth(rowHeaderWidth); + this.mainBody.applyStyles(marginStyle); + Ext.fly(this.innerHd).applyStyles(marginStyle); + + this.headerTitleEl.setWidth(rowHeaderWidth); + this.headerTitleEl.setHeight(this.getTotalColumnHeaderHeight()); + }, + + + resizeAllRows: function(width) { + var rows = this.getRows(), + length = rows.length, + i; + + for (i = 0; i < length; i++) { + Ext.fly(rows[i]).setWidth(width); + Ext.fly(rows[i]).child('table').setWidth(width); + } + }, + + + updateHeaders: function() { + this.renderGroupRowHeaders(); + this.renderGroupColumnHeaders(); + }, + + + renderGroupRowHeaders: function() { + var leftAxis = this.grid.leftAxis; + + this.resizeRowHeaders(); + leftAxis.rendered = false; + leftAxis.render(this.rowHeadersEl); + + this.setTitle(this.title); + }, + + + setTitle: function(title) { + this.headerTitleEl.child('span').dom.innerHTML = title; + }, + + + renderGroupColumnHeaders: function() { + var topAxis = this.grid.topAxis; + + topAxis.rendered = false; + topAxis.render(this.innerHd.firstChild); + }, + + + isMenuDisabled: function(cellIndex, el) { + return true; + } }); -Ext.grid.SplitDragZone = function(grid, hd, hd2){ - this.grid = grid; - this.view = grid.getView(); - this.proxy = this.view.resizeProxy; - Ext.grid.SplitDragZone.superclass.constructor.call(this, hd, - "gridSplitters" + this.grid.getGridEl().id, { - dragElId : Ext.id(this.proxy.dom), resizeFrame:false - }); - this.setHandleElId(Ext.id(hd)); - this.setOuterHandleElId(Ext.id(hd2)); - this.scroll = false; -}; -Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, { +Ext.grid.PivotAxis = Ext.extend(Ext.Component, { + + orientation: 'horizontal', + + + defaultHeaderWidth: 80, + + + paddingWidth: 7, + + + setDimensions: function(dimensions) { + this.dimensions = dimensions; + }, + + + onRender: function(ct, position) { + var rows = this.orientation == 'horizontal' + ? this.renderHorizontalRows() + : this.renderVerticalRows(); + + this.el = Ext.DomHelper.overwrite(ct.dom, {tag: 'table', cn: rows}, true); + }, + + + renderHorizontalRows: function() { + var headers = this.buildHeaders(), + rowCount = headers.length, + rows = [], + cells, cols, colCount, i, j; + + for (i = 0; i < rowCount; i++) { + cells = []; + cols = headers[i].items; + colCount = cols.length; + + for (j = 0; j < colCount; j++) { + cells.push({ + tag: 'td', + html: cols[j].header, + colspan: cols[j].span + }); + } + + rows[i] = { + tag: 'tr', + cn: cells + }; + } + + return rows; + }, + + + renderVerticalRows: function() { + var headers = this.buildHeaders(), + colCount = headers.length, + rowCells = [], + rows = [], + rowCount, col, row, colWidth, i, j; + + for (i = 0; i < colCount; i++) { + col = headers[i]; + colWidth = col.width || 80; + rowCount = col.items.length; + + for (j = 0; j < rowCount; j++) { + row = col.items[j]; + + rowCells[row.start] = rowCells[row.start] || []; + rowCells[row.start].push({ + tag : 'td', + html : row.header, + rowspan: row.span, + width : Ext.isBorderBox ? colWidth : colWidth - this.paddingWidth + }); + } + } + + rowCount = rowCells.length; + for (i = 0; i < rowCount; i++) { + rows[i] = { + tag: 'tr', + cn : rowCells[i] + }; + } + + return rows; + }, + + + getTuples: function() { + var newStore = new Ext.data.Store({}); + + newStore.data = this.store.data.clone(); + newStore.fields = this.store.fields; + + var sorters = [], + dimensions = this.dimensions, + length = dimensions.length, + i; + + for (i = 0; i < length; i++) { + sorters.push({ + field : dimensions[i].dataIndex, + direction: dimensions[i].direction || 'ASC' + }); + } + + newStore.sort(sorters); + + var records = newStore.data.items, + hashes = [], + tuples = [], + recData, hash, info, data, key; + + length = records.length; + + for (i = 0; i < length; i++) { + info = this.getRecordInfo(records[i]); + data = info.data; + hash = ""; + + for (key in data) { + hash += data[key] + '---'; + } + + if (hashes.indexOf(hash) == -1) { + hashes.push(hash); + tuples.push(info); + } + } + + newStore.destroy(); + + return tuples; + }, + + + getRecordInfo: function(record) { + var dimensions = this.dimensions, + length = dimensions.length, + data = {}, + dimension, dataIndex, i; + + + for (i = 0; i < length; i++) { + dimension = dimensions[i]; + dataIndex = dimension.dataIndex; + + data[dataIndex] = record.get(dataIndex); + } + + + + var createMatcherFunction = function(data) { + return function(record) { + for (var dataIndex in data) { + if (record.get(dataIndex) != data[dataIndex]) { + return false; + } + } + + return true; + }; + }; + + return { + data: data, + matcher: createMatcherFunction(data) + }; + }, + + + buildHeaders: function() { + var tuples = this.getTuples(), + rowCount = tuples.length, + dimensions = this.dimensions, + dimension, + colCount = dimensions.length, + headers = [], + tuple, rows, currentHeader, previousHeader, span, start, isLast, changed, i, j; + + for (i = 0; i < colCount; i++) { + dimension = dimensions[i]; + rows = []; + span = 0; + start = 0; + + for (j = 0; j < rowCount; j++) { + tuple = tuples[j]; + isLast = j == (rowCount - 1); + currentHeader = tuple.data[dimension.dataIndex]; + + + changed = previousHeader != undefined && previousHeader != currentHeader; + if (i > 0 && j > 0) { + changed = changed || tuple.data[dimensions[i-1].dataIndex] != tuples[j-1].data[dimensions[i-1].dataIndex]; + } + + if (changed) { + rows.push({ + header: previousHeader, + span : span, + start : start + }); + + start += span; + span = 0; + } + + if (isLast) { + rows.push({ + header: currentHeader, + span : span + 1, + start : start + }); + + start += span; + span = 0; + } + + previousHeader = currentHeader; + span++; + } + + headers.push({ + items: rows, + width: dimension.width || this.defaultHeaderWidth + }); + + previousHeader = undefined; + } + + return headers; + } +}); + + +Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, { + maxDragWidth: 120, + + constructor : function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd); + if(hd2){ + this.setHandleElId(Ext.id(hd)); + this.setOuterHandleElId(Ext.id(hd2)); + } + this.scroll = false; + }, + + getDragData : function(e){ + var t = Ext.lib.Event.getTarget(e), + h = this.view.findHeaderCell(t); + if(h){ + return {ddel: h.firstChild, header:h}; + } + return false; + }, + + onInitDrag : function(e){ + + this.dragHeadersDisabled = this.view.headersDisabled; + this.view.headersDisabled = true; + var clone = this.dragData.ddel.cloneNode(true); + clone.id = Ext.id(); + clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px"; + this.proxy.update(clone); + return true; + }, + + afterValidDrop : function(){ + this.completeDrop(); + }, + + afterInvalidDrop : function(){ + this.completeDrop(); + }, + + completeDrop: function(){ + var v = this.view, + disabled = this.dragHeadersDisabled; + setTimeout(function(){ + v.headersDisabled = disabled; + }, 50); + } +}); + + + +Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, { + proxyOffsets : [-4, -9], fly: Ext.Element.fly, + + constructor : function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + + this.proxyTop = Ext.DomHelper.append(document.body, { + cls:"col-move-top", html:" " + }, true); + this.proxyBottom = Ext.DomHelper.append(document.body, { + cls:"col-move-bottom", html:" " + }, true); + this.proxyTop.hide = this.proxyBottom.hide = function(){ + this.setLeftTop(-100,-100); + this.setStyle("visibility", "hidden"); + }; + this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + + + Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom); + }, + + getTargetFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e), + cindex = this.view.findCellIndex(t); + if(cindex !== false){ + return this.view.getHeaderCell(cindex); + } + }, + + nextVisible : function(h){ + var v = this.view, cm = this.grid.colModel; + h = h.nextSibling; + while(h){ + if(!cm.isHidden(v.getCellIndex(h))){ + return h; + } + h = h.nextSibling; + } + return null; + }, + + prevVisible : function(h){ + var v = this.view, cm = this.grid.colModel; + h = h.prevSibling; + while(h){ + if(!cm.isHidden(v.getCellIndex(h))){ + return h; + } + h = h.prevSibling; + } + return null; + }, + + positionIndicator : function(h, n, e){ + var x = Ext.lib.Event.getPageX(e), + r = Ext.lib.Dom.getRegion(n.firstChild), + px, + pt, + py = r.top + this.proxyOffsets[1]; + if((r.right - x) <= (r.right-r.left)/2){ + px = r.right+this.view.borderWidth; + pt = "after"; + }else{ + px = r.left; + pt = "before"; + } + + if(this.grid.colModel.isFixed(this.view.getCellIndex(n))){ + return false; + } + + px += this.proxyOffsets[0]; + this.proxyTop.setLeftTop(px, py); + this.proxyTop.show(); + if(!this.bottomOffset){ + this.bottomOffset = this.view.mainHd.getHeight(); + } + this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset); + this.proxyBottom.show(); + return pt; + }, + + onNodeEnter : function(n, dd, e, data){ + if(data.header != n){ + this.positionIndicator(data.header, n, e); + } + }, + + onNodeOver : function(n, dd, e, data){ + var result = false; + if(data.header != n){ + result = this.positionIndicator(data.header, n, e); + } + if(!result){ + this.proxyTop.hide(); + this.proxyBottom.hide(); + } + return result ? this.dropAllowed : this.dropNotAllowed; + }, + + onNodeOut : function(n, dd, e, data){ + this.proxyTop.hide(); + this.proxyBottom.hide(); + }, + + onNodeDrop : function(n, dd, e, data){ + var h = data.header; + if(h != n){ + var cm = this.grid.colModel, + x = Ext.lib.Event.getPageX(e), + r = Ext.lib.Dom.getRegion(n.firstChild), + pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before", + oldIndex = this.view.getCellIndex(h), + newIndex = this.view.getCellIndex(n); + if(pt == "after"){ + newIndex++; + } + if(oldIndex < newIndex){ + newIndex--; + } + cm.moveColumn(oldIndex, newIndex); + return true; + } + return false; + } +}); + +Ext.grid.GridView.ColumnDragZone = Ext.extend(Ext.grid.HeaderDragZone, { + + constructor : function(grid, hd){ + Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null); + this.proxy.el.addClass('x-grid3-col-dd'); + }, + + handleMouseDown : function(e){ + }, + + callHandleMouseDown : function(e){ + Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e); + } +}); + +Ext.grid.SplitDragZone = Ext.extend(Ext.dd.DDProxy, { + fly: Ext.Element.fly, + + constructor : function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + this.proxy = this.view.resizeProxy; + Ext.grid.SplitDragZone.superclass.constructor.call(this, hd, + "gridSplitters" + this.grid.getGridEl().id, { + dragElId : Ext.id(this.proxy.dom), resizeFrame:false + }); + this.setHandleElId(Ext.id(hd)); + this.setOuterHandleElId(Ext.id(hd2)); + this.scroll = false; + }, b4StartDrag : function(x, y){ this.view.headersDisabled = true; @@ -32675,7 +49621,7 @@ Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, { handleMouseDown : function(e){ - ev = Ext.EventObject.setEvent(e); + var ev = Ext.EventObject.setEvent(e); var t = this.fly(ev.getTarget()); if(t.hasClass("x-grid-split")){ this.cellIndex = this.view.getCellIndex(t.dom); @@ -32698,14 +49644,9 @@ Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, { this.setDelta(0,0); } }); - Ext.grid.GridDragZone = function(grid, config){ this.view = grid.getView(); Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config); - if(this.view.lockedBody){ - this.setHandleElId(Ext.id(this.view.mainBody.dom)); - this.setOuterHandleElId(Ext.id(this.view.lockedBody.dom)); - } this.scroll = false; this.grid = grid; this.ddel = document.createElement('div'); @@ -32734,7 +49675,8 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, { var data = this.dragData; this.ddel.innerHTML = this.grid.getDragDropText(); this.proxy.update(this.ddel); - }, + + }, afterRepair : function(){ @@ -32747,10 +49689,12 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, { }, onEndDrag : function(data, e){ - }, + + }, onValidDrop : function(dd, e, id){ - this.hideProxy(); + + this.hideProxy(); }, beforeInvalidDrop : function(e, id){ @@ -32758,97 +49702,112 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, { } }); - -Ext.grid.ColumnModel = function(config){ - - this.defaultWidth = 100; +Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { + + defaultWidth: 100, - this.defaultSortable = false; + defaultSortable: false, - if(config.columns){ - Ext.apply(this, config); - this.setConfig(config.columns, true); - }else{ - this.setConfig(config, true); - } - this.addEvents( + + + + constructor : function(config) { - "widthchange", - - "headerchange", - - "hiddenchange", + if (config.columns) { + Ext.apply(this, config); + this.setConfig(config.columns, true); + } else { + this.setConfig(config, true); + } - "columnmoved", - "columnlockchange", - - "configchange" - ); - Ext.grid.ColumnModel.superclass.constructor.call(this); -}; -Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { - - - - - - - - - - - - - - - - - - getColumnId : function(index){ - return this.config[index].id; + this.addEvents( + + "widthchange", + + + "headerchange", + + + "hiddenchange", + + + "columnmoved", + + + "configchange" + ); + + Ext.grid.ColumnModel.superclass.constructor.call(this); }, - setConfig : function(config, initial){ - if(!initial){ delete this.totalWidth; - for(var i = 0, len = this.config.length; i < len; i++){ - var c = this.config[i]; - if(c.editor){ - c.editor.destroy(); + getColumnId : function(index) { + return this.config[index].id; + }, + + getColumnAt : function(index) { + return this.config[index]; + }, + + + setConfig : function(config, initial) { + var i, c, len; + + if (!initial) { + delete this.totalWidth; + + for (i = 0, len = this.config.length; i < len; i++) { + c = this.config[i]; + + if (c.setEditor) { + + c.setEditor(null); } } } + + + this.defaults = Ext.apply({ + width: this.defaultWidth, + sortable: this.defaultSortable + }, this.defaults); + this.config = config; this.lookup = {}; - for(var i = 0, len = config.length; i < len; i++){ - var c = config[i]; - if(typeof c.renderer == "string"){ - c.renderer = Ext.util.Format[c.renderer]; - } - if(typeof c.id == "undefined"){ + + for (i = 0, len = config.length; i < len; i++) { + c = Ext.applyIf(config[i], this.defaults); + + + if (Ext.isEmpty(c.id)) { c.id = i; } - if(c.editor && c.editor.isFormField){ - c.editor = new Ext.grid.GridEditor(c.editor); + + if (!c.isColumn) { + var Cls = Ext.grid.Column.types[c.xtype || 'gridcolumn']; + c = new Cls(c); + config[i] = c; } + this.lookup[c.id] = c; } - if(!initial){ + + if (!initial) { this.fireEvent('configchange', this); } }, - getColumnById : function(id){ + getColumnById : function(id) { return this.lookup[id]; }, - getIndexById : function(id){ - for(var i = 0, len = this.config.length; i < len; i++){ - if(this.config[i].id == id){ + getIndexById : function(id) { + for (var i = 0, len = this.config.length; i < len; i++) { + if (this.config[i].id == id) { return i; } } @@ -32856,118 +49815,102 @@ Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { }, - moveColumn : function(oldIndex, newIndex){ - var c = this.config[oldIndex]; - this.config.splice(oldIndex, 1); - this.config.splice(newIndex, 0, c); + moveColumn : function(oldIndex, newIndex) { + var config = this.config, + c = config[oldIndex]; + + config.splice(oldIndex, 1); + config.splice(newIndex, 0, c); this.dataMap = null; this.fireEvent("columnmoved", this, oldIndex, newIndex); }, - isLocked : function(colIndex){ - return this.config[colIndex].locked === true; - }, - - setLocked : function(colIndex, value, suppressEvent){ - if(this.isLocked(colIndex) == value){ - return; - } - this.config[colIndex].locked = value; - if(!suppressEvent){ - this.fireEvent("columnlockchange", this, colIndex, value); - } - }, - - getTotalLockedWidth : function(){ - var totalWidth = 0; - for(var i = 0; i < this.config.length; i++){ - if(this.isLocked(i) && !this.isHidden(i)){ - this.totalWidth += this.getColumnWidth(i); - } - } - return totalWidth; - }, - - getLockedCount : function(){ - for(var i = 0, len = this.config.length; i < len; i++){ - if(!this.isLocked(i)){ - return i; - } - } - }, - - getColumnCount : function(visibleOnly){ - if(visibleOnly === true){ - var c = 0; - for(var i = 0, len = this.config.length; i < len; i++){ - if(!this.isHidden(i)){ + getColumnCount : function(visibleOnly) { + var length = this.config.length, + c = 0, + i; + + if (visibleOnly === true) { + for (i = 0; i < length; i++) { + if (!this.isHidden(i)) { c++; } } + return c; } - return this.config.length; + + return length; }, - getColumnsBy : function(fn, scope){ - var r = []; - for(var i = 0, len = this.config.length; i < len; i++){ - var c = this.config[i]; - if(fn.call(scope||this, c, i) === true){ - r[r.length] = c; + getColumnsBy : function(fn, scope) { + var config = this.config, + length = config.length, + result = [], + i, c; + + for (i = 0; i < length; i++){ + c = config[i]; + + if (fn.call(scope || this, c, i) === true) { + result[result.length] = c; } } - return r; + + return result; }, - isSortable : function(col){ - if(typeof this.config[col].sortable == "undefined"){ - return this.defaultSortable; - } - return this.config[col].sortable; + isSortable : function(col) { + return !!this.config[col].sortable; }, - isMenuDisabled : function(col){ + isMenuDisabled : function(col) { return !!this.config[col].menuDisabled; }, - getRenderer : function(col){ - if(!this.config[col].renderer){ - return Ext.grid.ColumnModel.defaultRenderer; - } - return this.config[col].renderer; + getRenderer : function(col) { + return this.config[col].renderer || Ext.grid.ColumnModel.defaultRenderer; + }, + + getRendererScope : function(col) { + return this.config[col].scope; }, - setRenderer : function(col, fn){ + setRenderer : function(col, fn) { this.config[col].renderer = fn; }, - getColumnWidth : function(col){ - return this.config[col].width || this.defaultWidth; + getColumnWidth : function(col) { + var width = this.config[col].width; + if(typeof width != 'number'){ + width = this.defaultWidth; + } + return width; }, - setColumnWidth : function(col, width, suppressEvent){ + setColumnWidth : function(col, width, suppressEvent) { this.config[col].width = width; this.totalWidth = null; - if(!suppressEvent){ + + if (!suppressEvent) { this.fireEvent("widthchange", this, col, width); } }, - getTotalWidth : function(includeHidden){ - if(!this.totalWidth){ + getTotalWidth : function(includeHidden) { + if (!this.totalWidth) { this.totalWidth = 0; - for(var i = 0, len = this.config.length; i < len; i++){ - if(includeHidden || !this.isHidden(i)){ + for (var i = 0, len = this.config.length; i < len; i++) { + if (includeHidden || !this.isHidden(i)) { this.totalWidth += this.getColumnWidth(i); } } @@ -32976,37 +49919,37 @@ Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { }, - getColumnHeader : function(col){ + getColumnHeader : function(col) { return this.config[col].header; }, - setColumnHeader : function(col, header){ + setColumnHeader : function(col, header) { this.config[col].header = header; this.fireEvent("headerchange", this, col, header); }, - getColumnTooltip : function(col){ + getColumnTooltip : function(col) { return this.config[col].tooltip; }, - setColumnTooltip : function(col, tooltip){ + setColumnTooltip : function(col, tooltip) { this.config[col].tooltip = tooltip; }, - getDataIndex : function(col){ + getDataIndex : function(col) { return this.config[col].dataIndex; }, - setDataIndex : function(col, dataIndex){ + setDataIndex : function(col, dataIndex) { this.config[col].dataIndex = dataIndex; }, - findColumnIndex : function(dataIndex){ + findColumnIndex : function(dataIndex) { var c = this.config; for(var i = 0, len = c.length; i < len; i++){ if(c[i].dataIndex == dataIndex){ @@ -33017,38 +49960,41 @@ Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { }, - isCellEditable : function(colIndex, rowIndex){ - return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false; + isCellEditable : function(colIndex, rowIndex) { + var c = this.config[colIndex], + ed = c.editable; + + + return !!(ed || (!Ext.isDefined(ed) && c.editor)); }, - getCellEditor : function(colIndex, rowIndex){ - return this.config[colIndex].editor; + getCellEditor : function(colIndex, rowIndex) { + return this.config[colIndex].getCellEditor(rowIndex); }, - setEditable : function(col, editable){ + setEditable : function(col, editable) { this.config[col].editable = editable; }, - - isHidden : function(colIndex){ - return this.config[colIndex].hidden; - }, - - - - isFixed : function(colIndex){ - return this.config[colIndex].fixed; + isHidden : function(colIndex) { + return !!this.config[colIndex].hidden; }, - isResizable : function(colIndex){ + isFixed : function(colIndex) { + return !!this.config[colIndex].fixed; + }, + + + isResizable : function(colIndex) { return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true; }, - setHidden : function(colIndex, hidden){ + + setHidden : function(colIndex, hidden) { var c = this.config[colIndex]; if(c.hidden !== hidden){ c.hidden = hidden; @@ -33058,149 +50004,210 @@ Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { }, - setEditor : function(col, editor){ - this.config[col].editor = editor; + setEditor : function(col, editor) { + this.config[col].setEditor(editor); + }, + + + destroy : function() { + var length = this.config.length, + i = 0; + + for (; i < length; i++){ + this.config[i].destroy(); + } + delete this.config; + delete this.lookup; + this.purgeListeners(); + }, + + + setState : function(col, state) { + state = Ext.applyIf(state, this.defaults); + Ext.apply(this.config[col], state); } }); -Ext.grid.ColumnModel.defaultRenderer = function(value){ - if(typeof value == "string" && value.length < 1){ - return " "; - } - return value; + +Ext.grid.ColumnModel.defaultRenderer = function(value) { + if (typeof value == "string" && value.length < 1) { + return " "; + } + return value; }; +Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable, { + -Ext.grid.DefaultColumnModel = Ext.grid.ColumnModel; + constructor : function(){ + this.locked = false; + Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); + }, - -Ext.grid.AbstractSelectionModel = function(){ - this.locked = false; - Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); -}; - -Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable, { - - init : function(grid){ - this.grid = grid; - this.initEvents(); - }, - - - lock : function(){ - this.locked = true; - }, - - - unlock : function(){ - this.locked = false; - }, - - - isLocked : function(){ - return this.locked; - } + + init : function(grid){ + this.grid = grid; + if(this.lockOnInit){ + delete this.lockOnInit; + this.locked = false; + this.lock(); + } + this.initEvents(); + }, + + + lock : function(){ + if(!this.locked){ + this.locked = true; + + var g = this.grid; + if(g){ + g.getView().on({ + scope: this, + beforerefresh: this.sortUnLock, + refresh: this.sortLock + }); + }else{ + this.lockOnInit = true; + } + } + }, + + + sortLock : function() { + this.locked = true; + }, + + + sortUnLock : function() { + this.locked = false; + }, + + + unlock : function(){ + if(this.locked){ + this.locked = false; + var g = this.grid, + gv; + + + if(g){ + gv = g.getView(); + gv.un('beforerefresh', this.sortUnLock, this); + gv.un('refresh', this.sortLock, this); + }else{ + delete this.lockOnInit; + } + } + }, + + + isLocked : function(){ + return this.locked; + }, + + destroy: function(){ + this.unlock(); + this.purgeListeners(); + } }); - -Ext.grid.RowSelectionModel = function(config){ - Ext.apply(this, config); - this.selections = new Ext.util.MixedCollection(false, function(o){ - return o.id; - }); - - this.last = false; - this.lastActive = false; - - this.addEvents( - - "selectionchange", - - "beforerowselect", - - "rowselect", - - "rowdeselect" - ); - - Ext.grid.RowSelectionModel.superclass.constructor.call(this); -}; - -Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { +Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { singleSelect : false, + + constructor : function(config){ + Ext.apply(this, config); + this.selections = new Ext.util.MixedCollection(false, function(o){ + return o.id; + }); - - initEvents : function(){ + this.last = false; + this.lastActive = false; + + this.addEvents( + + 'selectionchange', + + 'beforerowselect', + + 'rowselect', + + 'rowdeselect' + ); + Ext.grid.RowSelectionModel.superclass.constructor.call(this); + }, + + + + initEvents : function(){ if(!this.grid.enableDragDrop && !this.grid.enableDrag){ - this.grid.on("rowmousedown", this.handleMouseDown, this); - }else{ this.grid.on("rowclick", function(grid, rowIndex, e) { - if(e.button === 0 && !e.shiftKey && !e.ctrlKey) { - this.selectRow(rowIndex, false); - grid.view.focusRow(rowIndex); - } - }, this); + this.grid.on('rowmousedown', this.handleMouseDown, this); } this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), { - "up" : function(e){ - if(!e.shiftKey){ - this.selectPrevious(e.shiftKey); - }else if(this.last !== false && this.lastActive !== false){ - var last = this.last; - this.selectRange(this.last, this.lastActive-1); - this.grid.getView().focusRow(this.lastActive); - if(last !== false){ - this.last = last; - } - }else{ - this.selectFirstRow(); - } - }, - "down" : function(e){ - if(!e.shiftKey){ - this.selectNext(e.shiftKey); - }else if(this.last !== false && this.lastActive !== false){ - var last = this.last; - this.selectRange(this.last, this.lastActive+1); - this.grid.getView().focusRow(this.lastActive); - if(last !== false){ - this.last = last; - } - }else{ - this.selectFirstRow(); - } - }, + up: this.onKeyPress, + down: this.onKeyPress, scope: this }); - var view = this.grid.view; - view.on("refresh", this.onRefresh, this); - view.on("rowupdated", this.onRowUpdated, this); - view.on("rowremoved", this.onRemove, this); + this.grid.getView().on({ + scope: this, + refresh: this.onRefresh, + rowupdated: this.onRowUpdated, + rowremoved: this.onRemove + }); + }, + + onKeyPress : function(e, name){ + var up = name == 'up', + method = up ? 'selectPrevious' : 'selectNext', + add = up ? -1 : 1, + last; + if(!e.shiftKey || this.singleSelect){ + this[method](false); + }else if(this.last !== false && this.lastActive !== false){ + last = this.last; + this.selectRange(this.last, this.lastActive + add); + this.grid.getView().focusRow(this.lastActive); + if(last !== false){ + this.last = last; + } + }else{ + this.selectFirstRow(); + } }, - onRefresh : function(){ - var ds = this.grid.store, index; - var s = this.getSelections(); + + onRefresh : function(){ + var ds = this.grid.store, + s = this.getSelections(), + i = 0, + len = s.length, + index, r; + + this.silent = true; this.clearSelections(true); - for(var i = 0, len = s.length; i < len; i++){ - var r = s[i]; + for(; i < len; i++){ + r = s[i]; if((index = ds.indexOfId(r.id)) != -1){ this.selectRow(index, true); } } if(s.length != this.selections.getCount()){ - this.fireEvent("selectionchange", this); + this.fireEvent('selectionchange', this); } + this.silent = false; }, - onRemove : function(v, index, r){ + + onRemove : function(v, index, r){ if(this.selections.remove(r) !== false){ this.fireEvent('selectionchange', this); } }, - onRowUpdated : function(v, index, r){ + + onRowUpdated : function(v, index, r){ if(this.isSelected(r)){ v.onRowSelect(index); } @@ -33211,8 +50218,10 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { if(!keepExisting){ this.clearSelections(); } - var ds = this.grid.store; - for(var i = 0, len = records.length; i < len; i++){ + var ds = this.grid.store, + i = 0, + len = records.length; + for(; i < len; i++){ this.selectRow(ds.indexOf(records[i]), true); } }, @@ -33237,9 +50246,9 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { if(this.hasNext()){ this.selectRow(this.last+1, keepExisting); this.grid.getView().focusRow(this.last); - return true; + return true; } - return false; + return false; }, @@ -33247,9 +50256,9 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { if(this.hasPrevious()){ this.selectRow(this.last-1, keepExisting); this.grid.getView().focusRow(this.last); - return true; + return true; } - return false; + return false; }, @@ -33275,8 +50284,11 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { each : function(fn, scope){ - var s = this.getSelections(); - for(var i = 0, len = s.length; i < len; i++){ + var s = this.getSelections(), + i = 0, + len = s.length; + + for(; i < len; i++){ if(fn.call(scope || this, s[i], i) === false){ return false; } @@ -33286,10 +50298,12 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { clearSelections : function(fast){ - if(this.locked) return; + if(this.isLocked()){ + return; + } if(fast !== true){ - var ds = this.grid.store; - var s = this.selections; + var ds = this.grid.store, + s = this.selections; s.each(function(r){ this.deselectRow(ds.indexOfId(r.id)); }, this); @@ -33303,7 +50317,9 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { selectAll : function(){ - if(this.locked) return; + if(this.isLocked()){ + return; + } this.selections.clear(); for(var i = 0, len = this.grid.store.getCount(); i < len; i++){ this.selectRow(i, true); @@ -33317,7 +50333,7 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { isSelected : function(index){ - var r = typeof index == "number" ? this.grid.store.getAt(index) : index; + var r = Ext.isNumber(index) ? this.grid.store.getAt(index) : index; return (r && this.selections.key(r.id) ? true : false); }, @@ -33326,15 +50342,17 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { return (this.selections.key(id) ? true : false); }, - handleMouseDown : function(g, rowIndex, e){ + + handleMouseDown : function(g, rowIndex, e){ if(e.button !== 0 || this.isLocked()){ return; - }; + } var view = this.grid.getView(); - if(e.shiftKey && this.last !== false){ + if(e.shiftKey && !this.singleSelect && this.last !== false){ var last = this.last; this.selectRange(last, rowIndex, e.ctrlKey); - this.last = last; view.focusRow(rowIndex); + this.last = last; + view.focusRow(rowIndex); }else{ var isSelected = this.isSelected(rowIndex); if(e.ctrlKey && isSelected){ @@ -33358,16 +50376,19 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { selectRange : function(startRow, endRow, keepExisting){ - if(this.locked) return; + var i; + if(this.isLocked()){ + return; + } if(!keepExisting){ this.clearSelections(); } if(startRow <= endRow){ - for(var i = startRow; i <= endRow; i++){ + for(i = startRow; i <= endRow; i++){ this.selectRow(i, true); } }else{ - for(var i = startRow; i >= endRow; i--){ + for(i = startRow; i >= endRow; i--){ this.selectRow(i, true); } } @@ -33375,7 +50396,9 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { deselectRange : function(startRow, endRow, preventViewNotify){ - if(this.locked) return; + if(this.isLocked()){ + return; + } for(var i = startRow; i <= endRow; i++){ this.deselectRow(i, preventViewNotify); } @@ -33383,9 +50406,11 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { selectRow : function(index, keepExisting, preventViewNotify){ - if(this.locked || (index < 0 || index >= this.grid.store.getCount()) || this.isSelected(index)) return; + if(this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index))){ + return; + } var r = this.grid.store.getAt(index); - if(r && this.fireEvent("beforerowselect", this, index, keepExisting, r) !== false){ + if(r && this.fireEvent('beforerowselect', this, index, keepExisting, r) !== false){ if(!keepExisting || this.singleSelect){ this.clearSelections(); } @@ -33394,14 +50419,18 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { if(!preventViewNotify){ this.grid.getView().onRowSelect(index); } - this.fireEvent("rowselect", this, index, r); - this.fireEvent("selectionchange", this); + if(!this.silent){ + this.fireEvent('rowselect', this, index, r); + this.fireEvent('selectionchange', this); + } } }, deselectRow : function(index, preventViewNotify){ - if(this.locked) return; + if(this.isLocked()){ + return; + } if(this.last == index){ this.last = false; } @@ -33414,24 +50443,26 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { if(!preventViewNotify){ this.grid.getView().onRowDeselect(index); } - this.fireEvent("rowdeselect", this, index, r); - this.fireEvent("selectionchange", this); + this.fireEvent('rowdeselect', this, index, r); + this.fireEvent('selectionchange', this); } }, - restoreLast : function(){ - if(this._last){ - this.last = this._last; - } - }, - - acceptsNav : function(row, col, cm){ + + acceptsNav : function(row, col, cm){ return !cm.isHidden(col) && cm.isCellEditable(col, row); }, - onEditorKey : function(field, e){ - var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor; - var shift = e.shiftKey; + + onEditorKey : function(field, e){ + var k = e.getKey(), + newCell, + g = this.grid, + last = g.lastEdit, + ed = g.activeEditor, + shift = e.shiftKey, + ae, last, r, c; + if(k == e.TAB){ e.stopEvent(); ed.completeEdit(); @@ -33441,68 +50472,457 @@ Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); } }else if(k == e.ENTER){ - e.stopEvent(); - ed.completeEdit(); - if(this.moveEditorOnEnter !== false){ - if(shift){ - newCell = g.walkCells(ed.row - 1, ed.col, -1, this.acceptsNav, this); - }else{ - newCell = g.walkCells(ed.row + 1, ed.col, 1, this.acceptsNav, this); - } - } - }else if(k == e.ESC){ - ed.cancelEdit(); + if(this.moveEditorOnEnter !== false){ + if(shift){ + newCell = g.walkCells(last.row - 1, last.col, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(last.row + 1, last.col, 1, this.acceptsNav, this); + } + } } if(newCell){ - g.startEditing(newCell[0], newCell[1]); + r = newCell[0]; + c = newCell[1]; + + this.onEditorSelect(r, last.row); + + if(g.isEditor && g.editing){ + ae = g.activeEditor; + if(ae && ae.field.triggerBlur){ + + ae.field.triggerBlur(); + } + } + g.startEditing(r, c); } + }, + + onEditorSelect: function(row, lastRow){ + if(lastRow != row){ + this.selectRow(row); + } + }, + + destroy : function(){ + Ext.destroy(this.rowNav); + this.rowNav = null; + Ext.grid.RowSelectionModel.superclass.destroy.call(this); } }); -Ext.grid.CellSelectionModel = function(config){ - Ext.apply(this, config); - - this.selection = null; - - this.addEvents( - - "beforecellselect", - - "cellselect", - - "selectionchange" - ); - - Ext.grid.CellSelectionModel.superclass.constructor.call(this); -}; - -Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel, { +Ext.grid.Column = Ext.extend(Ext.util.Observable, { + + + + + + + + + + + + + + + + + + + + + + - initEvents : function(){ - this.grid.on("cellmousedown", this.handleMouseDown, this); - this.grid.getGridEl().on(Ext.isIE || Ext.isSafari3 ? "keydown" : "keypress", this.handleKeyDown, this); - var view = this.grid.view; - view.on("refresh", this.onViewChange, this); - view.on("rowupdated", this.onRowUpdated, this); - view.on("beforerowremoved", this.clearSelections, this); - view.on("beforerowsinserted", this.clearSelections, this); - if(this.grid.isEditor){ - this.grid.on("beforeedit", this.beforeEdit, this); + isColumn : true, + + constructor : function(config){ + Ext.apply(this, config); + + if(Ext.isString(this.renderer)){ + this.renderer = Ext.util.Format[this.renderer]; + }else if(Ext.isObject(this.renderer)){ + this.scope = this.renderer.scope; + this.renderer = this.renderer.fn; + } + if(!this.scope){ + this.scope = this; + } + + var ed = this.editor; + delete this.editor; + this.setEditor(ed); + this.addEvents( + + 'click', + + 'contextmenu', + + 'dblclick', + + 'mousedown' + ); + Ext.grid.Column.superclass.constructor.call(this); + }, + + + processEvent : function(name, e, grid, rowIndex, colIndex){ + return this.fireEvent(name, this, grid, rowIndex, e); + }, + + + destroy: function() { + if(this.setEditor){ + this.setEditor(null); + } + this.purgeListeners(); + }, + + + renderer : function(value){ + return value; + }, + + + getEditor: function(rowIndex){ + return this.editable !== false ? this.editor : null; + }, + + + setEditor : function(editor){ + var ed = this.editor; + if(ed){ + if(ed.gridEditor){ + ed.gridEditor.destroy(); + delete ed.gridEditor; + }else{ + ed.destroy(); + } + } + this.editor = null; + if(editor){ + + if(!editor.isXType){ + editor = Ext.create(editor, 'textfield'); + } + this.editor = editor; } }, - beforeEdit : function(e){ + + getCellEditor: function(rowIndex){ + var ed = this.getEditor(rowIndex); + if(ed){ + if(!ed.startEdit){ + if(!ed.gridEditor){ + ed.gridEditor = new Ext.grid.GridEditor(ed); + } + ed = ed.gridEditor; + } + } + return ed; + } +}); + + +Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, { + + trueText: 'true', + + falseText: 'false', + + undefinedText: ' ', + + constructor: function(cfg){ + Ext.grid.BooleanColumn.superclass.constructor.call(this, cfg); + var t = this.trueText, f = this.falseText, u = this.undefinedText; + this.renderer = function(v){ + if(v === undefined){ + return u; + } + if(!v || v === 'false'){ + return f; + } + return t; + }; + } +}); + + +Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, { + + format : '0,000.00', + constructor: function(cfg){ + Ext.grid.NumberColumn.superclass.constructor.call(this, cfg); + this.renderer = Ext.util.Format.numberRenderer(this.format); + } +}); + + +Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, { + + format : 'm/d/Y', + constructor: function(cfg){ + Ext.grid.DateColumn.superclass.constructor.call(this, cfg); + this.renderer = Ext.util.Format.dateRenderer(this.format); + } +}); + + +Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, { + + constructor: function(cfg){ + Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg); + var tpl = (!Ext.isPrimitive(this.tpl) && this.tpl.compile) ? this.tpl : new Ext.XTemplate(this.tpl); + this.renderer = function(value, p, r){ + return tpl.apply(r.data); + }; + this.tpl = tpl; + } +}); + + +Ext.grid.ActionColumn = Ext.extend(Ext.grid.Column, { + + + + + + + + + header: ' ', + + actionIdRe: /x-action-col-(\d+)/, + + + altText: '', + + constructor: function(cfg) { + var me = this, + items = cfg.items || (me.items = [me]), + l = items.length, + i, + item; + + Ext.grid.ActionColumn.superclass.constructor.call(me, cfg); + + + + me.renderer = function(v, meta) { + + v = Ext.isFunction(cfg.renderer) ? cfg.renderer.apply(this, arguments)||'' : ''; + + meta.css += ' x-action-col-cell'; + for (i = 0; i < l; i++) { + item = items[i]; + v += '' + (item.altText || me.altText) + ''; + } + return v; + }; + }, + + destroy: function() { + delete this.items; + delete this.renderer; + return Ext.grid.ActionColumn.superclass.destroy.apply(this, arguments); + }, + + + processEvent : function(name, e, grid, rowIndex, colIndex){ + var m = e.getTarget().className.match(this.actionIdRe), + item, fn; + if (m && (item = this.items[parseInt(m[1], 10)])) { + if (name == 'click') { + (fn = item.handler || this.handler) && fn.call(item.scope||this.scope||this, grid, rowIndex, colIndex, item, e); + } else if ((name == 'mousedown') && (item.stopSelection !== false)) { + return false; + } + } + return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments); + } +}); + + +Ext.grid.Column.types = { + gridcolumn : Ext.grid.Column, + booleancolumn: Ext.grid.BooleanColumn, + numbercolumn: Ext.grid.NumberColumn, + datecolumn: Ext.grid.DateColumn, + templatecolumn: Ext.grid.TemplateColumn, + actioncolumn: Ext.grid.ActionColumn +}; +Ext.grid.RowNumberer = Ext.extend(Object, { + + header: "", + + width: 23, + + sortable: false, + + constructor : function(config){ + Ext.apply(this, config); + if(this.rowspan){ + this.renderer = this.renderer.createDelegate(this); + } + }, + + + fixed:true, + hideable: false, + menuDisabled:true, + dataIndex: '', + id: 'numberer', + rowspan: undefined, + + + renderer : function(v, p, record, rowIndex){ + if(this.rowspan){ + p.cellAttr = 'rowspan="'+this.rowspan+'"'; + } + return rowIndex+1; + } +}); +Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { + + + + header : '
     
    ', + + width : 20, + + sortable : false, + + + menuDisabled : true, + fixed : true, + hideable: false, + dataIndex : '', + id : 'checker', + isColumn: true, + + constructor : function(){ + Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments); + if(this.checkOnly){ + this.handleMouseDown = Ext.emptyFn; + } + }, + + + initEvents : function(){ + Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this); + this.grid.on('render', function(){ + Ext.fly(this.grid.getView().innerHd).on('mousedown', this.onHdMouseDown, this); + }, this); + }, + + + processEvent : function(name, e, grid, rowIndex, colIndex){ + if (name == 'mousedown') { + this.onMouseDown(e, e.getTarget()); + return false; + } else { + return Ext.grid.Column.prototype.processEvent.apply(this, arguments); + } + }, + + + onMouseDown : function(e, t){ + if(e.button === 0 && t.className == 'x-grid3-row-checker'){ + e.stopEvent(); + var row = e.getTarget('.x-grid3-row'); + if(row){ + var index = row.rowIndex; + if(this.isSelected(index)){ + this.deselectRow(index); + }else{ + this.selectRow(index, true); + this.grid.getView().focusRow(index); + } + } + } + }, + + + onHdMouseDown : function(e, t) { + if(t.className == 'x-grid3-hd-checker'){ + e.stopEvent(); + var hd = Ext.fly(t.parentNode); + var isChecked = hd.hasClass('x-grid3-hd-checker-on'); + if(isChecked){ + hd.removeClass('x-grid3-hd-checker-on'); + this.clearSelections(); + }else{ + hd.addClass('x-grid3-hd-checker-on'); + this.selectAll(); + } + } + }, + + + renderer : function(v, p, record){ + return '
     
    '; + }, + + onEditorSelect: function(row, lastRow){ + if(lastRow != row && !this.checkOnly){ + this.selectRow(row); + } + } +}); +Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { + + constructor : function(config){ + Ext.apply(this, config); + + this.selection = null; + + this.addEvents( + + "beforecellselect", + + "cellselect", + + "selectionchange" + ); + + Ext.grid.CellSelectionModel.superclass.constructor.call(this); + }, + + + initEvents : function(){ + this.grid.on('cellmousedown', this.handleMouseDown, this); + this.grid.on(Ext.EventManager.getKeyEvent(), this.handleKeyDown, this); + this.grid.getView().on({ + scope: this, + refresh: this.onViewChange, + rowupdated: this.onRowUpdated, + beforerowremoved: this.clearSelections, + beforerowsinserted: this.clearSelections + }); + if(this.grid.isEditor){ + this.grid.on('beforeedit', this.beforeEdit, this); + } + }, + + + beforeEdit : function(e){ this.select(e.row, e.column, false, true, e.record); }, - onRowUpdated : function(v, index, r){ + + onRowUpdated : function(v, index, r){ if(this.selection && this.selection.record == r){ v.onCellSelect(index, this.selection.cell[1]); } }, - onViewChange : function(){ + + onViewChange : function(){ this.clearSelections(true); }, @@ -33532,7 +50952,7 @@ Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel, { handleMouseDown : function(g, row, cell, e){ if(e.button !== 0 || this.isLocked()){ return; - }; + } this.select(row, cell); }, @@ -33557,104 +50977,134 @@ Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel, { } }, - isSelectable : function(rowIndex, colIndex, cm){ + + isSelectable : function(rowIndex, colIndex, cm){ return !cm.isHidden(colIndex); }, + + + onEditorKey: function(field, e){ + if(e.getKey() == e.TAB){ + this.handleKeyDown(e); + } + }, handleKeyDown : function(e){ if(!e.isNavKeyPress()){ return; } - var g = this.grid, s = this.selection; + + var k = e.getKey(), + g = this.grid, + s = this.selection, + sm = this, + walk = function(row, col, step){ + return g.walkCells( + row, + col, + step, + g.isEditor && g.editing ? sm.acceptsNav : sm.isSelectable, + sm + ); + }, + cell, newCell, r, c, ae; + + switch(k){ + case e.ESC: + case e.PAGE_UP: + case e.PAGE_DOWN: + + break; + default: + + e.stopEvent(); + break; + } + if(!s){ - e.stopEvent(); - var cell = g.walkCells(0, 0, 1, this.isSelectable, this); + cell = walk(0, 0, 1); if(cell){ this.select(cell[0], cell[1]); } return; } - var sm = this; - var walk = function(row, col, step){ - return g.walkCells(row, col, step, sm.isSelectable, sm); - }; - var k = e.getKey(), r = s.cell[0], c = s.cell[1]; - var newCell; + cell = s.cell; + r = cell[0]; + c = cell[1]; + switch(k){ - case e.TAB: - if(e.shiftKey){ - newCell = walk(r, c-1, -1); - }else{ - newCell = walk(r, c+1, 1); - } - break; - case e.DOWN: - newCell = walk(r+1, c, 1); - break; - case e.UP: - newCell = walk(r-1, c, -1); - break; - case e.RIGHT: - newCell = walk(r, c+1, 1); - break; - case e.LEFT: - newCell = walk(r, c-1, -1); - break; - case e.ENTER: - if(g.isEditor && !g.editing){ + case e.TAB: + if(e.shiftKey){ + newCell = walk(r, c - 1, -1); + }else{ + newCell = walk(r, c + 1, 1); + } + break; + case e.DOWN: + newCell = walk(r + 1, c, 1); + break; + case e.UP: + newCell = walk(r - 1, c, -1); + break; + case e.RIGHT: + newCell = walk(r, c + 1, 1); + break; + case e.LEFT: + newCell = walk(r, c - 1, -1); + break; + case e.ENTER: + if (g.isEditor && !g.editing) { g.startEditing(r, c); - e.stopEvent(); return; } - break; - }; + break; + } + if(newCell){ - this.select(newCell[0], newCell[1]); - e.stopEvent(); + + r = newCell[0]; + c = newCell[1]; + + this.select(r, c); + + if(g.isEditor && g.editing){ + ae = g.activeEditor; + if(ae && ae.field.triggerBlur){ + + ae.field.triggerBlur(); + } + g.startEditing(r, c); + } } }, acceptsNav : function(row, col, cm){ return !cm.isHidden(col) && cm.isCellEditable(col, row); - }, - - onEditorKey : function(field, e){ - var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor; - if(k == e.TAB){ - if(e.shiftKey){ - newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); - }else{ - newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); - } - e.stopEvent(); - }else if(k == e.ENTER){ - ed.completeEdit(); - e.stopEvent(); - }else if(k == e.ESC){ - e.stopEvent(); - ed.cancelEdit(); - } - if(newCell){ - g.startEditing(newCell[0], newCell[1]); - } } }); - Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { clicksToEdit: 2, - isEditor : true, - detectEdit: false, + + forceValidation: false, - - autoEncode : false, + + isEditor : true, + + detectEdit: false, - - trackMouseOver: false, - initComponent : function(){ + + autoEncode : false, + + + + trackMouseOver: false, + + + initComponent : function(){ Ext.grid.EditorGridPanel.superclass.initComponent.call(this); if(!this.selModel){ @@ -33664,7 +51114,7 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { this.activeEditor = null; - this.addEvents( + this.addEvents( "beforeedit", @@ -33674,36 +51124,49 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { ); }, - initEvents : function(){ + + initEvents : function(){ Ext.grid.EditorGridPanel.superclass.initEvents.call(this); - - this.on("bodyscroll", this.stopEditing, this, [true]); + + this.getGridEl().on('mousewheel', this.stopEditing.createDelegate(this, [true]), this); + this.on('columnresize', this.stopEditing, this, [true]); if(this.clicksToEdit == 1){ this.on("cellclick", this.onCellDblClick, this); }else { - if(this.clicksToEdit == 'auto' && this.view.mainBody){ - this.view.mainBody.on("mousedown", this.onAutoEditClick, this); + var view = this.getView(); + if(this.clicksToEdit == 'auto' && view.mainBody){ + view.mainBody.on('mousedown', this.onAutoEditClick, this); } - this.on("celldblclick", this.onCellDblClick, this); + this.on('celldblclick', this.onCellDblClick, this); } - this.getGridEl().addClass("xedit-grid"); }, - onCellDblClick : function(g, row, col){ + onResize : function(){ + Ext.grid.EditorGridPanel.superclass.onResize.apply(this, arguments); + var ae = this.activeEditor; + if(this.editing && ae){ + ae.realign(true); + } + }, + + + onCellDblClick : function(g, row, col){ this.startEditing(row, col); }, - onAutoEditClick : function(e, t){ + + onAutoEditClick : function(e, t){ if(e.button !== 0){ return; } - var row = this.view.findRowIndex(t); - var col = this.view.findCellIndex(t); + var row = this.view.findRowIndex(t), + col = this.view.findCellIndex(t); if(row !== false && col !== false){ this.stopEditing(); - if(this.selModel.getSelectedCell){ var sc = this.selModel.getSelectedCell(); - if(sc && sc.cell[0] === row && sc.cell[1] === col){ + if(this.selModel.getSelectedCell){ + var sc = this.selModel.getSelectedCell(); + if(sc && sc[0] === row && sc[1] === col){ this.startEditing(row, col); } }else{ @@ -33714,14 +51177,16 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { } }, - onEditComplete : function(ed, value, startValue){ + + onEditComplete : function(ed, value, startValue){ this.editing = false; + this.lastActiveEditor = this.activeEditor; this.activeEditor = null; - ed.un("specialkey", this.selModel.onEditorKey, this.selModel); - var r = ed.record; - var field = this.colModel.getDataIndex(ed.col); + + var r = ed.record, + field = this.colModel.getDataIndex(ed.col); value = this.postEditValue(value, startValue, r, field); - if(String(value) !== String(startValue)){ + if(this.forceValidation === true || String(value) !== String(startValue)){ var e = { grid: this, record: r, @@ -33732,7 +51197,7 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { column: ed.col, cancel:false }; - if(this.fireEvent("validateedit", e) !== false && !e.cancel){ + if(this.fireEvent("validateedit", e) !== false && !e.cancel && String(value) !== String(startValue)){ r.set(field, e.value); delete e.cancel; this.fireEvent("afteredit", e); @@ -33746,65 +51211,92 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { this.stopEditing(); if(this.colModel.isCellEditable(col, row)){ this.view.ensureVisible(row, col, true); - var r = this.store.getAt(row); - var field = this.colModel.getDataIndex(col); - var e = { - grid: this, - record: r, - field: field, - value: r.data[field], - row: row, - column: col, - cancel:false - }; + var r = this.store.getAt(row), + field = this.colModel.getDataIndex(col), + e = { + grid: this, + record: r, + field: field, + value: r.data[field], + row: row, + column: col, + cancel:false + }; if(this.fireEvent("beforeedit", e) !== false && !e.cancel){ this.editing = true; var ed = this.colModel.getCellEditor(col, row); - if(!ed.rendered){ - ed.render(this.view.getEditorParent(ed)); + if(!ed){ + return; } - (function(){ ed.row = row; - ed.col = col; - ed.record = r; - ed.on("complete", this.onEditComplete, this, {single: true}); - ed.on("specialkey", this.selModel.onEditorKey, this.selModel); - this.activeEditor = ed; - var v = this.preEditValue(r, field); - ed.startEdit(this.view.getCell(row, col).firstChild, v); - }).defer(50, this); + if(!ed.rendered){ + ed.parentEl = this.view.getEditorParent(ed); + ed.on({ + scope: this, + render: { + fn: function(c){ + c.field.focus(false, true); + }, + single: true, + scope: this + }, + specialkey: function(field, e){ + this.getSelectionModel().onEditorKey(field, e); + }, + complete: this.onEditComplete, + canceledit: this.stopEditing.createDelegate(this, [true]) + }); + } + Ext.apply(ed, { + row : row, + col : col, + record : r + }); + this.lastEdit = { + row: row, + col: col + }; + this.activeEditor = ed; + + + ed.selectSameEditor = (this.activeEditor == this.lastActiveEditor); + var v = this.preEditValue(r, field); + ed.startEdit(this.view.getCell(row, col).firstChild, Ext.isDefined(v) ? v : ''); + + + (function(){ + delete ed.selectSameEditor; + }).defer(50); } } }, + - preEditValue : function(r, field){ + preEditValue : function(r, field){ var value = r.data[field]; - return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value; - }, - - postEditValue : function(value, originalValue, r, field){ - return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value; - }, - + return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlDecode(value) : value; + }, + + + postEditValue : function(value, originalValue, r, field){ + return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlEncode(value) : value; + }, + stopEditing : function(cancel){ - if(this.activeEditor){ - this.activeEditor[cancel === true ? 'cancelEdit' : 'completeEdit'](); - } - this.activeEditor = null; - }, - - onDestroy: function() { - if(this.rendered){ - var cols = this.colModel.config; - for(var i = 0, len = cols.length; i < len; i++){ - var c = cols[i]; - Ext.destroy(c.editor); + if(this.editing){ + + var ae = this.lastActiveEditor = this.activeEditor; + if(ae){ + ae[cancel === true ? 'cancelEdit' : 'completeEdit'](); + this.view.focusCell(ae.row, ae.col); } + this.activeEditor = null; } - Ext.grid.EditorGridPanel.superclass.onDestroy.call(this); + this.editing = false; } }); Ext.reg('editorgrid', Ext.grid.EditorGridPanel); + Ext.grid.GridEditor = function(field, config){ Ext.grid.GridEditor.superclass.constructor.call(this, field, config); field.monitorTab = false; @@ -33818,25 +51310,27 @@ Ext.extend(Ext.grid.GridEditor, Ext.Editor, { shim:false, shadow:false }); - Ext.grid.PropertyRecord = Ext.data.Record.create([ {name:'name',type:'string'}, 'value' ]); -Ext.grid.PropertyStore = function(grid, source){ - this.grid = grid; - this.store = new Ext.data.Store({ - recordType : Ext.grid.PropertyRecord - }); - this.store.on('update', this.onUpdate, this); - if(source){ - this.setSource(source); - } - Ext.grid.PropertyStore.superclass.constructor.call(this); -}; -Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, { - setSource : function(o){ +Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, { + + constructor : function(grid, source){ + this.grid = grid; + this.store = new Ext.data.Store({ + recordType : Ext.grid.PropertyRecord + }); + this.store.on('update', this.onUpdate, this); + if(source){ + this.setSource(source); + } + Ext.grid.PropertyStore.superclass.constructor.call(this); + }, + + + setSource : function(o){ this.source = o; this.store.removeAll(); var data = []; @@ -33848,10 +51342,11 @@ Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, { this.store.loadRecords({records: data}, {}, true); }, - onUpdate : function(ds, record, type){ + + onUpdate : function(ds, record, type){ if(type == Ext.data.Record.EDIT){ - var v = record.data['value']; - var oldValue = record.modified['value']; + var v = record.data.value; + var oldValue = record.modified.value; if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){ this.source[record.id] = v; record.commit(); @@ -33862,91 +51357,124 @@ Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, { } }, - getProperty : function(row){ + + getProperty : function(row){ return this.store.getAt(row); }, - isEditableValue: function(val){ - if(Ext.isDate(val)){ - return true; - }else if(typeof val == 'object' || typeof val == 'function'){ - return false; + + isEditableValue: function(val){ + return Ext.isPrimitive(val) || Ext.isDate(val); + }, + + + setValue : function(prop, value, create){ + var r = this.getRec(prop); + if(r){ + r.set('value', value); + this.source[prop] = value; + }else if(create){ + + this.source[prop] = value; + r = new Ext.grid.PropertyRecord({name: prop, value: value}, prop); + this.store.add(r); + } - return true; + }, + + + remove : function(prop){ + var r = this.getRec(prop); + if(r){ + this.store.remove(r); + delete this.source[prop]; + } + }, + + + getRec : function(prop){ + return this.store.getById(prop); }, - setValue : function(prop, value){ - this.source[prop] = value; - this.store.getById(prop).set('value', value); - }, - - getSource : function(){ + + getSource : function(){ return this.source; } }); -Ext.grid.PropertyColumnModel = function(grid, store){ - this.grid = grid; - var g = Ext.grid; - g.PropertyColumnModel.superclass.constructor.call(this, [ - {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name', menuDisabled:true}, - {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true} - ]); - this.store = store; - this.bselect = Ext.DomHelper.append(document.body, { - tag: 'select', cls: 'x-grid-editor x-hide-display', children: [ - {tag: 'option', value: 'true', html: 'true'}, - {tag: 'option', value: 'false', html: 'false'} - ] - }); - var f = Ext.form; - - var bfield = new f.Field({ - el:this.bselect, - bselect : this.bselect, - autoShow: true, - getValue : function(){ - return this.bselect.value == 'true'; - } - }); - this.editors = { - 'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})), - 'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})), - 'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})), - 'boolean' : new g.GridEditor(bfield) - }; - this.renderCellDelegate = this.renderCell.createDelegate(this); - this.renderPropDelegate = this.renderProp.createDelegate(this); -}; - -Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, { - nameText : 'Name', +Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, { + + nameText : 'Name', valueText : 'Value', dateFormat : 'm/j/Y', + trueText: 'true', + falseText: 'false', + + constructor : function(grid, store){ + var g = Ext.grid, + f = Ext.form; + + this.grid = grid; + g.PropertyColumnModel.superclass.constructor.call(this, [ + {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name', menuDisabled:true}, + {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true} + ]); + this.store = store; + + var bfield = new f.Field({ + autoCreate: {tag: 'select', children: [ + {tag: 'option', value: 'true', html: this.trueText}, + {tag: 'option', value: 'false', html: this.falseText} + ]}, + getValue : function(){ + return this.el.dom.value == 'true'; + } + }); + this.editors = { + 'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})), + 'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})), + 'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})), + 'boolean' : new g.GridEditor(bfield, { + autoSize: 'both' + }) + }; + this.renderCellDelegate = this.renderCell.createDelegate(this); + this.renderPropDelegate = this.renderProp.createDelegate(this); + }, - renderDate : function(dateVal){ + + renderDate : function(dateVal){ return dateVal.dateFormat(this.dateFormat); }, - renderBool : function(bVal){ - return bVal ? 'true' : 'false'; + + renderBool : function(bVal){ + return this[bVal ? 'trueText' : 'falseText']; }, - isCellEditable : function(colIndex, rowIndex){ + + isCellEditable : function(colIndex, rowIndex){ return colIndex == 1; }, - getRenderer : function(col){ + + getRenderer : function(col){ return col == 1 ? this.renderCellDelegate : this.renderPropDelegate; }, - renderProp : function(v){ + + renderProp : function(v){ return this.getPropertyName(v); }, - renderCell : function(val){ + + renderCell : function(val, meta, rec){ + var renderer = this.grid.customRenderers[rec.get('name')]; + if(renderer){ + return renderer.apply(this, arguments); + } var rv = val; if(Ext.isDate(val)){ rv = this.renderDate(val); @@ -33956,25 +51484,41 @@ Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, { return Ext.util.Format.htmlEncode(rv); }, - getPropertyName : function(name){ + + getPropertyName : function(name){ var pn = this.grid.propertyNames; return pn && pn[name] ? pn[name] : name; }, - getCellEditor : function(colIndex, rowIndex){ - var p = this.store.getProperty(rowIndex); - var n = p.data['name'], val = p.data['value']; + + getCellEditor : function(colIndex, rowIndex){ + var p = this.store.getProperty(rowIndex), + n = p.data.name, + val = p.data.value; if(this.grid.customEditors[n]){ return this.grid.customEditors[n]; } if(Ext.isDate(val)){ - return this.editors['date']; + return this.editors.date; }else if(typeof val == 'number'){ - return this.editors['number']; + return this.editors.number; }else if(typeof val == 'boolean'){ return this.editors['boolean']; }else{ - return this.editors['string']; + return this.editors.string; + } + }, + + + destroy : function(){ + Ext.grid.PropertyColumnModel.superclass.destroy.call(this); + this.destroyEditors(this.editors); + this.destroyEditors(this.grid.customEditors); + }, + + destroyEditors: function(editors){ + for(var ed in editors){ + Ext.destroy(editors[ed]); } } }); @@ -33983,8 +51527,12 @@ Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, { Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { + + + - enableColumnMove:false, + + enableColumnMove:false, stripeRows:false, trackMouseOver: false, clicksToEdit:1, @@ -33993,7 +51541,9 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { forceFit:true }, - initComponent : function(){ + + initComponent : function(){ + this.customRenderers = this.customRenderers || {}; this.customEditors = this.customEditors || {}; this.lastEditRow = null; var store = new Ext.grid.PropertyStore(this); @@ -34010,7 +51560,7 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { this.ds = store.store; Ext.grid.PropertyGrid.superclass.initComponent.call(this); - this.selModel.on('beforecellselect', function(sm, rowIndex, colIndex){ + this.mon(this.selModel, 'beforecellselect', function(sm, rowIndex, colIndex){ if(colIndex === 0){ this.startEditing.defer(200, this, [rowIndex, 1]); return false; @@ -34018,13 +51568,15 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { }, this); }, - onRender : function(){ + + onRender : function(){ Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments); this.getGridEl().addClass('x-props-grid'); }, - afterRender: function(){ + + afterRender: function(){ Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments); if(this.source){ this.setSource(this.source); @@ -34039,1442 +51591,489 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { getSource : function(){ return this.propStore.getSource(); + }, + + + setProperty : function(prop, value, create){ + this.propStore.setValue(prop, value, create); + }, + + + removeProperty : function(prop){ + this.propStore.remove(prop); } + + + + + }); Ext.reg("propertygrid", Ext.grid.PropertyGrid); - -Ext.grid.RowNumberer = function(config){ - Ext.apply(this, config); - if(this.rowspan){ - this.renderer = this.renderer.createDelegate(this); - } -}; - -Ext.grid.RowNumberer.prototype = { - - header: "", - - width: 23, - - sortable: false, - - - fixed:true, - menuDisabled:true, - dataIndex: '', - id: 'numberer', - rowspan: undefined, - - - renderer : function(v, p, record, rowIndex){ - if(this.rowspan){ - p.cellAttr = 'rowspan="'+this.rowspan+'"'; - } - return rowIndex+1; - } -}; - -Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { - - header: '
     
    ', - - width: 20, - - sortable: false, - - - menuDisabled:true, - fixed:true, - dataIndex: '', - id: 'checker', - - - initEvents : function(){ - Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this); - this.grid.on('render', function(){ - var view = this.grid.getView(); - view.mainBody.on('mousedown', this.onMouseDown, this); - Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this); - - }, this); - }, - - - onMouseDown : function(e, t){ - if(e.button === 0 && t.className == 'x-grid3-row-checker'){ - e.stopEvent(); - var row = e.getTarget('.x-grid3-row'); - if(row){ - var index = row.rowIndex; - if(this.isSelected(index)){ - this.deselectRow(index); - }else{ - this.selectRow(index, true); - } - } - } - }, - - - onHdMouseDown : function(e, t){ - if(t.className == 'x-grid3-hd-checker'){ - e.stopEvent(); - var hd = Ext.fly(t.parentNode); - var isChecked = hd.hasClass('x-grid3-hd-checker-on'); - if(isChecked){ - hd.removeClass('x-grid3-hd-checker-on'); - this.clearSelections(); - }else{ - hd.addClass('x-grid3-hd-checker-on'); - this.selectAll(); - } - } - }, - - - renderer : function(v, p, record){ - return '
     
    '; - } -}); - -Ext.LoadMask = function(el, config){ - this.el = Ext.get(el); - Ext.apply(this, config); - if(this.store){ - this.store.on('beforeload', this.onBeforeLoad, this); - this.store.on('load', this.onLoad, this); - this.store.on('loadexception', this.onLoad, this); - this.removeMask = Ext.value(this.removeMask, false); - }else{ - var um = this.el.getUpdater(); - um.showLoadIndicator = false; um.on('beforeupdate', this.onBeforeLoad, this); - um.on('update', this.onLoad, this); - um.on('failure', this.onLoad, this); - this.removeMask = Ext.value(this.removeMask, true); - } -}; - -Ext.LoadMask.prototype = { - - - - msg : 'Loading...', - - msgCls : 'x-mask-loading', +Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, { - disabled: false, + groupByText : 'Group By This Field', + + showGroupsText : 'Show in Groups', + + hideGroupedColumn : false, + + showGroupName : true, + + startCollapsed : false, + + enableGrouping : true, + + enableGroupingMenu : true, + + enableNoGroups : true, + + emptyGroupText : '(None)', + + ignoreAdd : false, + + groupTextTpl : '{text}', - disable : function(){ - this.disabled = true; - }, + groupMode: 'value', - enable : function(){ - this.disabled = false; - }, + + + cancelEditOnToggle: true, - onLoad : function(){ - this.el.unmask(this.removeMask); - }, + + initTemplates : function(){ + Ext.grid.GroupingView.superclass.initTemplates.call(this); + this.state = {}; - onBeforeLoad : function(){ - if(!this.disabled){ - this.el.mask(this.msg, this.msgCls); + var sm = this.grid.getSelectionModel(); + sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect', + this.onBeforeRowSelect, this); + + if(!this.startGroup){ + this.startGroup = new Ext.XTemplate( + '
    ', + '
    ', this.groupTextTpl ,'
    ', + '
    ' + ); + } + this.startGroup.compile(); + + if (!this.endGroup) { + this.endGroup = '
    '; } }, - show: function(){ - this.onBeforeLoad(); + findGroup : function(el){ + return Ext.fly(el).up('.x-grid-group', this.mainBody.dom); }, - hide: function(){ - this.onLoad(); + getGroups : function(){ + return this.hasRows() ? this.mainBody.dom.childNodes : []; }, - destroy : function(){ - if(this.store){ - this.store.un('beforeload', this.onBeforeLoad, this); - this.store.un('load', this.onLoad, this); - this.store.un('loadexception', this.onLoad, this); + + onAdd : function(ds, records, index) { + if (this.canGroup() && !this.ignoreAdd) { + var ss = this.getScrollState(); + this.fireEvent('beforerowsinserted', ds, index, index + (records.length-1)); + this.refresh(); + this.restoreScroll(ss); + this.fireEvent('rowsinserted', ds, index, index + (records.length-1)); + } else if (!this.canGroup()) { + Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments); + } + }, + + + onRemove : function(ds, record, index, isUpdate){ + Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments); + var g = document.getElementById(record._groupId); + if(g && g.childNodes[1].childNodes.length < 1){ + Ext.removeNode(g); + } + this.applyEmptyText(); + }, + + + refreshRow : function(record){ + if(this.ds.getCount()==1){ + this.refresh(); }else{ - var um = this.el.getUpdater(); - um.un('beforeupdate', this.onBeforeLoad, this); - um.un('update', this.onLoad, this); - um.un('failure', this.onLoad, this); + this.isUpdating = true; + Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments); + this.isUpdating = false; } - } -}; - -Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { - - baseCls : 'x-progress', - - - waitTimer : null, - - - initComponent : function(){ - Ext.ProgressBar.superclass.initComponent.call(this); - this.addEvents( - - "update" - ); - }, - - - onRender : function(ct, position){ - Ext.ProgressBar.superclass.onRender.call(this, ct, position); - - var tpl = new Ext.Template( - '
    ', - '
    ', - '
    ', - '
    ', - '
     
    ', - '
    ', - '
    ', - '
    ', - '
     
    ', - '
    ', - '
    ', - '
    ' - ); - - if(position){ - this.el = tpl.insertBefore(position, {cls: this.baseCls}, true); - }else{ - this.el = tpl.append(ct, {cls: this.baseCls}, true); - } - if(this.id){ - this.el.dom.id = this.id; - } - var inner = this.el.dom.firstChild; - this.progressBar = Ext.get(inner.firstChild); - - if(this.textEl){ - - this.textEl = Ext.get(this.textEl); - delete this.textTopEl; - }else{ - - this.textTopEl = Ext.get(this.progressBar.dom.firstChild); - var textBackEl = Ext.get(inner.childNodes[1]); - this.textTopEl.setStyle("z-index", 99).addClass('x-hidden'); - this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]); - this.textEl.setWidth(inner.offsetWidth); - } - this.progressBar.setHeight(inner.offsetHeight); - }, - - - afterRender : function(){ - Ext.ProgressBar.superclass.afterRender.call(this); - if(this.value){ - this.updateProgress(this.value, this.text); - }else{ - this.updateText(this.text); - } - }, - - - updateProgress : function(value, text){ - this.value = value || 0; - if(text){ - this.updateText(text); - } - if(this.rendered){ - var w = Math.floor(value*this.el.dom.firstChild.offsetWidth); - this.progressBar.setWidth(w); - if(this.textTopEl){ - - this.textTopEl.removeClass('x-hidden').setWidth(w); - } - } - this.fireEvent('update', this, value, text); - return this; - }, - - - wait : function(o){ - if(!this.waitTimer){ - var scope = this; - o = o || {}; - this.updateText(o.text); - this.waitTimer = Ext.TaskMgr.start({ - run: function(i){ - var inc = o.increment || 10; - this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*.01); - }, - interval: o.interval || 1000, - duration: o.duration, - onStop: function(){ - if(o.fn){ - o.fn.apply(o.scope || this); - } - this.reset(); - }, - scope: scope - }); - } - return this; - }, - - - isWaiting : function(){ - return this.waitTimer != null; - }, - - - updateText : function(text){ - this.text = text || ' '; - if(this.rendered){ - this.textEl.update(this.text); - } - return this; - }, - - - syncProgressBar : function(){ - if(this.value){ - this.updateProgress(this.value, this.text); - } - return this; - }, - - - setSize : function(w, h){ - Ext.ProgressBar.superclass.setSize.call(this, w, h); - if(this.textTopEl){ - var inner = this.el.dom.firstChild; - this.textEl.setSize(inner.offsetWidth, inner.offsetHeight); - } - this.syncProgressBar(); - return this; - }, - - - reset : function(hide){ - this.updateProgress(0); - if(this.textTopEl){ - this.textTopEl.addClass('x-hidden'); - } - if(this.waitTimer){ - this.waitTimer.onStop = null; - Ext.TaskMgr.stop(this.waitTimer); - this.waitTimer = null; - } - if(hide === true){ - this.hide(); - } - return this; - } -}); -Ext.reg('progress', Ext.ProgressBar); - -Ext.Slider = Ext.extend(Ext.BoxComponent, { - - - vertical: false, - - minValue: 0, - - maxValue: 100, - - keyIncrement: 1, - - increment: 0, - - clickRange: [5,15], - - clickToChange : true, - - animate: true, - - - dragging: false, - - - initComponent : function(){ - if(this.value === undefined){ - this.value = this.minValue; - } - Ext.Slider.superclass.initComponent.call(this); - this.keyIncrement = Math.max(this.increment, this.keyIncrement); - this.addEvents( - - 'beforechange', - - 'change', - - 'changecomplete', - - 'dragstart', - - 'drag', - - 'dragend' - ); - - if(this.vertical){ - Ext.apply(this, Ext.Slider.Vertical); - } - }, - - - onRender : function(){ - this.autoEl = { - cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'), - cn:{cls:'x-slider-end',cn:{cls:'x-slider-inner',cn:[{cls:'x-slider-thumb'},{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}]}} - }; - Ext.Slider.superclass.onRender.apply(this, arguments); - this.endEl = this.el.first(); - this.innerEl = this.endEl.first(); - this.thumb = this.innerEl.first(); - this.halfThumb = (this.vertical ? this.thumb.getHeight() : this.thumb.getWidth())/2; - this.focusEl = this.thumb.next(); - this.initEvents(); - }, - - - initEvents : function(){ - this.thumb.addClassOnOver('x-slider-thumb-over'); - this.mon(this.el, 'mousedown', this.onMouseDown, this); - this.mon(this.el, 'keydown', this.onKeyDown, this); - - this.focusEl.swallowEvent("click", true); - - this.tracker = new Ext.dd.DragTracker({ - onBeforeStart: this.onBeforeDragStart.createDelegate(this), - onStart: this.onDragStart.createDelegate(this), - onDrag: this.onDrag.createDelegate(this), - onEnd: this.onDragEnd.createDelegate(this), - tolerance: 3, - autoStart: 300 - }); - this.tracker.initEl(this.thumb); - this.on('beforedestroy', this.tracker.destroy, this.tracker); - }, - - - onMouseDown : function(e){ - if(this.disabled) {return;} - if(this.clickToChange && e.target != this.thumb.dom){ - var local = this.innerEl.translatePoints(e.getXY()); - this.onClickChange(local); - } - this.focus(); - }, - - - onClickChange : function(local){ - if(local.top > this.clickRange[0] && local.top < this.clickRange[1]){ - this.setValue(Math.round(this.reverseValue(local.left)), undefined, true); - } - }, - - - onKeyDown : function(e){ - if(this.disabled){e.preventDefault();return;} - var k = e.getKey(); - switch(k){ - case e.UP: - case e.RIGHT: - e.stopEvent(); - if(e.ctrlKey){ - this.setValue(this.maxValue, undefined, true); - }else{ - this.setValue(this.value+this.keyIncrement, undefined, true); - } - break; - case e.DOWN: - case e.LEFT: - e.stopEvent(); - if(e.ctrlKey){ - this.setValue(this.minValue, undefined, true); - }else{ - this.setValue(this.value-this.keyIncrement, undefined, true); - } - break; - default: - e.preventDefault(); - } - }, - - - doSnap : function(value){ - if(!this.increment || this.increment == 1 || !value) { - return value; - } - var newValue = value, inc = this.increment; - var m = value % inc; - if(m > 0){ - if(m > (inc/2)){ - newValue = value + (inc-m); - }else{ - newValue = value - m; - } - } - return newValue.constrain(this.minValue, this.maxValue); - }, - - - afterRender : function(){ - Ext.Slider.superclass.afterRender.apply(this, arguments); - if(this.value !== undefined){ - var v = this.normalizeValue(this.value); - if(v !== this.value){ - delete this.value; - this.setValue(v, false); - }else{ - this.moveThumb(this.translateValue(v), false); - } - } - }, - - - getRatio : function(){ - var w = this.innerEl.getWidth(); - var v = this.maxValue - this.minValue; - return v == 0 ? w : (w/v); - }, - - - normalizeValue : function(v){ - if(typeof v != 'number'){ - v = parseInt(v); - } - v = Math.round(v); - v = this.doSnap(v); - v = v.constrain(this.minValue, this.maxValue); - return v; - }, - - - setValue : function(v, animate, changeComplete){ - v = this.normalizeValue(v); - if(v !== this.value && this.fireEvent('beforechange', this, v, this.value) !== false){ - this.value = v; - this.moveThumb(this.translateValue(v), animate !== false); - this.fireEvent('change', this, v); - if(changeComplete){ - this.fireEvent('changecomplete', this, v); - } - } - }, - - - translateValue : function(v){ - var ratio = this.getRatio(); - return (v * ratio)-(this.minValue * ratio)-this.halfThumb; - }, - - reverseValue : function(pos){ - var ratio = this.getRatio(); - return (pos+this.halfThumb+(this.minValue * ratio))/ratio; - }, - - - moveThumb: function(v, animate){ - if(!animate || this.animate === false){ - this.thumb.setLeft(v); - }else{ - this.thumb.shift({left: v, stopFx: true, duration:.35}); - } - }, - - - focus : function(){ - this.focusEl.focus(10); - }, - - - onBeforeDragStart : function(e){ - return !this.disabled; - }, - - - onDragStart: function(e){ - this.thumb.addClass('x-slider-thumb-drag'); - this.dragging = true; - this.dragStartValue = this.value; - this.fireEvent('dragstart', this, e); - }, - - - onDrag: function(e){ - var pos = this.innerEl.translatePoints(this.tracker.getXY()); - this.setValue(Math.round(this.reverseValue(pos.left)), false); - this.fireEvent('drag', this, e); - }, - - - onDragEnd: function(e){ - this.thumb.removeClass('x-slider-thumb-drag'); - this.dragging = false; - this.fireEvent('dragend', this, e); - if(this.dragStartValue != this.value){ - this.fireEvent('changecomplete', this, this.value); - } - }, - - - onResize : function(w, h){ - this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); - this.syncThumb(); - }, - - - syncThumb : function(){ - if(this.rendered){ - this.moveThumb(this.translateValue(this.value)); - } - }, - - - getValue : function(){ - return this.value; - } -}); -Ext.reg('slider', Ext.Slider); - - -Ext.Slider.Vertical = { - onResize : function(w, h){ - this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b'))); - this.syncThumb(); - }, - - getRatio : function(){ - var h = this.innerEl.getHeight(); - var v = this.maxValue - this.minValue; - return h/v; - }, - - moveThumb: function(v, animate){ - if(!animate || this.animate === false){ - this.thumb.setBottom(v); - }else{ - this.thumb.shift({bottom: v, stopFx: true, duration:.35}); - } - }, - - onDrag: function(e){ - var pos = this.innerEl.translatePoints(this.tracker.getXY()); - var bottom = this.innerEl.getHeight()-pos.top; - this.setValue(Math.round(bottom/this.getRatio()), false); - this.fireEvent('drag', this, e); - }, - - onClickChange : function(local){ - if(local.left > this.clickRange[0] && local.left < this.clickRange[1]){ - var bottom = this.innerEl.getHeight()-local.top; - this.setValue(Math.round(bottom/this.getRatio()), undefined, true); - } - } -}; - -Ext.StatusBar = Ext.extend(Ext.Toolbar, { - - - - - - - - cls : 'x-statusbar', - - busyIconCls : 'x-status-busy', - - busyText : 'Loading...', - - autoClear : 5000, - - activeThreadId : 0, - - initComponent : function(){ - if(this.statusAlign=='right'){ - this.cls += ' x-status-right'; - } - Ext.StatusBar.superclass.initComponent.call(this); - }, - - afterRender : function(){ - Ext.StatusBar.superclass.afterRender.call(this); - - var right = this.statusAlign=='right', - td = Ext.get(this.nextBlock()); - - if(right){ - this.tr.appendChild(td.dom); - }else{ - td.insertBefore(this.tr.firstChild); - } - - this.statusEl = td.createChild({ - cls: 'x-status-text ' + (this.iconCls || this.defaultIconCls || ''), - html: this.text || this.defaultText || '' - }); - this.statusEl.unselectable(); - - this.spacerEl = td.insertSibling({ - tag: 'td', - style: 'width:100%', - cn: [{cls:'ytb-spacer'}] - }, right ? 'before' : 'after'); }, - setStatus : function(o){ - o = o || {}; - - if(typeof o == 'string'){ - o = {text:o}; + beforeMenuShow : function(){ + var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false; + if((item = items.get('groupBy'))){ + item.setDisabled(disabled); } - if(o.text !== undefined){ - this.setText(o.text); + if((item = items.get('showGroups'))){ + item.setDisabled(disabled); + item.setChecked(this.canGroup(), true); } - if(o.iconCls !== undefined){ - this.setIcon(o.iconCls); - } - - if(o.clear){ - var c = o.clear, - wait = this.autoClear, - defaults = {useDefaults: true, anim: true}; - - if(typeof c == 'object'){ - c = Ext.applyIf(c, defaults); - if(c.wait){ - wait = c.wait; - } - }else if(typeof c == 'number'){ - wait = c; - c = defaults; - }else if(typeof c == 'boolean'){ - c = defaults; - } - - c.threadId = this.activeThreadId; - this.clearStatus.defer(wait, this, [c]); - } - return this; }, - + - clearStatus : function(o){ - o = o || {}; - - if(o.threadId && o.threadId !== this.activeThreadId){ - return this; - } - - var text = o.useDefaults ? this.defaultText : '', - iconCls = o.useDefaults ? (this.defaultIconCls ? this.defaultIconCls : '') : ''; - - if(o.anim){ - this.statusEl.fadeOut({ - remove: false, - useDisplay: true, + renderUI : function(){ + var markup = Ext.grid.GroupingView.superclass.renderUI.call(this); + + if(this.enableGroupingMenu && this.hmenu){ + this.hmenu.add('-',{ + itemId:'groupBy', + text: this.groupByText, + handler: this.onGroupByClick, scope: this, - callback: function(){ - this.setStatus({ - text: text, - iconCls: iconCls - }); - this.statusEl.show(); - } + iconCls:'x-group-by-icon' }); + if(this.enableNoGroups){ + this.hmenu.add({ + itemId:'showGroups', + text: this.showGroupsText, + checked: true, + checkHandler: this.onShowGroupsClick, + scope: this + }); + } + this.hmenu.on('beforeshow', this.beforeMenuShow, this); + } + return markup; + }, + + processEvent: function(name, e){ + Ext.grid.GroupingView.superclass.processEvent.call(this, name, e); + var hd = e.getTarget('.x-grid-group-hd', this.mainBody); + if(hd){ + + var field = this.getGroupField(), + prefix = this.getPrefix(field), + groupValue = hd.id.substring(prefix.length), + emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd'); + + + groupValue = groupValue.substr(0, groupValue.length - 3); + + + if(groupValue || emptyRe.test(hd.id)){ + this.grid.fireEvent('group' + name, this.grid, field, groupValue, e); + } + if(name == 'mousedown' && e.button == 0){ + this.toggleGroup(hd.parentNode); + } + } + + }, + + + onGroupByClick : function(){ + var grid = this.grid; + this.enableGrouping = true; + grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); + grid.fireEvent('groupchange', grid, grid.store.getGroupState()); + this.beforeMenuShow(); + this.refresh(); + }, + + + onShowGroupsClick : function(mi, checked){ + this.enableGrouping = checked; + if(checked){ + this.onGroupByClick(); }else{ - this.statusEl.hide(); - this.setStatus({ - text: text, - iconCls: iconCls - }); - this.statusEl.show(); + this.grid.store.clearGrouping(); + this.grid.fireEvent('groupchange', this, null); } - return this; - }, - - - setText : function(text){ - this.activeThreadId++; - this.text = text || ''; - if(this.rendered){ - this.statusEl.update(this.text); - } - return this; - }, - - - getText : function(){ - return this.text; }, - setIcon : function(cls){ - this.activeThreadId++; - cls = cls || ''; - - if(this.rendered){ - if(this.currIconCls){ - this.statusEl.removeClass(this.currIconCls); - this.currIconCls = null; - } - if(cls.length > 0){ - this.statusEl.addClass(cls); - this.currIconCls = cls; - } - }else{ - this.currIconCls = cls; - } - return this; - }, - - - showBusy : function(o){ - if(typeof o == 'string'){ - o = {text:o}; - } - o = Ext.applyIf(o || {}, { - text: this.busyText, - iconCls: this.busyIconCls - }); - return this.setStatus(o); - } -}); -Ext.reg('statusbar', Ext.StatusBar); - - -Ext.History = (function () { - var iframe, hiddenField; - var ready = false; - var currentToken; - - function getHash() { - var href = top.location.href, i = href.indexOf("#"); - return i >= 0 ? href.substr(i + 1) : null; - } - - function doSave() { - hiddenField.value = currentToken; - } - - function handleStateChange(token) { - currentToken = token; - Ext.History.fireEvent('change', token); - } - - function updateIFrame (token) { - var html = ['
    ',token,'
    '].join(''); - try { - var doc = iframe.contentWindow.document; - doc.open(); - doc.write(html); - doc.close(); - return true; - } catch (e) { - return false; - } - } - - function checkIFrame() { - if (!iframe.contentWindow || !iframe.contentWindow.document) { - setTimeout(checkIFrame, 10); - return; - } - - var doc = iframe.contentWindow.document; - var elem = doc.getElementById("state"); - var token = elem ? elem.innerText : null; - - var hash = getHash(); - - setInterval(function () { - - doc = iframe.contentWindow.document; - elem = doc.getElementById("state"); - - var newtoken = elem ? elem.innerText : null; - - var newHash = getHash(); - - if (newtoken !== token) { - token = newtoken; - handleStateChange(token); - top.location.hash = token; - hash = token; - doSave(); - } else if (newHash !== hash) { - hash = newHash; - updateIFrame(newHash); - } - - }, 50); - - ready = true; - - Ext.History.fireEvent('ready', Ext.History); - } - - function startUp() { - currentToken = hiddenField.value; - - if (Ext.isIE) { - checkIFrame(); - } else { - var hash = getHash(); - setInterval(function () { - var newHash = getHash(); - if (newHash !== hash) { - hash = newHash; - handleStateChange(hash); - doSave(); - } - }, 50); - ready = true; - Ext.History.fireEvent('ready', Ext.History); - } - } - - return { - - fieldId: 'x-history-field', - - iframeId: 'x-history-frame', - - events:{}, - - - init: function (onReady, scope) { - if(ready) { - Ext.callback(onReady, scope, [this]); - return; - } - if(!Ext.isReady){ - Ext.onReady(function(){ - Ext.History.init(onReady, scope); - }); - return; - } - hiddenField = Ext.getDom(Ext.History.fieldId); - if (Ext.isIE) { - iframe = Ext.getDom(Ext.History.iframeId); - } - this.addEvents('ready', 'change'); - if(onReady){ - this.on('ready', onReady, scope, {single:true}); - } - startUp(); - }, - - - add: function (token, preventDup) { - if(preventDup !== false){ - if(this.getToken() == token){ - return true; - } - } - if (Ext.isIE) { - return updateIFrame(token); - } else { - top.location.hash = token; - return true; - } - }, - - - back: function(){ - history.go(-1); - }, - - - forward: function(){ - history.go(1); - }, - - - getToken: function() { - return ready ? currentToken : getHash(); - } - }; -})(); -Ext.apply(Ext.History, new Ext.util.Observable()); -Ext.debug = {}; - -(function(){ - -var cp; - -function createConsole(){ - - var scriptPanel = new Ext.debug.ScriptsPanel(); - var logView = new Ext.debug.LogPanel(); - var tree = new Ext.debug.DomTree(); - - var tabs = new Ext.TabPanel({ - activeTab: 0, - border: false, - tabPosition: 'bottom', - items: [{ - title: 'Debug Console', - layout:'border', - items: [logView, scriptPanel] - },{ - title: 'DOM Inspector', - layout:'border', - items: [tree] - }] - }); - - cp = new Ext.Panel({ - id: 'x-debug-browser', - title: 'Console', - collapsible: true, - animCollapse: false, - style: 'position:absolute;left:0;bottom:0;', - height:200, - logView: logView, - layout: 'fit', - - tools:[{ - id: 'close', - handler: function(){ - cp.destroy(); - cp = null; - Ext.EventManager.removeResizeListener(handleResize); - } - }], - - items: tabs - }); - - cp.render(document.body); - - cp.resizer = new Ext.Resizable(cp.el, { - minHeight:50, - handles: "n", - pinned: true, - transparent:true, - resizeElement : function(){ - var box = this.proxy.getBox(); - this.proxy.hide(); - cp.setHeight(box.height); - return box; - } - }); - - function handleResize(){ - cp.setWidth(Ext.getBody().getViewSize().width); - } - Ext.EventManager.onWindowResize(handleResize); - - handleResize(); -} - - -Ext.apply(Ext, { - log : function(){ - if(!cp){ - createConsole(); - } - cp.logView.log.apply(cp.logView, arguments); - }, - - logf : function(format, arg1, arg2, etc){ - Ext.log(String.format.apply(String, arguments)); - }, - - dump : function(o){ - if(typeof o == 'string' || typeof o == 'number' || typeof o == 'undefined' || Ext.isDate(o)){ - Ext.log(o); - }else if(!o){ - Ext.log("null"); - }else if(typeof o != "object"){ - Ext.log('Unknown return type'); - }else if(Ext.isArray(o)){ - Ext.log('['+o.join(',')+']'); - }else{ - var b = ["{\n"]; - for(var key in o){ - var to = typeof o[key]; - if(to != "function" && to != "object"){ - b.push(String.format(" {0}: {1},\n", key, o[key])); - } - } - var s = b.join(""); - if(s.length > 3){ - s = s.substr(0, s.length-2); - } - Ext.log(s + "\n}"); - } - }, - - _timers : {}, - - time : function(name){ - name = name || "def"; - Ext._timers[name] = new Date().getTime(); - }, - - timeEnd : function(name, printResults){ - var t = new Date().getTime(); - name = name || "def"; - var v = String.format("{0} ms", t-Ext._timers[name]); - Ext._timers[name] = new Date().getTime(); - if(printResults !== false){ - Ext.log('Timer ' + (name == "def" ? v : name + ": " + v)); - } - return v; - } -}); - -})(); - - -Ext.debug.ScriptsPanel = Ext.extend(Ext.Panel, { - id:'x-debug-scripts', - region: 'east', - minWidth: 200, - split: true, - width: 350, - border: false, - layout:'anchor', - style:'border-width:0 0 0 1px;', - - initComponent : function(){ - - this.scriptField = new Ext.form.TextArea({ - anchor: '100% -26', - style:'border-width:0;' - }); - - this.trapBox = new Ext.form.Checkbox({ - id: 'console-trap', - boxLabel: 'Trap Errors', - checked: true - }); - - this.toolbar = new Ext.Toolbar([{ - text: 'Run', - scope: this, - handler: this.evalScript - },{ - text: 'Clear', - scope: this, - handler: this.clear - }, - '->', - this.trapBox, - ' ', ' ' - ]); - - this.items = [this.toolbar, this.scriptField]; - - Ext.debug.ScriptsPanel.superclass.initComponent.call(this); - }, - - evalScript : function(){ - var s = this.scriptField.getValue(); - if(this.trapBox.getValue()){ - try{ - var rt = eval(s); - Ext.dump(rt === undefined? '(no return)' : rt); - }catch(e){ - Ext.log(e.message || e.descript); - } - }else{ - var rt = eval(s); - Ext.dump(rt === undefined? '(no return)' : rt); - } - }, - - clear : function(){ - this.scriptField.setValue(''); - this.scriptField.focus(); - } - -}); - -Ext.debug.LogPanel = Ext.extend(Ext.Panel, { - autoScroll: true, - region: 'center', - border: false, - style:'border-width:0 1px 0 0', - - log : function(){ - var markup = [ '
    ', - Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '
    ').replace(/\s/g, ' '), - '
    '].join(''); - - this.body.insertHtml('beforeend', markup); - this.body.scrollTo('top', 100000); - }, - - clear : function(){ - this.body.update(''); - this.body.dom.scrollTop = 0; - } -}); - -Ext.debug.DomTree = Ext.extend(Ext.tree.TreePanel, { - enableDD:false , - lines:false, - rootVisible:false, - animate:false, - hlColor:'ffff9c', - autoScroll: true, - region:'center', - border:false, - - initComponent : function(){ - - - Ext.debug.DomTree.superclass.initComponent.call(this); - - var styles = false, hnode; - var nonSpace = /^\s*$/; - var html = Ext.util.Format.htmlEncode; - var ellipsis = Ext.util.Format.ellipsis; - var styleRe = /\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi; - - function findNode(n){ - if(!n || n.nodeType != 1 || n == document.body || n == document){ - return false; - } - var pn = [n], p = n; - while((p = p.parentNode) && p.nodeType == 1 && p.tagName.toUpperCase() != 'HTML'){ - pn.unshift(p); - } - var cn = hnode; - for(var i = 0, len = pn.length; i < len; i++){ - cn.expand(); - cn = cn.findChild('htmlNode', pn[i]); - if(!cn){ return false; - } - } - cn.select(); - var a = cn.ui.anchor; - treeEl.dom.scrollTop = Math.max(0 ,a.offsetTop-10); - cn.highlight(); - return true; - } - - function nodeTitle(n){ - var s = n.tagName; - if(n.id){ - s += '#'+n.id; - }else if(n.className){ - s += '.'+n.className; - } - return s; - } - - function onNodeSelect(t, n, last){ + toggleRowIndex : function(rowIndex, expanded){ + if(!this.canGroup()){ return; - if(last && last.unframe){ - last.unframe(); + } + var row = this.getRow(rowIndex); + if(row){ + this.toggleGroup(this.findGroup(row), expanded); + } + }, + + + toggleGroup : function(group, expanded){ + var gel = Ext.get(group), + id = Ext.util.Format.htmlEncode(gel.id); + + expanded = Ext.isDefined(expanded) ? expanded : gel.hasClass('x-grid-group-collapsed'); + if(this.state[id] !== expanded){ + if (this.cancelEditOnToggle !== false) { + this.grid.stopEditing(true); } - var props = {}; - if(n && n.htmlNode){ - if(frameEl.pressed){ - n.frame(); - } - if(inspecting){ - return; - } - addStyle.enable(); - reload.setDisabled(n.leaf); - var dom = n.htmlNode; - stylePanel.setTitle(nodeTitle(dom)); - if(styles && !showAll.pressed){ - var s = dom.style ? dom.style.cssText : ''; - if(s){ - var m; - while ((m = styleRe.exec(s)) != null){ - props[m[1].toLowerCase()] = m[2]; - } - } - }else if(styles){ - var cl = Ext.debug.cssList; - var s = dom.style, fly = Ext.fly(dom); - if(s){ - for(var i = 0, len = cl.length; i' + ellipsis(html(String(c.nodeValue)), 35) + '
    ', - cls: 'x-tree-noicon' - })); + if(!this.canGroup() || this.isUpdating){ + return Ext.grid.GroupingView.superclass.doRender.apply(this, arguments); + } + + var groupField = this.getGroupField(), + colIndex = this.cm.findColumnIndex(groupField), + g, + gstyle = 'width:' + this.getTotalWidth() + ';', + cfg = this.cm.config[colIndex], + groupRenderer = cfg.groupRenderer || cfg.renderer, + prefix = this.showGroupName ? (cfg.groupName || cfg.header)+': ' : '', + groups = [], + curGroup, i, len, gid; + + for(i = 0, len = rs.length; i < len; i++){ + var rowIndex = startRow + i, + r = rs[i], + gvalue = r.data[groupField]; + + g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds); + if(!curGroup || curGroup.group != g){ + gid = this.constructId(gvalue, groupField, colIndex); + + + this.state[gid] = !(Ext.isDefined(this.state[gid]) ? !this.state[gid] : this.startCollapsed); + curGroup = { + group: g, + gvalue: gvalue, + text: prefix + g, + groupId: gid, + startRow: rowIndex, + rs: [r], + cls: this.state[gid] ? '' : 'x-grid-group-collapsed', + style: gstyle + }; + groups.push(curGroup); + }else{ + curGroup.rs.push(r); + } + r._groupId = gid; + } + + var buf = []; + for(i = 0, len = groups.length; i < len; i++){ + g = groups[i]; + this.doGroupStart(buf, g, cs, ds, colCount); + buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call( + this, cs, g.rs, ds, g.startRow, colCount, stripe); + + this.doGroupEnd(buf, g, cs, ds, colCount); + } + return buf.join(''); + }, + + + getGroupId : function(value){ + var field = this.getGroupField(); + return this.constructId(value, field, this.cm.findColumnIndex(field)); + }, + + + constructId : function(value, field, idx){ + var cfg = this.cm.config[idx], + groupRenderer = cfg.groupRenderer || cfg.renderer, + val = (this.groupMode == 'value') ? value : this.getGroup(value, {data:{}}, groupRenderer, 0, idx, this.ds); + + return this.getPrefix(field) + Ext.util.Format.htmlEncode(val); + }, + + + canGroup : function(){ + return this.enableGrouping && !!this.getGroupField(); + }, + + + getPrefix: function(field){ + return this.grid.getGridEl().id + '-gp-' + field + '-'; + }, + + + doGroupStart : function(buf, g, cs, ds, colCount){ + buf[buf.length] = this.startGroup.apply(g); + }, + + + doGroupEnd : function(buf, g, cs, ds, colCount){ + buf[buf.length] = this.endGroup; + }, + + + getRows : function(){ + if(!this.canGroup()){ + return Ext.grid.GroupingView.superclass.getRows.call(this); + } + var r = [], + gs = this.getGroups(), + g, + i = 0, + len = gs.length, + j, + jlen; + for(; i < len; ++i){ + g = gs[i].childNodes[1]; + if(g){ + g = g.childNodes; + for(j = 0, jlen = g.length; j < jlen; ++j){ + r[r.length] = g[j]; } } - cb(); - }; + } + return r; + }, - - this.root = this.setRootNode(new Ext.tree.TreeNode('Ext')); + + updateGroupWidths : function(){ + if(!this.canGroup() || !this.hasRows()){ + return; + } + var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.getScrollOffset()) +'px'; + var gs = this.getGroups(); + for(var i = 0, len = gs.length; i < len; i++){ + gs[i].firstChild.style.width = tw; + } + }, - hnode = this.root.appendChild(new Ext.debug.HtmlNode( - document.getElementsByTagName('html')[0] - )); + + onColumnWidthUpdated : function(col, w, tw){ + Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this, col, w, tw); + this.updateGroupWidths(); + }, + + onAllColumnWidthsUpdated : function(ws, tw){ + Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this, ws, tw); + this.updateGroupWidths(); + }, + + + onColumnHiddenUpdated : function(col, hidden, tw){ + Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this, col, hidden, tw); + this.updateGroupWidths(); + }, + + + onLayout : function(){ + this.updateGroupWidths(); + }, + + + onBeforeRowSelect : function(sm, rowIndex){ + this.toggleRowIndex(rowIndex, true); } }); - -Ext.debug.HtmlNode = function(){ - var html = Ext.util.Format.htmlEncode; - var ellipsis = Ext.util.Format.ellipsis; - var nonSpace = /^\s*$/; - - var attrs = [ - {n: 'id', v: 'id'}, - {n: 'className', v: 'class'}, - {n: 'name', v: 'name'}, - {n: 'type', v: 'type'}, - {n: 'src', v: 'src'}, - {n: 'href', v: 'href'} - ]; - - function hasChild(n){ - for(var i = 0, c; c = n.childNodes[i]; i++){ - if(c.nodeType == 1){ - return true; - } - } - return false; - } - - function renderNode(n, leaf){ - var tag = n.tagName.toLowerCase(); - var s = '<' + tag; - for(var i = 0, len = attrs.length; i < len; i++){ - var a = attrs[i]; - var v = n[a.n]; - if(v && !nonSpace.test(v)){ - s += ' ' + a.v + '="' + html(v) +'"'; - } - } - var style = n.style ? n.style.cssText : ''; - if(style){ - s += ' style="' + html(style.toLowerCase()) +'"'; - } - if(leaf && n.childNodes.length > 0){ - s+='>' + ellipsis(html(String(n.innerHTML)), 35) + '</'+tag+'>'; - }else if(leaf){ - s += ' />'; - }else{ - s += '>'; - } - return s; - } - - var HtmlNode = function(n){ - var leaf = !hasChild(n); - this.htmlNode = n; - this.tagName = n.tagName.toLowerCase(); - var attr = { - text : renderNode(n, leaf), - leaf : leaf, - cls: 'x-tree-noicon' - }; - HtmlNode.superclass.constructor.call(this, attr); - this.attributes.htmlNode = n; if(!leaf){ - this.on('expand', this.onExpand, this); - this.on('collapse', this.onCollapse, this); - } - }; - - - Ext.extend(HtmlNode, Ext.tree.AsyncTreeNode, { - cls: 'x-tree-noicon', - preventHScroll: true, - refresh : function(highlight){ - var leaf = !hasChild(this.htmlNode); - this.setText(renderNode(this.htmlNode, leaf)); - if(highlight){ - Ext.fly(this.ui.textNode).highlight(); - } - }, - - onExpand : function(){ - if(!this.closeNode && this.parentNode){ - this.closeNode = this.parentNode.insertBefore(new Ext.tree.TreeNode({ - text:'</' + this.tagName + '>', - cls: 'x-tree-noicon' - }), this.nextSibling); - }else if(this.closeNode){ - this.closeNode.ui.show(); - } - }, - - onCollapse : function(){ - if(this.closeNode){ - this.closeNode.ui.hide(); - } - }, - - render : function(bulkRender){ - HtmlNode.superclass.render.call(this, bulkRender); - }, - - highlightNode : function(){ - }, - - highlight : function(){ - }, - - frame : function(){ - this.htmlNode.style.border = '1px solid #0000ff'; - }, - - unframe : function(){ - this.htmlNode.style.border = ''; - } - }); - - return HtmlNode; -}(); - - - +Ext.grid.GroupingView.GROUP_ID = 1000; diff --git a/src/webui/static/extjs/ext-all.js b/src/webui/static/extjs/ext-all.js index 6d86ccb5..5b0034a5 100644 --- a/src/webui/static/extjs/ext-all.js +++ b/src/webui/static/extjs/ext-all.js @@ -1,162 +1,11 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -Ext.DomHelper=function(){var L=null;var F=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var B=/^table|tbody|tr|td$/i;var A=function(T){if(typeof T=="string"){return T}var O="";if(Ext.isArray(T)){for(var R=0,P=T.length;R"}else{O+=">";var U=T.children||T.cn;if(U){O+=A(U)}else{if(T.html){O+=T.html}}O+=""}return O};var M=function(T,O){var S;if(Ext.isArray(T)){S=document.createDocumentFragment();for(var R=0,P=T.length;R",K=""+E,H=C+"",D=""+K;var G=function(N,O,Q,P){if(!L){L=document.createElement("div")}var R;var S=null;if(N=="td"){if(O=="afterbegin"||O=="beforeend"){return }if(O=="beforebegin"){S=Q;Q=Q.parentNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else{if(N=="tr"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(4,H,P,D)}}}else{if(N=="tbody"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(3,C,P,K)}}}else{if(O=="beforebegin"||O=="afterend"){return }if(O=="afterbegin"){S=Q.firstChild}R=I(2,J,P,E)}}}Q.insertBefore(R,S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var R;while((R=O.exec(Q))!=null){P.setStyle(R[1],R[2])}}else{if(typeof Q=="object"){for(var N in Q){P.setStyle(N,Q[N])}}else{if(typeof Q=="function"){Ext.DomHelper.applyStyles(P,Q.call())}}}}},insertHtml:function(P,R,Q){P=P.toLowerCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.toLowerCase(),P,R,Q)){return O}}switch(P){case"beforebegin":R.insertAdjacentHTML("BeforeBegin",Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML("AfterBegin",Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("BeforeEnd",Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd",Q);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""}var N=R.ownerDocument.createRange();var S;switch(P){case"beforebegin":N.setStartBefore(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling;case"afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createContextualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.innerHTML=Q;return R.firstChild}case"beforeend":if(R.lastChild){N.setStartAfter(R.lastChild);S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else{R.innerHTML=Q;return R.lastChild}case"afterend":N.setStartAfter(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""},insertBefore:function(N,P,O){return this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this.doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return this.doInsert(N,P,O,"afterBegin","firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext.getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).insertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.get(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R,null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P);return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){var N=A(O);return new Ext.Template(N)}}}(); -Ext.Template=function(E){var B=arguments;if(Ext.isArray(E)){E=E.join("")}else{if(B.length>1){var C=[];for(var D=0,A=B.length;D+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:"n = byClassName(n, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{1}\");"},{re:/^@([\w-]+)/,select:"return {firstChild:{nodeValue:attrValue(n, \"{1}\")}};"}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},"contains":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},"nodeValue":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},"checked":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},"not":function(c,ss){return Ext.DomQuery.filter(c,ss,true)},"any":function(c,selectors){var ss=selectors.split("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},"odd":function(c){return this["nth-child"](c,"odd")},"even":function(c){return this["nth-child"](c,"even")},"nth":function(c,a){return c[a-1]||[]},"first":function(c){return c[0]||[]},"last":function(c){return c[c.length-1]||[]},"has":function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},"prev":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select; -Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,C,B,F){if(typeof A=="object"){F=A;for(var E in F){if(this.filterOptRe.test(E)){continue}if(typeof F[E]=="function"){this.addListener(E,F[E],F.scope,F)}else{this.addListener(E,F[E].fn,F[E].scope,F[E])}}return }F=(!F||typeof F=="boolean")?{}:F;A=A.toLowerCase();var D=this.events[A]||true;if(typeof D=="boolean"){D=new Ext.util.Event(this,A);this.events[A]=D}D.addListener(C,B,F)},removeListener:function(A,C,B){var D=this.events[A.toLowerCase()];if(typeof D=="object"){D.removeListener(C,B)}},purgeListeners:function(){for(var A in this.events){if(typeof this.events[A]=="object"){this.events[A].clearListeners()}}},relayEvents:function(F,D){var E=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,Array.prototype.slice.call(arguments,0)))}};for(var C=0,A=D.length;C0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(G){if(!this.methodEvents){this.methodEvents={}}var F=this.methodEvents[G];if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before=[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H))!==undefined){if(typeof B==="object"){if(B.returnValue!==undefined){C=B.returnValue}else{C=B}if(B.cancel===true){D=true}}else{if(B===false){D=true}else{C=B}}}};this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(arguments,0);for(var J=0,H=F.before.length;J0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}B.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafari?(A[D]||D):D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return B.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(E,F,D){return E?Ext.fly(this.target).findParent(E,F,D):(D?Ext.get(this.target):this.target)},getRelatedTarget:function(){if(this.browserEvent){return B.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var D=this.browserEvent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120}else{if(D.detail){E=-D.detail/3}}return E},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}(); -(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depthch||tcb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||lcr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},initDD:function(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDProxy:function(group,config,overrides){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDTarget:function(group,config,overrides){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(Ext.isArray(className)){for(var i=0,len=className.length;idw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(xdh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(yvr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="0";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName)){for(var i=0,len=eventName.length;idom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||Ext.isArray(x)){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format("
    "+El.boxMarkup+"
    ",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},getTextWidth:function(text,min,max){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(text,this.dom.innerHTML,true)).width).constrain(min||0,max||1000000)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup="
    ";El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(Ext.isArray(el)){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i0){F()}else{B.afterFx(D)}})};F.call(this)});return this},pause:function(C){var A=this.getFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*1000)});return this},fadeIn:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity()}A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;if(D!==undefined){E.width={to:this.adjustWidth(D)}}if(F!==undefined){E.height={to:this.adjustHeight(F)}}if(B.left!==undefined){E.left={to:B.left}}if(B.top!==undefined){E.top={to:B.top}}if(B.right!==undefined){E.right={to:B.right}}if(B.bottom!==undefined){E.bottom={to:B.bottom}}if(C!==undefined||H!==undefined){E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}}if(G!==undefined){E.opacity={to:G}}if(B.xy!==undefined){E.points={to:B.xy}}arguments.callee.anim=this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)})});return this},ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this.dom.style;var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide()}B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.afterFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){case"t":I.by=[0,-G];break;case"l":I.by=[-E,0];break;case"r":I.by=[E,0];break;case"b":I.by=[0,G];break;case"tl":I.by=[-E,-G];break;case"bl":I.by=[-E,G];break;case"br":I.by=[E,G];break;case"tr":I.by=[E,-G];break}arguments.callee.anim=this.fxanim(D,C,"motion",0.5,"easeOut",J)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=this.fxQueue[0];if(A){A.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return this},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B){this.nextFx()}}else{A.call(this)}}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!(B=Ext.get(D.wrap))){var A;if(D.fixPosition){A=this.getXY()}var E=document.createElement("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static"){B.position("relative")}this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);if(A){B.setXY(A)}}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this.setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle)}if(A.afterCls){this.addClass(A.afterCls)}if(A.remove===true){this.remove()}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.dom,D,(E.duration||F)||0.35,(E.easing||C)||"easeOut",function(){Ext.callback(A,this)},this);E.anim=G;return G}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx); -Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E){return this}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)}var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C"+A.text+"
    "}if(typeof A.scripts!="undefined"){this.loadScripts=A.scripts}if(typeof A.timeout!="undefined"){this.timeout=A.timeout}}this.showLoading();if(!D){this.defaultUrl=B}if(typeof B=="function"){B=B.call(this)}var E=Ext.apply({},{url:B,params:(typeof F=="function"&&C)?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),disableCaching:this.disableCaching,argument:{"options":A,"url":B,"form":null,"callback":G,"scope":C||window,"params":F}},A);this.transaction=Ext.Ajax.request(E)}},formUpdate:function(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function"){A=A.call(this)}C=Ext.getDom(C);this.transaction=Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{"url":A,"form":C,"callback":D,"reset":B}});this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C,D,E,A){if(A){this.update(C||this.defaultUrl,D,E,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset()}catch(B){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]))}else{this.renderer.render(this.el,A,this);this.updateComplete(A)}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options)}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)}},setRenderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer},setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:"
    Loading...
    "};Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManager=Ext.Updater; -(function(){Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=="function"?p():p;Date.parseCodes[character]=p}return p?Ext.applyIf({c:p.c?String.format(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}};var $f=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(month){return Date.monthNames[month].substring(0,3)},getShortDayName:function(day){return Date.dayNames[day].substring(0,3)},getMonthNumber:function(name){return Date.monthNumbers[name.substring(0,1).toUpperCase()+name.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var c="Y-m-dTH:i:sP",code=[],i=0,l=c.length;i 0) {";var regex="";var special=false;var ch="";for(var i=0;i= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){\n"+"v = new Date(y, m, d, h, i, s, ms);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){\n"+"v = new Date(y, m, d, h, i, s);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){\n"+"v = new Date(y, m, d, h, i);\n"+"}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){\n"+"v = new Date(y, m, d, h);\n"+"}else if (y >= 0 && m >= 0 && d > 0){\n"+"v = new Date(y, m, d);\n"+"}else if (y >= 0 && m >= 0){\n"+"v = new Date(y, m);\n"+"}else if (y >= 0){\n"+"v = new Date(y);\n"+"}\n}\nreturn (v && (z || o))?"+" (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :"+" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n"+"}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code)},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i){}return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3}"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i){}return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $f("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return $f("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"z = results[{0}] * 1;\n"+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var calc=[];var arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:"if(results[9] == 'Z'){\no = 0;\n}else{\n"+$f("P",9).c+"\n}"}];for(var i=0,l=arr.length;i0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+(A?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var A=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var B=0;B28){A=Math.min(A,this.getFirstDateOfMonth().add("mo",C).getLastDateOfMonth().getDate())}D.setDate(A);D.setMonth(this.getMonth()+C);break;case Date.YEAR:D.setFullYear(this.getFullYear()+C);break}return D},between:function(C,A){var B=this.getTime();return C.getTime()<=B&&B<=A.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari){Date.brokenSetMonth=Date.prototype.setMonth;Date.prototype.setMonth=function(A){if(A<=-1){var D=Math.ceil(-A);var C=Math.ceil(D/12);var B=(D%12)?12-D%12:0;this.setFullYear(this.getFullYear()-C);return Date.brokenSetMonth.call(this,B)}else{return Date.brokenSetMonth.apply(this,arguments)}}}; -Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=new Date().getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay=function(I,K,J,H){if(G&&I!=F){this.cancel()}F=I;B=new Date().getTime();E=K||E;D=J||D;A=H||A;if(!G){G=setInterval(C,F)}};this.cancel=function(){if(G){clearInterval(G);G=null}}}; -Ext.util.TaskRunner=function(E){E=E||10;var F=[],A=[];var B=0;var G=false;var D=function(){G=false;clearInterval(B);B=0};var H=function(){if(!G){G=true;B=setInterval(I,E)}};var C=function(J){A.push(J);if(J.onStop){J.onStop.apply(J.scope||J)}};var I=function(){if(A.length>0){for(var O=0,K=A.length;O1||Ext.isArray(E)){var B=arguments.length>1?arguments:E;for(var D=0,A=B.length;D=this.length){return this.add(B,C)}this.length++;this.items.splice(A,0,C);if(typeof B!="undefined"&&B!=null){this.map[B]=C}this.keys.splice(A,0,B);this.fireEvent("add",A,C,B);return C},remove:function(A){return this.removeAt(this.indexOf(A))},removeAt:function(A){if(A=0){this.length--;var C=this.items[A];this.items.splice(A,1);var B=this.keys[A];if(typeof B!="undefined"){delete this.map[B]}this.keys.splice(A,1);this.fireEvent("remove",C,B);return C}return false},removeKey:function(A){return this.removeAt(this.indexOfKey(A))},getCount:function(){return this.length},indexOf:function(A){return this.items.indexOf(A)},indexOfKey:function(A){return this.keys.indexOf(A)},item:function(A){var B=typeof this.map[A]!="undefined"?this.map[A]:this.items[A];return typeof B!="function"||this.allowFunctions?B:null},itemAt:function(A){return this.items[A]},key:function(A){return this.map[A]},contains:function(A){return this.indexOf(A)!=-1},containsKey:function(A){return typeof this.map[A]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(I,A,H){var C=String(A).toUpperCase()=="DESC"?-1:1;H=H||function(K,J){return K-J};var G=[],B=this.keys,F=this.items;for(var D=0,E=F.length;D=A;C--){D[D.length]=B[C]}}return D},filter:function(C,B,D,A){if(Ext.isEmpty(B,false)){return this.clone()}B=this.createValueMatcher(B,D,A);return this.filterBy(function(E){return E&&B.test(E[C])})},filterBy:function(F,E){var G=new Ext.util.MixedCollection();G.getKey=this.getKey;var B=this.keys,D=this.items;for(var C=0,A=D.length;C0){for(var C=0;Clen){return value.substr(0,len-3)+"..."}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,"\"").replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1"+","+"$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"")},stripScriptsRe:/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return !v?v:String(v).replace(this.stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),nl2br:function(v){return v===undefined||v===null?"":v.replace(/\n/g,"
    ")}}}(); -Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var P=this.html;P=["",P,""].join("");var O=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var N=/^]*?for="(.*?)"/;var L=/^]*?if="(.*?)"/;var J=/^]*?exec="(.*?)"/;var C,B=0;var G=[];while(C=P.match(O)){var M=C[0].match(N);var K=C[0].match(L);var I=C[0].match(J);var E=null,H=null,D=null;var A=M&&M[1]?M[1]:"";if(K){E=K&&K[1]?K[1]:null;if(E){H=new Function("values","parent","xindex","xcount","with(values){ return "+(Ext.util.Format.htmlDecode(E))+"; }")}}if(I){E=I&&I[1]?I[1]:null;if(E){D=new Function("values","parent","xindex","xcount","with(values){ "+(Ext.util.Format.htmlDecode(E))+"; }")}}if(A){switch(A){case".":A=new Function("values","parent","with(values){ return values; }");break;case"..":A=new Function("values","parent","with(values){ return parent; }");break;default:A=new Function("values","parent","with(values){ return "+A+"; }")}}G.push({id:B,target:A,exec:D,test:H,body:C[1]||""});P=P.replace(C[0],"{xtpl"+B+"}");++B}for(var F=G.length-1;F>=0;--F){this.compileTpl(G[F])}this.master=G[G.length-1];this.tpls=G};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(A,H,G,D,C){var J=this.tpls[A];if(J.test&&!J.test.call(this,H,G,D,C)){return""}if(J.exec&&J.exec.call(this,H,G,D,C)){return""}var I=J.target?J.target.call(this,H,G):H;G=J.target?H:G;if(J.target&&Ext.isArray(I)){var B=[];for(var E=0,F=I.length;E=0;--E){D[H[E].selectorText]=H[E]}}catch(G){}},getRules:function(F){if(D==null||F){D={};var H=C.styleSheets;for(var G=0,E=H.length;G=37&&A<=40){C.stopEvent()}},relay:function(C){var A=C.getKey();var B=this.keyToHandler[A];if(B&&this[B]){if(this.doRelay(C,this[B],B)!==true){C[this.defaultEventAction]()}}},doRelay:function(C,B,A){return B.call(this.scope||this,C)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isSafari3||Ext.isAir){this.el.on("keydown",this.relay,this)}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this)}this.disabled=false}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isSafari3||Ext.isAir){this.el.un("keydown",this.relay)}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}}; -Ext.KeyMap=function(C,B,A){this.el=Ext.get(C);this.eventName=A||"keydown";this.bindings=[];if(B){this.addBinding(B)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(D){if(Ext.isArray(D)){for(var F=0,H=D.length;F=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=E;this.rightConstraint=D;this.minX=this.initPageX-E;this.maxX=this.initPageX+D;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=C;this.bottomConstraint=E;this.minY=this.initPageY-C;this.maxY=this.initPageY+E;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue}F[D].apply(F,C)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(B){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init()}if(!this.ids[B]){this.ids[B]={}}this.ids[B][C.id]=C},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={}}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id]}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id]}}delete this.handleIds[C.id]},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={}}this.handleIds[C][B]=B},isDragDrop:function(B){return(this.getDDById(B))?true:false},getRelated:function(F,C){var E=[];for(var D in F.groups){for(j in this.ids[D]){var B=this.ids[D][j];if(!this.isTypeOfDD(B)){continue}if(!C||B.isTarget){E[E.length]=B}}}return E},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;Dthis.clickPixelThresh||B>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(D);this.dragCurrent.onDrag(D);if(!this.dragCurrent.moveOnly){this.fireEvents(D,false)}}this.stopEvent(D);return true},fireEvents:function(K,L){var N=this.dragCurrent;if(!N||N.isLocked()){return }var O=K.getPoint();var B=[];var E=[];var I=[];var G=[];var D=[];for(var F in this.dragOvers){var C=this.dragOvers[F];if(!this.isTypeOfDD(C)){continue}if(!this.isOverTarget(O,C,this.mode)){E.push(C)}B[F]=true;delete this.dragOvers[F]}for(var M in N.groups){if("string"!=typeof M){continue}for(F in this.ids[M]){var H=this.ids[M][F];if(!this.isTypeOfDD(H)){continue}if(H.isTarget&&!H.isLocked()&&H!=N){if(this.isOverTarget(O,H,this.mode)){if(L){G.push(H)}else{if(!B[H.id]){D.push(H)}else{I.push(H)}this.dragOvers[H.id]=H}}}}}if(this.mode){if(E.length){N.b4DragOut(K,E);N.onDragOut(K,E)}if(D.length){N.onDragEnter(K,D)}if(I.length){N.b4DragOver(K,I);N.onDragOver(K,I)}if(G.length){N.b4DragDrop(K,G);N.onDragDrop(K,G)}}else{var J=0;for(F=0,J=E.length;F2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true}else{C=C.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(C,A,B){if(C){this.init(C,A,B)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);var B=C.dom?C:Ext.fly(C,"_dd");if(!this.deltaSetXY){var H=[E.x,E.y];B.setXY(H);var D=B.getLeft(true);var A=B.getTop(true);this.deltaSetXY=[D-E.x,A-E.y]}else{B.setLeftTop(E.x+this.deltaSetXY[0],E.y+this.deltaSetXY[1])}this.cachePosition(E.x,E.y);this.autoScroll(E.x,E.y,C.offsetHeight,C.offsetWidth);return E},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=Ext.lib.Dom.getViewHeight();var B=Ext.lib.Dom.getViewWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-Dthis.maxX){A=this.maxX}}if(this.constrainY){if(Dthis.maxY){D=this.maxY}}A=this.getTick(A,this.xTicks);D=this.getTick(D,this.yTicks);return{x:A,y:D}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.autoOffset(A.getPageX(),A.getPageY())},b4Drag:function(A){this.setDragElPos(A.getPageX(),A.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this;var A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return }var D=this.getDragEl();if(!D){D=document.createElement("div");D.id=this.dragElId;var C=D.style;C.position="absolute";C.visibility="hidden";C.cursor="move";C.border="2px solid #aaa";C.zIndex=999;A.insertBefore(D,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);Ext.fly(A).show()},_resizeProxy:function(){if(this.resizeFrame){var A=this.getEl();Ext.fly(this.getDragEl()).setSize(A.offsetWidth,A.offsetHeight)}},b4MouseDown:function(B){var A=B.getPageX();var C=B.getPageY();this.autoOffset(A,C);this.setDragElPos(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){Ext.fly(this.getDragEl()).hide()},endDrag:function(C){var B=this.getEl();var A=this.getDragEl();A.style.visibility="";this.beforeMove();B.style.visibility="hidden";Ext.dd.DDM.moveToEl(B,A);A.style.visibility="hidden";B.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}}); -Ext.dd.DragTracker=function(A){Ext.apply(this,A);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}};Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(A){this.el=Ext.get(A);A.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(C,B){if(this.fireEvent("mousedown",this,C)!==false&&this.onBeforeStart(C)!==false){this.startXY=this.lastXY=C.getXY();this.dragTarget=this.delegate?B:this.el.dom;C.preventDefault();var A=Ext.getDoc();A.on("mouseup",this.onMouseUp,this);A.on("mousemove",this.onMouseMove,this);A.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(D,C){D.preventDefault();var B=D.getXY(),A=this.startXY;this.lastXY=B;if(!this.active){if(Math.abs(A[0]-B[0])>this.tolerance||Math.abs(A[1]-B[1])>this.tolerance){this.triggerStart()}else{return }}this.fireEvent("mousemove",this,D);this.onDrag(D);this.fireEvent("drag",this,D)},onMouseUp:function(B){var A=Ext.getDoc();A.un("mousemove",this.onMouseMove,this);A.un("mouseup",this.onMouseUp,this);A.un("selectstart",this.stopSelect,this);B.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,B);this.onEnd(B);this.fireEvent("dragend",this,B)},triggerStart:function(A){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(A){A.stopEvent();return false},onBeforeStart:function(A){},onStart:function(A){},onDrag:function(A){},onEnd:function(A){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(A){return A?this.constrainModes[A].call(this,this.lastXY):this.lastXY},getOffset:function(C){var B=this.getXY(C);var A=this.startXY;return[A[0]-B[0],A[1]-B[1]]},constrainModes:{"point":function(B){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var A=this.dragRegion;A.left=B[0];A.top=B[1];A.right=B[0];A.bottom=B[1];A.constrainTo(this.elRegion);return[A.left,A.top]}}}); -Ext.dd.ScrollManager=function(){var C=Ext.dd.DragDropMgr;var E={};var B=null;var H={};var G=function(K){B=null;A()};var I=function(){if(C.dragCurrent){C.refreshCache(C.dragCurrent.groups)}};var D=function(){if(C.dragCurrent){var K=Ext.dd.ScrollManager;var L=H.el.ddScrollConfig?H.el.ddScrollConfig.increment:K.increment;if(!K.animate){if(H.el.scroll(H.dir,L)){I()}}else{H.el.scroll(H.dir,L,true,K.animDuration,I)}}};var A=function(){if(H.id){clearInterval(H.id)}H.id=0;H.el=null;H.dir=""};var F=function(L,K){A();H.el=L;H.dir=K;var M=(L.ddScrollConfig&&L.ddScrollConfig.frequency)?L.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;H.id=setInterval(D,M)};var J=function(N,P){if(P||!C.dragCurrent){return }var Q=Ext.dd.ScrollManager;if(!B||B!=C.dragCurrent){B=C.dragCurrent;Q.refreshCache()}var R=Ext.lib.Event.getXY(N);var S=new Ext.lib.Point(R[0],R[1]);for(var L in E){var M=E[L],K=M._region;var O=M.ddScrollConfig?M.ddScrollConfig:Q;if(K&&K.contains(S)&&M.isScrollable()){if(K.bottom-S.y<=O.vthresh){if(H.el!=M){F(M,"down")}return }else{if(K.right-S.x<=O.hthresh){if(H.el!=M){F(M,"left")}return }else{if(S.y-K.top<=O.vthresh){if(H.el!=M){F(M,"up")}return }else{if(S.x-K.left<=O.hthresh){if(H.el!=M){F(M,"right")}return }}}}}}A()};C.fireEvents=C.fireEvents.createSequence(J,C);C.stopDrag=C.stopDrag.createSequence(G,C);return{register:function(M){if(Ext.isArray(M)){for(var L=0,K=M.length;L]+>/gi,asText:function(A){return String(A).replace(this.stripTagsRE,"")},asUCText:function(A){return String(A).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(A){return String(A).toUpperCase()},asDate:function(A){if(!A){return 0}if(Ext.isDate(A)){return A.getTime()}return Date.parse(String(A))},asFloat:function(A){var B=parseFloat(String(A).replace(/,/g,""));if(isNaN(B)){B=0}return B},asInt:function(A){var B=parseInt(String(A).replace(/,/g,""));if(isNaN(B)){B=0}return B}}; -Ext.data.Record=function(A,B){this.id=(B||B===0)?B:++Ext.data.Record.AUTO_ID;this.data=A};Ext.data.Record.create=function(E){var C=Ext.extend(Ext.data.Record,{});var D=C.prototype;D.fields=new Ext.util.MixedCollection(false,function(F){return F.name});for(var B=0,A=E.length;BG?1:(H0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(E){var F=false;if(Ext.isArray(E)){F=E}else{if(arguments.length>1){F=arguments}}if(F){for(var D=0,A=F.length;D0){var F=D?function(){E.apply(D,arguments)}:E;C.sort(F);for(var B=0;BG+L.left){H=G-I-this.shadowOffset;E=true}if((F+D)>C+L.top){F=C-D-this.shadowOffset;E=true}if(H=J){F=J-D-5}}K=[H,F];this.storeXY(K);A.setXY.call(this,K);this.sync()}}},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){A.setXY.call(this,this.lastXY)}else{if(this.lastLT){A.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(E,D,G,H,F){if(E){this.showAction()}if(D&&E){var C=function(){this.sync(true);if(H){H()}}.createDelegate(this);A.setVisible.call(this,true,true,G,C,F)}else{if(!E){this.hideUnders(true)}var C=H;if(D){C=function(){this.hideAction();if(H){H()}}.createDelegate(this)}A.setVisible.call(this,E,D,G,C,F);if(E){this.sync(true)}else{if(!D){this.hideAction()}}}},storeXY:function(C){delete this.lastLT;this.lastXY=C},storeLeftTop:function(D,C){delete this.lastXY;this.lastLT=[D,C]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));A.setLeft.apply(this,arguments);this.sync()},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);A.setTop.apply(this,arguments);this.sync()},setLeftTop:function(D,C){this.storeLeftTop(D,C);A.setLeftTop.apply(this,arguments);this.sync()},setXY:function(F,D,G,H,E){this.fixDisplay();this.beforeAction();this.storeXY(F);var C=this.createCB(H);A.setXY.call(this,F,D,G,C,E);if(!D){C()}},createCB:function(D){var C=this;return function(){C.constrainXY();C.sync(true);if(D){D()}}},setX:function(C,D,F,G,E){this.setXY([C,this.getY()],D,F,G,E)},setY:function(G,C,E,F,D){this.setXY([this.getX(),G],C,E,F,D)},setSize:function(E,F,D,H,I,G){this.beforeAction();var C=this.createCB(I);A.setSize.call(this,E,F,D,H,C,G);if(!D){C()}},setWidth:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setWidth.call(this,E,D,G,C,F);if(!D){C()}},setHeight:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setHeight.call(this,E,D,G,C,F);if(!D){C()}},setBounds:function(J,H,K,D,I,F,G,E){this.beforeAction();var C=this.createCB(G);if(!I){this.storeXY([J,H]);A.setXY.call(this,[J,H]);A.setSize.call(this,K,D,I,F,C,E);C()}else{A.setBounds.call(this,J,H,K,D,I,F,C,E)}return this},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow){this.shadow.setZIndex(C+1)}if(this.shim){this.shim.setStyle("z-index",C)}}})})(); -Ext.Shadow=function(C){Ext.apply(this,C);if(typeof this.mode!="string"){this.mode=this.defaultMode}var D=this.offset,B={h:0};var A=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":B.w=0;B.l=B.t=D;B.t-=1;if(Ext.isIE){B.l-=this.offset+A;B.t-=this.offset+A;B.w-=A;B.h-=A;B.t+=1}break;case"sides":B.w=(D*2);B.l=-D;B.t=D-1;if(Ext.isIE){B.l-=(this.offset-A);B.t-=this.offset+A;B.l+=1;B.w-=(this.offset-A)*2;B.w-=A+1;B.h-=1}break;case"frame":B.w=B.h=(D*2);B.l=B.t=-D;B.t+=1;B.h-=2;if(Ext.isIE){B.l-=(this.offset-A);B.t-=(this.offset-A);B.l+=1;B.w-=(this.offset+A+1);B.h-=(this.offset+A);B.h+=1}break}this.adjusts=B};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(A){A=Ext.get(A);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=A.dom){this.el.insertBefore(A)}}this.el.setStyle("z-index",this.zIndex||parseInt(A.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(A.getLeft(true),A.getTop(true),A.getWidth(),A.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(A,M,L,D){if(!this.el){return }var I=this.adjusts,G=this.el.dom,N=G.style;var E=0;N.left=(A+I.l)+"px";N.top=(M+I.t)+"px";var K=(L+I.w),C=(D+I.h),F=K+"px",J=C+"px";if(N.width!=F||N.height!=J){N.width=F;N.height=J;if(!Ext.isIE){var H=G.childNodes;var B=Math.max(0,(K-12))+"px";H[0].childNodes[1].style.width=B;H[1].childNodes[1].style.width=B;H[2].childNodes[1].style.width=B;H[1].style.height=Math.max(0,(C-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(A){this.zIndex=A;if(this.el){this.el.setStyle("z-index",A)}}};Ext.Shadow.Pool=function(){var B=[];var A=Ext.isIE?"
    ":"
    ";return{pull:function(){var C=B.shift();if(!C){C=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,A));C.autoBoxAdjust=false}return C},push:function(C){B.push(C)}}}(); -Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(B,D){if(typeof B=="object"){D=B.height;B=B.width}if(!this.boxReady){this.width=B;this.height=D;return this}if(this.lastSize&&this.lastSize.width==B&&this.lastSize.height==D){return this}this.lastSize={width:B,height:D};var C=this.adjustSize(B,D);var F=C.width,A=C.height;if(F!==undefined||A!==undefined){var E=this.getResizeEl();if(!this.deferHeight&&F!==undefined&&A!==undefined){E.setSize(F,A)}else{if(!this.deferHeight&&A!==undefined){E.setHeight(A)}else{if(F!==undefined){E.setWidth(F)}}}this.onResize(F,A,B,D);this.fireEvent("resize",this,F,A,B,D)}return this},setWidth:function(A){return this.setSize(A)},setHeight:function(A){return this.setSize(undefined,A)},getSize:function(){return this.el.getSize()},getPosition:function(A){if(A===true){return[this.el.getLeft(true),this.el.getTop(true)]}return this.xy||this.el.getXY()},getBox:function(A){var B=this.el.getSize();if(A===true){B.x=this.el.getLeft(true);B.y=this.el.getTop(true)}else{var C=this.xy||this.el.getXY();B.x=C[0];B.y=C[1]}return B},updateBox:function(A){this.setSize(A.width,A.height);this.setPagePosition(A.x,A.y);return this},getResizeEl:function(){return this.resizeEl||this.el},getPositionEl:function(){return this.positionEl||this.el},setPosition:function(A,F){if(A&&typeof A[1]=="number"){F=A[1];A=A[0]}this.x=A;this.y=F;if(!this.boxReady){return this}var B=this.adjustPosition(A,F);var E=B.x,D=B.y;var C=this.getPositionEl();if(E!==undefined||D!==undefined){if(E!==undefined&&D!==undefined){C.setLeftTop(E,D)}else{if(E!==undefined){C.setLeft(E)}else{if(D!==undefined){C.setTop(D)}}}this.onPosition(E,D);this.fireEvent("move",this,E,D)}return this},setPagePosition:function(A,C){if(A&&typeof A[1]=="number"){C=A[1];A=A[0]}this.pageX=A;this.pageY=C;if(!this.boxReady){return }if(A===undefined||C===undefined){return }var B=this.el.translatePoints(A,C);this.setPosition(B.left,B.top);return this},onRender:function(B,A){Ext.BoxComponent.superclass.onRender.call(this,B,A);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.el.getWidth(),this.autoHeight?undefined:this.el.getHeight());return this},onResize:function(D,B,A,C){},onPosition:function(A,B){},adjustSize:function(A,B){if(this.autoWidth){A="auto"}if(this.autoHeight){B="auto"}return{width:A,height:B}},adjustPosition:function(A,B){return{x:A,y:B}}});Ext.reg("box",Ext.BoxComponent); -Ext.SplitBar=function(C,E,B,D,A){this.el=Ext.get(C,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(E,true);this.orientation=B||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!A){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(A).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=D||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=D||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(A,E){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var C=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var D=C-this.activeMinSize;var B=Math.max(this.activeMaxSize-C,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:B,this.placement==Ext.SplitBar.LEFT?B:D);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:B,this.placement==Ext.SplitBar.TOP?B:D)}this.dragSpecs.startSize=C;this.dragSpecs.startPoint=[A,E];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,A,E)},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);var B=Ext.lib.Event.getXY(C);if(this.overlay){this.overlay.remove();delete this.overlay}var A;if(this.orientation==Ext.SplitBar.HORIZONTAL){A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?B[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-B[0])}else{A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?B[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-B[1])}A=Math.min(Math.max(A,this.activeMinSize),this.activeMaxSize);if(A!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,A)!==false){this.adapter.setElementSize(this,A);this.fireEvent("moved",this,A);this.fireEvent("resize",this,A)}}},getAdapter:function(){return this.adapter},setAdapter:function(A){this.adapter=A;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(A){this.minSize=A},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(A){this.maxSize=A},setCurrentSize:function(B){var A=this.animate;this.animate=false;this.adapter.setElementSize(this,B);this.animate=A},destroy:function(A){if(this.shim){this.shim.remove()}this.dd.unreg();Ext.removeNode(this.proxy);if(A){this.el.remove()}}});Ext.SplitBar.createProxy=function(B){var C=new Ext.Element(document.createElement("div"));C.unselectable();var A="x-splitbar-proxy";C.addClass(A+" "+(B==Ext.SplitBar.HORIZONTAL?A+"-h":A+"-v"));document.body.appendChild(C.dom);return C.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(A){},getElementSize:function(A){if(A.orientation==Ext.SplitBar.HORIZONTAL){return A.resizingEl.getWidth()}else{return A.resizingEl.getHeight()}},setElementSize:function(B,A,C){if(B.orientation==Ext.SplitBar.HORIZONTAL){if(!B.animate){B.resizingEl.setWidth(A);if(C){C(B,A)}}else{B.resizingEl.setWidth(A,true,0.1,C,"easeOut")}}else{if(!B.animate){B.resizingEl.setHeight(A);if(C){C(B,A)}}else{B.resizingEl.setHeight(A,true,0.1,C,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(A)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A)},getElementSize:function(A){return this.basic.getElementSize(A)},setElementSize:function(B,A,C){this.basic.setElementSize(B,A,this.moveSplitter.createDelegate(this,[B]))},moveSplitter:function(A){var B=Ext.SplitBar;switch(A.placement){case B.LEFT:A.el.setX(A.resizingEl.getRight());break;case B.RIGHT:A.el.setStyle("right",(this.container.getWidth()-A.resizingEl.getLeft())+"px");break;case B.TOP:A.el.setY(A.resizingEl.getBottom());break;case B.BOTTOM:A.el.setY(A.resizingEl.getTop()-A.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4; -Ext.Container=Ext.extend(Ext.BoxComponent,{autoDestroy:true,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var A=this.items;if(A){delete this.items;if(Ext.isArray(A)){this.add.apply(this,A)}else{this.add(A)}}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(A){if(this.layout&&this.layout!=A){this.layout.setContainer(null)}this.initItems();this.layout=A;A.setContainer(this)},render:function(){Ext.Container.superclass.render.apply(this,arguments);if(this.layout){if(typeof this.layout=="string"){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var A=this.activeItem;delete this.activeItem;this.layout.setActiveItem(A);return }}if(!this.ownerCt){this.doLayout()}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(A){return A.itemId||A.id},add:function(C){if(!this.items){this.initItems()}var B=arguments,A=B.length;if(A>1){for(var D=0;D2){for(var E=A-1;E>=1;--E){this.insert(D,B[E])}return }var F=this.lookupComponent(this.applyDefaults(C));if(F.ownerCt==this&&this.items.indexOf(F)0){B.setSize(A)}}});Ext.Container.LAYOUTS["fit"]=Ext.layout.FitLayout; -Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,renderHidden:true,setActiveItem:function(A){A=this.container.getComponent(A);if(this.activeItem!=A){if(this.activeItem){this.activeItem.hide()}this.activeItem=A;A.show();this.layout()}},renderAll:function(A,B){if(this.deferredRender){this.renderItem(this.activeItem,undefined,B)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,A,B)}}});Ext.Container.LAYOUTS["card"]=Ext.layout.CardLayout; -Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,getAnchorViewSize:function(A,B){return B.dom==document.body?B.getViewSize():B.getStyleSize()},onLayout:function(F,I){Ext.layout.AnchorLayout.superclass.onLayout.call(this,F,I);var O=this.getAnchorViewSize(F,I);var M=O.width,E=O.height;if(M<20||E<20){return }var B,K;if(F.anchorSize){if(typeof F.anchorSize=="number"){B=F.anchorSize}else{B=F.anchorSize.width;K=F.anchorSize.height}}else{B=F.initialConfig.width;K=F.initialConfig.height}var H=F.items.items,G=H.length,D,J,L,C,A;for(D=0;D 
    ");B.disableFormats=true;B.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=B}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{var A=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);A.addClassOnOver("x-tool-expand-"+this.position+"-over");A.on("click",this.onExpandClick,this,{stopEvent:true});if(this.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.collapseClick,this)}}}return this.collapsedEl},onExpandClick:function(A){if(this.isSlid){this.afterSlideIn();this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(A){this.panel.collapse()},beforeCollapse:function(B,A){this.lastAnim=A;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(A){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(A){var B=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,B.getHeight())}else{this.panel.setSize(B.getWidth(),undefined)}B.hide();B.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",100)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",1);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(A){if(this.isSlid){A.stopPropagation();this.slideIn()}else{A.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(A){this.panel=A},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(A){var B=this.getCollapsedEl();B.setLeftTop(A.x,A.y);B.setSize(A.width,A.height)},applyLayout:function(A){if(this.isCollapsed){this.applyLayoutCollapsed(A)}else{this.panel.setPosition(A.x,A.y);this.panel.setSize(A.width,A.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={"mouseout":function(B){if(!B.within(this.el,true)){A.delay(500)}},"mouseover":function(B){A.cancel()},scope:this}}this.el.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return }this.isSlid=true;var A=this.panel.tools;if(A&&A.toggle){A.toggle.hide()}this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,this.collapsedEl.getHeight())}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",102);if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var A=this.panel.tools;if(A&&A.toggle){A.toggle.show()}},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return }this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(A)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(A){if(!A.within(this.el)){this.slideIn()}},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r","north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var B=this.collapsedEl,A=this.cmargins;switch(this.position){case"west":return[-(A.right+B.getWidth()+A.left),0];break;case"east":return[A.right+B.getWidth()+A.left,0];break;case"north":return[0,-(A.top+A.bottom+B.getHeight())];break;case"south":return[0,A.top+A.bottom+B.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(B,A,C){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,B,A,C);this.applyLayout=this.applyFns[C]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;this.panel.setPosition(C.x,C.y);var A=D.offsetWidth;B.left=(C.x+C.width-A)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},east:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetWidth;this.panel.setPosition(C.x+A,C.y);B.left=(C.x)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},north:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y);B.left=(C.x)+"px";B.top=(C.y+C.height-A)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)},south:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y+A);B.left=(C.x)+"px";B.top=(C.y)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)}},render:function(A,C){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,A,C);var D=this.position;this.splitEl=A.createChild({cls:"x-layout-split x-layout-split-"+D,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+D,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var B=this.splitSettings[D];this.split=new Ext.SplitBar(this.splitEl.dom,C.el,B.orientation);this.split.placement=B.placement;this.split.getMaximumSize=this[B.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[B.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[B.maxProp];if(C.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var A=this.panel.getSize();if(this.position=="north"||this.position=="south"){A.height+=this.splitEl.dom.offsetHeight}else{A.width+=this.splitEl.dom.offsetWidth}return A},getHMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getWidth()+A.el.getWidth())-A.getMinWidth())},getVMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getHeight()+A.el.getHeight())-A.getMinHeight())},onSplitMove:function(B,A){var C=this.panel.getSize();this.lastSplitSize=A;if(this.position=="north"||this.position=="south"){this.panel.setSize(C.width,A);this.state.height=A}else{this.panel.setSize(A,C.height);this.state.width=A}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split}});Ext.Container.LAYOUTS["border"]=Ext.layout.BorderLayout; -Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",getAnchorViewSize:function(A,B){return A.body.getStyleSize()},setContainer:function(B){Ext.layout.FormLayout.superclass.setContainer.call(this,B);if(B.labelAlign){B.addClass("x-form-label-"+B.labelAlign)}if(B.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=B.labelSeparator||this.labelSeparator;B.labelWidth=B.labelWidth||100;if(typeof B.labelWidth=="number"){var C=(typeof B.labelPad=="number"?B.labelPad:5);this.labelAdjust=B.labelWidth+C;this.labelStyle="width:"+B.labelWidth+"px;";this.elementStyle="padding-left:"+(B.labelWidth+C)+"px"}if(B.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}if(!this.fieldTpl){var A=new Ext.Template("
    ","","
    ","
    ","
    ");A.disableFormats=true;A.compile();Ext.layout.FormLayout.prototype.fieldTpl=A}},renderItem:function(D,A,C){if(D&&!D.rendered&&D.isFormField&&D.inputType!="hidden"){var B=[D.id,D.fieldLabel,D.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof D.labelSeparator=="undefined"?this.labelSeparator:D.labelSeparator,(D.itemCls||this.container.itemCls||"")+(D.hideLabel?" x-hide-label":""),D.clearCls||"x-form-clear-left"];if(typeof A=="number"){A=C.dom.childNodes[A]||null}if(A){this.fieldTpl.insertBefore(A,B)}else{this.fieldTpl.append(C,B)}D.render("x-form-el-"+D.id)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},adjustWidthAnchor:function(B,A){return B-(A.isFormField?(A.hideLabel?0:this.labelAdjust):0)},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["form"]=Ext.layout.FormLayout; -Ext.layout.Accordion=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A){if(this.animate===false){A.animCollapse=false}A.collapsible=true;if(this.autoWidth){A.autoWidth=true}if(this.titleCollapse){A.titleCollapse=true}if(this.hideCollapseTool){A.hideCollapseTool=true}if(this.collapseFirst!==undefined){A.collapseFirst=this.collapseFirst}if(!this.activeItem&&!A.collapsed){this.activeItem=A}else{if(this.activeItem){A.collapsed=true}}Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");A.on("beforeexpand",this.beforeExpand,this)},beforeExpand:function(C,B){var A=this.activeItem;if(A){if(this.sequence){delete this.activeItem;if(!A.collapsed){A.collapse({callback:function(){C.expand(B||true)},scope:this});return false}}else{A.collapse(this.animate)}}this.activeItem=C;if(this.activeOnTop){C.el.dom.parentNode.insertBefore(C.el.dom,C.el.dom.parentNode.firstChild)}this.layout()},setItemSize:function(F,E){if(this.fill&&F){var B=this.container.items.items;var D=0;for(var C=0,A=B.length;C=B)||(this.cells[C]&&this.cells[C][A])){if(B&&A>=B){C++;A=0}else{A++}}return[A,C]},renderItem:function(C,A,B){if(C&&!C.rendered){C.render(this.getNextCell(C))}},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["table"]=Ext.layout.TableLayout; -Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",isForm:false,setContainer:function(A){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,A);if(A.isXType("form")){this.isForm=true}},onLayout:function(A,B){if(this.isForm){A.body.position()}else{B.position()}Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,A,B)},getAnchorViewSize:function(A,B){return this.isForm?A.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,A,B)},isValidParent:function(B,A){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,B,A)},adjustWidthAnchor:function(B,A){return B?B-A.getPosition(true)[0]:B},adjustHeightAnchor:function(B,A){return B?B-A.getPosition(true)[1]:B}});Ext.Container.LAYOUTS["absolute"]=Ext.layout.AbsoluteLayout; -Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(A,B){this.fireEvent("resize",this,A,B,A,B)}});Ext.reg("viewport",Ext.Viewport); -Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object"){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object"){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.title&&this.header!==false){this.elements+=",header"}}if(this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){var C=this.buttons;this.buttons=[];for(var B=0,A=C.length;B"+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var J=this.tools;this.tools={};this.addTool.apply(this,J)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var D=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:"
    "}},null,true);var L=D.getElementsByTagName("tr")[0];for(var F=0,I=this.buttons.length;F 
    ");F.disableFormats=true;F.compile();Ext.Panel.prototype.toolTemplate=F}for(var E=0,C=arguments,B=C.length;E0){J.sort(C);var I=J[0].manager.zseed;for(var K=0;K=0;--H){if(!D[H].hidden){B(D[H]);return }}B(null)};return{zseed:9000,register:function(H){F[H.id]=H;D.push(H);H.on("hide",A)},unregister:function(H){delete F[H.id];H.un("hide",A);D.remove(H)},get:function(H){return typeof H=="object"?H:F[H]},bringToFront:function(H){H=this.get(H);if(H!=E){H._lastAccess=new Date().getTime();G();return true}return false},sendToBack:function(H){H=this.get(H);H._lastAccess=-(new Date().getTime());G();return H},hideAll:function(){for(var H in F){if(F[H]&&typeof F[H]!="function"&&F[H].isVisible()){F[H].hide()}}},getActive:function(){return E},getBy:function(J,I){var K=[];for(var H=D.length-1;H>=0;--H){var L=D[H];if(J.call(I||L,L)!==false){K.push(L)}}return K},each:function(I,H){for(var J in F){if(F[J]&&typeof F[J]!="function"){if(I.call(H||F[J],F[J])===false){return }}}}}};Ext.WindowMgr=new Ext.WindowGroup(); -Ext.dd.PanelProxy=function(A,B){this.panel=A;this.id=this.panel.id+"-ddproxy";Ext.apply(this,B)};Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(B,C,A){this.hide();if(typeof C=="function"){C.call(A||this)}},moveProxy:function(A,B){if(this.proxy){A.insertBefore(this.proxy.dom,B)}}};Ext.Panel.DD=function(B,A){this.panel=B;this.dragData={panel:B};this.proxy=new Ext.dd.PanelProxy(B,A);Ext.Panel.DD.superclass.constructor.call(this,B.el,A);var C=B.header;if(C){this.setHandleElId(C.id)}(C?C:this.panel.body).setStyle("cursor","move");this.scroll=false};Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(A,B){this.proxy.show()},b4MouseDown:function(B){var A=B.getPageX();var C=B.getPageY();this.autoOffset(A,C)},onInitDrag:function(A,B){this.onStartDrag(A,B);return true},createFrame:Ext.emptyFn,getDragEl:function(A){return this.proxy.ghost.dom},endDrag:function(A){this.proxy.hide();this.panel.saveState()},autoOffset:function(A,B){A-=this.startPageX;B-=this.startPageY;this.setDelta(A,B)}}); -Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(B,A){return typeof this.state[B]=="undefined"?A:this.state[B]},clear:function(A){delete this.state[A];this.fireEvent("statechange",this,A,null)},set:function(A,B){this.state[A]=B;this.fireEvent("statechange",this,A,B)},decodeValue:function(A){var J=/^(a|n|d|b|s|o)\:(.*)$/;var C=J.exec(unescape(A));if(!C||!C[1]){return }var F=C[1];var H=C[2];switch(F){case"n":return parseFloat(H);case"d":return new Date(Date.parse(H));case"b":return(H=="1");case"a":var G=[];var I=H.split("^");for(var B=0,D=I.length;B0){if(!B){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!A){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(A){return this.selected.contains(this.getNode(A))},deselect:function(A){if(this.isSelected(A)){A=this.getNode(A);this.selected.removeElement(A);if(this.last==A.viewIndex){this.last=false}Ext.fly(A).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(D,F,B){if(Ext.isArray(D)){if(!F){this.clearSelections(true)}for(var C=0,A=D.length;C=A&&D[C];C--){B.push(D[C])}}return B},indexOf:function(A){A=this.getNode(A);if(typeof A.viewIndex=="number"){return A.viewIndex}return this.all.indexOf(A)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.el.update("
    "+this.loadingText+"
    ");this.all.clear()}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);this.setStore(null)}});Ext.reg("dataview",Ext.DataView); -Ext.ColorPalette=function(A){Ext.ColorPalette.superclass.constructor.call(this,A);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}};Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(B,A){var C=this.tpl||new Ext.XTemplate(" ");var D=document.createElement("div");D.className=this.itemCls;C.overwrite(D,this.colors);B.dom.insertBefore(D,A);this.el=Ext.get(D);this.el.on(this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.el.on("click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var A=this.value;this.value=null;this.select(A)}},handleClick:function(B,A){B.preventDefault();if(!this.disabled){var C=A.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(C.toUpperCase())}},select:function(A){A=A.replace("#","");if(A!=this.value||this.allowReselect){var B=this.el;if(this.value){B.child("a.color-"+this.value).removeClass("x-color-palette-sel")}B.child("a.color-"+A).addClass("x-color-palette-sel");this.value=A;this.fireEvent("select",this,A)}}});Ext.reg("colorpalette",Ext.ColorPalette); -Ext.DatePicker=Ext.extend(Ext.Component,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",constrainToViewport:true,monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime():new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;B","  ",""];var E=this.dayNames;for(var D=0;D<7;D++){var G=this.startDay+D;if(G>6){G=G-7}C.push("")}C[C.length]="";for(var D=0;D<42;D++){if(D%7==0&&D!=0){C[C.length]=""}C[C.length]=""}C.push("
    ",E[G].substr(0,1),"
    ",this.showToday?"":"","
    ");var B=document.createElement("div");B.className="x-date-picker";B.innerHTML=C.join("");A.dom.insertBefore(B,F);this.el=Ext.get(B);this.eventEl=Ext.get(B.firstChild);new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.eventEl.on("mousewheel",this.handleMouseWheel,this);this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");var I=new Ext.KeyNav(this.eventEl,{"left":function(J){J.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1))},"right":function(J){J.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))},"up":function(J){J.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))},"down":function(J){J.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))},"pageUp":function(J){this.showNextMonth()},"pageDown":function(J){this.showPrevMonth()},"enter":function(J){J.stopPropagation();return true},scope:this});this.eventEl.on("click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.on("click",this.showMonthPicker,this);this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var H=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,H),tooltip:String.format(this.todayTip,H),handler:this.selectToday,scope:this})}if(Ext.isIE){this.el.repaint()}this.update(this.value)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var A=[""];for(var B=0;B<6;B++){A.push("","",B==0?"":"")}A.push("","
    ",this.monthNames[B].substr(0,3),"",this.monthNames[B+6].substr(0,3),"
    ");this.monthPicker.update(A.join(""));this.monthPicker.on("click",this.onMonthClick,this);this.monthPicker.on("dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(C,D,E){E+=1;if((E%2)==0){C.dom.xmonth=5+Math.round(E*0.5)}else{C.dom.xmonth=Math.round((E-1)*0.5)}})}},showMonthPicker:function(){this.createMonthPicker();var A=this.el.getSize();this.monthPicker.setSize(A);this.monthPicker.child("table").setSize(A);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})},updateMPYear:function(E){this.mpyear=E;var C=this.mpYears.elements;for(var B=1;B<=10;B++){var D=C[B-1],A;if((B%2)==0){A=E+Math.round(B*0.5);D.firstChild.innerHTML=A;D.xyear=A}else{A=E-(5-Math.round(B*0.5));D.firstChild.innerHTML=A;D.xyear=A}this.mpYears.item(B-1)[A==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(A){this.mpMonths.each(function(B,C,D){B[B.dom.xmonth==A?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(A){},onMonthClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(C.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(C.is("button.x-date-mp-ok")){var E=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(E.getMonth()!=this.mpSelMonth){E=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(E);this.hideMonthPicker()}else{if(A=C.up("td.x-date-mp-month",2)){this.mpMonths.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelMonth=A.dom.xmonth}else{if(A=C.up("td.x-date-mp-year",2)){this.mpYears.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelYear=A.dom.xyear}else{if(C.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(C.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(A=C.up("td.x-date-mp-month",2)){this.update(new Date(this.mpSelYear,A.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if(A=C.up("td.x-date-mp-year",2)){this.update(new Date(A.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(A){if(this.monthPicker){if(A===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(A){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(A){var B=A.getWheelDelta();if(B>0){this.showPrevMonth();A.stopEvent()}else{if(B<0){this.showNextMonth();A.stopEvent()}}},handleDateClick:function(B,A){B.stopEvent();if(A.dateValue&&!Ext.fly(A.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(A.dateValue));this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(a,U){var A=this.activeDate;this.activeDate=a;if(!U&&A&&this.el){var K=a.getTime();if(A.getMonth()==a.getMonth()&&A.getFullYear()==a.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==K){d.addClass("x-date-selected");setTimeout(function(){try{d.dom.firstChild.focus()}catch(f){}},50);return false}});return }}var G=a.getDaysInMonth();var L=a.getFirstDateOfMonth();var D=L.getDay()-this.startDay;if(D<=this.startDay){D+=7}var V=a.add("mo",-1);var E=V.getDaysInMonth()-D;var C=this.cells.elements;var M=this.textNodes;G+=D;var R=86400000;var X=(new Date(V.getFullYear(),V.getMonth(),E)).clearTime();var W=new Date().clearTime().getTime();var P=a.clearTime().getTime();var O=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var S=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var Z=this.disabledDatesRE;var N=this.disabledDatesText;var c=this.disabledDays?this.disabledDays.join(""):false;var Y=this.disabledDaysText;var T=this.format;if(this.showToday){var I=new Date().clearTime();var B=(IS||(Z&&T&&Z.test(I.dateFormat(T)))||(c&&c.indexOf(I.getDay())!=-1));this.todayBtn.setDisabled(B);this.todayKeyListener[B?"disable":"enable"]()}var H=function(g,d){d.title="";var e=X.getTime();d.firstChild.dateValue=e;if(e==W){d.className+=" x-date-today";d.title=g.todayText}if(e==P){d.className+=" x-date-selected";setTimeout(function(){try{d.firstChild.focus()}catch(h){}},50)}if(eS){d.className=" x-date-disabled";d.title=g.maxText;return }if(c){if(c.indexOf(X.getDay())!=-1){d.title=Y;d.className=" x-date-disabled"}}if(Z&&T){var f=X.dateFormat(T);if(Z.test(f)){d.title=N.replace("%0",f);d.className=" x-date-disabled"}}};var Q=0;for(;Q","","{text}","");D.disableFormats=true;D.compile();Ext.TabPanel.prototype.itemTpl=D}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this);this.on("remove",this.onRemove,this);this.strip.on("mousedown",this.onStripMouseDown,this);this.strip.on("contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll){this.strip.on("mousewheel",this.onWheel,this)}},findTargets:function(C){var B=null;var A=C.getTarget("li",this.strip);if(A){B=this.getComponent(A.id.split(this.idDelimiter)[1]);if(B.disabled){return{close:null,item:null,el:null}}}return{close:C.getTarget(".x-tab-strip-close",this.strip),item:B,el:A}},onStripMouseDown:function(B){if(B.button!=0){return }B.preventDefault();var A=this.findTargets(B);if(A.close){this.remove(A.item);return }if(A.item&&A.item!=this.activeTab){this.setActiveTab(A.item)}},onStripContextMenu:function(B){B.preventDefault();var A=this.findTargets(B);if(A.item){this.fireEvent("contextmenu",this,A.item,B)}},readTabs:function(D){if(D===true){this.items.each(function(G){this.remove(G)},this)}var C=this.el.query(this.autoTabSelector);for(var B=0,A=C.length;B20?C:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(H>(A-C)){E.scrollLeft=A-C}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){var C=this.stripWrap.dom.offsetHeight;var A=this.header.insertFirst({cls:"x-tab-scroller-left"});A.setHeight(C);A.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(A,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=A;var B=this.header.insertFirst({cls:"x-tab-scroller-right"});B.setHeight(C);B.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(B,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=B},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(E,A){if(!E){return }var C=this.getTabEl(E);var G=this.getScrollPos(),D=this.getScrollArea();var F=Ext.fly(C).getOffsetsTo(this.stripWrap)[0]+G;var B=F+C.offsetWidth;if(F(G+D)){this.scrollTo(B-D,A)}}},scrollTo:function(B,A){this.stripWrap.scrollTo("left",B,A?this.getScrollAnim():false);if(!A){this.updateScrollButtons()}},onWheel:function(D){var E=D.getWheelDelta()*this.wheelIncrement*-1;D.stopEvent();var F=this.getScrollPos();var C=F+E;var A=this.getScrollWidth()-this.getScrollArea();var B=Math.max(0,Math.min(A,C));if(B!=F){this.scrollTo(B,false)}},onScrollRight:function(){var A=this.getScrollWidth()-this.getScrollArea();var C=this.getScrollPos();var B=Math.min(A,C+this.getScrollIncrement());if(B!=C){this.scrollTo(B,this.animScroll)}},onScrollLeft:function(){var B=this.getScrollPos();var A=Math.max(0,B-this.getScrollIncrement());if(A!=B){this.scrollTo(A,this.animScroll)}},updateScrollButtons:function(){var A=this.getScrollPos();this.scrollLeft[A==0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[A>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var A=[];return{add:function(B){A.push(B);if(A.length>10){A.shift()}},remove:function(E){var D=[];for(var C=0,B=A.length;C","  ","")}this.template=Ext.Button.buttonTemplate}var B,E=[this.text||" ",this.type];if(A){B=this.template.insertBefore(A,E,true)}else{B=this.template.append(C,E,true)}var D=B.child(this.buttonSelector);D.on("focus",this.onFocus,this);D.on("blur",this.onBlur,this);this.initButtonEl(B,D);if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu")}Ext.ButtonToggleMgr.register(this)},initButtonEl:function(B,C){this.el=B;B.addClass("x-btn");if(this.icon){C.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){C.addClass(this.iconCls);if(!this.cls){B.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}if(this.tabIndex!==undefined){C.dom.tabIndex=this.tabIndex}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:C.id},this.tooltip))}else{C.dom[this.tooltipType]=this.tooltip}}if(this.pressed){this.el.addClass("x-btn-pressed")}if(this.handleMouseEvents){B.on("mouseover",this.onMouseOver,this);B.on("mousedown",this.onMouseDown,this)}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}if(this.id){this.el.dom.id=this.el.id=this.id}if(this.repeat){var A=new Ext.util.ClickRepeater(B,typeof this.repeat=="object"?this.repeat:{});A.on("click",this.onClick,this)}B.on(this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);if(Ext.isIE6){this.autoWidth.defer(1,this)}else{this.autoWidth()}},setIconClass:function(A){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,A)}this.iconCls=A},beforeDestroy:function(){if(this.rendered){var A=this.el.child(this.buttonSelector);if(A){A.removeAllListeners()}}if(this.menu){Ext.destroy(this.menu)}},onDestroy:function(){if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()","","","
     
    ","","","
     
    ");var C,F=[this.text||" ",this.type];if(A){C=B.insertBefore(A,F,true)}else{C=B.append(D,F,true)}var E=C.child(this.buttonSelector);this.initButtonEl(C,E);this.arrowBtnTable=C.child("table:last");if(this.arrowTooltip){C.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip}},autoWidth:function(){if(this.el){var C=this.el.child("table:first");var B=this.el.child("table:last");this.el.setWidth("auto");C.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth){if((C.getWidth()+B.getWidth())"},onRender:function(C,B){this.el=C.createChild(Ext.apply({id:this.id},this.autoCreate),B);this.tr=this.el.child("tr",true)},afterRender:function(){A.superclass.afterRender.call(this);if(this.buttons){this.add.apply(this,this.buttons);delete this.buttons}},add:function(){var C=arguments,B=C.length;for(var D=0;D"){this.addFill()}else{this.addText(E)}}}}else{if(E.tagName){this.addElement(E)}else{if(typeof E=="object"){if(E.xtype){this.addField(Ext.ComponentMgr.create(E,"button"))}else{this.addButton(E)}}}}}}}},addSeparator:function(){return this.addItem(new A.Separator())},addSpacer:function(){return this.addItem(new A.Spacer())},addFill:function(){return this.addItem(new A.Fill())},addElement:function(B){return this.addItem(new A.Item(B))},addItem:function(B){var C=this.nextBlock();this.initMenuTracking(B);B.render(C);this.items.add(B);return B},addButton:function(D){if(Ext.isArray(D)){var F=[];for(var E=0,C=D.length;E=1&C<=E.pages){this.field.dom.value=C}}}}}},beforeLoad:function(){if(this.rendered&&this.loading){this.loading.disable()}},doLoad:function(C){var B={},A=this.paramNames;B[A.start]=C;B[A.limit]=this.pageSize;if(this.fireEvent("beforechange",this,B)!==false){this.store.load({params:B})}},changePage:function(A){this.doLoad(((A-1)*this.pageSize).constrain(0,this.store.getTotalCount()))},onClick:function(E){var B=this.store;switch(E){case"first":this.doLoad(0);break;case"prev":this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case"next":this.doLoad(this.cursor+this.pageSize);break;case"last":var D=B.getTotalCount();var A=D%this.pageSize;var C=A?(D-A):D-this.pageSize;this.doLoad(C);break;case"refresh":this.doLoad(this.cursor);break}},unbind:function(A){A=Ext.StoreMgr.lookup(A);A.un("beforeload",this.beforeLoad,this);A.un("load",this.onLoad,this);A.un("loadexception",this.onLoadError,this);this.store=undefined},bind:function(A){A=Ext.StoreMgr.lookup(A);A.on("beforeload",this.beforeLoad,this);A.on("load",this.onLoad,this);A.on("loadexception",this.onLoadError,this);this.store=A}});Ext.reg("paging",Ext.PagingToolbar); -Ext.Resizable=function(D,E){this.el=Ext.get(D);if(E&&E.wrap){E.resizeChild=this.el;this.el=this.el.wrap(typeof E.wrap=="object"?E.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=E.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(E.resizeChild.getPositioning());E.resizeChild.clearPositioning();if(!E.width||!E.height){var F=E.resizeChild.getSize();this.el.setSize(F.width,F.height)}if(E.pinned&&!E.adjustments){E.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,E);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var I=this.el.getStyle("position");if(I!="absolute"&&I!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var M=this.handles.split(/\s*?[,;]\s*?| /);var C=Ext.Resizable.positions;for(var H=0,J=M.length;H0){if(A>(E/2)){D=C+(E-A)}else{D=C-A}}return Math.max(B,D)},resizeElement:function(){var A=this.proxy.getBox();if(this.updateBox){this.el.setBox(A,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(A.width,A.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}return A},constrain:function(B,C,A,D){if(B-CD){C=D-B}}return C},onMouseMove:function(S){if(this.enabled){try{if(this.resizeRegion&&!this.resizeRegion.contains(S.getPoint())){return }var Q=this.curSize||this.startBox;var I=this.startBox.x,H=this.startBox.y;var C=I,B=H;var J=Q.width,R=Q.height;var D=J,L=R;var K=this.minWidth,T=this.minHeight;var P=this.maxWidth,W=this.maxHeight;var F=this.widthIncrement;var A=this.heightIncrement;var U=S.getXY();var O=-(this.startPoint[0]-Math.max(this.minX,U[0]));var M=-(this.startPoint[1]-Math.max(this.minY,U[1]));var G=this.activeHandle.position;switch(G){case"east":J+=O;J=Math.min(Math.max(K,J),P);break;case"south":R+=M;R=Math.min(Math.max(T,R),W);break;case"southeast":J+=O;R+=M;J=Math.min(Math.max(K,J),P);R=Math.min(Math.max(T,R),W);break;case"north":M=this.constrain(R,M,T,W);H+=M;R-=M;break;case"west":O=this.constrain(J,O,K,P);I+=O;J-=O;break;case"northeast":J+=O;J=Math.min(Math.max(K,J),P);M=this.constrain(R,M,T,W);H+=M;R-=M;break;case"northwest":O=this.constrain(J,O,K,P);M=this.constrain(R,M,T,W);H+=M;R-=M;I+=O;J-=O;break;case"southwest":O=this.constrain(J,O,K,P);R+=M;R=Math.min(Math.max(T,R),W);I+=O;J-=O;break}var N=this.snap(J,F,K);var V=this.snap(R,A,T);if(N!=J||V!=R){switch(G){case"northeast":H-=V-R;break;case"north":H-=V-R;break;case"southwest":I-=N-J;break;case"west":I-=N-J;break;case"northwest":I-=N-J;H-=V-R;break}J=N;R=V}if(this.preserveRatio){switch(G){case"southeast":case"east":R=L*(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);break;case"south":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case"northeast":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case"north":var X=J;J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);I+=(X-J)/2;break;case"southwest":R=L*(J/D);R=Math.min(Math.max(T,R),W);var X=J;J=D*(R/L);I+=X-J;break;case"west":var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);H+=(E-R)/2;var X=J;J=D*(R/L);I+=X-J;break;case"northwest":var X=J;var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);H+=E-R;I+=X-J;break}}this.proxy.setBounds(I,H,J,R);if(this.dynamic){this.resizeElement()}}catch(S){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(C){this.proxy.remove();if(this.overlay){this.overlay.removeAllListeners();this.overlay.remove()}var D=Ext.Resizable.positions;for(var A in D){if(typeof D[A]!="function"&&this[D[A]]){var B=this[D[A]];B.el.removeAllListeners();B.el.remove()}}if(C){this.el.update("");this.el.remove()}},syncHandleHeight:function(){var A=this.el.getHeight(true);if(this.west){this.west.el.setHeight(A)}if(this.east){this.east.el.setHeight(A)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=function(C,E,B,D){if(!this.tpl){var A=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});A.compile();Ext.Resizable.Handle.prototype.tpl=A}this.position=E;this.rz=C;this.el=this.tpl.append(C.el.dom,[this.position],true);this.el.unselectable();if(D){this.el.setOpacity(0)}this.el.on("mousedown",this.onMouseDown,this);if(!B){this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this)}};Ext.Resizable.Handle.prototype={afterResize:function(A){},onMouseDown:function(A){this.rz.onMouseDown(this,A)},onMouseOver:function(A){this.rz.handleOver(this,A)},onMouseOut:function(A){this.rz.handleOut(this,A)}}; -Ext.Editor=function(B,A){this.field=B;Ext.Editor.superclass.constructor.call(this,A)};Ext.extend(Ext.Editor,Ext.Component,{value:"",alignment:"c-c?",shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:false,cancelOnEsc:false,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(B,A){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:B,shim:this.shim,shadowOffset:4,id:this.id,constrain:this.constrain});this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.field.render(this.el);if(Ext.isGecko){this.field.el.dom.setAttribute("autocomplete","off")}this.field.on("specialkey",this.onSpecialKey,this);if(this.swallowKeys){this.field.el.swallowEvent(["keydown","keypress"])}this.field.show();this.field.on("blur",this.onBlur,this);if(this.field.grow){this.field.on("autosize",this.el.sync,this.el,{delay:1})}},onSpecialKey:function(C,B){var A=B.getKey();if(this.completeOnEnter&&A==B.ENTER){B.stopEvent();this.completeEdit()}else{if(this.cancelOnEsc&&A==B.ESC){this.cancelEdit()}else{this.fireEvent("specialkey",C,B)}}if(this.field.triggerBlur&&(A==B.ENTER||A==B.ESC||A==B.TAB)){this.field.triggerBlur()}},startEdit:function(B,C){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(B);var A=C!==undefined?C:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,A)===false){return }this.startValue=A;this.field.setValue(A);this.doAutoSize();this.el.alignTo(this.boundEl,this.alignment);this.editing=true;this.show()},doAutoSize:function(){if(this.autoSize){var A=this.boundEl.getSize();switch(this.autoSize){case"width":this.setSize(A.width,"");break;case"height":this.setSize("",A.height);break;default:this.setSize(A.width,A.height)}}},setSize:function(A,B){delete this.field.lastSize;this.field.setSize(A,B);if(this.el){if(Ext.isGecko2||Ext.isOpera){this.el.setSize(A,B)}this.el.sync()}},realign:function(){this.el.alignTo(this.boundEl,this.alignment)},completeEdit:function(A){if(!this.editing){return }var B=this.getValue();if(this.revertInvalid!==false&&!this.field.isValid()){B=this.startValue;this.cancelEdit(true)}if(String(B)===String(this.startValue)&&this.ignoreNoChange){this.editing=false;this.hide();return }if(this.fireEvent("beforecomplete",this,B,this.startValue)!==false){this.editing=false;if(this.updateEl&&this.boundEl){this.boundEl.update(B)}if(A!==true){this.hide()}this.fireEvent("complete",this,B,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show();if(Ext.isIE&&!this.fixIEFocus){this.fixIEFocus=true;this.deferredFocus.defer(50,this)}else{this.field.focus()}this.fireEvent("startedit",this.boundEl,this.startValue)},deferredFocus:function(){if(this.editing){this.field.focus()}},cancelEdit:function(A){if(this.editing){var B=this.getValue();this.setValue(this.startValue);if(A!==true){this.hide()}this.fireEvent("canceledit",this,B,this.startValue)}},onBlur:function(){if(this.allowBlur!==true&&this.editing){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return }this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(A){this.field.setValue(A)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){this.field.destroy();this.field=null}});Ext.reg("editor",Ext.Editor); -Ext.MessageBox=function(){var R,B,N,Q;var G,J,P,A,K,M,H,F;var O,S,L,C="";var D=function(U){if(R.isVisible()){R.hide();Ext.callback(B.fn,B.scope||window,[U,S.dom.value],1)}};var T=function(){if(B&&B.cls){R.el.removeClass(B.cls)}K.reset()};var E=function(W,U,V){if(B&&B.closable!==false){R.hide()}if(V){V.stopEvent()}};var I=function(U){var W=0;if(!U){O["ok"].hide();O["cancel"].hide();O["yes"].hide();O["no"].hide();return W}R.footer.dom.style.display="";for(var V in O){if(typeof O[V]!="function"){if(U[V]){O[V].show();O[V].setText(typeof U[V]=="string"?U[V]:Ext.MessageBox.buttonText[V]);W+=O[V].el.getWidth()+15}else{O[V].hide()}}}return W};return{getDialog:function(U){if(!R){R=new Ext.Window({autoCreate:true,title:U,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(B&&B.buttons&&B.buttons.no&&!B.buttons.cancel){D("no")}else{D("cancel")}}});O={};var V=this.buttonText;O["ok"]=R.addButton(V["ok"],D.createCallback("ok"));O["yes"]=R.addButton(V["yes"],D.createCallback("yes"));O["no"]=R.addButton(V["no"],D.createCallback("no"));O["cancel"]=R.addButton(V["cancel"],D.createCallback("cancel"));O["ok"].hideMode=O["yes"].hideMode=O["no"].hideMode=O["cancel"].hideMode="offsets";R.render(document.body);R.getEl().addClass("x-window-dlg");N=R.mask;G=R.body.createChild({html:"

    "});H=Ext.get(G.dom.firstChild);var W=G.dom.childNodes[1];J=Ext.get(W.firstChild);P=Ext.get(W.childNodes[2].firstChild);P.enableDisplayMode();P.addKeyListener([10,13],function(){if(R.isVisible()&&B&&B.buttons){if(B.buttons.ok){D("ok")}else{if(B.buttons.yes){D("yes")}}}});A=Ext.get(W.childNodes[2].childNodes[1]);A.enableDisplayMode();K=new Ext.ProgressBar({renderTo:G});G.createChild({cls:"x-clear"})}return R},updateText:function(X){if(!R.isVisible()&&!B.width){R.setSize(this.maxWidth,100)}J.update(X||" ");var V=C!=""?(H.getWidth()+H.getMargins("lr")):0;var Z=J.getWidth()+J.getMargins("lr");var W=R.getFrameWidth("lr");var Y=R.body.getFrameWidth("lr");if(Ext.isIE&&V>0){V+=3}var U=Math.max(Math.min(B.width||V+Z+W+Y,this.maxWidth),Math.max(B.minWidth||this.minWidth,L||0));if(B.prompt===true){S.setWidth(U-V-W-Y)}if(B.progress===true||B.wait===true){K.setSize(U-V-W-Y)}R.setSize(U,"auto").center();return this},updateProgress:function(V,U,W){K.updateProgress(V,U);if(W){this.updateText(W)}return this},isVisible:function(){return R&&R.isVisible()},hide:function(){if(this.isVisible()){R.hide();T()}return this},show:function(X){if(this.isVisible()){this.hide()}B=X;var Y=this.getDialog(B.title||" ");Y.setTitle(B.title||" ");var U=(B.closable!==false&&B.progress!==true&&B.wait!==true);Y.tools.close.setDisplayed(U);S=P;B.prompt=B.prompt||(B.multiline?true:false);if(B.prompt){if(B.multiline){P.hide();A.show();A.setHeight(typeof B.multiline=="number"?B.multiline:this.defaultTextHeight);S=A}else{P.show();A.hide()}}else{P.hide();A.hide()}S.dom.value=B.value||"";if(B.prompt){Y.focusEl=S}else{var W=B.buttons;var V=null;if(W&&W.ok){V=O["ok"]}else{if(W&&W.yes){V=O["yes"]}}if(V){Y.focusEl=V}}if(B.iconCls){Y.setIconClass(B.iconCls)}this.setIcon(B.icon);L=I(B.buttons);K.setVisible(B.progress===true||B.wait===true);this.updateProgress(0,B.progressText);this.updateText(B.msg);if(B.cls){Y.el.addClass(B.cls)}Y.proxyDrag=B.proxyDrag===true;Y.modal=B.modal!==false;Y.mask=B.modal!==false?N:false;if(!Y.isVisible()){document.body.appendChild(R.el.dom);Y.setAnimateTarget(B.animEl);Y.show(B.animEl)}Y.on("show",function(){if(U===true){Y.keyMap.enable()}else{Y.keyMap.disable()}},this,{single:true});if(B.wait===true){K.wait(B.waitConfig)}return this},setIcon:function(U){if(U&&U!=""){H.removeClass("x-hidden");H.replaceClass(C,U);C=U}else{H.replaceClass(C,"x-hidden");C=""}return this},progress:function(W,V,U){this.show({title:W,msg:V,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:U});return this},wait:function(W,V,U){this.show({title:V,msg:W,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:U});return this},alert:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.OK,fn:V,scope:U});return this},confirm:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.YESNO,fn:V,scope:U,icon:this.QUESTION});return this},prompt:function(Z,Y,W,V,U,X){this.show({title:Z,msg:Y,buttons:this.OKCANCEL,fn:W,minWidth:250,scope:V,prompt:true,multiline:U,value:X});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox; -Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this.hide,scope:this})}},showAt:function(A){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){A=this.el.adjustForConstraints(A)}this.setPagePosition(A[0],A[1])},doAutoWidth:function(){var A=this.body.getTextWidth();if(this.title){A=Math.max(A,this.header.child("span").getTextWidth(this.title))}A+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr");this.setWidth(A.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(A,B){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(A,B||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.Tip.DD=function(B,A){Ext.apply(this,A);this.tip=B;Ext.Tip.DD.superclass.constructor.call(this,B.el.id,"WindowDD-"+B.id);this.setHandleElId(B.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(A){this.tip.el.enableShadow(true)}}); -Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,mouseOffset:[15,18],trackMouse:false,constrainPosition:true,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget()},initTarget:function(){if(this.target){this.target=Ext.get(this.target);this.target.on("mouseover",this.onTargetOver,this);this.target.on("mouseout",this.onTargetOut,this);this.target.on("mousemove",this.onMouseMove,this)}},onMouseMove:function(A){this.targetXY=A.getXY();if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}},getTargetXY:function(){return[this.targetXY[0]+this.mouseOffset[0],this.targetXY[1]+this.mouseOffset[1]]},onTargetOver:function(A){if(this.disabled||A.within(this.target.dom,true)){return }this.clearTimer("hide");this.targetXY=A.getXY();this.delayShow()},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=C){D=C-B-5}return{x:A,y:D}},onDestroy:function(){Ext.ToolTip.superclass.onDestroy.call(this);if(this.target){this.target.un("mouseover",this.onTargetOver,this);this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this)}}}); -Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(D){var F=Ext.isArray(D)?D:arguments;for(var E=0,A=F.length;E0){var D=function(H,G){if(H&&G){var I=G.findChild(A,B);if(I){I.select();if(F){F(true,I)}}else{if(F){F(false,I)}}}else{if(F){F(false,I)}}};this.expandPath(C.join(this.pathSeparator),A,D)}else{this.root.select();if(F){F(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(B,A){Ext.tree.TreePanel.superclass.onRender.call(this,B,A);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}},onDestroy:function(){if(this.rendered){this.body.removeAllListeners();Ext.dd.ScrollManager.unregister(this.body);if(this.dropZone){this.dropZone.unreg()}if(this.dragZone){this.dragZone.unreg()}}this.root.destroy();this.nodeHash=null;Ext.tree.TreePanel.superclass.onDestroy.call(this)}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel); -Ext.tree.TreeEventModel=function(A){this.tree=A;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var A=this.tree.getTreeEl();A.on("click",this.delegateClick,this);if(this.tree.trackMouseOver!==false){A.on("mouseover",this.delegateOver,this);A.on("mouseout",this.delegateOut,this)}A.on("dblclick",this.delegateDblClick,this);A.on("contextmenu",this.delegateContextMenu,this)},getNode:function(B){var A;if(A=B.getTarget(".x-tree-node-el",10)){var C=Ext.fly(A,"_treeEvents").getAttributeNS("ext","tree-node-id");if(C){return this.tree.getNodeById(C)}}return null},getNodeTarget:function(B){var A=B.getTarget(".x-tree-node-icon",1);if(!A){A=B.getTarget(".x-tree-node-el",6)}return A},delegateOut:function(B,A){if(!this.beforeEvent(B)){return }if(B.getTarget(".x-tree-ec-icon",1)){var C=this.getNode(B);this.onIconOut(B,C);if(C==this.lastEcOver){delete this.lastEcOver}}if((A=this.getNodeTarget(B))&&!B.within(A,true)){this.onNodeOut(B,this.getNode(B))}},delegateOver:function(B,A){if(!this.beforeEvent(B)){return }if(this.lastEcOver){this.onIconOut(B,this.lastEcOver);delete this.lastEcOver}if(B.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(B);this.onIconOver(B,this.lastEcOver)}if(A=this.getNodeTarget(B)){this.onNodeOver(B,this.getNode(B))}},delegateClick:function(B,A){if(!this.beforeEvent(B)){return }if(B.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(B,this.getNode(B))}else{if(B.getTarget(".x-tree-ec-icon",1)){this.onIconClick(B,this.getNode(B))}else{if(this.getNodeTarget(B)){this.onNodeClick(B,this.getNode(B))}}}},delegateDblClick:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B)){this.onNodeDblClick(B,this.getNode(B))}},delegateContextMenu:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B)){this.onNodeContextMenu(B,this.getNode(B))}},onNodeClick:function(B,A){A.ui.onClick(B)},onNodeOver:function(B,A){A.ui.onOver(B)},onNodeOut:function(B,A){A.ui.onOut(B)},onIconOver:function(B,A){A.ui.addClass("x-tree-ec-over")},onIconOut:function(B,A){A.ui.removeClass("x-tree-ec-over")},onIconClick:function(B,A){A.ui.ecClick(B)},onCheckboxClick:function(B,A){A.ui.onCheckChange(B)},onNodeDblClick:function(B,A){A.ui.onDblClick(B)},onNodeContextMenu:function(B,A){A.ui.onContextMenu(B)},beforeEvent:function(A){if(this.disabled){A.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}}; -Ext.tree.DefaultSelectionModel=function(A){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,A);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A)},select:function(B){var A=this.selNode;if(A!=B&&this.fireEvent("beforeselect",this,B,A)!==false){if(A){A.ui.onSelectedChange(false)}this.selNode=B;B.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,B,A)}return B},unselect:function(A){if(this.selNode==A){this.clearSelections()}},clearSelections:function(){var A=this.selNode;if(A){A.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return A},getSelectedNode:function(){return this.selNode},isSelected:function(A){return this.selNode==A},selectPrevious:function(){var A=this.selNode||this.lastSelNode;if(!A){return null}var C=A.previousSibling;if(C){if(!C.isExpanded()||C.childNodes.length<1){return this.select(C)}else{var B=C.lastChild;while(B&&B.isExpanded()&&B.childNodes.length>0){B=B.lastChild}return this.select(B)}}else{if(A.parentNode&&(this.tree.rootVisible||!A.parentNode.isRoot)){return this.select(A.parentNode)}}return null},selectNext:function(){var B=this.selNode||this.lastSelNode;if(!B){return null}if(B.firstChild&&B.isExpanded()){return this.select(B.firstChild)}else{if(B.nextSibling){return this.select(B.nextSibling)}else{if(B.parentNode){var A=null;B.parentNode.bubble(function(){if(this.nextSibling){A=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return A}}}return null},onKeyDown:function(C){var B=this.selNode||this.lastSelNode;var D=this;if(!B){return }var A=C.getKey();switch(A){case C.DOWN:C.stopEvent();this.selectNext();break;case C.UP:C.stopEvent();this.selectPrevious();break;case C.RIGHT:C.preventDefault();if(B.hasChildNodes()){if(!B.isExpanded()){B.expand()}else{if(B.firstChild){this.select(B.firstChild,C)}}}break;case C.LEFT:C.preventDefault();if(B.hasChildNodes()&&B.isExpanded()){B.collapse()}else{if(B.parentNode&&(this.tree.rootVisible||B.parentNode!=this.tree.getRootNode())){this.select(B.parentNode,C)}}break}}});Ext.tree.MultiSelectionModel=function(A){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,A);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A,B,B.ctrlKey)},select:function(A,C,B){if(B!==true){this.clearSelections(true)}if(this.isSelected(A)){this.lastSelNode=A;return A}this.selNodes.push(A);this.selMap[A.id]=A;this.lastSelNode=A;A.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return A},unselect:function(B){if(this.selMap[B.id]){B.ui.onSelectedChange(false);var C=this.selNodes;var A=C.indexOf(B);if(A!=-1){this.selNodes.splice(A,1)}delete this.selMap[B.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(B){var D=this.selNodes;if(D.length>0){for(var C=0,A=D.length;C
    ","",this.indentMarkup,"","","",E?("":"/>")):"","",D.text,"
    ","
      ",""].join("");var A;if(J!==true&&D.nextSibling&&(A=D.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",A,C)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",H,C)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var G=this.elNode.childNodes;this.indentNode=G[0];this.ecNode=G[1];this.iconNode=G[2];var F=3;if(E){this.checkbox=G[3];this.checkbox.defaultChecked=this.checkbox.checked;F++}this.anchor=G[F];this.textNode=G[F].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var E=this.node,D,C;var A=E.isLast()?"x-tree-elbow-end":"x-tree-elbow";if(E.isExpandable()){if(E.expanded){A+="-minus";D="x-tree-node-collapsed";C="x-tree-node-expanded"}else{A+="-plus";D="x-tree-node-expanded";C="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=D||this.c2!=C){Ext.fly(this.elNode).replaceClass(D,C);this.c1=D;this.c2=C}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var B="x-tree-ec-icon "+A;if(this.ecc!=B){this.ecNode.className=B;this.ecc=B}}},getChildIndent:function(){if(!this.childIndent){var A=[];var B=this.node;while(B){if(!B.isRoot||(B.isRoot&&B.ownerTree.rootVisible)){if(!B.isLast()){A.unshift("")}else{A.unshift("")}}B=B.parentNode}this.childIndent=A.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var A="";var B=this.node.parentNode;if(B){A=B.ui.getChildIndent()}if(this.indentMarkup!=A){this.indentNode.innerHTML=A;this.indentMarkup=A}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}delete this.elNode;delete this.ctNode;delete this.indentNode;delete this.ecNode;delete this.iconNode;delete this.checkbox;delete this.anchor;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var A=this.node.ownerTree.innerCt.dom;this.node.expanded=true;A.innerHTML="
      ";this.wrap=this.ctNode=A.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn}); -Ext.tree.TreeLoader=function(A){this.baseParams={};Ext.apply(this,A);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(A,B){if(this.clearOnLoad){while(A.firstChild){A.removeChild(A.firstChild)}}if(this.doPreload(A)){if(typeof B=="function"){B()}}else{if(this.dataUrl||this.url){this.requestData(A,B)}}},doPreload:function(D){if(D.attributes.children){if(D.childNodes.length<1){var C=D.attributes.children;D.beginUpdate();for(var B=0,A=C.length;BK){return E?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(A){A.sort(this.sortFn)},compareNodes:function(B,A){return(B.text.toUpperCase()>A.text.toUpperCase()?1:-1)},updateSort:function(A,B){if(B.childrenRendered){this.doSort.defer(1,this,[B])}},updateSortParent:function(A){var B=A.parentNode;if(B&&B.childrenRendered){this.doSort.defer(1,this,[B])}}}; -if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(A,B){this.allowParentInsert=false;this.allowContainerDrop=false;this.appendOnly=false;Ext.tree.TreeDropZone.superclass.constructor.call(this,A.innerCt,B);this.tree=A;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(A){if(A.hasChildNodes()&&!A.isExpanded()){A.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(A){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[A])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(A,I,G,D,C){if(!A||!C){return false}var E=A.node;var F=C.node;if(!(E&&E.isTarget&&I)){return false}if(I=="append"&&E.allowChildren===false){return false}if((I=="above"||I=="below")&&(E.parentNode&&E.parentNode.allowChildren===false)){return false}if(F&&(E==F||F.contains(E))){return false}var B=this.dragOverData;B.tree=this.tree;B.target=E;B.data=C;B.point=I;B.source=G;B.rawEvent=D;B.dropNode=F;B.cancel=false;var H=this.tree.fireEvent("nodedragover",B);return B.cancel===false&&H!==false},getDropPoint:function(E,D,I){var J=D.node;if(J.isRoot){return J.allowChildren!==false?"append":false}var B=D.ddel;var K=Ext.lib.Dom.getY(B),G=K+B.offsetHeight;var F=Ext.lib.Event.getPageY(E);var H=J.allowChildren===false||J.isLeaf();if(this.appendOnly||J.parentNode.allowChildren===false){return H?false:"append"}var C=false;if(!this.allowParentInsert){C=J.hasChildNodes()&&J.isExpanded()}var A=(G-K)/(H?2:3);if(F>=K&&F<(K+A)){return"above"}else{if(!C&&(H||F>=G-A&&F<=G)){return"below"}else{return"append"}}},onNodeEnter:function(D,A,C,B){this.cancelExpand()},onNodeOver:function(B,G,F,E){var I=this.getDropPoint(F,B,G);var C=B.node;if(!this.expandProcId&&I=="append"&&C.hasChildNodes()&&!B.node.isExpanded()){this.queueExpand(C)}else{if(I!="append"){this.cancelExpand()}}var D=this.dropNotAllowed;if(this.isValidDropPoint(B,I,G,F,E)){if(I){var A=B.ddel;var H;if(I=="above"){D=B.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";H="x-tree-drag-insert-above"}else{if(I=="below"){D=B.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";H="x-tree-drag-insert-below"}else{D="x-tree-drop-ok-append";H="x-tree-drag-append"}}if(this.lastInsertClass!=H){Ext.fly(A).replaceClass(this.lastInsertClass,H);this.lastInsertClass=H}}}return D},onNodeOut:function(D,A,C,B){this.cancelExpand();this.removeDropIndicators(D)},onNodeDrop:function(C,I,E,D){var H=this.getDropPoint(E,C,I);var F=C.node;F.ui.startDrop();if(!this.isValidDropPoint(C,H,I,E,D)){F.ui.endDrop();return false}var G=D.node||(I.getTreeNode?I.getTreeNode(D,F,H,E):null);var B={tree:this.tree,target:F,data:D,point:H,source:I,rawEvent:E,dropNode:G,cancel:!G,dropStatus:false};var A=this.tree.fireEvent("beforenodedrop",B);if(A===false||B.cancel===true||!B.dropNode){F.ui.endDrop();return B.dropStatus}F=B.target;if(H=="append"&&!F.isExpanded()){F.expand(false,null,function(){this.completeDrop(B)}.createDelegate(this))}else{this.completeDrop(B)}return true},completeDrop:function(G){var D=G.dropNode,E=G.point,C=G.target;if(!Ext.isArray(D)){D=[D]}var F;for(var B=0,A=D.length;BD.offsetLeft){E.scrollLeft=D.offsetLeft}var A=Math.min(this.maxWidth,(E.clientWidth>20?E.clientWidth:E.offsetWidth)-Math.max(0,D.offsetLeft-E.scrollLeft)-5);this.setSize(A,"")},triggerEdit:function(A,B){this.completeEdit();if(A.attributes.editable!==false){this.editNode=A;if(this.tree.autoScroll){A.ui.getEl().scrollIntoView(this.tree.body)}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[A.ui.textNode,A.text]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(A,B){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(A)){B.stopEvent();return this.triggerEdit(A)}},onNodeDblClick:function(A,B){clearTimeout(this.autoEditTimer)},updateNode:function(A,B){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(B)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(C,B){var A=B.getKey();if(A==B.ESC){B.stopEvent();this.cancelEdit()}else{if(A==B.ENTER&&!B.hasModifier()){B.stopEvent();this.completeEdit()}}}}); -Ext.menu.Menu=function(A){if(Ext.isArray(A)){A={items:A}}Ext.apply(this,A);this.id=this.id||Ext.id();this.addEvents("beforeshow","beforehide","show","hide","click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);Ext.menu.Menu.superclass.constructor.call(this);var B=this.items;this.items=new Ext.util.MixedCollection();if(B){this.add.apply(this,B)}};Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000})},render:function(){if(this.el){return }var B=this.el=this.createEl();if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}if(this.plain){B.addClass("x-menu-plain")}if(this.cls){B.addClass(this.cls)}this.focusEl=B.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var A=B.createChild({tag:"ul",cls:"x-menu-list"});A.on("click",this.onClick,this);A.on("mouseover",this.onMouseOver,this);A.on("mouseout",this.onMouseOut,this);this.items.each(function(D){var C=document.createElement("li");C.className="x-menu-list-item";A.dom.appendChild(C);D.render(C,this)},this);this.ul=A;this.autoWidth()},autoWidth:function(){var D=this.el,C=this.ul;if(!D){return }var A=this.width;if(A){D.setWidth(A)}else{if(Ext.isIE){D.setWidth(this.minWidth);var B=D.dom.offsetWidth;D.setWidth(C.getWidth()+D.getFrameWidth("lr"))}}},delayAutoWidth:function(){if(this.el){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this)}this.awTask.delay(20)}},findTargetItem:function(B){var A=B.getTarget(".x-menu-list-item",this.ul,true);if(A&&A.menuItemId){return this.items.get(A.menuItemId)}},onClick:function(B){var A;if(A=this.findTargetItem(B)){if(A.menu&&this.ignoreParentClicks){A.expandMenu()}else{A.onClick(B);this.fireEvent("click",this,A,B)}}},setActiveItem:function(A,B){if(A!=this.activeItem){if(this.activeItem){this.activeItem.deactivate()}this.activeItem=A;A.activate(B)}else{if(B){A.expandMenu()}}},tryActivate:function(F,E){var B=this.items;for(var C=F,A=B.length;C>=0&&C0){H()}})}function H(){if(D&&D.length>0){var N=D.clone();N.each(function(O){O.hide()})}}function E(N){D.remove(N);if(D.length<1){Ext.getDoc().un("mousedown",L);A=false}}function J(N){var O=D.last();K=new Date();D.add(N);if(!A){Ext.getDoc().on("mousedown",L);A=true}if(N.parentMenu){N.getEl().setZIndex(parseInt(N.parentMenu.getEl().getStyle("z-index"),10)+3);N.parentMenu.activeChild=N}else{if(O&&O.isVisible()){N.getEl().setZIndex(parseInt(O.getEl().getStyle("z-index"),10)+3)}}}function B(N){if(N.activeChild){N.activeChild.hide()}if(N.autoHideTimer){clearTimeout(N.autoHideTimer);delete N.autoHideTimer}}function G(N){var O=N.parentMenu;if(!O&&!N.allowOtherMenus){H()}else{if(O&&O.activeChild){O.activeChild.hide()}}}function L(N){if(K.getElapsed()>50&&D.length>0&&!N.getTarget(".x-menu")){H()}}function I(O,R){if(R){var Q=C[O.group];for(var P=0,N=Q.length;P{1}",this.icon||Ext.BLANK_IMAGE_URL,this.itemText||this.text,this.iconCls||"");this.el=C;Ext.menu.Item.superclass.onRender.call(this,B,A)},setText:function(A){this.text=A;if(this.rendered){this.el.update(String.format("{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||""));this.parentMenu.autoWidth()}},setIconClass:function(A){var B=this.iconCls;this.iconCls=A;if(this.rendered){this.el.child("img.x-menu-item-icon").replaceClass(B,this.iconCls)}},handleClick:function(A){if(!this.href){A.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(A){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(A){this.expandMenu()}}return true},shouldDeactivate:function(A){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,A)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(A.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(A){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[A])}else{if(this.menu.isVisible()&&A){this.menu.tryActivate(0,1)}}}},deferExpand:function(A){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(A){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}}); -Ext.menu.CheckItem=function(A){Ext.menu.CheckItem.superclass.constructor.call(this,A);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)};Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(A){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(B,A){if(this.checked!=B&&this.fireEvent("beforecheckchange",this,B)!==false){if(this.container){this.container[B?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=B;if(A!==true){this.fireEvent("checkchange",this,B)}}},handleClick:function(A){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}}); -Ext.menu.Adapter=function(B,A){Ext.menu.Adapter.superclass.constructor.call(this,A);this.component=B};Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(B,A){this.component.render(B);this.el=this.component.getEl()},activate:function(){if(this.disabled){return false}this.component.focus();this.fireEvent("activate",this);return true},deactivate:function(){this.fireEvent("deactivate",this)},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this)},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this)}}); -Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);this.picker=this.component;this.addEvents("select");this.picker.on("render",function(B){B.getEl().swallowEvent("click");B.container.addClass("x-menu-date-item")});this.picker.on("select",this.onSelect,this)};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(B,A){this.fireEvent("select",this,A,B);Ext.menu.DateItem.superclass.handleClick.call(this)}}); -Ext.menu.ColorItem=function(A){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(A),A);this.palette=this.component;this.relayEvents(this.palette,["select"]);if(this.selectHandler){this.on("select",this.selectHandler,this.scope)}};Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter); -Ext.menu.DateMenu=function(A){Ext.menu.DateMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.DateItem(A);this.add(B);this.picker=B.picker;this.relayEvents(B,["select"]);this.on("beforeshow",function(){if(this.picker){this.picker.hideMonthPicker(true)}},this)};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu",beforeDestroy:function(){this.picker.destroy()}}); -Ext.menu.ColorMenu=function(A){Ext.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.ColorItem(A);this.add(B);this.palette=B.palette;this.relayEvents(B,["select"])};Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu); -Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,isFormField:true,hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:(this.hiddenName||"")},onRender:function(C,A){Ext.form.Field.superclass.onRender.call(this,C,A);if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=this.name||this.id}if(this.inputType){B.type=this.inputType}this.el=C.createChild(B,A)}var D=this.el.dom.type;if(D){if(D=="password"){D="text"}this.el.addClass("x-form-"+D)}if(this.readOnly){this.el.dom.readOnly=true}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled){return false}return String(this.getValue())!==String(this.originalValue)},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(A){if(A.isSpecialKey()){this.fireEvent("specialkey",this,A)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.el.on(Ext.isIE||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var A=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,A);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(!Ext.isOpera&&this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()}var A=this.getValue();if(String(A)!==String(this.startValue)){this.fireEvent("change",this,A,this.startValue)}this.fireEvent("blur",this)},isValid:function(A){if(this.disabled){return true}var C=this.preventMark;this.preventMark=A===true;var B=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=C;return B},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(A){return A},validateValue:function(A){return true},markInvalid:function(C){if(!this.rendered||this.preventMark){return }this.el.addClass(this.invalidClass);C=C||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=C;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}break;case"title":this.el.dom.title=C;break;case"under":if(!this.errorEl){var B=this.getErrorCt();if(!B){this.el.dom.title=C;break}this.errorEl=B.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(B.getWidth(true)-20)}this.errorEl.update(C);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var B=this.getErrorCt();if(!B){this.el.dom.title=C;break}this.errorIcon=B.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=C;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML=C;A.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,C)},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},clearInvalid:function(){if(!this.rendered||this.preventMark){return }this.el.removeClass(this.invalidClass);switch(this.msgTarget){case"qtip":this.el.dom.qtip="";break;case"title":this.el.dom.title="";break;case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}break;case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML="";A.style.display="none";break}this.fireEvent("valid",this)},getRawValue:function(){var A=this.rendered?this.el.getValue():Ext.value(this.value,"");if(A===this.emptyText){A=""}return A},getValue:function(){if(!this.rendered){return this.value}var A=this.el.getValue();if(A===this.emptyText||A===undefined){A=""}return A},setRawValue:function(A){return this.el.dom.value=(A===null||A===undefined?"":A)},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=(A===null||A===undefined?"":A);this.validate()}},adjustSize:function(A,C){var B=Ext.form.Field.superclass.adjustSize.call(this,A,C);B.width=this.adjustWidth(this.el.dom.tagName,B.width);return B},adjustWidth:function(A,B){A=A.toLowerCase();if(typeof B=="number"&&!Ext.isSafari){if(Ext.isIE&&(A=="input"||A=="textarea")){if(A=="input"&&!Ext.isStrict){return this.inEditor?B:B-3}if(A=="input"&&Ext.isStrict){return B-(Ext.isIE6?4:1)}if(A=="textarea"&&Ext.isStrict){return B-2}}else{if(Ext.isOpera&&Ext.isStrict){if(A=="input"){return B+2}if(A=="textarea"){return B-2}}}}return B}});Ext.form.MessageTargets={"qtip":{mark:function(A){this.el.dom.qtip=msg;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(A){this.el.dom.qtip=""}},"title":{mark:function(A){this.el.dom.title=msg},clear:function(A){this.el.dom.title=""}},"under":{mark:function(B){if(!this.errorEl){var A=this.getErrorCt();if(!A){this.el.dom.title=msg;return }this.errorEl=A.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(A.getWidth(true)-20)}this.errorEl.update(msg);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this)},clear:function(A){if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}else{this.el.dom.title=""}}},"side":{mark:function(B){if(!this.errorIcon){var A=this.getErrorCt();if(!A){this.el.dom.title=msg;return }this.errorIcon=A.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=msg;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this)},clear:function(A){if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}else{this.el.dom.title=""}}},"around":{mark:function(A){},clear:function(A){}}};Ext.form.Field.msgFx={normal:{show:function(A,B){A.setDisplayed("block")},hide:function(A,B){A.setDisplayed(false).update("")}},slide:{show:function(A,B){A.slideIn("t",{stopFx:true})},hide:function(A,B){A.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(A,B){A.fixDisplay();A.alignTo(B.el,"tl-tr");A.slideIn("l",{stopFx:true})},hide:function(A,B){A.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field); -Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);this.el.on("mousedown",function(){if(!this.hasFocus){this.el.on("mouseup",function(A){A.preventDefault()},this,{single:true})}},this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this)}if(this.grow){this.el.on("keyup",this.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this)}if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);this.el.on("keypress",this.onKeyPress,this)}},processValue:function(A){if(this.stripCharsRe){var B=A.replace(this.stripCharsRe,"");if(B!==A){this.setRawValue(B);return B}}return A},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onKeyUpBuffered:function(A){if(!A.isNavKeyPress()){this.autoSize()}},onKeyUp:function(A){this.fireEvent("keyup",this,A)},onKeyDown:function(A){this.fireEvent("keydown",this,A)},onKeyPress:function(A){this.fireEvent("keypress",this,A)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue("")}this.el.removeClass(this.emptyClass)}if(this.selectOnFocus){this.el.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(B){if(B.ctrlKey){return }var A=B.getKey();if(Ext.isGecko&&(B.isNavKeyPress()||A==B.BACKSPACE||(A==B.DELETE&&B.button==-1))){return }var D=B.getCharCode(),C=String.fromCharCode(D);if(!Ext.isGecko&&B.isSpecialKey()&&!C){return }if(!this.maskRe.test(C)){B.stopEvent()}},setValue:function(A){if(this.emptyText&&this.el&&A!==undefined&&A!==null&&A!==""){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(A){if(A.length<1||A===this.emptyText){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(A.lengththis.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var C=Ext.form.VTypes;if(!C[this.vtype](A,this)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var B=this.validator(A);if(B!==true){this.markInvalid(B);return false}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);return false}return true},selectText:function(E,A){var C=this.getRawValue();if(C.length>0){E=E===undefined?0:E;A=A===undefined?C.length:A;var D=this.el.dom;if(D.setSelectionRange){D.setSelectionRange(E,A)}else{if(D.createTextRange){var B=D.createTextRange();B.moveStart("character",E);B.moveEnd("character",A-C.length);B.select()}}}},autoSize:function(){if(!this.grow||!this.rendered){return }if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var C=this.el;var B=C.dom.value;var D=document.createElement("div");D.appendChild(document.createTextNode(B));B=D.innerHTML;D=null;B+=" ";var A=Math.min(this.growMax,Math.max(this.metrics.getWidth(B)+10,this.growMin));this.el.setWidth(A);this.fireEvent("autosize",this,A)}});Ext.reg("textfield",Ext.form.TextField); -Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,onResize:function(A,B){Ext.form.TriggerField.superclass.onResize.call(this,A,B);if(typeof A=="number"){this.el.setWidth(this.adjustWidth("input",A-this.trigger.getWidth()))}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger){this.trigger.setDisplayed(false)}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);var A;if(Ext.isIE&&this.el.getY()!=(A=this.trigger.getY())){this.el.position();this.el.setY(A)}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove()}if(this.wrap){this.wrap.remove()}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.el.on("keydown",this.checkTab,this)}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur()}},onBlur:function(){},mimicBlur:function(A){if(!this.wrap.contains(A.target)&&this.validateBlur(A)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);if(this.monitorTab){this.el.un("keydown",this.checkTab,this)}this.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},beforeBlur:Ext.emptyFn,validateBlur:function(A){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass(this.disabledClass);this.el.removeClass(this.disabledClass)}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass(this.disabledClass)}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(A){return this.triggers[A]},initTrigger:function(){var A=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var B=this;A.each(function(D,F,C){D.hide=function(){var G=B.wrap.getWidth();this.dom.style.display="none";B.el.setWidth(G-B.trigger.getWidth())};D.show=function(){var G=B.wrap.getWidth();this.dom.style.display="";B.el.setWidth(G-B.trigger.getWidth())};var E="Trigger"+(C+1);if(this["hide"+E]){D.dom.style.display="none"}D.on("click",this["on"+E+"Click"],this,{preventDefault:true});D.addClassOnOver("x-form-trigger-over");D.addClassOnClick("x-form-trigger-click")},this);this.triggers=A.elements},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField); -Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:" \n ",growPad:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(B,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,B,A);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl){Ext.removeNode(this.textSizeEl)}Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(A){if(A.isSpecialKey()&&(this.enterIsSpecial||(A.getKey()!=A.ENTER||A.hasModifier()))){this.fireEvent("specialkey",this,A)}},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER){this.autoSize()}Ext.form.TextArea.superclass.onKeyUp.call(this,A)},autoSize:function(){if(!this.grow||!this.textSizeEl){return }var C=this.el;var A=C.dom.value;var D=this.textSizeEl;D.innerHTML="";D.appendChild(document.createTextNode(A));A=D.innerHTML;Ext.fly(D).setWidth(this.el.getWidth());if(A.length<1){A="  "}else{if(Ext.isIE){A=A.replace(/\n/g,"

       

      ")}A+=this.growAppend}D.innerHTML=A;var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin)+this.growPad);if(B!=this.lastHeight){this.lastHeight=B;this.el.setHeight(B);this.fireEvent("autosize",this,B)}}});Ext.reg("textarea",Ext.form.TextArea); -Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var B=this.baseChars+"";if(this.allowDecimals){B+=this.decimalSeparator}if(this.allowNegative){B+="-"}this.stripCharsRe=new RegExp("[^"+B+"]","gi");var A=function(D){var C=D.getKey();if(!Ext.isIE&&(D.isSpecialKey()||C==D.BACKSPACE||C==D.DELETE)){return }var E=D.getCharCode();if(B.indexOf(String.fromCharCode(E))===-1){D.stopEvent()}};this.el.on("keypress",A,this)},validateValue:function(B){if(!Ext.form.NumberField.superclass.validateValue.call(this,B)){return false}if(B.length<1){return true}B=String(B).replace(this.decimalSeparator,".");if(isNaN(B)){this.markInvalid(String.format(this.nanText,B));return false}var A=this.parseValue(B);if(Athis.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(A){A=typeof A=="number"?A:parseFloat(String(A).replace(this.decimalSeparator,"."));A=isNaN(A)?"":String(A).replace(".",this.decimalSeparator);Ext.form.NumberField.superclass.setValue.call(this,A)},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));return isNaN(A)?"":A},fixPrecision:function(B){var A=isNaN(B);if(!this.allowDecimals||this.decimalPrecision==-1||A||!B){return A?"":B}return parseFloat(parseFloat(B).toFixed(this.decimalPrecision))},beforeBlur:function(){var A=this.parseValue(this.getRawValue());if(A){this.setValue(this.fixPrecision(A))}}});Ext.reg("numberfield",Ext.form.NumberField); -Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}this.ddMatch=null;this.initDisabledDays()},initDisabledDays:function(){if(this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;Bthis.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var A=E.getDay();for(var B=0;B
      {"+this.displayField+"}
      "}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+A+"-item"});this.view.on("click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(E,C,D){this.maxHeight=D-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=C;this.innerList.setWidth(C-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},bindStore:function(A,B){if(this.store&&!B){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);if(!A){this.store=null;if(this.view){this.view.setStore(null)}}}if(A){this.store=Ext.StoreMgr.lookup(A);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.view){this.view.setStore(A)}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{"up":function(A){this.inKeyMode=true;this.selectPrev()},"down":function(A){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},"enter":function(A){this.onViewClick();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this)},"esc":function(A){this.collapse()},"tab":function(A){this.onViewClick(false);return true},scope:this,doRelay:function(C,B,A){if(A=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)}return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this)}if(this.forceSelection){this.on("blur",this.doForce,this)}},onDestroy:function(){if(this.view){this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners()}if(this.list){this.list.destroy()}this.bindStore(null);Ext.form.ComboBox.superclass.onDestroy.call(this)},unsetDelayCheck:function(){delete this.delayedCheck},fireKey:function(A){if(A.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){this.fireEvent("specialkey",this,A)}},onResize:function(A,B){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var C=Math.max(A,this.minListWidth);this.list.setWidth(C);this.innerList.setWidth(C-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},setEditable:function(A){if(A==this.editable){return }this.editable=A;if(!A){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit")}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit")}},onBeforeLoad:function(){if(!this.hasFocus){return }this.innerList.update(this.loadingText?"
      "+this.loadingText+"
      ":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return }if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(!this.selectByValue(this.value,true)){this.select(0,true)}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.onEmptyResults()}},onTypeAhead:function(){if(this.store.getCount()>0){var B=this.store.getAt(0);var C=B.data[this.displayField];var A=C.length;var D=this.getRawValue().length;if(D!=A){this.setRawValue(C);this.selectText(D,C.length)}}},onSelect:function(A,B){if(this.fireEvent("beforeselect",this,A,B)!==false){this.setValue(A.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,A,B)}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(A){var C=A;if(this.valueField){var B=this.findRecord(this.valueField,A);if(B){C=B.data[this.displayField]}else{if(this.valueNotFoundText!==undefined){C=this.valueNotFoundText}}}this.lastSelectionText=C;if(this.hiddenField){this.hiddenField.value=A}Ext.form.ComboBox.superclass.setValue.call(this,C);this.value=A},findRecord:function(C,B){var A;if(this.store.getCount()>0){this.store.each(function(D){if(D.data[C]==B){A=D;return false}})}return A},onViewMove:function(B,A){this.inKeyMode=false},onViewOver:function(D,B){if(this.inKeyMode){return }var C=this.view.findItemFromChild(B);if(C){var A=this.view.indexOf(C);this.select(A,false)}},onViewClick:function(B){var A=this.view.getSelectedIndexes()[0];var C=this.store.getAt(A);if(C){this.onSelect(C,A)}if(B!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var B=this.innerList.dom;var E=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight;var C=Math.max(B.clientHeight,B.offsetHeight,B.scrollHeight);var A=this.getPosition()[1]-Ext.getBody().getScroll().top;var F=Ext.lib.Dom.getViewHeight()-A-this.getSize().height;var D=Math.max(A,F,this.minHeight||0)-this.list.shadowOffset-E-5;C=Math.min(C,D,this.maxHeight);this.innerList.setHeight(C);this.list.beginUpdate();this.list.setHeight(C+E);this.list.alignTo(this.wrap,this.listAlign);this.list.endUpdate()},onEmptyResults:function(){this.collapse()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(A,C){if(A!==undefined&&A!==null){var B=this.findRecord(this.valueField||this.displayField,A);if(B){this.select(this.store.indexOf(B),C);return true}}return false},select:function(A,C){this.selectedIndex=A;this.view.select(A);if(C!==false){var B=this.view.getNode(A);if(B){this.innerList.scrollChildIntoView(B,false)}}},selectNext:function(){var A=this.store.getCount();if(A>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(A){if(this.editable!==false&&!A.isSpecialKey()){this.lastKey=A.getKey();this.dqTask.delay(this.queryDelay)}},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;this.applyEmptyText()}},doQuery:function(C,B){if(C===undefined||C===null){C=""}var A={query:C,forceAll:B,combo:this,cancel:false};if(this.fireEvent("beforequery",A)===false||A.cancel){return false}C=A.query;B=A.forceAll;if(B===true||(C.length>=this.minChars)){if(this.lastQuery!==C){this.lastQuery=C;if(this.mode=="local"){this.selectedIndex=-1;if(B){this.store.clearFilter()}else{this.store.filter(this.displayField,C)}this.onLoad()}else{this.store.baseParams[this.queryParam]=C;this.store.load({params:this.getParams(C)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(A){var B={};if(this.pageSize){B.start=0;B.limit=this.pageSize}return B},collapse:function(){if(!this.isExpanded()){return }this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(A){if(!A.within(this.wrap)&&!A.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return }this.list.alignTo(this.wrap,this.listAlign);this.list.show();this.innerList.setOverflow("auto");Ext.getDoc().on("mousewheel",this.collapseIf,this);Ext.getDoc().on("mousedown",this.collapseIf,this);this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled){return }if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox); -Ext.form.Checkbox=Ext.extend(Ext.form.Field,{checkedCls:"x-form-check-checked",focusCls:"x-form-check-focus",overCls:"x-form-check-over",mouseDownCls:"x-form-check-down",tabIndex:0,checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},baseCls:"x-form-check",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.initCheckEvents()},initCheckEvents:function(){this.innerWrap.removeAllListeners();this.innerWrap.addClassOnOver(this.overCls);this.innerWrap.addClassOnClick(this.mouseDownCls);this.innerWrap.on("click",this.onClick,this);this.innerWrap.on("keyup",this.onKeyUp,this)},onRender:function(B,A){Ext.form.Checkbox.superclass.onRender.call(this,B,A);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.el.addClass("x-hidden");this.innerWrap=this.el.wrap({tabIndex:this.tabIndex,cls:this.baseCls+"-wrap-inner"});this.wrap=this.innerWrap.wrap({cls:this.baseCls+"-wrap"});if(this.boxLabel){this.labelEl=this.innerWrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}this.imageEl=this.innerWrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:this.baseCls},this.el);if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}this.originalValue=this.checked},onDestroy:function(){if(this.rendered){Ext.destroy(this.imageEl,this.labelEl,this.innerWrap,this.wrap)}Ext.form.Checkbox.superclass.onDestroy.call(this)},onFocus:function(A){Ext.form.Checkbox.superclass.onFocus.call(this,A);this.el.addClass(this.focusCls)},onBlur:function(A){Ext.form.Checkbox.superclass.onBlur.call(this,A);this.el.removeClass(this.focusCls)},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},onKeyUp:function(A){if(A.getKey()==Ext.EventObject.SPACE){this.onClick(A)}},onClick:function(A){if(!this.disabled&&!this.readOnly){this.toggleValue()}A.stopEvent()},onEnable:function(){Ext.form.Checkbox.superclass.onEnable.call(this);this.initCheckEvents()},onDisable:function(){Ext.form.Checkbox.superclass.onDisable.call(this);this.innerWrap.removeAllListeners()},toggleValue:function(){this.setValue(!this.checked)},getResizeEl:function(){if(!this.resizeEl){this.resizeEl=Ext.isSafari?this.wrap:(this.wrap.up(".x-form-element",5)||this.wrap)}return this.resizeEl},getPositionEl:function(){return this.wrap},getActionEl:function(){return this.wrap},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,initValue:Ext.emptyFn,getValue:function(){if(this.rendered){return this.el.dom.checked}return false},setValue:function(A){var B=this.checked;this.checked=(A===true||A==="true"||A=="1"||String(A).toLowerCase()=="on");if(this.el&&this.el.dom){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}this.wrap[this.checked?"addClass":"removeClass"](this.checkedCls);if(B!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}}});Ext.reg("checkbox",Ext.form.Checkbox); -Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",onRender:function(H,F){if(!this.el){var M={cls:this.groupCls,layout:"column",border:false,renderTo:H};var A={defaultType:this.defaultType,layout:"form",border:false,defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(M,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var E=0,J=this.items.length;E0&&E%O==0){L++}if(this.items[E].fieldLabel){this.items[E].hideLabel=false}K[L].items.push(this.items[E])}}else{for(var E=0,J=this.items.length;E":">"),C,"")}return D.join("")},createToolbar:function(D){var A=Ext.QuickTips&&Ext.QuickTips.isEnabled();function C(G,E,F){return{itemId:G,cls:"x-btn-icon x-edit-"+G,enableToggle:E!==false,scope:D,handler:F||D.relayBtnCmd,clickEvent:"mousedown",tooltip:A?D.buttonTips[G]||undefined:undefined,tabIndex:-1}}var B=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});B.el.on("click",function(E){E.preventDefault()});if(this.enableFont&&!Ext.isSafari2){this.fontSelect=B.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});this.fontSelect.on("change",function(){var E=this.fontSelect.dom.value;this.relayCmd("fontname",E);this.deferFocus()},this);B.add(this.fontSelect.dom,"-")}if(this.enableFormat){B.add(C("bold"),C("italic"),C("underline"))}if(this.enableFontSize){B.add("-",C("increasefontsize",false,this.adjustFont),C("decreasefontsize",false,this.adjustFont))}if(this.enableColors){B.add("-",{itemId:"forecolor",cls:"x-btn-icon x-edit-forecolor",clickEvent:"mousedown",tooltip:A?D.buttonTips["forecolor"]||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,selectHandler:function(F,E){this.execCmd("forecolor",Ext.isSafari||Ext.isIE?"#"+E:E);this.deferFocus()},scope:this,clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon x-edit-backcolor",clickEvent:"mousedown",tooltip:A?D.buttonTips["backcolor"]||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,selectHandler:function(F,E){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",E);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isSafari||Ext.isIE?"#"+E:E);this.deferFocus()}},scope:this,clickEvent:"mousedown"})})}if(this.enableAlignments){B.add("-",C("justifyleft"),C("justifycenter"),C("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){B.add("-",C("createlink",false,this.createLink))}if(this.enableLists){B.add("-",C("insertorderedlist"),C("insertunorderedlist"))}if(this.enableSourceEdit){B.add("-",C("sourceedit",true,function(E){this.toggleSourceEdit(E.pressed)}))}}this.tb=B},getDocMarkup:function(){return""},getEditorBody:function(){return this.doc.body||this.doc.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(B,A){Ext.form.HtmlEditor.superclass.onRender.call(this,B,A);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.tb.items.each(function(E){if(E.itemId!="sourceedit"){E.disable()}});var C=document.createElement("iframe");C.name=Ext.id();C.frameBorder="0";C.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(C);this.iframe=C;this.initFrame();if(this.autoMonitorDesignMode!==false){this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})}if(!this.width){var D=this.el.getSize();this.setSize(D.width,this.height||D.height)}},initFrame:function(){this.doc=this.getDoc();this.win=this.getWin();this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var A={run:function(){if(this.doc.body||this.doc.readyState=="complete"){Ext.TaskMgr.stop(A);this.doc.designMode="on";this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(A)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var A=this.getDoc();if(!A){return }if(!A.editorInitialized||String(A.designMode).toLowerCase()!="on"){this.initFrame()}}},onResize:function(B,C){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof B=="number"){var D=B-this.wrap.getFrameWidth("lr");this.el.setWidth(this.adjustWidth("textarea",D));this.iframe.style.width=D+"px"}if(typeof C=="number"){var A=C-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",A));this.iframe.style.height=A+"px";if(this.doc){this.getEditorBody().style.height=(A-(this.iframePad*2))+"px"}}}},toggleSourceEdit:function(A){if(A===undefined){A=!this.sourceEditMode}this.sourceEditMode=A===true;var C=this.tb.items.get("sourceedit");if(C.pressed!==this.sourceEditMode){C.toggle(this.sourceEditMode);return }if(this.sourceEditMode){this.tb.items.each(function(D){if(D.itemId!="sourceedit"){D.disable()}});this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus()}else{if(this.initialized){this.tb.items.each(function(D){D.enable()})}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus()}var B=this.lastSize;if(B){delete this.lastSize;this.setSize(B)}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var A=prompt(this.createLinkText,this.defaultLinkValue);if(A&&A!="http:/"+"/"){this.relayCmd("createlink",A)}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(A){Ext.form.HtmlEditor.superclass.setValue.call(this,A);this.pushValue()},cleanHtml:function(A){A=String(A);if(A.length>5){if(Ext.isSafari){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}}if(A==" "){A=""}return A},syncValue:function(){if(this.initialized){var D=this.getEditorBody();var C=D.innerHTML;if(Ext.isSafari){var B=D.getAttribute("style");var A=B.match(/text-align:(.*?);/i);if(A&&A[1]){C="
      "+C+"
      "}}C=this.cleanHtml(C);if(this.fireEvent("beforesync",this,C)!==false){this.el.dom.value=C;this.fireEvent("sync",this,C)}}},pushValue:function(){if(this.initialized){var A=this.el.dom.value;if(!this.activated&&A.length<1){A=" "}if(this.fireEvent("beforepush",this,A)!==false){this.getEditorBody().innerHTML=A;this.fireEvent("push",this,A)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){var B=this.getEditorBody();var A=this.el.getStyles("font-size","font-family","background-image","background-repeat");A["background-attachment"]="fixed";B.bgProperties="fixed";Ext.DomHelper.applyStyles(B,A);if(this.doc){try{Ext.EventManager.removeAll(this.doc)}catch(C){}}this.doc=this.getDoc();Ext.EventManager.on(this.doc,{"mousedown":this.onEditorEvent,"dblclick":this.onEditorEvent,"click":this.onEditorEvent,"keyup":this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isSafari||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this)}this.initialized=true;this.fireEvent("initialize",this);this.doc.editorInitialized=true;this.pushValue()},onDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){this.tb.items.each(function(A){if(A.menu){A.menu.removeAll();if(A.menu.el){A.menu.el.destroy()}}A.destroy()});this.wrap.dom.innerHTML="";this.wrap.remove()}},onFirstFocus:function(){this.activated=true;this.tb.items.each(function(D){D.enable()});if(Ext.isGecko){this.win.focus();var A=this.win.getSelection();if(!A.focusNode||A.focusNode.nodeType!=3){var B=A.getRangeAt(0);B.selectNodeContents(this.getEditorBody());B.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(C){}}this.fireEvent("activate",this)},adjustFont:function(B){var C=B.itemId=="increasefontsize"?1:-1;var A=parseInt(this.doc.queryCommandValue("FontSize")||2,10);if(Ext.isSafari3||Ext.isAir){if(A<=10){A=1+C}else{if(A<=13){A=2+C}else{if(A<=16){A=3+C}else{if(A<=18){A=4+C}else{if(A<=24){A=5+C}else{A=6+C}}}}}A=A.constrain(1,6)}else{if(Ext.isSafari){C*=2}A=Math.max(1,A+C)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",A)},onEditorEvent:function(A){this.updateToolbar()},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return }var B=this.tb.items.map,C=this.doc;if(this.enableFont&&!Ext.isSafari2){var A=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(A!=this.fontSelect.dom.value){this.fontSelect.dom.value=A}}if(this.enableFormat){B.bold.toggle(C.queryCommandState("bold"));B.italic.toggle(C.queryCommandState("italic"));B.underline.toggle(C.queryCommandState("underline"))}if(this.enableAlignments){B.justifyleft.toggle(C.queryCommandState("justifyleft"));B.justifycenter.toggle(C.queryCommandState("justifycenter"));B.justifyright.toggle(C.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){B.insertorderedlist.toggle(C.queryCommandState("insertorderedlist"));B.insertunorderedlist.toggle(C.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(A){this.relayCmd(A.itemId)},relayCmd:function(B,A){(function(){this.focus();this.execCmd(B,A);this.updateToolbar()}).defer(10,this)},execCmd:function(B,A){this.doc.execCommand(B,false,A===undefined?null:A);this.syncValue()},applyCommand:function(B){if(B.ctrlKey){var C=B.getCharCode(),A;if(C>0){C=String.fromCharCode(C);switch(C){case"b":A="bold";break;case"i":A="italic";break;case"u":A="underline";break}if(A){this.win.focus();this.execCmd(A);this.deferFocus();B.preventDefault()}}}},insertAtCursor:function(B){if(!this.activated){return }if(Ext.isIE){this.win.focus();var A=this.doc.selection.createRange();if(A){A.collapse(true);A.pasteHTML(B);this.syncValue();this.deferFocus()}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",B);this.deferFocus()}else{if(Ext.isSafari){this.execCmd("InsertText",B);this.deferFocus()}}}},fixKeys:function(){if(Ext.isIE){return function(D){var A=D.getKey(),B;if(A==D.TAB){D.stopEvent();B=this.doc.selection.createRange();if(B){B.collapse(true);B.pasteHTML("    ");this.deferFocus()}}else{if(A==D.ENTER){B=this.doc.selection.createRange();if(B){var C=B.parentElement();if(!C||C.tagName.toLowerCase()!="li"){D.stopEvent();B.pasteHTML("
      ");B.collapse(false);B.select()}}}}}}else{if(Ext.isOpera){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isSafari){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor); -Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initComponent:function(){Ext.form.TimeField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}if(!this.store){var B=this.parseDate(this.minValue);if(!B){B=new Date(this.initDate).clearTime()}var A=this.parseDate(this.maxValue);if(!A){A=new Date(this.initDate).clearTime().add("mi",(24*60)-1)}var C=[];while(B<=A){C.push([B.dateFormat(this.format)]);B=B.add("mi",this.increment)}this.store=new Ext.data.SimpleStore({fields:["text"],data:C});this.displayField="text"}},getValue:function(){var A=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(A))||""},setValue:function(A){Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A){this.setValue(A.dateFormat(this.format))}}});Ext.reg("timefield",Ext.form.TimeField); -Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(B,A){if(!this.el){this.el=document.createElement("label");this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):(this.html||"");if(this.forId){this.el.setAttribute("htmlFor",this.forId)}}Ext.form.Label.superclass.onRender.call(this,B,A)},setText:function(A,B){this.text=A;if(this.rendered){this.el.dom.innerHTML=B!==false?Ext.util.Format.htmlEncode(A):A}return this}});Ext.reg("label",Ext.form.Label); -Ext.form.Action=function(B,A){this.form=B;this.options=A||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(A){},success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(A){this.response=A;if(!A.responseText){return true}this.result=this.handleResponse(A);return this.result},getUrl:function(C){var A=this.options.url||this.form.url||this.form.el.dom.action;if(C){var B=this.getParams();if(B){A+=(A.indexOf("?")!=-1?"&":"?")+B}}return A},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var A=this.form.baseParams;var B=this.options.params;if(B){if(typeof B=="object"){B=Ext.urlEncode(Ext.applyIf(B,A))}else{if(typeof B=="string"&&A){B+="&"+Ext.urlEncode(A)}}}else{if(A){B=Ext.urlEncode(A)}}return B},createCallback:function(A){var A=A||{};return{success:this.success,failure:this.failure,scope:this,timeout:(A.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(B,A){Ext.form.Action.Submit.superclass.constructor.call(this,B,A)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var B=this.options;var C=this.getMethod();var A=C=="GET";if(B.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(B),{form:this.form.el.dom,url:this.getUrl(A),method:C,headers:B.headers,params:!A?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(B.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(B){var A=this.processResponse(B);if(A===true||A.success){this.form.afterAction(this,true);return }if(A.errors){this.form.markInvalid(A.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(C){if(this.form.errorReader){var B=this.form.errorReader.read(C);var F=[];if(B.records){for(var D=0,A=B.records.length;D=0){if(!D){C=F-1}D=false;while(C>=0){if(E.call(I||this,J,C,H)===true){return[J,C]}C--}J--}}else{if(C>=F){J++;D=false}while(J","
      ","
      {header}
      ","
      {body}
      ","
      ","
       
      ","
       
      ","
      ")}if(!C.header){C.header=new Ext.Template("","{cells}","
      ")}if(!C.hcell){C.hcell=new Ext.Template("
      ",this.grid.enableHdMenu?"":"","{value}","
      ")}if(!C.body){C.body=new Ext.Template("{rows}")}if(!C.row){C.row=new Ext.Template("
      ","{cells}",(this.enableRowBody?"":""),"
      {body}
      ")}if(!C.cell){C.cell=new Ext.Template("","
      {value}
      ","")}for(var A in C){var B=C[A];if(B&&typeof B.compile=="function"&&!B.compiled){B.disableFormats=true;B.compile()}}this.templates=C;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(A){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=A;return this._flyweight},getEditorParent:function(A){return this.scroller.dom},initElements:function(){var C=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new C(B);this.mainWrap=new C(A[0]);this.mainHd=new C(this.mainWrap.dom.firstChild);if(this.grid.hideHeaders){this.mainHd.setDisplayed(false)}this.innerHd=this.mainHd.dom.firstChild;this.scroller=new C(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new C(this.scroller.dom.firstChild);this.focusEl=new C(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new C(A[1]);this.resizeProxy=new C(A[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(A){if(!A){return false}return this.fly(A).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(C,B){var A=this.findCell(C);if(A&&(!B||this.fly(A).hasClass(B))){return this.getCellIndex(A)}return false},getCellIndex:function(B){if(B){var A=B.className.match(this.colRe);if(A&&A[1]){return this.cm.getIndexById(A[1])}}return false},findHeaderCell:function(B){var A=this.findCell(B);return A&&this.fly(A).hasClass(this.hdCls)?A:null},findHeaderIndex:function(A){return this.findCellIndex(A,this.hdCls)},findRow:function(A){if(!A){return false}return this.fly(A).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(A){var B=this.findRow(A);return B?B.rowIndex:false},getRow:function(A){return this.getRows()[A]},getCell:function(B,A){return this.getRow(B).getElementsByTagName("td")[A]},getHeaderCell:function(A){return this.mainHd.dom.getElementsByTagName("td")[A]},addRowClass:function(C,A){var B=this.getRow(C);if(B){this.fly(B).addClass(A)}},removeRowClass:function(C,A){var B=this.getRow(C);if(B){this.fly(B).removeClass(A)}},removeRow:function(A){Ext.removeNode(this.getRow(A));this.focusRow(A)},removeRows:function(C,A){var B=this.mainBody.dom;for(var D=C;D<=A;D++){Ext.removeNode(B.childNodes[C])}this.focusRow(C)},getScrollState:function(){var A=this.scroller.dom;return{left:A.scrollLeft,top:A.scrollTop}},restoreScroll:function(A){var B=this.scroller.dom;B.scrollLeft=A.left;B.scrollTop=A.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var A=this.scroller.dom;this.grid.fireEvent("bodyscroll",A.scrollLeft,A.scrollTop)},syncHeaderScroll:function(){var A=this.scroller.dom;this.innerHd.scrollLeft=A.scrollLeft;this.innerHd.scrollLeft=A.scrollLeft},updateSortIcon:function(B,A){var D=this.sortClasses;var C=this.mainHd.select("td").removeClass(D);C.item(B).addClass(D[A=="DESC"?1:0])},updateAllColumnWidths:function(){var D=this.getTotalWidth();var H=this.cm.getColumnCount();var F=[];for(var B=0;B=this.ds.getCount()){return }E=(E!==undefined?E:0);var I=this.getRow(P),F;if(!(D===false&&E===0)){while(this.cm.isHidden(E)){E++}F=this.getCell(P,E)}if(!I){return }var L=this.scroller.dom;var O=0;var C=I,M=this.el.dom;while(C&&C!=M){O+=C.offsetTop;C=C.offsetParent}O-=this.mainHd.dom.offsetHeight;var N=O+I.offsetHeight;var A=L.clientHeight;var M=parseInt(L.scrollTop,10);var K=M+A;if(OK){L.scrollTop=N-A}}if(D!==false){var J=parseInt(F.offsetLeft,10);var H=J+F.offsetWidth;var G=parseInt(L.scrollLeft,10);var B=G+L.clientWidth;if(JB){L.scrollLeft=H-L.clientWidth}}}return F?Ext.fly(F).getXY():[L.scrollLeft+this.el.getX(),Ext.fly(I).getY()]},insertRows:function(A,F,C,E){if(!E&&F===0&&C>=A.getCount()-1){this.refresh()}else{if(!E){this.fireEvent("beforerowsinserted",this,F,C)}var B=this.renderRows(F,C);var D=this.getRow(F);if(D){Ext.DomHelper.insertHtml("beforeBegin",D,B)}else{Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,B)}if(!E){this.fireEvent("rowsinserted",this,F,C);this.processRows(F)}}this.focusRow(F)},deleteRows:function(A,C,B){if(A.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,C,B);this.removeRows(C,B);this.processRows(C);this.fireEvent("rowsdeleted",this,C,B)}},getColumnStyle:function(A,C){var B=!C?(this.cm.config[A].css||""):"";B+="width:"+this.getColumnWidth(A)+";";if(this.cm.isHidden(A)){B+="display:none;"}var D=this.cm.config[A].align;if(D){B+="text-align:"+D+";"}return B},getColumnWidth:function(B){var A=this.cm.getColumnWidth(B);if(typeof A=="number"){return(Ext.isBorderBox?A:(A-this.borderWidth>0?A-this.borderWidth:0))+"px"}return A},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(D,G,E){var F=this.cm,S,L,O;var R=F.getTotalWidth(false);var J=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(J<20){return }var B=J-R;if(B===0){return false}var A=F.getColumnCount(true);var P=A-(typeof E=="number"?1:0);if(P===0){P=1;E=undefined}var K=F.getColumnCount();var I=[];var N=0;var M=0;var H;for(O=0;OJ){var Q=P!=A?E:N;F.setColumnWidth(Q,Math.max(1,F.getColumnWidth(Q)-(R-J)),true)}if(D!==true){this.updateAllColumnWidths()}return true},autoExpand:function(B){var G=this.grid,A=this.cm;if(!this.userResized&&G.autoExpandColumn){var D=A.getTotalWidth(false);var H=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(D!=H){var F=A.getIndexById(G.autoExpandColumn);var E=A.getColumnWidth(F);var C=Math.min(Math.max(((H-D)+E),G.autoExpandMin),G.autoExpandMax);if(C!=E){A.setColumnWidth(F,C,true);if(B!==true){this.updateColumnWidth(F,C)}}}}},getColumnData:function(){var D=[],A=this.cm,E=A.getColumnCount();for(var C=0;C"+this.emptyText+"
      ")}},updateHeaderSortState:function(){var B=this.ds.getSortState();if(!B){return }if(!this.sortState||(this.sortState.field!=B.field||this.sortState.direction!=B.direction)){this.grid.fireEvent("sortchange",this.grid,B)}this.sortState=B;var C=this.cm.findColumnIndex(B.field);if(C!=-1){var A=B.direction;this.updateSortIcon(C,A)}},destroy:function(){if(this.colMenu){this.colMenu.removeAll();Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.getEl().remove();delete this.colMenu}if(this.hmenu){this.hmenu.removeAll();Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.getEl().remove();delete this.hmenu}if(this.grid.enableColumnMove){var C=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(C){for(var A in C){if(!C[A].config.isTarget&&C[A].dragElId){var B=C[A].dragElId;C[A].unreg();Ext.get(B).remove()}else{if(C[A].config.isTarget){C[A].proxyTop.remove();C[A].proxyBottom.remove();C[A].unreg()}}if(Ext.dd.DDM.locationCache[A]){delete Ext.dd.DDM.locationCache[A]}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id]}}Ext.destroy(this.resizeMarker,this.resizeProxy);if(this.dragZone){this.dragZone.unreg()}this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){this.fitColumns(true,true)}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},initData:function(B,A){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this)}if(B){B.on("load",this.onLoad,this);B.on("datachanged",this.onDataChange,this);B.on("add",this.onAdd,this);B.on("remove",this.onRemove,this);B.on("update",this.onUpdate,this);B.on("clear",this.onClear,this)}this.ds=B;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this);this.cm.un("columnlockchange",this.onColumnLock,this)}if(A){delete this.lastViewWidth;A.on("configchange",this.onColConfigChange,this);A.on("widthchange",this.onColWidthChange,this);A.on("headerchange",this.onHeaderChange,this);A.on("hiddenchange",this.onHiddenChange,this);A.on("columnmoved",this.onColumnMove,this);A.on("columnlockchange",this.onColumnLock,this)}this.cm=A},onDataChange:function(){this.refresh();this.updateHeaderSortState()},onClear:function(){this.refresh()},onUpdate:function(B,A){this.refreshRow(A)},onAdd:function(C,A,B){this.insertRows(C,B,B+(A.length-1))},onRemove:function(D,A,B,C){if(C!==true){this.fireEvent("beforerowremoved",this,B,A)}this.removeRow(B);if(C!==true){this.processRows(B);this.applyEmptyText();this.fireEvent("rowremoved",this,B,A)}},onLoad:function(){this.scrollToTop()},onColWidthChange:function(A,B,C){this.updateColumnWidth(B,C)},onHeaderChange:function(A,B,C){this.updateHeaders()},onHiddenChange:function(A,B,C){this.updateColumnHidden(B,C)},onColumnMove:function(A,D,B){this.indexMap=null;var C=this.getScrollState();this.refresh(true);this.restoreScroll(C);this.afterMove(B)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(A){A.on("headerclick",this.onHeaderClick,this);if(A.trackMouseOver){A.on("mouseover",this.onRowOver,this);A.on("mouseout",this.onRowOut,this)}},initEvents:function(){},onHeaderClick:function(B,A){if(this.headersDisabled||!this.cm.isSortable(A)){return }B.stopEditing(true);B.store.sort(this.cm.getDataIndex(A))},onRowOver:function(B,A){var C;if((C=this.findRowIndex(A))!==false){this.addRowClass(C,"x-grid3-row-over")}},onRowOut:function(B,A){var C;if((C=this.findRowIndex(A))!==false&&C!==this.findRowIndex(B.getRelatedTarget())){this.removeRowClass(C,"x-grid3-row-over")}},handleWheel:function(A){A.stopPropagation()},onRowSelect:function(A){this.addRowClass(A,"x-grid3-row-selected")},onRowDeselect:function(A){this.removeRowClass(A,"x-grid3-row-selected")},onCellSelect:function(C,B){var A=this.getCell(C,B);if(A){this.fly(A).addClass("x-grid3-cell-selected")}},onCellDeselect:function(C,B){var A=this.getCell(C,B);if(A){this.fly(A).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(C,B){this.userResized=true;var A=this.grid.colModel;A.setColumnWidth(C,B,true);if(this.forceFit){this.fitColumns(true,false,C);this.updateAllColumnWidths()}else{this.updateColumnWidth(C,B)}this.grid.fireEvent("columnresize",C,B)},handleHdMenuClick:function(C){var B=this.hdCtxIndex;var A=this.cm,D=this.ds;switch(C.id){case"asc":D.sort(A.getDataIndex(B),"ASC");break;case"desc":D.sort(A.getDataIndex(B),"DESC");break;default:B=A.getIndexById(C.id.substr(4));if(B!=-1){if(C.checked&&A.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}A.setHidden(B,C.checked)}}return true},isHideableColumn:function(A){return !A.hidden&&!A.fixed},beforeColMenuShow:function(){var A=this.cm,C=A.getColumnCount();this.colMenu.removeAll();for(var B=0;B","
      ",this.groupTextTpl,"
      ","
      ")}this.startGroup.compile();this.endGroup="
      "},findGroup:function(A){return Ext.fly(A).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.enableGrouping&&!this.ignoreAdd){var A=this.getScrollState();this.refresh();this.restoreScroll(A)}else{if(!this.enableGrouping){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(E,A,B,D){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var C=document.getElementById(A._groupId);if(C&&C.childNodes[1].childNodes.length<1){Ext.removeNode(C)}this.applyEmptyText()},refreshRow:function(A){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var C=this.getGroupField();var B=this.hmenu.items.get("groupBy");if(B){B.setDisabled(this.cm.config[this.hdCtxIndex].groupable===false)}var A=this.hmenu.items.get("showGroups");if(A){A.setDisabled(!C&&this.cm.config[this.hdCtxIndex].groupable===false);A.setChecked(!!C,true)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{id:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({id:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},onGroupByClick:function(){this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));this.beforeMenuShow()},onShowGroupsClick:function(A,B){if(B){this.onGroupByClick()}else{this.grid.store.clearGrouping()}},toggleGroup:function(C,B){this.grid.stopEditing(true);C=Ext.getDom(C);var A=Ext.fly(C);B=B!==undefined?B:A.hasClass("x-grid-group-collapsed");this.state[A.dom.id]=B;A[B?"removeClass":"addClass"]("x-grid-group-collapsed")},toggleAllGroups:function(C){var B=this.getGroups();for(var D=0,A=B.length;D=0&&this.config[A].resizable!==false&&this.config[A].fixed!==true},setHidden:function(A,B){var C=this.config[A];if(C.hidden!==B){C.hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B)}},setEditor:function(A,B){this.config[A].editor=B}});Ext.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="string"&&A.length<1){return" "}return A};Ext.grid.DefaultColumnModel=Ext.grid.ColumnModel; -Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(A){this.grid=A;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked}}); -Ext.grid.RowSelectionModel=function(A){Ext.apply(this,A);this.selections=new Ext.util.MixedCollection(false,function(B){return B.id});this.last=false;this.lastActive=false;this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect");Ext.grid.RowSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("rowmousedown",this.handleMouseDown,this)}else{this.grid.on("rowclick",function(B,D,C){if(C.button===0&&!C.shiftKey&&!C.ctrlKey){this.selectRow(D,false);B.view.focusRow(D)}},this)}this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{"up":function(C){if(!C.shiftKey){this.selectPrevious(C.shiftKey)}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(B!==false){this.last=B}}else{this.selectFirstRow()}}},"down":function(C){if(!C.shiftKey){this.selectNext(C.shiftKey)}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(B!==false){this.last=B}}else{this.selectFirstRow()}}},scope:this});var A=this.grid.view;A.on("refresh",this.onRefresh,this);A.on("rowupdated",this.onRowUpdated,this);A.on("rowremoved",this.onRemove,this)},onRefresh:function(){var F=this.grid.store,B;var D=this.getSelections();this.clearSelections(true);for(var C=0,A=D.length;C0},isSelected:function(A){var B=typeof A=="number"?this.grid.store.getAt(A):A;return(B&&this.selections.key(B.id)?true:false)},isIdSelected:function(A){return(this.selections.key(A)?true:false)},handleMouseDown:function(D,F,E){if(E.button!==0||this.isLocked()){return }var A=this.grid.getView();if(E.shiftKey&&this.last!==false){var C=this.last;this.selectRange(C,F,E.ctrlKey);this.last=C;A.focusRow(F)}else{var B=this.isSelected(F);if(E.ctrlKey&&B){this.deselectRow(F)}else{if(!B||this.getCount()>1){this.selectRow(F,E.ctrlKey||E.shiftKey);A.focusRow(F)}}}},selectRows:function(C,D){if(!D){this.clearSelections()}for(var B=0,A=C.length;B=A;C--){this.selectRow(C,true)}}},deselectRange:function(C,B,A){if(this.locked){return }for(var D=C;D<=B;D++){this.deselectRow(D,A)}},selectRow:function(B,D,A){if(this.locked||(B<0||B>=this.grid.store.getCount())||this.isSelected(B)){return }var C=this.grid.store.getAt(B);if(C&&this.fireEvent("beforerowselect",this,B,D,C)!==false){if(!D||this.singleSelect){this.clearSelections()}this.selections.add(C);this.last=this.lastActive=B;if(!A){this.grid.getView().onRowSelect(B)}this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},deselectRow:function(B,A){if(this.locked){return }if(this.last==B){this.last=false}if(this.lastActive==B){this.lastActive=false}var C=this.grid.store.getAt(B);if(C){this.selections.remove(C);if(!A){this.grid.getView().onRowDeselect(B)}this.fireEvent("rowdeselect",this,B,C);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(F,E){var C=E.getKey(),G,D=this.grid,B=D.activeEditor;var A=E.shiftKey;if(C==E.TAB){E.stopEvent();B.completeEdit();if(A){G=D.walkCells(B.row,B.col-1,-1,this.acceptsNav,this)}else{G=D.walkCells(B.row,B.col+1,1,this.acceptsNav,this)}}else{if(C==E.ENTER){E.stopEvent();B.completeEdit();if(this.moveEditorOnEnter!==false){if(A){G=D.walkCells(B.row-1,B.col,-1,this.acceptsNav,this)}else{G=D.walkCells(B.row+1,B.col,1,this.acceptsNav,this)}}}else{if(C==E.ESC){B.cancelEdit()}}}if(G){D.startEditing(G[0],G[1])}}}); -Ext.grid.CellSelectionModel=function(A){Ext.apply(this,A);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.isIE||Ext.isSafari3?"keydown":"keypress",this.handleKeyDown,this);var A=this.grid.view;A.on("refresh",this.onViewChange,this);A.on("rowupdated",this.onRowUpdated,this);A.on("beforerowremoved",this.clearSelections,this);A.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(A){this.select(A.row,A.column,false,true,A.record)},onRowUpdated:function(A,B,C){if(this.selection&&this.selection.record==C){A.onCellSelect(B,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(B){var A=this.selection;if(A){if(B!==true){this.grid.view.onCellDeselect(A.cell[0],A.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(B,D,A,C){if(C.button!==0||this.isLocked()){return }this.select(D,A)},select:function(F,C,B,E,D){if(this.fireEvent("beforecellselect",this,F,C)!==false){this.clearSelections();D=D||this.grid.store.getAt(F);this.selection={record:D,cell:[F,C]};if(!B){var A=this.grid.getView();A.onCellSelect(F,C);if(E!==true){A.focusCell(F,C)}}this.fireEvent("cellselect",this,F,C);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(C,B,A){return !A.isHidden(B)},handleKeyDown:function(F){if(!F.isNavKeyPress()){return }var E=this.grid,J=this.selection;if(!J){F.stopEvent();var I=E.walkCells(0,0,1,this.isSelectable,this);if(I){this.select(I[0],I[1])}return }var B=this;var H=function(M,K,L){return E.walkCells(M,K,L,B.isSelectable,B)};var C=F.getKey(),A=J.cell[0],G=J.cell[1];var D;switch(C){case F.TAB:if(F.shiftKey){D=H(A,G-1,-1)}else{D=H(A,G+1,1)}break;case F.DOWN:D=H(A+1,G,1);break;case F.UP:D=H(A-1,G,-1);break;case F.RIGHT:D=H(A,G+1,1);break;case F.LEFT:D=H(A,G-1,-1);break;case F.ENTER:if(E.isEditor&&!E.editing){E.startEditing(A,G);F.stopEvent();return }break}if(D){this.select(D[0],D[1]);F.stopEvent()}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}D.stopEvent()}else{if(B==D.ENTER){A.completeEdit();D.stopEvent()}else{if(B==D.ESC){D.stopEvent();A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}}); -Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.on("bodyscroll",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{if(this.clicksToEdit=="auto"&&this.view.mainBody){this.view.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}this.getGridEl().addClass("xedit-grid")},onCellDblClick:function(B,C,A){this.startEditing(C,A)},onAutoEditClick:function(C,B){if(C.button!==0){return }var E=this.view.findRowIndex(B);var A=this.view.findCellIndex(B);if(E!==false&&A!==false){this.stopEditing();if(this.selModel.getSelectedCell){var D=this.selModel.getSelectedCell();if(D&&D.cell[0]===E&&D.cell[1]===A){this.startEditing(E,A)}}else{if(this.selModel.isSelected(E)){this.startEditing(E,A)}}}},onEditComplete:function(B,D,A){this.editing=false;this.activeEditor=null;B.un("specialkey",this.selModel.onEditorKey,this.selModel);var C=B.record;var F=this.colModel.getDataIndex(B.col);D=this.postEditValue(D,A,C,F);if(String(D)!==String(A)){var E={grid:this,record:C,field:F,originalValue:A,value:D,row:B.row,column:B.col,cancel:false};if(this.fireEvent("validateedit",E)!==false&&!E.cancel){C.set(F,E.value);delete E.cancel;this.fireEvent("afteredit",E)}}this.view.focusCell(B.row,B.col)},startEditing:function(F,B){this.stopEditing();if(this.colModel.isCellEditable(B,F)){this.view.ensureVisible(F,B,true);var C=this.store.getAt(F);var E=this.colModel.getDataIndex(B);var D={grid:this,record:C,field:E,value:C.data[E],row:F,column:B,cancel:false};if(this.fireEvent("beforeedit",D)!==false&&!D.cancel){this.editing=true;var A=this.colModel.getCellEditor(B,F);if(!A.rendered){A.render(this.view.getEditorParent(A))}(function(){A.row=F;A.col=B;A.record=C;A.on("complete",this.onEditComplete,this,{single:true});A.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=A;var G=this.preEditValue(C,E);A.startEdit(this.view.getCell(F,B).firstChild,G)}).defer(50,this)}}},preEditValue:function(A,C){var B=A.data[C];return this.autoEncode&&typeof B=="string"?Ext.util.Format.htmlDecode(B):B},postEditValue:function(C,A,B,D){return this.autoEncode&&typeof C=="string"?Ext.util.Format.htmlEncode(C):C},stopEditing:function(A){if(this.activeEditor){this.activeEditor[A===true?"cancelEdit":"completeEdit"]()}this.activeEditor=null},onDestroy:function(){if(this.rendered){var C=this.colModel.config;for(var B=0,A=C.length;B ",width:20,sortable:false,menuDisabled:true,fixed:true,dataIndex:"",id:"checker",initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var A=this.grid.getView();A.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(A.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(C,B){if(C.button===0&&B.className=="x-grid3-row-checker"){C.stopEvent();var D=C.getTarget(".x-grid3-row");if(D){var A=D.rowIndex;if(this.isSelected(A)){this.deselectRow(A)}else{this.selectRow(A,true)}}}},onHdMouseDown:function(C,A){if(A.className=="x-grid3-hd-checker"){C.stopEvent();var B=Ext.fly(A.parentNode);var D=B.hasClass("x-grid3-hd-checker-on");if(D){B.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{B.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(B,C,A){return"
       
      "}}); -Ext.LoadMask=function(C,B){this.el=Ext.get(C);Ext.apply(this,B);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var A=this.el.getUpdater();A.showLoadIndicator=false;A.on("beforeupdate",this.onBeforeLoad,this);A.on("update",this.onLoad,this);A.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true},enable:function(){this.disabled=false},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls)}},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.onLoad,this)}else{var A=this.el.getUpdater();A.un("beforeupdate",this.onBeforeLoad,this);A.un("update",this.onLoad,this);A.un("failure",this.onLoad,this)}}}; -Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(D,A){Ext.ProgressBar.superclass.onRender.call(this,D,A);var C=new Ext.Template("
      ","
      ","
      ","
      ","
       
      ","
      ","
      ","
      ","
       
      ","
      ","
      ","
      ");if(A){this.el=C.insertBefore(A,{cls:this.baseCls},true)}else{this.el=C.append(D,{cls:this.baseCls},true)}if(this.id){this.el.dom.id=this.id}var B=this.el.dom.firstChild;this.progressBar=Ext.get(B.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var E=Ext.get(B.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,E.dom.firstChild]);this.textEl.setWidth(B.offsetWidth)}this.progressBar.setHeight(B.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(B,C){this.value=B||0;if(C){this.updateText(C)}if(this.rendered){var A=Math.floor(B*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(A);if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(A)}}this.fireEvent("update",this,B,C);return this},wait:function(B){if(!this.waitTimer){var A=this;B=B||{};this.updateText(B.text);this.waitTimer=Ext.TaskMgr.start({run:function(C){var D=B.increment||10;this.updateProgress(((((C+D)%D)+1)*(100/D))*0.01)},interval:B.interval||1000,duration:B.duration,onStop:function(){if(B.fn){B.fn.apply(B.scope||this)}this.reset()},scope:A})}return this},isWaiting:function(){return this.waitTimer!=null},updateText:function(A){this.text=A||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(A,C){Ext.ProgressBar.superclass.setSize.call(this,A,C);if(this.textTopEl){var B=this.el.dom.firstChild;this.textEl.setSize(B.offsetWidth,B.offsetHeight)}this.syncProgressBar();return this},reset:function(A){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(A===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar); -Ext.Slider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,initComponent:function(){if(this.value===undefined){this.value=this.minValue}Ext.Slider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.vertical){Ext.apply(this,Ext.Slider.Vertical)}},onRender:function(){this.autoEl={cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{cls:"x-slider-thumb"},{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}};Ext.Slider.superclass.onRender.apply(this,arguments);this.endEl=this.el.first();this.innerEl=this.endEl.first();this.thumb=this.innerEl.first();this.halfThumb=(this.vertical?this.thumb.getHeight():this.thumb.getWidth())/2;this.focusEl=this.thumb.next();this.initEvents()},initEvents:function(){this.thumb.addClassOnOver("x-slider-thumb-over");this.mon(this.el,"mousedown",this.onMouseDown,this);this.mon(this.el,"keydown",this.onKeyDown,this);this.focusEl.swallowEvent("click",true);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(this.thumb);this.on("beforedestroy",this.tracker.destroy,this.tracker)},onMouseDown:function(B){if(this.disabled){return }if(this.clickToChange&&B.target!=this.thumb.dom){var A=this.innerEl.translatePoints(B.getXY());this.onClickChange(A)}this.focus()},onClickChange:function(A){if(A.top>this.clickRange[0]&&A.top0){if(A>(C/2)){D=B+(C-A)}else{D=B-A}}return D.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.Slider.superclass.afterRender.apply(this,arguments);if(this.value!==undefined){var A=this.normalizeValue(this.value);if(A!==this.value){delete this.value;this.setValue(A,false)}else{this.moveThumb(this.translateValue(A),false)}}},getRatio:function(){var A=this.innerEl.getWidth();var B=this.maxValue-this.minValue;return B==0?A:(A/B)},normalizeValue:function(A){if(typeof A!="number"){A=parseInt(A)}A=Math.round(A);A=this.doSnap(A);A=A.constrain(this.minValue,this.maxValue);return A},setValue:function(B,A,C){B=this.normalizeValue(B);if(B!==this.value&&this.fireEvent("beforechange",this,B,this.value)!==false){this.value=B;this.moveThumb(this.translateValue(B),A!==false);this.fireEvent("change",this,B);if(C){this.fireEvent("changecomplete",this,B)}}},translateValue:function(A){var B=this.getRatio();return(A*B)-(this.minValue*B)-this.halfThumb},reverseValue:function(B){var A=this.getRatio();return(B+this.halfThumb+(this.minValue*A))/A},moveThumb:function(B,A){if(!A||this.animate===false){this.thumb.setLeft(B)}else{this.thumb.shift({left:B,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onBeforeDragStart:function(A){return !this.disabled},onDragStart:function(A){this.thumb.addClass("x-slider-thumb-drag");this.dragging=true;this.dragStartValue=this.value;this.fireEvent("dragstart",this,A)},onDrag:function(A){var B=this.innerEl.translatePoints(this.tracker.getXY());this.setValue(Math.round(this.reverseValue(B.left)),false);this.fireEvent("drag",this,A)},onDragEnd:function(A){this.thumb.removeClass("x-slider-thumb-drag");this.dragging=false;this.fireEvent("dragend",this,A);if(this.dragStartValue!=this.value){this.fireEvent("changecomplete",this,this.value)}},onResize:function(A,B){this.innerEl.setWidth(A-(this.el.getPadding("l")+this.endEl.getPadding("r")));this.syncThumb()},syncThumb:function(){if(this.rendered){this.moveThumb(this.translateValue(this.value))}},getValue:function(){return this.value}});Ext.reg("slider",Ext.Slider);Ext.Slider.Vertical={onResize:function(A,B){this.innerEl.setHeight(B-(this.el.getPadding("t")+this.endEl.getPadding("b")));this.syncThumb()},getRatio:function(){var B=this.innerEl.getHeight();var A=this.maxValue-this.minValue;return B/A},moveThumb:function(B,A){if(!A||this.animate===false){this.thumb.setBottom(B)}else{this.thumb.shift({bottom:B,stopFx:true,duration:0.35})}},onDrag:function(B){var C=this.innerEl.translatePoints(this.tracker.getXY());var A=this.innerEl.getHeight()-C.top;this.setValue(Math.round(A/this.getRatio()),false);this.fireEvent("drag",this,B)},onClickChange:function(B){if(B.left>this.clickRange[0]&&B.left0){this.statusEl.addClass(A);this.currIconCls=A}}else{this.currIconCls=A}return this},showBusy:function(A){if(typeof A=="string"){A={text:A}}A=Ext.applyIf(A||{},{text:this.busyText,iconCls:this.busyIconCls});return this.setStatus(A)}});Ext.reg("statusbar",Ext.StatusBar); -Ext.History=(function(){var E,C;var J=false;var D;function F(){var K=top.location.href,L=K.indexOf("#");return L>=0?K.substr(L+1):null}function A(){C.value=D}function G(K){D=K;Ext.History.fireEvent("change",K)}function H(L){var K=["
      ",L,"
      "].join("");try{var N=E.contentWindow.document;N.open();N.write(K);N.close();return true}catch(M){return false}}function B(){if(!E.contentWindow||!E.contentWindow.document){setTimeout(B,10);return }var N=E.contentWindow.document;var L=N.getElementById("state");var K=L?L.innerText:null;var M=F();setInterval(function(){N=E.contentWindow.document;L=N.getElementById("state");var P=L?L.innerText:null;var O=F();if(P!==K){K=P;G(K);top.location.hash=K;M=K;A()}else{if(O!==M){M=O;H(O)}}},50);J=true;Ext.History.fireEvent("ready",Ext.History)}function I(){D=C.value;if(Ext.isIE){B()}else{var K=F();setInterval(function(){var L=F();if(L!==K){K=L;G(K);A()}},50);J=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(L,K){if(J){Ext.callback(L,K,[this]);return }if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(L,K)});return }C=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){E=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(L){this.on("ready",L,K,{single:true})}I()},add:function(K,L){if(L!==false){if(this.getToken()==K){return true}}if(Ext.isIE){return H(K)}else{top.location.hash=K;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return J?D:F()}}})();Ext.apply(Ext.History,new Ext.util.Observable()); +/* + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +(function(){var h=Ext.util,j=Ext.each,g=true,i=false;h.Observable=function(){var k=this,l=k.events;if(k.listeners){k.on(k.listeners);delete k.listeners}k.events=l||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var k=Array.prototype.slice.call(arguments,0),m=k[0].toLowerCase(),n=this,l=g,p=n.events[m],s,o,r;if(n.eventsSuspended===g){if(o=n.eventQueue){o.push(k)}}else{if(typeof p=="object"){if(p.bubble){if(p.fire.apply(p,k.slice(1))===i){return i}r=n.getBubbleTarget&&n.getBubbleTarget();if(r&&r.enableBubble){s=r.events[m];if(!s||typeof s!="object"||!s.bubble){r.enableBubble(m)}return r.fireEvent.apply(r,k)}}else{k.shift();l=p.fire.apply(p,k)}}}return l},addListener:function(k,m,l,r){var n=this,q,s,p;if(typeof k=="object"){r=k;for(q in r){s=r[q];if(!n.filterOptRe.test(q)){n.addListener(q,s.fn||s,s.scope||r.scope,s.fn?s:r)}}}else{k=k.toLowerCase();p=n.events[k]||g;if(typeof p=="boolean"){n.events[k]=p=new h.Event(n,k)}p.addListener(m,l,typeof r=="object"?r:{})}},removeListener:function(k,m,l){var n=this.events[k.toLowerCase()];if(typeof n=="object"){n.removeListener(m,l)}},purgeListeners:function(){var m=this.events,k,l;for(l in m){k=m[l];if(typeof k=="object"){k.clearListeners()}}},addEvents:function(n){var m=this;m.events=m.events||{};if(typeof n=="string"){var k=arguments,l=k.length;while(l--){m.events[k[l]]=m.events[k[l]]||g}}else{Ext.applyIf(m.events,n)}},hasListener:function(k){var l=this.events[k.toLowerCase()];return typeof l=="object"&&l.listeners.length>0},suspendEvents:function(k){this.eventsSuspended=g;if(k&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var k=this,l=k.eventQueue||[];k.eventsSuspended=i;delete k.eventQueue;j(l,function(m){k.fireEvent.apply(k,m)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(k){k.fireEvent=d.fireEvent};function e(l,m,k){return function(){if(m.target==arguments[0]){l.apply(k,Array.prototype.slice.call(arguments,0))}}}function b(n,p,k,m){k.task=new h.DelayedTask();return function(){k.task.delay(p.buffer,n,m,Array.prototype.slice.call(arguments,0))}}function c(m,n,l,k){return function(){n.removeListener(l,k);return m.apply(k,arguments)}}function a(n,p,k,m){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!k.tasks){k.tasks=[]}k.tasks.push(l);l.delay(p.delay||10,function(){k.tasks.remove(l);n.apply(m,o)},m)}}h.Event=function(l,k){this.name=k;this.obj=l;this.listeners=[]};h.Event.prototype={addListener:function(o,n,m){var p=this,k;n=n||p.obj;if(!p.isListening(o,n)){k=p.createListener(o,n,m);if(p.firing){p.listeners=p.listeners.slice(0)}p.listeners.push(k)}},createListener:function(p,n,q){q=q||{};n=n||this.obj;var k={fn:p,scope:n,options:q},m=p;if(q.target){m=e(m,q,n)}if(q.delay){m=a(m,q,k,n)}if(q.single){m=c(m,this,p,n)}if(q.buffer){m=b(m,q,k,n)}k.fireFn=m;return k},findListener:function(o,n){var p=this.listeners,m=p.length,k;n=n||this.obj;while(m--){k=p[m];if(k){if(k.fn==o&&k.scope==n){return m}}}return -1},isListening:function(l,k){return this.findListener(l,k)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var n=this,k=n.listeners,m=k.length;while(m--){n.removeListener(k[m].fn,k[m].scope)}},fire:function(){var q=this,p=q.listeners,k=p.length,o=0,m;if(k>0){q.firing=g;var n=Array.prototype.slice.call(arguments,0);for(;o",i="",b=a+"",j=""+i,l=b+"",w=""+j;function h(B,D,C,E,A,y){var z=r.insertHtml(E,Ext.getDom(B),u(D));return C?Ext.get(z,true):z}function u(D){var z="",y,C,B,E;if(typeof D=="string"){z=D}else{if(Ext.isArray(D)){for(var A=0;A"}}}return z}function g(F,C,B,D){x.innerHTML=[C,B,D].join("");var y=-1,A=x,z;while(++y "'+D+'"'},insertBefore:function(y,A,z){return h(y,A,z,c)},insertAfter:function(y,A,z){return h(y,A,z,p,"nextSibling")},insertFirst:function(y,A,z){return h(y,A,z,n,"firstChild")},append:function(y,A,z){return h(y,A,z,q,"",true)},overwrite:function(y,A,z){y=Ext.getDom(y);y.innerHTML=u(A);return z?Ext.get(y.firstChild):y.firstChild},createHtml:u};return r}();Ext.Template=function(h){var j=this,c=arguments,e=[],d;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){for(var g=0,b=c.length;g+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");'},{re:/^#([\w\-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=document;Ext.Element=function(l,m){var n=typeof l=="string"?h.getElementById(l):l,o;if(!n){return null}o=n.id;if(!m&&o&&Ext.elCache[o]){return Ext.elCache[o].el}this.dom=n;this.id=o||Ext.id(n)};var d=Ext.DomHelper,e=Ext.Element,a=Ext.elCache;e.prototype={set:function(q,m){var n=this.dom,l,p,m=(m!==false)&&!!n.setAttribute;for(l in q){if(q.hasOwnProperty(l)){p=q[l];if(l=="style"){d.applyStyles(n,p)}else{if(l=="cls"){n.className=p}else{if(m){n.setAttribute(l,p)}else{n[l]=p}}}}}return this},defaultUnit:"px",is:function(l){return Ext.DomQuery.is(this.dom,l)},focus:function(o,n){var l=this,n=n||l.dom;try{if(Number(o)){l.focus.defer(o,null,[null,n])}else{n.focus()}}catch(m){}return l},blur:function(){try{this.dom.blur()}catch(l){}return this},getValue:function(l){var m=this.dom.value;return l?parseInt(m,10):m},addListener:function(l,o,n,m){Ext.EventManager.on(this.dom,l,o,n||this,m);return this},removeListener:function(l,n,m){Ext.EventManager.removeListener(this.dom,l,n,m||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(l){if(l===""||l=="auto"||l===undefined){l=l||""}else{if(!isNaN(l)||!i.test(l)){l=l+(this.defaultUnit||"px")}}return l},load:function(m,n,l){Ext.Ajax.request(Ext.apply({params:n,url:m.url||m,callback:l,el:this.dom,indicatorText:m.indicatorText||""},Ext.isObject(m)?m:{}));return this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var l=this,m=l.dom;if(m){delete l.dom;Ext.removeNode(m)}},hover:function(m,l,o,n){var p=this;p.on("mouseenter",m,o||p.dom,n);p.on("mouseleave",l,o||p.dom,n);return p},contains:function(l){return !l?false:Ext.lib.Dom.isAncestor(this.dom,l.dom?l.dom:l)},getAttributeNS:function(m,l){return this.getAttribute(l,m)},getAttribute:(function(){var p=document.createElement("table"),o=false,m="getAttribute" in p,l=/undefined|unknown/;if(m){try{p.getAttribute("ext:qtip")}catch(n){o=true}return function(q,s){var r=this.dom,t;if(r.getAttributeNS){t=r.getAttributeNS(s,q)||null}if(t==null){if(s){if(o&&r.tagName.toUpperCase()=="TABLE"){try{t=r.getAttribute(s+":"+q)}catch(u){t=""}}else{t=r.getAttribute(s+":"+q)}}else{t=r.getAttribute(q)||r[q]}}return t||""}}else{return function(q,s){var r=this.om,u,t;if(s){t=r[s+":"+q];u=l.test(typeof t)?undefined:t}else{u=r[q]}return u||""}}p=null})(),update:function(l){if(this.dom){this.dom.innerHTML=l}return this}};var k=e.prototype;e.addMethods=function(l){Ext.apply(k,l)};k.on=k.addListener;k.un=k.removeListener;k.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(m){var l,p,o;if(!m){return null}if(typeof m=="string"){if(!(p=h.getElementById(m))){return null}if(a[m]&&a[m].el){l=a[m].el;l.dom=p}else{l=e.addToCache(new e(p))}return l}else{if(m.tagName){if(!(o=m.id)){o=Ext.id(m)}if(a[o]&&a[o].el){l=a[o].el;l.dom=m}else{l=e.addToCache(new e(m))}return l}else{if(m instanceof e){if(m!=c){if(Ext.isIE&&(m.id==undefined||m.id=="")){m.dom=m.dom}else{m.dom=h.getElementById(m.id)||m.dom}}return m}else{if(m.isComposite){return m}else{if(Ext.isArray(m)){return e.select(m)}else{if(m==h){if(!c){var n=function(){};n.prototype=e.prototype;c=new n();c.dom=h}return c}}}}}}return null};e.addToCache=function(l,m){m=m||l.id;a[m]={el:l,data:{},events:{}};return l};e.data=function(m,l,n){m=e.get(m);if(!m){return null}var o=a[m.id].data;if(arguments.length==2){return o[l]}else{return(o[l]=n)}};function j(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var l,n,q,p;for(l in a){p=a[l];if(p.skipGC){continue}n=p.el;q=n.dom;if(!q||!q.parentNode||(!q.offsetParent&&!h.getElementById(l))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}delete a[l]}}if(Ext.isIE){var m={};for(l in a){m[l]=a[l]}a=Ext.elCache=m}}}e.collectorThreadId=setInterval(j,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(l){this.dom=l};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(n,l){var m=null;l=l||"_global";if(n=Ext.getDom(n)){(e._flyweights[l]=e._flyweights[l]||new e.Flyweight()).dom=n;m=e._flyweights[l]}return m};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.Element.addMethods(function(){var A=Ext.supports,h={},x=/(-[a-z])/gi,s=document.defaultView,D=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,B=Ext.Element,u=/\s+/,b=/\w/g,d="padding",c="margin",y="border",t="-left",q="-right",w="-top",o="-bottom",j="-width",r=Math,z="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",C="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+o+j},g={l:d+t,r:d+q,t:d+w,b:d+o},a={l:c+t,r:c+q,t:c+w,b:c+o},E=Ext.Element.data;function p(F,G){return G.charAt(1).toUpperCase()}function v(F){return h[F]||(h[F]=F=="float"?(A.cssFloat?"cssFloat":"styleFloat"):F.replace(x,p))}return{adjustWidth:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("lr")+G.getPadding("lr"))}return(H&&F<0)?0:F},adjustHeight:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("tb")+G.getPadding("tb"))}return(H&&F<0)?0:F},addClass:function(J){var K=this,I,F,H,G=[];if(!Ext.isArray(J)){if(typeof J=="string"&&!this.hasClass(J)){K.dom.className+=" "+J}}else{for(I=0,F=J.length;I5?H.toLowerCase():G)},setStyle:function(I,H){var F,G;if(typeof I!="object"){F={};F[I]=H;I=F}for(G in I){H=I[G];G=="opacity"?this.setOpacity(H):this.dom.style[v(G)]=H}return this},setOpacity:function(G,F){var J=this,H=J.dom.style;if(!F||!J.anim){if(Ext.isIE){var I=G<1?"alpha(opacity="+G*100+")":"",K=H.filter.replace(D,"").replace(l,"");H.zoom=1;H.filter=K+(K.length>0?" ":"")+I}else{H.opacity=G}}else{J.anim({opacity:{to:G}},J.preanim(arguments,1),null,0.35,"easeIn")}return J},clearOpacity:function(){var F=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(F.filter)){F.filter=F.filter.replace(D,"").replace(l,"")}}else{F.opacity=F["-moz-opacity"]=F["-khtml-opacity"]=""}return this},getHeight:function(H){var G=this,J=G.dom,I=Ext.isIE&&G.isStyle("display","none"),F=r.max(J.offsetHeight,I?0:J.clientHeight)||0;F=!H?F:F-G.getBorderWidth("tb")-G.getPadding("tb");return F<0?0:F},getWidth:function(G){var H=this,J=H.dom,I=Ext.isIE&&H.isStyle("display","none"),F=r.max(J.offsetWidth,I?0:J.clientWidth)||0;F=!G?F:F-H.getBorderWidth("lr")-H.getPadding("lr");return F<0?0:F},setWidth:function(G,F){var H=this;G=H.adjustWidth(G);!F||!H.anim?H.dom.style.width=H.addUnits(G):H.anim({width:{to:G}},H.preanim(arguments,1));return H},setHeight:function(F,G){var H=this;F=H.adjustHeight(F);!G||!H.anim?H.dom.style.height=H.addUnits(F):H.anim({height:{to:F}},H.preanim(arguments,1));return H},getBorderWidth:function(F){return this.addStyles(F,i)},getPadding:function(F){return this.addStyles(F,g)},clip:function(){var F=this,G=F.dom;if(!E(G,e)){E(G,e,true);E(G,C,{o:F.getStyle(k),x:F.getStyle(n),y:F.getStyle(m)});F.setStyle(k,z);F.setStyle(n,z);F.setStyle(m,z)}return F},unclip:function(){var F=this,H=F.dom;if(E(H,e)){E(H,e,false);var G=E(H,C);if(G.o){F.setStyle(k,G.o)}if(G.x){F.setStyle(n,G.x)}if(G.y){F.setStyle(m,G.y)}}return F},addStyles:function(M,L){var J=0,K=M.match(b),I,H,G,F=K.length;for(G=0;Ga.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls="x-hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,p="opacity",j="visibility",g="display",d="hidden",n="offsets",k="asclass",m="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,l=function(r){var q=i(r,b);if(q===undefined){i(r,b,q="")}return q},o=function(r){var q=i(r,c);if(q===undefined){i(r,c,q=1)}return q};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(q){i(this.dom,c,q);return this},animate:function(r,t,s,u,q){this.anim(r,{duration:t,callback:s,easing:u},q);return this},anim:function(t,u,r,w,s,q){r=r||"run";u=u||{};var v=this,x=Ext.lib.Anim[r](v.dom,t,(u.duration||w)||0.35,(u.easing||s)||"easeOut",function(){if(q){q.call(v)}if(u.callback){u.callback.call(u.scope||v,v,u)}},v);u.anim=x;return x},preanim:function(q,r){return !q[r]?false:(typeof q[r]=="object"?q[r]:{duration:q[r+1],callback:q[r+2],easing:q[r+3]})},isVisible:function(){var q=this,s=q.dom,r=i(s,h);if(typeof r=="boolean"){return r}r=!q.isStyle(j,d)&&!q.isStyle(g,m)&&!((o(s)==e.ASCLASS)&&q.hasClass(q.visibilityCls||e.visibilityCls));i(s,h,r);return r},setVisible:function(t,q){var w=this,r,y,x,v,u=w.dom,s=o(u);if(typeof q=="string"){switch(q){case g:s=e.DISPLAY;break;case j:s=e.VISIBILITY;break;case n:s=e.OFFSETS;break;case a:case k:s=e.ASCLASS;break}w.setVisibilityMode(s);q=false}if(!q||!w.anim){if(s==e.ASCLASS){w[t?"removeClass":"addClass"](w.visibilityCls||e.visibilityCls)}else{if(s==e.DISPLAY){return w.setDisplayed(t)}else{if(s==e.OFFSETS){if(!t){w.hideModeStyles={position:w.getStyle("position"),top:w.getStyle("top"),left:w.getStyle("left")};w.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{w.applyStyles(w.hideModeStyles||{position:"",top:"",left:""});delete w.hideModeStyles}}else{w.fixDisplay();u.style.visibility=t?"visible":d}}}}else{if(t){w.setOpacity(0.01);w.setVisible(true)}w.anim({opacity:{to:(t?1:0)}},w.preanim(arguments,1),null,0.35,"easeIn",function(){t||w.setVisible(false).setOpacity(1)})}i(u,h,t);return w},hasMetrics:function(){var q=this.dom;return this.isVisible()||(o(q)==e.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.preanim(arguments,0));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?l(this.dom):m}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,m)){q.setStyle(j,d);q.setStyle(g,l(this.dom));if(q.isStyle(g,m)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(C.callback){C.callback.call(C.scope,p(B))}if(!C.concurrent){c(D).shift();p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(j){Ext.apply(this,j);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText='
      '+n.indicatorText+"
      "}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText})}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:Ext.num(n.timeout,s.timeout)},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n)}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n)}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||(/multipart\/form-data/i.test(m.getAttribute("enctype")))){return s.doFormUpload.call(s,n,l,k)}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()))}n.headers=Ext.applyIf(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort()}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l=""}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n))}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId)}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,true,j)}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,false,j)}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden",src:Ext.SSL_SECURE_URL});v.body.appendChild(r);if(Ext.isIE){document.frames[l].name=l}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t)});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value}else{w.responseText=A.body.innerHTML}}w.responseXML=A.XMLDocument||A}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B)}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r)},100)}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return json?eval("("+json+")"):""},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i
      ';e.body.appendChild(g);d=g.lastChild;if((c=e.defaultView)){if(c.getComputedStyle(g.firstChild.firstChild,null).marginRight!="0px"){b.correctRightMargin=false}if(c.getComputedStyle(d,null).backgroundColor!="transparent"){b.correctTransparentColor=false}}b.cssFloat=!!d.style.cssFloat;e.body.removeChild(g)};if(Ext.isReady){a()}else{Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,c=/(dbl)?click/,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},d=Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2};Ext.EventObjectImpl=function(g){if(g){this.setEvent(g.browserEvent||g)}};Ext.EventObjectImpl.prototype={setEvent:function(h){var g=this;if(h==g||(h&&h.browserEvent)){return h}g.browserEvent=h;if(h){g.button=h.button?d[h.button]:(h.which?h.which-1:-1);if(c.test(h.type)&&g.button==-1){g.button=0}g.type=h.type;g.shiftKey=h.shiftKey;g.ctrlKey=h.ctrlKey||h.metaKey||false;g.altKey=h.altKey;g.keyCode=h.keyCode;g.charCode=h.charCode;g.target=b.getTarget(h);g.xy=b.getXY(h)}else{g.button=-1;g.shiftKey=false;g.ctrlKey=false;g.altKey=false;g.keyCode=0;g.charCode=0;g.target=null;g.xy=[0,0]}return g},stopEvent:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopEvent(e.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopPropagation(e.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(e){return Ext.isSafari?(a[e]||e):e},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(g,h,e){return g?Ext.fly(this.target).findParent(g,h,e):(e?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var g=this.browserEvent;var h=0;if(g.wheelDelta){h=g.wheelDelta/120}else{if(g.detail){h=-g.detail/3}}return h},within:function(h,i,e){if(h){var g=this[i?"getRelatedTarget":"getTarget"]();return g&&((e?(g==Ext.getDom(h)):false)||Ext.fly(h).contains(g))}return false}};return new Ext.EventObjectImpl()}();Ext.Loader=Ext.apply({},{load:function(j,i,k,c){var k=k||this,g=document.getElementsByTagName("head")[0],b=document.createDocumentFragment(),a=j.length,h=0,e=this;var l=function(m){g.appendChild(e.buildScriptTag(j[m],d))};var d=function(){h++;if(a==h&&typeof i=="function"){i.call(k)}else{if(c===true){l(h)}}};if(c===true){l.call(this,0)}else{Ext.each(j,function(n,m){b.appendChild(this.buildScriptTag(n,d))},this);g.appendChild(b)}},buildScriptTag:function(b,c){var a=document.createElement("script");a.type="text/javascript";a.src=b;if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;c()}}}else{a.onload=c}return a}});Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout.boxOverflow","Ext.app","Ext.ux","Ext.chart","Ext.direct","Ext.slider");Ext.apply(Ext,function(){var c=Ext,a=0,b=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(d,e){return Ext.extend(d,e(d.prototype))},getDoc:function(){return Ext.get(document)},num:function(e,d){e=Number(Ext.isEmpty(e)||Ext.isArray(e)||typeof e=="boolean"||(typeof e=="string"&&e.trim().length==0)?NaN:e);return isNaN(e)?d:e},value:function(g,d,e){return Ext.isEmpty(g,e)?d:g},escapeRe:function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(h,d,g,e){h[d]=h[d].createSequence(g,e)},addBehaviors:function(i){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(i)})}else{var e={},h,d,g;for(d in i){if((h=d.split("@"))[1]){g=h[0];if(!e[g]){e[g]=Ext.select(g)}e[g].on(h[1],i[d])}}e=null}},getScrollBarWidth:function(g){if(!Ext.isReady){return 0}if(g===true||b===null){var i=Ext.getBody().createChild('
      '),h=i.child("div",true);var e=h.offsetWidth;i.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=h.offsetWidth;i.remove();b=e-d+2}return b},combine:function(){var g=arguments,e=g.length,j=[];for(var h=0;hh?1:-1};Ext.each(d,function(h){g=e(g,h)==1?g:h});return g},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(g){e+=g});return e},partition:function(d,e){var g=[[],[]];Ext.each(d,function(j,k,h){g[(e&&e(j,k,h))||(!e&&j)?0:1].push(j)});return g},invoke:function(d,e){var h=[],g=Array.prototype.slice.call(arguments,2);Ext.each(d,function(j,k){if(j&&typeof j[e]=="function"){h.push(j[e].apply(j,g))}else{h.push(undefined)}});return h},pluck:function(d,g){var e=[];Ext.each(d,function(h){e.push(h[g])});return e},zip:function(){var n=Ext.partition(arguments,function(i){return typeof i!="function"}),k=n[0],m=n[1][0],d=Ext.max(Ext.pluck(k,"length")),h=[];for(var l=0;l=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},getArea:function(){var a=this;return((a.bottom-a.top)*(a.right-a.left))},intersect:function(h){var g=this,d=Math.max(g.top,h.top),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.left,h.left);if(a>=d&&e>=c){return new Ext.lib.Region(d,e,a,c)}},union:function(h){var g=this,d=Math.min(g.top,h.top),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.left,h.left);return new Ext.lib.Region(d,e,a,c)},constrainTo:function(b){var a=this;a.top=a.top.constrain(b.top,b.bottom);a.bottom=a.bottom.constrain(b.top,b.bottom);a.left=a.left.constrain(b.left,b.right);a.right=a.right.constrain(b.left,b.right);return a},adjust:function(d,c,a,g){var e=this;e.top+=d;e.left+=c;e.right+=g;e.bottom+=a;return e}};Ext.lib.Region.getRegion=function(e){var h=Ext.lib.Dom.getXY(e),d=h[1],g=h[0]+e.offsetWidth,a=h[1]+e.offsetHeight,c=h[0];return new Ext.lib.Region(d,g,a,c)};Ext.lib.Point=function(a,c){if(Ext.isArray(a)){c=a[1];a=a[0]}var b=this;b.x=b.right=b.left=b[0]=a;b.y=b.top=b.bottom=b[1]=c};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",h="afterend",i="beforebegin",d="beforeend",b=/tag|children|cn|html$/i;function g(m,p,n,q,l,j){m=Ext.getDom(m);var k;if(e.useDom){k=c(p,null);if(j){m.appendChild(k)}else{(l=="firstChild"?m:m.parentNode).insertBefore(k,m[l]||m)}}else{k=Ext.DomHelper.insertHtml(q,m,Ext.DomHelper.createHtml(p))}return n?Ext.get(k,true):k}function c(j,r){var k,u=document,p,s,m,t;if(Ext.isArray(j)){k=u.createDocumentFragment();for(var q=0,n=j.length;q0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}}};Ext.defer=Ext.util.Functions.defer;Ext.createInterceptor=Ext.util.Functions.createInterceptor;Ext.createSequence=Ext.util.Functions.createSequence;Ext.createDelegate=Ext.util.Functions.createDelegate;Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var l=Array.prototype.slice.call(arguments,0),k;d=c=undefined;g=false;for(var m=0,e=i.before.length;m=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{_unload:function(){Ext.EventManager.un(window,"resize",this.fireWindowResize,this);c.call(Ext.EventManager)},doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(h!=m||i!=l){d.fire(i=l,h=m)}},onWindowResize:function(n,m,l){if(!d){d=new Ext.util.Event();k=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}d.addListener(n,m,l)},fireWindowResize:function(){if(d){k.delay(100)}},onTextResize:function(o,n,l){if(!g){g=new Ext.util.Event();var m=new Ext.Element(document.createElement("div"));m.dom.className="x-text-resize";m.dom.innerHTML="X";m.appendTo(document.body);b=m.dom.offsetHeight;setInterval(function(){if(m.dom.offsetHeight!=b){g.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}g.addListener(o,n,l)},removeResizeListener:function(m,l){if(d){d.removeListener(m,l)}},fireResize:function(){if(d){d.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,getKeyEvent:function(){return e?"keydown":"keypress"},useKeydown:e}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!(/\S/.test(g.nodeValue))){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id(),dom=this.dom;html+='';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=(typeof a=="object")?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.lib.Dom.getViewWidth():k.getWidth(),i=q.height||b?Ext.lib.Dom.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,h,c,a,k,l){var i=this,e=i.dom,j=!Ext.isEmpty(k),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(l,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:j});Ext.EventManager.onWindowResize(d,null);if(j){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(k)?k:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}B=B||[0,0];A=(!A||A=="?"?"tl-bl?":(!(/-/).test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.lib.Dom.getViewWidth()-10,G=Ext.lib.Dom.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){throw"Element.alignTo with an invalid alignment "+A}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(nG+D){l=u?v.top-F:G+D-F}if(lB){p=B-q;m=true}if((o+C)>g){o=g-C;m=true}if(p"+String.format(Ext.Element.boxMarkup,c)+"
      "));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var g=this;if(typeof e=="object"){c=e.height;e=e.width}e=g.adjustWidth(e);c=g.adjustHeight(c);if(!d||!g.anim){g.dom.style.width=g.addUnits(e);g.dom.style.height=g.addUnits(c)}else{g.anim({width:{to:e},height:{to:c}},g.preanim(arguments,2))}return g},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var g=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var g=document,h=this.dom,c=(h==g||h==g.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:h.clientWidth,height:h.clientHeight}}},getStyleSize:function(){var j=this,c,i,l=document,m=this.dom,e=(m==l||m==l.body),g=m.style;if(e){var k=Ext.lib.Dom;return{width:k.getViewWidth(),height:k.getViewHeight()}}if(g.width&&g.width!="auto"){c=parseFloat(g.width);if(j.isBorderBox()){c-=j.getFrameWidth("lr")}}if(g.height&&g.height!="auto"){i=parseFloat(g.height);if(j.isBorderBox()){i-=j.getFrameWidth("tb")}}return{width:c||j.getWidth(true),height:i||j.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,g={t:"top",l:"left",r:"right",b:"bottom"},h={};if(!d){for(c in e.margins){h[g[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return h}else{return e.addStyles.call(e,d,e.margins)}}}}());Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(j,p){var m=this,v,e,o,d=m.getBorderWidth,q=m.getPadding,g,a,u,n;if(!p){v=m.getXY()}else{e=parseInt(m.getStyle("left"),10)||0;o=parseInt(m.getStyle("top"),10)||0;v=[e,o]}var c=m.dom,s=c.offsetWidth,i=c.offsetHeight,k;if(!j){k={x:v[0],y:v[1],0:v[0],1:v[1],width:s,height:i}}else{g=d.call(m,"l")+q.call(m,"l");a=d.call(m,"r")+q.call(m,"r");u=d.call(m,"t")+q.call(m,"t");n=d.call(m,"b")+q.call(m,"b");k={x:v[0]+g,y:v[1]+u,0:v[0]+g,1:v[1]+u,width:s-(g+a),height:i-(u+n)}}k.right=k.x+k.width;k.bottom=k.y+k.height;return k},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.moveTo(e[j][0],e[j][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,g=c.dom,h;if(!a||!c.anim){h="scroll"+(e?"Top":"Left");g[h]=d}else{h="scroll"+(e?"Left":"Top");c.anim({scroll:{to:e?[g[h],d]:[d,g[h]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,i){var p=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(p),k=g[0]+p.scrollLeft,u=g[1]+p.scrollTop,q=u+h.offsetHeight,d=k+h.offsetWidth,a=p.clientHeight,m=parseInt(p.scrollTop,10),s=parseInt(p.scrollLeft,10),j=m+a,n=s+p.clientWidth;if(h.offsetHeight>a||uj){p.scrollTop=q-a}}p.scrollTop=p.scrollTop;if(i!==false){if(h.offsetWidth>p.clientWidth||kn){p.scrollLeft=d-p.clientWidth}}p.scrollLeft=p.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.preanim(arguments,2))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!(/^body/i.test(k.tagName))){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,n){var p=this,l=p.dom,o=Ext.DomHelper,m="ext-el-mask-msg",i,q;if(!/^body/i.test(l.tagName)&&p.getStyle("position")=="static"){p.addClass(g)}if(i=e(l,"maskMsg")){i.remove()}if(i=e(l,"mask")){i.remove()}q=o.append(l,{cls:"ext-el-mask"},true);e(l,"mask",q);p.addClass(c);q.setDisplayed(true);if(typeof j=="string"){var k=o.append(l,{cls:m,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=n?m+" "+n:m;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(p)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&p.getStyle("height")=="auto"){q.setSize(undefined,p.getHeight())}return q},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined);k.removeClass([c,g])}},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className="ext-shim";i.src=Ext.SSL_SECURE_URL;j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(j){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,j){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(j)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var j=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}j.el=i;j.defaultUrl=null;j.addEvents(b,d,c);Ext.apply(j,Ext.Updater.defaults);j.transaction=null;j.refreshDelegate=j.refresh.createDelegate(j);j.updateDelegate=j.update.createDelegate(j);j.formUpdateDelegate=(j.formUpdate||function(){}).createDelegate(j);j.renderer=j.renderer||j.getDefaultRenderer();Ext.Updater.superclass.constructor.call(j)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,n,p,l){var k=this,h,j;if(k.fireEvent(b,k.el,i,n)!==false){if(Ext.isObject(i)){h=i;i=h.url;n=n||h.params;p=p||h.callback;l=l||h.discardUrl;j=h.scope;if(!Ext.isEmpty(h.nocache)){k.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){k.indicatorText='
      '+h.text+"
      "}if(!Ext.isEmpty(h.scripts)){k.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){k.timeout=h.timeout}}k.showLoading();if(!l){k.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(k)}var m=Ext.apply({},{url:i,params:(Ext.isFunction(n)&&j)?n.createDelegate(j):n,success:a,failure:e,scope:k,callback:undefined,timeout:(k.timeout*1000),disableCaching:k.disableCaching,argument:{options:h,url:i,form:null,callback:p,scope:j||window,params:n}},h);k.transaction=Ext.Ajax.request(m)}},formUpdate:function(k,h,j,l){var i=this;if(i.fireEvent(b,i.el,k,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}k=Ext.getDom(k);i.transaction=Ext.Ajax.request({form:k,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:k,callback:l,reset:j}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,j,l,m,h){var k=this;if(h){k.update(j||k.defaultUrl,l,m,true)}if(k.autoRefreshProcId){clearInterval(k.autoRefreshProcId)}k.autoRefreshProcId=setInterval(k.update.createDelegate(k,[j||k.defaultUrl,l,m,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'
      Loading...
      ',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|M\$)/;return function(e){return c.test(e.replace(d,""))}})(),formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g= 0 && y >= 0){","v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=Date.parseRegexes.length,o=1,g=[],l=[],k=false,d="",j=0,h,n;for(;j Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:function(){return a("A")},A:{calcLast:true,g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return typeof c!="function"||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(k,a,j){var d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],l=this.keys,g=this.items;j=j||function(i,c){return i-c};for(d=0,e=g.length;de?1:(g=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c]+>/gi,stripScriptsRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var y=this,j=y.html,q=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^]*?for="(.*?)"/,v=/^]*?if="(.*?)"/,x=/^]*?exec="(.*?)"/,r,p=0,k=[],o="values",w="parent",l="xindex",n="xcount",e="return ",c="with(values){ ";j=["",j,""].join("");while((r=j.match(q))){var b=r[0].match(d),a=r[0].match(v),A=r[0].match(x),g=null,h=null,t=null,z=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(o,w,l,n,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(A){g=A&&A[1]?A[1]:null;if(g){t=new Function(o,w,l,n,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(z){switch(z){case".":z=new Function(o,w,c+e+o+"; }");break;case"..":z=new Function(o,w,c+e+w+"; }");break;default:z=new Function(o,w,c+e+z+"; }")}}k.push({id:p,target:z,exec:t,test:h,body:r[1]||""});j=j.replace(r[0],"{xtpl"+p+"}");++p}for(var u=k.length-1;u>=0;--u){y.compileTpl(k[u])}y.master=k[k.length-1];y.tpls=k};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,k,j,d,c){var h=this,g,m=h.tpls[a],l,b=[];if((m.test&&!m.test.call(h,k,j,d,c))||(m.exec&&m.exec.call(h,k,j,d,c))){return""}l=m.target?m.target.call(h,k,j):k;g=l.length;j=m.target?k:j;if(m.target&&Ext.isArray(l)){for(var e=0,g=l.length;e=0;--g){d[k[g].selectorText.toLowerCase()]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets;for(var j=0,g=k.length;j=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;cj+o.left){k=j-l-c;g=true}if((i+e)>d+o.top){i=d-e-c;g=true}if(k=m){i=m-e-5}}n=[k,i];this.storeXY(n);a.setXY.call(this,n);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(i,h,k,l,j){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(l){l()}}.createDelegate(this);a.setVisible.call(this,true,true,k,g,j)}else{if(!i){this.hideUnders(true)}var g=l;if(h){g=function(){this.hideAction();if(l){l()}}.createDelegate(this)}a.setVisible.call(this,i,h,k,g,j);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(j,h,k,l,i){this.fixDisplay();this.beforeAction();this.storeXY(j);var g=this.createCB(l);a.setXY.call(this,j,h,k,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,j,k,i){this.setXY([g,this.getY()],h,j,k,i);return this},setY:function(k,g,i,j,h){this.setXY([this.getX(),k],g,i,j,h);return this},setSize:function(j,k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setSize.call(this,j,k,i,m,g,l);if(!i){g()}return this},setWidth:function(i,h,k,l,j){this.beforeAction();var g=this.createCB(l);a.setWidth.call(this,i,h,k,g,j);if(!h){g()}return this},setHeight:function(j,i,l,m,k){this.beforeAction();var g=this.createCB(m);a.setHeight.call(this,j,i,l,g,k);if(!i){g()}return this},setBounds:function(o,m,p,i,n,k,l,j){this.beforeAction();var g=this.createCB(l);if(!n){this.storeXY([o,m]);a.setXY.call(this,[o,m]);a.setSize.call(this,p,i,n,k,g,j);g()}else{a.setBounds.call(this,o,m,p,i,n,k,g,j)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0},b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,r,q,g){if(!this.el){return}var n=this.adjusts,k=this.el.dom,u=k.style,i=0,p=(q+n.w),e=(g+n.h),j=p+"px",o=e+"px",m,c;u.left=(b+n.l)+"px";u.top=(r+n.t)+"px";if(u.width!=j||u.height!=o){u.width=j;u.height=o;if(!Ext.isIE){m=k.childNodes;c=Math.max(0,(p-12))+"px";m[0].childNodes[1].style.width=c;m[1].childNodes[1].style.width=c;m[2].childNodes[1].style.width=c;m[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[],a=Ext.isIE?'
      ':'
      ';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height;b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(bthis.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),g=c.width,a=c.height,e;if(g!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.layout=a;this.initItems();a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined&&this.layout.setActiveItem){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(h){a.push(this.add(h))},this);return a}var g=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,g,d)!==false&&this.onBeforeAdd(g)!==false){this.items.add(g);g.onAdded(this,d);this.onAdd(g);this.fireEvent("add",this,g,d)}return g},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(e,b){var d=arguments,h=d.length,a=[],g,j;this.initItems();if(h>2){for(g=h-1;g>=1;--g){a.push(this.insert(e,d[g]))}return a}j=this.lookupComponent(this.applyDefaults(b));e=Math.min(e,this.items.length);if(this.fireEvent("beforeadd",this,j,e)!==false&&this.onBeforeAdd(j)!==false){if(j.ownerCt==this){this.items.remove(j)}this.items.insert(e,j);j.onAdded(this,e);this.onAdd(j);this.fireEvent("add",this,j,e)}return j},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b.isAction?b.initialConfig:b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d','','
      ','
      ',"");a.disableFormats=true;return a.compile()})(),destroy:function(){if(this.resizeTask&&this.resizeTask.cancel){this.resizeTask.cancel()}if(this.container){this.container.un(this.container.resizeEvent,this.onResize,this)}if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:true,onLayout:function(d,g){Ext.layout.AutoLayout.superclass.onLayout.call(this,d,g);var e=this.getRenderedItems(d),a=e.length,b,h;for(b=0;b0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",setActiveItem:function(d){var a=this.activeItem,b=this.container;d=b.getComponent(d);if(d&&a!=d){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}var c=d.doLayout&&(this.layoutOnCardChange||!d.rendered);this.activeItem=d;delete d.deferLayout;d.show();this.layout();if(c){d.doLayout()}d.fireEvent("activate",d)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a={};if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},onLayout:function(m,w){Ext.layout.AnchorLayout.superclass.onLayout.call(this,m,w);var p=this.getLayoutTargetSize(),k=p.width,o=p.height,q=w.getStyle("overflow"),n=this.getRenderedItems(m),t=n.length,g=[],j,a,v,l,h,c,e,d,u=0,s,b;if(k<20&&o<20){return}if(m.anchorSize){if(typeof m.anchorSize=="number"){a=m.anchorSize}else{a=m.anchorSize.width;v=m.anchorSize.height}}else{a=m.initialConfig.width;v=m.initialConfig.height}for(s=0;s ');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.expandToolEl=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(a){if(!a.within(this.el,true)){this.autoHideSlideTask.delay(500)}},mouseover:function(a){this.autoHideSlideTask.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){if(this.autoHideSlideTask&&this.autoHideSlideTask.cancel){this.autoHideSlideTask.cancel()}Ext.destroyMembers(this,"miniCollapsedEl","collapsedEl","expandToolEl")}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:true,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=Ext.isDefined(a.labelSeparator)?a.labelSeparator:this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode);if(a.isComposite){a.doLayout()}},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)},destroy:function(){delete this.table;Ext.layout.TableLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}var d=this.overflowHandler;if(typeof d=="string"){d={type:d}}var c="none";if(d&&d.type!=undefined){c=d.type}var b=Ext.layout.boxOverflow[c];if(b[this.type]){b=b[this.type]}this.overflowHandler=new b(this,d)},onLayout:function(b,h){Ext.layout.BoxLayout.superclass.onLayout.call(this,b,h);var d=this.getLayoutTargetSize(),i=this.getVisibleItems(b),c=this.calculateChildBoxes(i,d),g=c.boxes,j=c.meta;if(d.width>0){var k=this.overflowHandler,a=j.tooNarrow?"handleOverflow":"clearOverflow";var e=k[a](c,d);if(e){if(e.targetSize){d=e.targetSize}if(e.recalculate){i=this.getVisibleItems(b);c=this.calculateChildBoxes(i,d);g=c.boxes}}}this.layoutTargetLastSize=d;this.childBoxCache=c;this.updateInnerCtSize(d,c);this.updateChildBoxes(g);this.handleTargetOverflow(d,b,h)},updateChildBoxes:function(c){for(var b=0,e=c.length;b(None)',constructor:function(a){Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this,arguments);this.menuItems=[]},createInnerElements:function(){if(!this.afterCt){this.afterCt=this.layout.innerCt.insertSibling({cls:this.afterCls},"before")}},clearOverflow:function(a,g){var e=g.width+(this.afterCt?this.afterCt.getWidth():0),b=this.menuItems;this.hideTrigger();for(var c=0,d=b.length;ci.width;return l}},handleOverflow:function(d,h){this.showTrigger();var k=h.width-this.afterCt.getWidth(),l=d.boxes,e=0,r=false;for(var o=0,c=l.length;o=0;j--){var q=l[j].component,p=l[j].left+l[j].width;if(p>=k){this.menuItems.unshift({component:q,width:l[j].width});q.hide()}else{break}}}if(this.menuItems.length==0){this.hideTrigger()}return{targetSize:{height:h.height,width:k},recalculate:r}}});Ext.layout.boxOverflow.menu.hbox=Ext.layout.boxOverflow.HorizontalMenu;Ext.layout.boxOverflow.Scroller=Ext.extend(Ext.layout.boxOverflow.None,{animateScroll:true,scrollIncrement:100,wheelIncrement:3,scrollRepeatInterval:400,scrollDuration:0.4,beforeCls:"x-strip-left",afterCls:"x-strip-right",scrollerCls:"x-strip-scroller",beforeScrollerCls:"x-strip-scroller-left",afterScrollerCls:"x-strip-scroller-right",createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},handleOverflow:function(a,b){this.createInnerElements();this.showScrollers()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons()},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide()}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClassOnOver(this.beforeScrollerCls+"-hover");b.addClassOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeScroller,this.afterScroller,this.beforeRepeater,this.afterRepeater,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getItem:function(a){if(Ext.isString(a)){a=Ext.getCmp(a)}else{if(Ext.isNumber(a)){a=this.items[a]}}return a},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addClass":"removeClass",c=this.atExtremeAfter()?"addClass":"removeClass",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(a){this.scrollBy(-this.scrollIncrement,a)},scrollRight:function(a){this.scrollBy(this.scrollIncrement,a)},scrollToItem:function(d,b){d=this.getItem(d);if(d!=undefined){var a=this.getItemVisibility(d);if(!a.fullyVisible){var c=d.getBox(true,true),e=c.x;if(a.hiddenRight){e-=(this.layout.innerCt.getWidth()-c.width)}this.scrollTo(e,b)}}},getItemVisibility:function(e){var d=this.getItem(e).getBox(true,true),a=d.x,c=d.x+d.width,g=this.getScrollPosition(),b=this.layout.innerCt.getWidth()+g;return{hiddenLeft:ab,fullyVisible:a>g&&c=this.getMaxScrollBottom()}});Ext.layout.boxOverflow.scroller.vbox=Ext.layout.boxOverflow.VerticalScroller;Ext.layout.boxOverflow.HorizontalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{handleOverflow:function(a,b){Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this,arguments);return{targetSize:{height:b.height,width:b.width-(this.beforeCt.getWidth()+this.afterCt.getWidth())}}},createInnerElements:function(){var a=this.layout.innerCt;if(!this.beforeCt){this.afterCt=a.insertSibling({cls:this.afterCls},"before");this.beforeCt=a.insertSibling({cls:this.beforeCls},"before");this.createWheelListener()}},scrollTo:function(a,b){var d=this.getScrollPosition(),c=a.constrain(0,this.getMaxScrollRight());if(c!=d&&!this.scrolling){if(b==undefined){b=this.animateScroll}this.layout.innerCt.scrollTo("left",c,b?this.getScrollAnim():false);if(b){this.scrolling=true}else{this.scrolling=false;this.updateScrollButtons()}}},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollLeft,10)||0},getMaxScrollRight:function(){return this.layout.innerCt.dom.scrollWidth-this.layout.innerCt.getWidth()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollRight()}});Ext.layout.boxOverflow.scroller.hbox=Ext.layout.boxOverflow.HorizontalScroller;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",calculateChildBoxes:function(r,b){var F=r.length,R=this.padding,D=R.top,U=R.left,y=D+R.bottom,O=U+R.right,a=b.width-this.scrollOffset,e=b.height,o=Math.max(0,e-y),P=this.pack=="start",W=this.pack=="center",A=this.pack=="end",L=0,Q=0,T=0,l=0,X=0,H=[],k,J,M,V,w,j,S,I,c,x,q,N;for(S=0;Sa;var n=Math.max(0,a-L-O);if(p){for(S=0;S0){var C=[];for(var E=0,v=F;Ei.available?1:-1});for(var S=0,v=C.length;S0){I.top=D+q+(z/2)}}U+=I.width+w.right}return{boxes:H,meta:{maxHeight:Q,nonFlexWidth:L,desiredWidth:l,minimumWidth:X,shortfall:l-a,tooNarrow:p}}}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",calculateChildBoxes:function(o,b){var E=o.length,R=this.padding,C=R.top,V=R.left,x=C+R.bottom,O=V+R.right,a=b.width-this.scrollOffset,c=b.height,K=Math.max(0,a-O),P=this.pack=="start",X=this.pack=="center",z=this.pack=="end",k=0,u=0,U=0,L=0,m=0,G=[],h,I,N,W,t,g,T,H,S,w,n,d,r;for(T=0;Tc;var q=Math.max(0,(c-k-x));if(l){for(T=0,r=E;T0){var J=[];for(var D=0,r=E;Di.available?1:-1});for(var T=0,r=J.length;T0){H.left=V+w+(y/2)}}C+=H.height+t.bottom}return{boxes:G,meta:{maxWidth:u,nonFlexHeight:k,desiredHeight:L,minimumHeight:m,shortfall:L-c,tooNarrow:l}}}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"toolbar",triggerWidth:18,noItemsMenuText:'
      (None)
      ',lastOverflow:false,tableHTML:['',"","",'",'","","","
      ','',"",'',"","
      ","
      ','',"","","","","","","
      ",'',"",'',"","
      ","
      ",'',"",'',"","
      ","
      ","
      "].join(""),onLayout:function(e,j){if(!this.leftTr){var h=e.buttonAlign=="center"?"center":"left";j.addClass("x-toolbar-layout-ct");j.insertHtml("beforeEnd",String.format(this.tableHTML,h));this.leftTr=j.child("tr.x-toolbar-left-row",true);this.rightTr=j.child("tr.x-toolbar-right-row",true);this.extrasTr=j.child("tr.x-toolbar-extras-row",true);if(this.hiddenItem==undefined){this.hiddenItems=[]}}var k=e.buttonAlign=="right"?this.rightTr:this.leftTr,l=e.items.items,d=0;for(var b=0,g=l.length,m;b=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,b,a){var d=document.createElement("td");d.className="x-toolbar-cell";b.insertBefore(d,b.childNodes[a]||null);return d},hideItem:function(a){this.hiddenItems.push(a);a.xtbHidden=true;a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddenItems.remove(a)},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(k){if(this.container.enableOverflow===false){return}var b=k.dom.clientWidth,j=k.dom.firstChild.offsetWidth,m=b-this.triggerWidth,a=this.lastWidth||0,c=this.hiddenItems,e=c.length!=0,n=b>=a;this.lastWidth=b;if(j>b||(e&&n)){var l=this.container.items.items,h=l.length,d=0,o;for(var g=0;gm){if(!(o.hidden||o.xtbHidden)){this.hideItem(o)}}else{if(o.xtbHidden){this.unhideItem(o)}}}}}e=c.length!=0;if(e){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(b,a){if(a instanceof Ext.Toolbar.Separator){b.add("-")}else{if(Ext.isFunction(a.isXType)){if(a.isXType("splitbutton")){b.add(this.createMenuConfig(a,true))}else{if(a.isXType("button")){b.add(this.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(c){this.addComponentToMenu(b,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(h){var b=this.container.items.items,a=b.length,g,e;var c=function(j,i){return j.isXType("buttongroup")&&!(i instanceof Ext.Toolbar.Separator)};this.clearMenu();h.removeAll();for(var d=0;d','','{altText}',"","")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.getItemId();if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(g)}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(d){var a=d instanceof Ext.menu.Item,b=!(a||d instanceof Ext.menu.Separator);return{isMenuItem:a,needsIcon:b&&(d.icon||d.iconCls),icon:d.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(d.iconCls||""),itemId:"x-menu-el-"+d.id,itemCls:"x-menu-list-item ",altText:d.altText||""}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8||Ext.isIE9)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);this.tbar=null}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);this.bbar=null}if(this.header===true){this.elements+=",header";this.header=null}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";this.footer=null}if(this.buttons){this.fbar=this.buttons;this.buttons=null}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,h=a.dom,k,i;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){i=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var j=this.bwrap?this.bwrap:a;this.tbar=j.down("."+this.tbarCls);this.body=j.down("."+this.bodyCls);this.bbar=j.down("."+this.bbarCls);this.footer=j.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);k=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];k.appendChild(c);k.appendChild(b);var l=k.firstChild.firstChild.firstChild;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",k.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(l)}else{this.createElement("header",h);this.createElement("bwrap",h);k=this.bwrap.dom;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",k);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML=''+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(i){this.addTool.apply(this,i)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var e=this.header,c=e.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{var d=e.child("span."+this.headerTextCls);if(d){Ext.DomHelper.insertBefore(d.dom,{tag:"img",alt:"",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('
       
      ');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,a-this.getFrameHeight());c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide(this.hideMode);this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);if(a!==false){this[this.collapseEl].hide(this.hideMode)}this.afterEffect(a);this.cascade(function(b){if(b.lastSize){b.lastSize={width:undefined,height:undefined}}});this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show(this.hideMode);this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;if(a!==false){this[this.collapseEl].show(this.hideMode)}this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(g,d,c,e){var a=g,b=d;if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,b-this.getFrameHeight());this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this,g,d,c,e)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){a+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{allowBlur:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(g,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}}this.fireEvent("specialkey",g,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera||(Ext.isIE7&&Ext.isStrict)){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}if(this.field.assertValue){this.field.assertValue()}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur===true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate(' ');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a,true)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(b,a){b=b.replace("#","");if(b!=this.value||this.allowReselect){var c=this.el;if(this.value){c.child("a.color-"+this.value).removeClass("x-color-palette-sel")}c.child("a.color-"+b).addClass("x-color-palette-sel");this.value=b;if(a!==true){this.fireEvent("select",this,b)}}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['','','",this.showToday?'':"",'
        
      '],c=this.dayNames,h;for(h=0;h<7;h++){var k=this.startDay+h;if(k>6){k=k-7}a.push("")}a[a.length]="";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]=""}a[a.length]=''}a.push("
      ",c[k].substr(0,1),"
      ');var j=document.createElement("div");j.className="x-date-picker";j.innerHTML=a.join("");e.dom.insertBefore(j,b);this.el=Ext.get(j);this.eventEl=Ext.get(j.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=[''];for(var b=0;b<6;b++){a.push('",'",b===0?'':'')}a.push('","
      ',Date.getShortMonthName(b),"',Date.getShortMonthName(b+6),"
      ");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(G,A){if(this.rendered){var a=this.activeDate,p=this.isVisible();this.activeDate=G;if(!A&&a&&this.el){var o=G.getTime();if(a.getMonth()==G.getMonth()&&a.getFullYear()==G.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==o){d.addClass("x-date-selected");if(p&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var k=G.getDaysInMonth(),q=G.getFirstDateOfMonth(),g=q.getDay()-this.startDay;if(g<0){g+=7}k+=g;var B=G.add("mo",-1),h=B.getDaysInMonth()-g,e=this.cells.elements,r=this.textNodes,D=(new Date(B.getFullYear(),B.getMonth(),h,this.initHour)),C=new Date().clearTime().getTime(),v=G.clearTime(true).getTime(),u=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,y=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,F=this.disabledDatesRE,s=this.disabledDatesText,I=this.disabledDays?this.disabledDays.join(""):false,E=this.disabledDaysText,z=this.format;if(this.showToday){var m=new Date().clearTime(),c=(my||(F&&z&&F.test(m.dateFormat(z)))||(I&&I.indexOf(m.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var l=function(J,d){d.title="";var i=D.clearTime(true).getTime();d.firstChild.dateValue=i;if(i==C){d.className+=" x-date-today";d.title=J.todayText}if(i==v){d.className+=" x-date-selected";if(p){Ext.fly(d.firstChild).focus(50)}}if(iy){d.className=" x-date-disabled";d.title=J.maxText;return}if(I){if(I.indexOf(D.getDay())!=-1){d.title=E;d.className=" x-date-disabled"}}if(F&&z){var w=D.dateFormat(z);if(F.test(w)){d.title=s.replace("%0",w);d.className=" x-date-disabled"}}};var x=0;for(;x=a.value){d=a.value}}c.setValue(b,d,false);c.fireEvent("drag",c,g,this)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(c){var a=this.slider,b=this.value;this.el.removeClass("x-slider-thumb-drag");this.dragging=false;a.fireEvent("dragend",a,c);if(this.dragStartValue!=b){a.fireEvent("changecomplete",a,b,this)}},destroy:function(){Ext.destroyMembers(this,"tracker","el")}});Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,constrainThumbs:true,topThumbZIndex:10000,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}this.thumbs=[];Ext.slider.MultiSlider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.values==undefined||Ext.isEmpty(this.values)){this.values=[0]}var a=this.values;for(var b=0;bthis.clickRange[0]&&c.top=c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var c=0;ce?e:c.value}this.syncThumb()},setValue:function(d,c,b,g){var a=this.thumbs[d],e=a.el;c=this.normalizeValue(c);if(c!==a.value&&this.fireEvent("beforechange",this,c,a.value,a)!==false){a.value=c;if(this.rendered){this.moveThumb(d,this.translateValue(c),b!==false);this.fireEvent("change",this,c,a);if(g){this.fireEvent("changecomplete",this,c,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(d,c,b){var a=this.thumbs[d].el;if(!b||this.animate===false){a.setLeft(c)}else{a.shift({left:c,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onResize:function(c,e){var b=this.thumbs,a=b.length,d=0;for(;dthis.clickRange[0]&&c.left','
      ','
      ','
      ',"
       
      ","
      ","
      ",'
      ',"
       
      ","
      ","
      ","");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(j,h,o){if(Ext.isNumber(h)){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var l=Ext.get(this.getEl()).getBox(),d=Ext.get(j),n=d.getScroll(),k,e=d.dom;if(e==document.body){k={x:n.left,y:n.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var m=d.getXY();k={x:m[0],y:m[1],width:e.clientWidth,height:e.clientHeight}}var i=l.y-k.y,g=l.x-k.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),k.width-g-l.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),k.height-i-l.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(k,g){if(!g){return k}else{if(g[0]>=k){return g[0]}else{for(var d=0,c=g.length;d=k){var j=k-g[d];var h=g[e]-k;return(h>j)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(h,c){var g=[];for(var e in h.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;dthis.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(n,o){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=n.getPoint();var b=[];var g=[];var l=[];var j=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(r,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var p in q.groups){if("string"!=typeof p){continue}for(h in this.ids[p]){var k=this.ids[p][h];if(!this.isTypeOfDD(k)){continue}if(k.isTarget&&!k.isLocked()&&((k!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,k,this.mode)){if(o){j.push(k)}else{if(!b[k.id]){d.push(k)}else{l.push(k)}this.dragOvers[k.id]=k}}}}}if(this.mode){if(g.length){q.b4DragOut(n,g);q.onDragOut(n,g)}if(d.length){q.onDragEnter(n,d)}if(l.length){q.b4DragOver(n,l);q.onDragOver(n,l)}if(j.length){q.b4DragDrop(n,j);q.onDragDrop(n,j)}}else{var m=0;for(h=0,m=g.length;h2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var p=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var j=e+k;var o=m+l;var i=(n+p-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i0&&k-pb&&g0&&l-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this);delete this.el},onMouseDown:function(b,a){if(this.fireEvent("mousedown",this,b)!==false&&this.onBeforeStart(b)!==false){this.startXY=this.lastXY=b.getXY();this.dragTarget=this.delegate?a:this.el.dom;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this,[b])}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart(d)}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(l){b=null;a()};var j=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var l=Ext.dd.ScrollManager;var m=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:l.increment;if(!l.animate){if(i.el.scroll(i.dir,m)){j()}}else{i.el.scroll(i.dir,m,true,l.animDuration,j)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(m,l){a();i.el=m;i.dir=l;var o=m.ddScrollConfig?m.ddScrollConfig.ddGroup:undefined,n=(m.ddScrollConfig&&m.ddScrollConfig.frequency)?m.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;if(o===undefined||c.dragCurrent.ddGroup==o){i.id=setInterval(d,n)}};var k=function(o,q){if(q||!c.dragCurrent){return}var s=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;s.refreshCache()}var t=Ext.lib.Event.getXY(o);var u=new Ext.lib.Point(t[0],t[1]);for(var m in e){var n=e[m],l=n._region;var p=n.ddScrollConfig?n.ddScrollConfig:s;if(l&&l.contains(u)&&n.isScrollable()){if(l.bottom-u.y<=p.vthresh){if(i.el!=n){g(n,"down")}return}else{if(l.right-u.x<=p.hthresh){if(i.el!=n){g(n,"left")}return}else{if(u.y-l.top<=p.vthresh){if(i.el!=n){g(n,"up")}return}else{if(u.x-l.left<=p.hthresh){if(i.el!=n){g(n,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(k,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(d,c){var e,a,b;c=[].concat(c);for(e=0,a=c.length;e=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){g.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(g.length){h.push(["create",g])}if(b.length){h.push(["update",b])}}j=h.length;if(j){e=++this.batchCounter;for(d=0;d=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(b,l,h){var e,g;if(this.isDestroyed===true){return}if(!b||h===false){if(h!==false){this.fireEvent("load",this,[],l)}if(l.callback){l.callback.call(l.scope||this,[],l,false,b)}return}var a=b.records,j=b.totalRecords||a.length;if(!l||l.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(e=0,g=a.length;e-1){this.doUpdate(d)}else{k.push(d);++c}}this.totalLength=Math.max(j,this.data.length+c);this.add(k)}this.fireEvent("load",this,a,l);if(l.callback){l.callback.call(l.scope||this,a,l,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if((this.sortInfo||this.multiSortInfo)&&!this.remoteSort){this.sortData()}},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,k=a.direction||"ASC",h=a.sorters,c=[];if(!this.hasMultiSort){h=[{direction:k,field:a.field}]}for(var d=0,b=h.length;d1){for(var p=1,o=c.length;ph?1:(i=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.data=c;a.commit();a.store.reMap(a)}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.data=Ext.apply(a.data,c)}a.commit()}},extractData:function(k,a){var j=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(k)&&!(this instanceof Ext.data.XmlReader)){k=[k]}var h=this.recordType.prototype.fields,o=h.items,m=h.length,c=[];if(a===true){var l=this.recordType;for(var e=0;e=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,g=0,e=true;if(this.meta.totalProperty){g=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:g||b.length}},readResponse:function(g,b){var e=Ext.DomQuery,h=b.responseXML,a=h.documentElement||h;var c=new Ext.data.Response({action:g,success:this.getSuccess(a),message:this.getMessage(a),data:this.extractData(e.select(this.meta.record,a)||e.select(this.meta.root,a),false),raw:h});if(Ext.isEmpty(c.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(g===Ext.data.Api.actions.create){var d=Ext.isDefined(c.data);if(d&&Ext.isEmpty(c.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return c},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=function(g){return(!Ext.isEmpty(g[this.meta.record]))?g[this.meta.record]:g[this.meta.root]};if(l.idPath||l.idProperty){var d=this.createAccessor(l.idPath||l.idProperty);this.getId=function(g){var i=d(g)||g.id;return(i===undefined||i==="")?null:i}}else{this.getId=function(){return null}}var c=[];for(var b=0;b0&&c[0].field==this.groupField){c.shift()}this.groupField=e;this.groupDir=d;this.applyGroupField();var b=function(){this.fireEvent("groupchange",this,this.getGroupState())};if(this.groupOnSort){this.sort(e,d);b.call(this);return}if(this.remoteGroup){this.on("load",b,this,{single:true});this.reload()}else{this.sort(c);b.call(this)}},sort:function(h,c){if(this.remoteSort){return Ext.data.GroupingStore.superclass.sort.call(this,h,c)}var g=[];if(Ext.isArray(arguments[0])){g=arguments[0]}else{if(h==undefined){g=this.sortInfo?[this.sortInfo]:[]}else{var e=this.fields.get(h);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};g=[this.sortInfo]}}if(this.groupField){g.unshift({direction:this.groupDir,field:this.groupField})}return this.multiSort.call(this,g,c)},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir});var a=this.lastOptions;if(a&&a.params){a.params.groupDir=this.groupDir;delete a.params.groupBy}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore);Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,k,l,n){var j=[],h=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:j.push(a.jsonData);break;case Ext.data.Api.actions.read:if(h.directCfg.method.len>0){if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d1){for(var d=0,b=c.length;d0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d,a)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d,a)}},doForm:function(j,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:j,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d,b)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:j,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d,b);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(g.result)?g.result:g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var k=this.el.getStyle("position");if(k!="absolute"&&k!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var o=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var j=0,l=o.length;j0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-cd){c=b-d}}return c},onMouseMove:function(z){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(z.getPoint())){return}var t=this.curSize||this.startBox,l=this.startBox.x,k=this.startBox.y,c=l,b=k,m=t.width,u=t.height,d=m,o=u,n=this.minWidth,A=this.minHeight,s=this.maxWidth,D=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,B=z.getXY(),r=-(this.startPoint[0]-Math.max(this.minX,B[0])),p=-(this.startPoint[1]-Math.max(this.minY,B[1])),j=this.activeHandle.position,E,g;switch(j){case"east":m+=r;m=Math.min(Math.max(n,m),s);break;case"south":u+=p;u=Math.min(Math.max(A,u),D);break;case"southeast":m+=r;u+=p;m=Math.min(Math.max(n,m),s);u=Math.min(Math.max(A,u),D);break;case"north":p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"west":r=this.constrain(m,r,n,s);l+=r;m-=r;break;case"northeast":m+=r;m=Math.min(Math.max(n,m),s);p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"northwest":r=this.constrain(m,r,n,s);p=this.constrain(u,p,A,D);k+=p;u-=p;l+=r;m-=r;break;case"southwest":r=this.constrain(m,r,n,s);u+=p;u=Math.min(Math.max(A,u),D);l+=r;m-=r;break}var q=this.snap(m,i,n);var C=this.snap(u,a,A);if(q!=m||C!=u){switch(j){case"northeast":k-=C-u;break;case"north":k-=C-u;break;case"southwest":l-=q-m;break;case"west":l-=q-m;break;case"northwest":l-=q-m;k-=C-u;break}m=q;u=C}if(this.preserveRatio){switch(j){case"southeast":case"east":u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);break;case"south":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"northeast":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"north":E=m;m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);l+=(E-m)/2;break;case"southwest":u=o*(m/d);u=Math.min(Math.max(A,u),D);E=m;m=d*(u/o);l+=E-m;break;case"west":g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);k+=(g-u)/2;E=m;m=d*(u/o);l+=E-m;break;case"northwest":E=m;g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);k+=g-u;l+=E-m;break}}this.proxy.setBounds(l,k,m,u);if(this.dynamic){this.resizeElement()}}catch(v){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,g,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=g;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,showAnimDuration:0.25,hideAnimDuration:0.25,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:" "});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){if(this.activeGhost){this.unghost()}b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();this.clearAnchor();Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)}Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b);if(Ext.isIE6&&Ext.isStrict){this.doLayout()}}this.focus();this.updateHandles();this.saveState()},focus:function(){var e=this.focusEl,a=this.defaultButton,c=typeof a,d,b;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){e=this.fbar.items.get(a)}else{if(Ext.isString(a)){e=Ext.getCmp(a)}else{e=a}}d=e.getEl();b=Ext.getDom(this.container);if(d&&b){if(b!=document.body&&!Ext.lib.Region.getRegion(b).contains(Ext.lib.Region.getRegion(d.dom))){return}}}e=e||this.focusEl;e.focus.defer(10,e)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:this.showAnimDuration,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:this.hideAnimDuration,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25+this.el.getConstrainOffset())}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus.defer(10,this);if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){this.clearAnchor();this.anchorTarget={el:c,alignment:e,offsets:d};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this.doAnchor()},doAnchor:function(){var a=this.anchorTarget;this.alignTo(a.el,a.alignment,a.offsets);return this},clearAnchor:function(){if(this.anchorTarget){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);delete this.anchorTarget}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=Ext.extend(Ext.dd.DD,{constructor:function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false},moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost(a.initialConfig.cls);if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var g={};var d=[];var e=null;var c=function(j,i){return(!j._lastAccess||j._lastAccess0){l.sort(c);var k=l[0].manager.zseed;for(var m=0;m=0;--j){if(!d[j].hidden){b(d[j]);return}}b(null)};return{zseed:9000,register:function(i){if(i.manager){i.manager.unregister(i)}i.manager=this;g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete i.manager;delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(l,k){var m=[];for(var j=d.length-1;j>=0;--j){var n=d[j];if(l.call(k||n,n)!==false){m.push(n)}}return m},each:function(j,i){for(var k in g){if(g[k]&&typeof g[k]!="function"){if(j.call(i||g[k],g[k])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var u,b,q,t,h,l,s,a,n,p,j,g,r,v,o,i="",d="",m=["ok","yes","no","cancel"];var c=function(x){r[x].blur();if(u.isVisible()){u.hide();w();Ext.callback(b.fn,b.scope||window,[x,v.dom.value,b],1)}};var w=function(){if(b&&b.cls){u.el.removeClass(b.cls)}n.reset()};var e=function(z,x,y){if(b&&b.closable!==false){u.hide();w()}if(y){y.stopEvent()}};var k=function(x){var z=0,y;if(!x){Ext.each(m,function(A){r[A].hide()});return z}u.footer.dom.style.display="";Ext.iterate(r,function(A,B){y=x[A];if(y){B.show();B.setText(Ext.isString(y)?y:Ext.MessageBox.buttonText[A]);z+=B.getEl().getWidth()+15}else{B.hide()}});return z};return{getDialog:function(x){if(!u){var z=[];r={};Ext.each(m,function(A){z.push(r[A]=new Ext.Button({text:this.buttonText[A],handler:c.createCallback(A),hideMode:"offsets"}))},this);u=new Ext.Window({autoCreate:true,title:x,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:z,enableOverflow:false})});u.render(document.body);u.getEl().addClass("x-window-dlg");q=u.mask;h=u.body.createChild({html:'

      '});j=Ext.get(h.dom.firstChild);var y=h.dom.childNodes[1];l=Ext.get(y.firstChild);s=Ext.get(y.childNodes[2].firstChild);s.enableDisplayMode();s.addKeyListener([10,13],function(){if(u.isVisible()&&b&&b.buttons){if(b.buttons.ok){c("ok")}else{if(b.buttons.yes){c("yes")}}}});a=Ext.get(y.childNodes[2].childNodes[1]);a.enableDisplayMode();n=new Ext.ProgressBar({renderTo:h});h.createChild({cls:"x-clear"})}return u},updateText:function(A){if(!u.isVisible()&&!b.width){u.setSize(this.maxWidth,100)}l.update(A?A+" ":" ");var y=d!=""?(j.getWidth()+j.getMargins("lr")):0,C=l.getWidth()+l.getMargins("lr"),z=u.getFrameWidth("lr"),B=u.body.getFrameWidth("lr"),x;x=Math.max(Math.min(b.width||y+C+z+B,b.maxWidth||this.maxWidth),Math.max(b.minWidth||this.minWidth,o||0));if(b.prompt===true){v.setWidth(x-y-z-B)}if(b.progress===true||b.wait===true){n.setSize(x-y-z-B)}if(Ext.isIE&&x==o){x+=4}l.update(A||" ");u.setSize(x,"auto").center();return this},updateProgress:function(y,x,z){n.updateProgress(y,x);if(z){this.updateText(z)}return this},isVisible:function(){return u&&u.isVisible()},hide:function(){var x=u?u.activeGhost:null;if(this.isVisible()||x){u.hide();w();if(x){u.unghost(false,false)}}return this},show:function(A){if(this.isVisible()){this.hide()}b=A;var B=this.getDialog(b.title||" ");B.setTitle(b.title||" ");var x=(b.closable!==false&&b.progress!==true&&b.wait!==true);B.tools.close.setDisplayed(x);v=s;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){s.hide();a.show();a.setHeight(Ext.isNumber(b.multiline)?b.multiline:this.defaultTextHeight);v=a}else{s.show();a.hide()}}else{s.hide();a.hide()}v.dom.value=b.value||"";if(b.prompt){B.focusEl=v}else{var z=b.buttons;var y=null;if(z&&z.ok){y=r.ok}else{if(z&&z.yes){y=r.yes}}if(y){B.focusEl=y}}if(Ext.isDefined(b.iconCls)){B.setIconClass(b.iconCls)}this.setIcon(Ext.isDefined(b.icon)?b.icon:i);o=k(b.buttons);n.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){B.el.addClass(b.cls)}B.proxyDrag=b.proxyDrag===true;B.modal=b.modal!==false;B.mask=b.modal!==false?q:false;if(!B.isVisible()){document.body.appendChild(u.el.dom);B.setAnimateTarget(b.animEl);B.on("show",function(){if(x===true){B.keyMap.enable()}else{B.keyMap.disable()}},this,{single:true});B.show(b.animEl)}if(b.wait===true){n.wait(b.waitConfig)}return this},setIcon:function(x){if(!u){i=x;return}i=undefined;if(x&&x!=""){j.removeClass("x-hidden");j.replaceClass(d,x);h.addClass("x-dlg-icon");d=x}else{j.replaceClass(d,"x-hidden");h.removeClass("x-dlg-icon");d=""}return this},progress:function(z,y,x){this.show({title:z,msg:y,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:x});return this},wait:function(z,y,x){this.show({title:y,msg:z,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:x});return this},alert:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.OK,fn:y,scope:x,minWidth:this.minWidth});return this},confirm:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.YESNO,fn:y,scope:x,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(C,B,z,y,x,A){this.show({title:C,msg:B,buttons:this.OKCANCEL,fn:z,minWidth:this.minPromptWidth,scope:y,prompt:true,multiline:x,value:A});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=Ext.extend(Object,{constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(this.panel.initialConfig.cls,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.Panel.DD=Ext.extend(Ext.dd.DragSource,{constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=new Ext.dd.PanelProxy(b,a);Ext.Panel.DD.superclass.constructor.call(this,b.el,a);var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=b.header}c.setStyle("cursor","move");this.scroll=false},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.state.Provider=Ext.extend(Ext.util.Observable,{constructor:function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(b){var e=/^(a|n|d|b|s|o|e)\:(.*)$/,h=e.exec(unescape(b)),d,c,a,g;if(!h||!h[1]){return}c=h[1];a=h[2];switch(c){case"e":return null;case"n":return parseFloat(a);case"d":return new Date(Date.parse(a));case"b":return(a=="1");case"a":d=[];if(a!=""){Ext.each(a.split("^"),function(i){d.push(this.decodeValue(i))},this)}return d;case"o":d={};if(a!=""){Ext.each(a.split("^"),function(i){g=i.split("=");d[g[0]]=this.decodeValue(g[1])},this)}return d;default:return a}},encodeValue:function(c){var b,g="",e=0,a,d;if(c==null){return"e:1"}else{if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){for(a=c.length;e-1){var e=this.isSelected(b),c=this.all.elements[b],d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)}},onAdd:function(g,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),h,b=this.all.elements;if(e0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,g,b){if(Ext.isArray(d)){if(!g){this.clearSelections(true)}for(var c=0,a=d.length;c=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('
      '+this.loadingText+"
      ");this.all.clear()}},onDestroy:function(){this.all.clear();this.selected.clear();Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:undefined,columnResize:true,columnSort:true,maxColumnWidth:Ext.isIE?99:100,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.list.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.list.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('
      ','','
      ',"{header}","
      ","
      ",'
      ',"
      ",'
      ',"
      ")}if(!this.tpl){this.tpl=new Ext.XTemplate('',"
      ",'','
      ',' class="{cls}">',"{[values.tpl.apply(parent)]}","
      ","
      ",'
      ',"
      ","
      ")}var l=this.columns,h=0,k=0,m=l.length,b=[];for(var g=0;gthis.maxColumnWidth){n.width-=(h-this.maxColumnWidth)/100}k++}b.push(n)}l=this.columns=b;if(k10)){b.style.width=d;g.style.width=d}else{b.style.width=c+"px";g.style.width=c+"px";setTimeout(function(){if((a.offsetWidth-a.clientWidth)>10){b.style.width=d;g.style.width=d}},10)}}if(Ext.isNumber(e)){a.style.height=Math.max(0,e-g.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(g){g=g.dom||g;var a=g.parentNode,d=a.parentNode.childNodes,b=0,e;for(;e=d[b];b++){if(e==a){return b}}return -1},setHdWidths:function(){var d=this.innerHd.dom.getElementsByTagName("div"),c=0,b=this.columns,a=b.length;for(;c','','{text}',"");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu});if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this)}},findTargets:function(c){var b=null,a=c.getTarget("li:not(.x-tab-edge)",this.strip);if(a){b=this.getComponent(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{close:null,item:null,el:null}}}return{close:c.getTarget(".x-tab-strip-close",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!==0){return}b.preventDefault();var a=this.findTargets(b);if(a.close){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(h){this.remove(h)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b0){this.setActiveTab(0)}else{this.setActiveTab(null)}}}if(!this.destroying){this.delegateUpdates()}},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onItemDisabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).addClass("x-item-disabled")}this.stack.remove(b)},onItemEnabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).removeClass("x-item-disabled")}},onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("span.x-tab-strip-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){b=Ext.get(b);b.child("span.x-tab-strip-text").replaceClass(c,a);b[Ext.isEmpty(a)?"removeClass":"addClass"]("x-tab-with-icon")}},getTabEl:function(a){var b=this.getComponent(a);return b?b.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){var a=this.rendered;if(this.suspendUpdates){return}if(this.resizeTabs&&a){this.autoSizeTabs()}if(this.enableTabScroll&&a){this.autoScrollTabs()}},autoSizeTabs:function(){var h=this.items.length,b=this.tabPosition!="bottom"?"header":"footer",c=this[b].dom.offsetWidth,a=this[b].dom.clientWidth;if(!this.resizeTabs||h<1||!a){return}var k=Math.max(Math.min(Math.floor((a-4)/h)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=k;var m=this.strip.query("li:not(.x-tab-edge)");for(var e=0,j=m.length;e20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(i>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.insertFirst({cls:"x-tab-scroller-left"});a.setHeight(c);a.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=a;var b=this.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e),h=this.getScrollPos(),d=this.getScrollArea(),g=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+h,b=g+c.offsetWidth;if(g(h+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(g){var h=g.getWheelDelta()*this.wheelIncrement*-1;g.stopEvent();var i=this.getScrollPos(),c=i+h,a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=i){this.scrollTo(b,false)}},onScrollRight:function(){var a=this.getScrollWidth()-this.getScrollArea(),c=this.getScrollPos(),b=Math.min(a,c+this.getScrollIncrement());if(b!=c){this.scrollTo(b,this.animScroll)}},onScrollLeft:function(){var b=this.getScrollPos(),a=Math.max(0,b-this.getScrollIncrement());if(a!=b){this.scrollTo(a,this.animScroll)}},updateScrollButtons:function(){var a=this.getScrollPos();this.scrollLeft[a===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[a>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater);this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap");this.activeTab=null;Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c','  ','  ','  ',"");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;this.setIcon(this.icon);this.setText(this.text);this.setIconClass(this.iconCls);if(Ext.isDefined(this.tabIndex)){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onRepeatClick,this)}else{this.mon(b,this.clickEvent,this.onClick,this)}},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.useSetClass=true;this.setButtonClass();this.doc=Ext.getDoc();this.doAutoWidth()},setIconClass:function(a){this.iconCls=a;if(this.el){this.btnEl.dom.className="";this.btnEl.addClass(["x-btn-text",a||""]);this.setButtonClass()}return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}if(this.menu&&this.destroyMenu!==false){Ext.destroy(this.btnEl,this.menu)}Ext.destroy(this.repeater)},onDestroy:function(){if(this.rendered){this.doc.un("mouseover",this.monitorMouseOver,this);this.doc.un("mouseup",this.onMouseUp,this);delete this.doc;delete this.btnEl;Ext.ButtonToggleMgr.unregister(this)}Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){if(this.autoWidth!==false&&this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;if(a&&a.getWidth()>20){a.clip();a.setWidth(Ext.util.TextMetrics.measure(a,this.text).width+a.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()a}else{return c.getPageY()>this.btnEl.getRegion().bottom}},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{this.doToggle();this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName==this.arrowSelector},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!=this.arrowSelector}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(!Ext.isObject(c)){c=this.menu.getComponent(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,a)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var a=0;Ext.each(this.items,function(c,b){Ext.apply(c,{group:c.group||this.id,itemIndex:b,checkHandler:this.checkHandler,scope:this,checked:c.checked||false});this.menu.items.push(c);if(c.checked){a=b}},this);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this);this.setActiveItem(a,true)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var a=this.menu;a.render();if(!a.hasLayout){a.doLayout()}var d,b;for(var c=1;c"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.createComponent(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.createComponent(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return this.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store,true)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,j){if(!this.rendered){this.dsLoaded=[b,e,j];return}var g=this.getParams();this.cursor=(j.params&&j.params[g.start])?j.params[g.start]:0;var i=this.getPageData(),c=i.activePage,h=i.pages;this.afterTextItem.setText(String.format(this.afterPageText,i.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==h);this.last.setDisabled(c==h);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,i)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b=1&g<=j.pages){i.setValue(g)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this)}if(!c){this.store=null}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=true}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);Ext.History=(function(){var e,c;var k=false;var d;function g(){var l=location.href,m=l.indexOf("#"),n=m>=0?l.substr(m+1):null;if(Ext.isGecko){n=decodeURIComponent(n)}return n}function a(){c.value=d}function h(l){d=l;Ext.History.fireEvent("change",l)}function i(m){var l=['
      ',Ext.util.Format.htmlEncode(m),"
      "].join("");try{var o=e.contentWindow.document;o.open();o.write(l);o.close();return true}catch(n){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var o=e.contentWindow.document;var m=o.getElementById("state");var l=m?m.innerText:null;var n=g();setInterval(function(){o=e.contentWindow.document;m=o.getElementById("state");var q=m?m.innerText:null;var p=g();if(q!==l){l=q;h(l);location.hash=l;n=l;a()}else{if(p!==n){n=p;i(p)}}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}function j(){d=c.value?c.value:g();if(Ext.isIE){b()}else{var l=g();setInterval(function(){var m=g();if(m!==l){l=m;h(l);a()}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(m,l){if(k){Ext.callback(m,l,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(m,l)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(m){this.on("ready",m,l,{single:true})}j()},add:function(l,m){if(m!==false){if(this.getToken()==l){return true}}if(Ext.isIE){return i(l)}else{location.hash=l;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return k?d:g()}}})();Ext.apply(Ext.History,new Ext.util.Observable());Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this[this.closeAction],scope:this})}},showAt:function(a){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){a=this.el.adjustForConstraints(a)}this.setPagePosition(a[0],a[1])},doAutoWidth:function(a){a=a||0;var b=this.body.getTextWidth();if(this.title){b=Math.max(b,this.header.child("span").getTextWidth(this.title))}b+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+a;this.setWidth(b.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(a,b){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.reg("tip",Ext.Tip);Ext.Tip.DD=function(b,a){Ext.apply(this,a);this.tip=b;Ext.Tip.DD.superclass.constructor.call(this,b.el.id,"WindowDD-"+b.id);this.setHandleElId(b.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(a){this.tip.el.enableShadow(true)}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1).setVisibilityMode(Ext.Element.DISPLAY)},initTarget:function(c){var a;if((a=Ext.get(c))){if(this.target){var b=Ext.get(this.target);this.mun(b,"mouseover",this.onTargetOver,this);this.mun(b,"mouseout",this.onTargetOut,this);this.mun(b,"mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.delegate){this.anchorTarget=this.triggerElement}if(this.anchor){this.targetCounter++;var c=this.getOffsets(),l=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,a=Ext.lib.Dom.getViewWidth()-5,h=Ext.lib.Dom.getViewHeight()-5,i=document.documentElement,e=document.body,k=(i.scrollLeft||e.scrollLeft||0)+5,j=(i.scrollTop||e.scrollTop||0)+5,b=[l[0]+c[0],l[1]+c[1]],g=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]h){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.getXY();this.delayShow()}},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=c){d=c-b-5}}return{x:a,y:d}},beforeDestroy:function(){this.clearTimers();Ext.destroy(this.anchorEl);delete this.anchorEl;delete this.target;delete this.anchorTarget;delete this.triggerElement;Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(this)}});Ext.reg("tooltip",Ext.ToolTip);Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var h=Ext.isArray(e)?e:arguments;for(var g=0,a=h.length;g1){var d=function(i,h){if(i&&h){var j=h.findChild(a,b);if(j){j.select();if(g){g(true,j)}}else{if(g){g(false,j)}}}else{if(g){g(false,j)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(b,a){Ext.tree.TreePanel.superclass.onRender.call(this,b,a);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.renderRoot()},beforeDestroy:function(){if(this.rendered){Ext.dd.ScrollManager.unregister(this.body);Ext.destroy(this.dropZone,this.dragZone)}this.destroyRoot();Ext.destroy(this.loader);this.nodeHash=this.root=this.loader=null;Ext.tree.TreePanel.superclass.beforeDestroy.call(this)},destroyRoot:function(){if(this.root&&this.root.destroy){this.root.destroy(true)}}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(a){this.tree=a;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var a=this.tree;if(a.trackMouseOver!==false){a.mon(a.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut})}a.mon(a.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(b){var a;if(a=b.getTarget(".x-tree-node-el",10)){var c=Ext.fly(a,"_treeEvents").getAttribute("tree-node-id","ext");if(c){return this.tree.getNodeById(c)}}return null},getNodeTarget:function(b){var a=b.getTarget(".x-tree-node-icon",1);if(!a){a=b.getTarget(".x-tree-node-el",6)}return a},delegateOut:function(b,a){if(!this.beforeEvent(b)){return}if(b.getTarget(".x-tree-ec-icon",1)){var c=this.getNode(b);this.onIconOut(b,c);if(c==this.lastEcOver){delete this.lastEcOver}}if((a=this.getNodeTarget(b))&&!b.within(a,true)){this.onNodeOut(b,this.getNode(b))}},delegateOver:function(b,a){if(!this.beforeEvent(b)){return}if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}if(this.lastEcOver){this.onIconOut(b,this.lastEcOver);delete this.lastEcOver}if(b.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(b);this.onIconOver(b,this.lastEcOver)}if(a=this.getNodeTarget(b)){this.onNodeOver(b,this.getNode(b))}},trackExit:function(a){if(this.lastOverNode){if(this.lastOverNode.ui&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode)}delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},delegateClick:function(b,a){if(this.beforeEvent(b)){if(b.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(b,this.getNode(b))}else{if(b.getTarget(".x-tree-ec-icon",1)){this.onIconClick(b,this.getNode(b))}else{if(this.getNodeTarget(b)){this.onNodeClick(b,this.getNode(b))}}}}else{this.checkContainerEvent(b,"click")}},delegateDblClick:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeDblClick(b,this.getNode(b))}}else{this.checkContainerEvent(b,"dblclick")}},delegateContextMenu:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeContextMenu(b,this.getNode(b))}}else{this.checkContainerEvent(b,"contextmenu")}},checkContainerEvent:function(b,a){if(this.disabled){b.stopEvent();return false}this.onContainerEvent(b,a)},onContainerEvent:function(b,a){this.tree.fireEvent("container"+a,this.tree,b)},onNodeClick:function(b,a){a.ui.onClick(b)},onNodeOver:function(b,a){this.lastOverNode=a;a.ui.onOver(b)},onNodeOut:function(b,a){a.ui.onOut(b)},onIconOver:function(b,a){a.ui.addClass("x-tree-ec-over")},onIconOut:function(b,a){a.ui.removeClass("x-tree-ec-over")},onIconClick:function(b,a){a.ui.ecClick(b)},onCheckboxClick:function(b,a){a.ui.onCheckChange(b)},onNodeDblClick:function(b,a){a.ui.onDblClick(b)},onNodeContextMenu:function(b,a){a.ui.onContextMenu(b)},beforeEvent:function(b){var a=this.getNode(b);if(this.disabled||!a||!a.ui){b.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,a);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){this.select(a)},select:function(c,a){if(!Ext.fly(c.ui.wrap).isVisible()&&a){return a.call(this,c)}var b=this.selNode;if(c==b){c.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,c,b)!==false){if(b&&b.ui){b.ui.onSelectedChange(false)}this.selNode=c;c.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,c,b)}}return c},unselect:function(b,a){if(this.selNode==b){this.clearSelections(a)}},clearSelections:function(a){var b=this.selNode;if(b){b.ui.onSelectedChange(false);this.selNode=null;if(a!==true){this.fireEvent("selectionchange",this,null)}}return b},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(a){if(!(a=a||this.selNode||this.lastSelNode)){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c,this.selectPrevious)}else{var b=c.lastChild;while(b&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()&&b.childNodes.length>0){b=b.lastChild}return this.select(b,this.selectPrevious)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode,this.selectPrevious)}}return null},selectNext:function(b){if(!(b=b||this.selNode||this.lastSelNode)){return null}if(b.firstChild&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()){return this.select(b.firstChild,this.selectNext)}else{if(b.nextSibling){return this.select(b.nextSibling,this.selectNext)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var g=false;if(Ext.isArray(e)){g=e}else{if(arguments.length>1){g=arguments}}if(g){for(var d=0,a=g.length;d0){var g=d?function(){e.apply(d,arguments)}:e;c.sort(g);for(var b=0;b
      ','',this.indentMarkup,"",'','',g?('':"/>")):"",'',e.text,"
      ",'',""].join("");if(l!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",j,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var i=this.elNode.childNodes;this.indentNode=i[0];this.ecNode=i[1];this.iconNode=i[2];var h=3;if(g){this.checkbox=i[3];this.checkbox.defaultChecked=this.checkbox.checked;h++}this.anchor=i[h];this.textNode=i[h].firstChild},getHref:function(a){return Ext.isEmpty(a)?(Ext.isGecko?"":"#"):a},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var g=this.node,d,c,a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow",e=g.hasChildNodes();if(e||g.attributes.expandable){if(g.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},getChildIndent:function(){if(!this.childIndent){var a=[],b=this.node;while(b){if(!b.isRoot||(b.isRoot&&b.ownerTree.rootVisible)){if(!b.isLast()){a.unshift('')}else{a.unshift('')}}b=b.parentNode}this.childIndent=a.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var a="",b=this.node.parentNode;if(b){a=b.ui.getChildIndent()}if(this.indentMarkup!=a){this.indentNode.innerHTML=a;this.indentMarkup=a}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(a){if(this[a]){Ext.fly(this[a]).remove();delete this[a]}},this);delete this.node}});Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='
      ';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,nodeParameter:"node",directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[b])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b-1){c=[]}for(var d=0,a=b.length;dp){return e?-1:1}}return 0}},doSort:function(a){a.sort(this.sortFn)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}});if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,k,i,d,c){if(!a||!c){return false}var g=a.node;var h=c.node;if(!(g&&g.isTarget&&k)){return false}if(k=="append"&&g.allowChildren===false){return false}if((k=="above"||k=="below")&&(g.parentNode&&g.parentNode.allowChildren===false)){return false}if(h&&(g==h||h.contains(g))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=g;b.data=c;b.point=k;b.source=i;b.rawEvent=d;b.dropNode=h;b.cancel=false;var j=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&j!==false},getDropPoint:function(h,g,l){var m=g.node;if(m.isRoot){return m.allowChildren!==false?"append":false}var c=g.ddel;var o=Ext.lib.Dom.getY(c),j=o+c.offsetHeight;var i=Ext.lib.Event.getPageY(h);var k=m.allowChildren===false||m.isLeaf();if(this.appendOnly||m.parentNode.allowChildren===false){return k?false:"append"}var d=false;if(!this.allowParentInsert){d=m.hasChildNodes()&&m.isExpanded()}var a=(j-o)/(k?2:3);if(i>=o&&i<(o+a)){return"above"}else{if(!d&&(k||i>=j-a&&i<=j)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,i,h,g){var k=this.getDropPoint(h,b,i);var c=b.node;if(!this.expandProcId&&k=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(k!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,k,i,h,g)){if(k){var a=b.ddel;var j;if(k=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";j="x-tree-drag-insert-above"}else{if(k=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";j="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";j="x-tree-drag-append"}}if(this.lastInsertClass!=j){Ext.fly(a).replaceClass(this.lastInsertClass,j);this.lastInsertClass=j}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(i,b,h,d){var a=this.getDropPoint(h,i,b);var g=i.node;g.ui.startDrop();if(!this.isValidDropPoint(i,a,b,h,d)){g.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,g,a,h):null);return this.processDrop(g,d,a,b,h,c)},onContainerDrop:function(a,g,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,g,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",g):null);return this.processDrop(d,c,"append",a,g,b)}return false},processDrop:function(j,h,b,a,i,d){var g={tree:this.tree,target:j,data:h,point:b,source:a,rawEvent:i,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",g);if(c===false||g.cancel===true||!g.dropNode){j.ui.endDrop();return g.dropStatus}j=g.target;if(b=="append"&&!j.isExpanded()){j.expand(false,null,function(){this.completeDrop(g)}.createDelegate(this))}else{this.completeDrop(g)}return true},completeDrop:function(h){var d=h.dropNode,e=h.point,c=h.target;if(!Ext.isArray(d)){d=[d]}var g;for(var b=0,a=d.length;bd.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText(" ")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}},onDestroy:function(){clearTimeout(this.autoEditTimer);Ext.tree.TreeEditor.superclass.onDestroy.call(this);var a=this.tree;a.un("beforeclick",this.beforeNodeClick,this);a.un("dblclick",this.onNodeDblClick,this)}}); +/* SWFObject v2.2 + is released under the MIT License +*/ +var swfobject=function(){var E="undefined",s="object",T="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",r="application/x-shockwave-flash",S="SWFObjectExprInst",y="onreadystatechange",P=window,k=document,u=navigator,U=false,V=[i],p=[],O=[],J=[],m,R,F,C,K=false,a=false,o,H,n=true,N=function(){var ab=typeof k.getElementById!=E&&typeof k.getElementsByTagName!=E&&typeof k.createElement!=E,ai=u.userAgent.toLowerCase(),Z=u.platform.toLowerCase(),af=Z?(/win/).test(Z):/win/.test(ai),ad=Z?(/mac/).test(Z):/mac/.test(ai),ag=/webkit/.test(ai)?parseFloat(ai.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Y=!+"\v1",ah=[0,0,0],ac=null;if(typeof u.plugins!=E&&typeof u.plugins[T]==s){ac=u.plugins[T].description;if(ac&&!(typeof u.mimeTypes!=E&&u.mimeTypes[r]&&!u.mimeTypes[r].enabledPlugin)){U=true;Y=false;ac=ac.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ah[0]=parseInt(ac.replace(/^(.*)\..*$/,"$1"),10);ah[1]=parseInt(ac.replace(/^.*\.(.*)\s.*$/,"$1"),10);ah[2]=/[a-zA-Z]/.test(ac)?parseInt(ac.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof P.ActiveXObject!=E){try{var ae=new ActiveXObject(X);if(ae){ac=ae.GetVariable("$version");if(ac){Y=true;ac=ac.split(" ")[1].split(",");ah=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}}catch(aa){}}}return{w3:ab,pv:ah,wk:ag,ie:Y,win:af,mac:ad}}(),l=function(){if(!N.w3){return}if((typeof k.readyState!=E&&k.readyState=="complete")||(typeof k.readyState==E&&(k.getElementsByTagName("body")[0]||k.body))){g()}if(!K){if(typeof k.addEventListener!=E){k.addEventListener("DOMContentLoaded",g,false)}if(N.ie&&N.win){k.attachEvent(y,function(){if(k.readyState=="complete"){k.detachEvent(y,arguments.callee);g()}});if(P==top){(function(){if(K){return}try{k.documentElement.doScroll("left")}catch(Y){setTimeout(arguments.callee,0);return}g()})()}}if(N.wk){(function(){if(K){return}if(!(/loaded|complete/).test(k.readyState)){setTimeout(arguments.callee,0);return}g()})()}t(g)}}();function g(){if(K){return}try{var aa=k.getElementsByTagName("body")[0].appendChild(D("span"));aa.parentNode.removeChild(aa)}catch(ab){return}K=true;var Y=V.length;for(var Z=0;Z0){for(var ag=0;ag0){var af=c(Z);if(af){if(G(p[ag].swfVersion)&&!(N.wk&&N.wk<312)){x(Z,true);if(ac){ab.success=true;ab.ref=A(Z);ac(ab)}}else{if(p[ag].expressInstall&&B()){var aj={};aj.data=p[ag].expressInstall;aj.width=af.getAttribute("width")||"0";aj.height=af.getAttribute("height")||"0";if(af.getAttribute("class")){aj.styleclass=af.getAttribute("class")}if(af.getAttribute("align")){aj.align=af.getAttribute("align")}var ai={};var Y=af.getElementsByTagName("param");var ad=Y.length;for(var ae=0;ae'}}ab.outerHTML='"+ag+"";O[O.length]=aj.id;Y=c(aj.id)}else{var aa=D(s);aa.setAttribute("type",r);for(var ad in aj){if(aj[ad]!=Object.prototype[ad]){if(ad.toLowerCase()=="styleclass"){aa.setAttribute("class",aj[ad])}else{if(ad.toLowerCase()!="classid"){aa.setAttribute(ad,aj[ad])}}}}for(var ac in ah){if(ah[ac]!=Object.prototype[ac]&&ac.toLowerCase()!="movie"){e(aa,ac,ah[ac])}}ab.parentNode.replaceChild(aa,ab);Y=aa}}return Y}function e(aa,Y,Z){var ab=D("param");ab.setAttribute("name",Y);ab.setAttribute("value",Z);aa.appendChild(ab)}function z(Z){var Y=c(Z);if(Y&&Y.nodeName=="OBJECT"){if(N.ie&&N.win){Y.style.display="none";(function(){if(Y.readyState==4){b(Z)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.removeChild(Y)}}}function b(aa){var Z=c(aa);if(Z){for(var Y in Z){if(typeof Z[Y]=="function"){Z[Y]=null}}Z.parentNode.removeChild(Z)}}function c(aa){var Y=null;try{Y=k.getElementById(aa)}catch(Z){}return Y}function D(Y){return k.createElement(Y)}function j(aa,Y,Z){aa.attachEvent(Y,Z);J[J.length]=[aa,Y,Z]}function G(aa){var Z=N.pv,Y=aa.split(".");Y[0]=parseInt(Y[0],10);Y[1]=parseInt(Y[1],10)||0;Y[2]=parseInt(Y[2],10)||0;return(Z[0]>Y[0]||(Z[0]==Y[0]&&Z[1]>Y[1])||(Z[0]==Y[0]&&Z[1]==Y[1]&&Z[2]>=Y[2]))?true:false}function w(ad,Z,ae,ac){if(N.ie&&N.mac){return}var ab=k.getElementsByTagName("head")[0];if(!ab){return}var Y=(ae&&typeof ae=="string")?ae:"screen";if(ac){o=null;H=null}if(!o||H!=Y){var aa=D("style");aa.setAttribute("type","text/css");aa.setAttribute("media",Y);o=ab.appendChild(aa);if(N.ie&&N.win&&typeof k.styleSheets!=E&&k.styleSheets.length>0){o=k.styleSheets[k.styleSheets.length-1]}H=Y}if(N.ie&&N.win){if(o&&typeof o.addRule==s){o.addRule(ad,Z)}}else{if(o&&typeof k.createTextNode!=E){o.appendChild(k.createTextNode(ad+" {"+Z+"}"))}}}function x(aa,Y){if(!n){return}var Z=Y?"visible":"hidden";if(K&&c(aa)){c(aa).style.visibility=Z}else{w("#"+aa,"visibility:"+Z)}}function M(Z){var aa=/[\\\"<>\.;]/;var Y=aa.exec(Z)!=null;return Y&&typeof encodeURIComponent!=E?encodeURIComponent(Z):Z}var d=function(){if(N.ie&&N.win){window.attachEvent("onunload",function(){var ad=J.length;for(var ac=0;ac0){for(h=0;h-1&&e.position=="left"){e.position="bottom"}return e},onDestroy:function(){Ext.chart.CartesianChart.superclass.onDestroy.call(this);Ext.each(this.labelFn,function(a){this.removeFnProxy(a)},this)}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true,labelSpacing:2};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear",roundMajorUnit:true,calculateByLabelSize:true,position:"left",adjustMaximumByMajorUnit:true,adjustMinimumByMajorUnit:true});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false,calculateByLabelSize:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null,calculateCategoryCount:false});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null,showInLegend:true,axis:"primary"});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],plain:false,floating:true,zIndex:15000,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",bufferResize:false,initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){var a=this.doLayout.createDelegate(this,[]);this.on({add:a,remove:a})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:this.zIndex})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a instanceof Ext.menu.BaseItem){if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(g,e){var b=this.items;for(var c=g,a=b.length;c>=0&&c=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMaxc){b=c;a=i-h}else{if(bb&&b>0){this.activeMax=b-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(d);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0;return a},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:" "}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:" "})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(!this.isDestroyed){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide}},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}var a=this.parentMenu;if(this.deepHide===true&&a){if(a.floating){a.hide(true)}else{a.deactivateActive()}}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){a.ownerCt=this;if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem({el:a}))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var a=this.parentMenu;if(a&&a.activeChild==this){delete a.activeChild}delete this.parentMenu;Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}var b=this.scroller;if(b){Ext.destroy(b.topRepeater,b.bottomRepeater,b.top,b.bottom)}Ext.destroy(this.el,this.focusEl,this.ul)}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(g,d){var c=g.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=g.TAB){return false}if(!this.menu.activeItem&&g.isNavKeyPress()&&c!=g.SPACE&&c!=g.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,g,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var h,e,b,d={},a=false,l=new Date();function n(){h={};e=new Ext.util.MixedCollection();b=Ext.getDoc().addKeyListener(27,j);b.disable()}function j(){if(e&&e.length>0){var o=e.clone();o.each(function(p){p.hide()});return true}return false}function g(o){e.remove(o);if(e.length<1){b.disable();Ext.getDoc().un("mousedown",m);a=false}}function k(o){var p=e.last();l=new Date();e.add(o);if(!a){b.enable();Ext.getDoc().on("mousedown",m);a=true}if(o.parentMenu){o.getEl().setZIndex(parseInt(o.parentMenu.getEl().getStyle("z-index"),10)+3);o.parentMenu.activeChild=o}else{if(p&&!p.isDestroyed&&p.isVisible()){o.getEl().setZIndex(parseInt(p.getEl().getStyle("z-index"),10)+3)}}}function c(o){if(o.activeChild){o.activeChild.hide()}if(o.autoHideTimer){clearTimeout(o.autoHideTimer);delete o.autoHideTimer}}function i(o){var p=o.parentMenu;if(!p&&!o.allowOtherMenus){j()}else{if(p&&p.activeChild){p.activeChild.hide()}}}function m(o){if(l.getElapsed()>50&&e.length>0&&!o.getTarget(".x-menu")){j()}}return{hideAll:function(){return j()},register:function(o){if(!h){n()}h[o.id]=o;o.on({beforehide:c,hide:g,beforeshow:i,show:k})},get:function(o){if(typeof o=="string"){if(!h){return null}return h[o]}else{if(o.events){return o}else{if(typeof o.length=="number"){return new Ext.menu.Menu({items:o})}else{return Ext.create(o,"menu")}}}},unregister:function(o){delete h[o.id];o.un("beforehide",c);o.un("hide",g);o.un("beforeshow",i);o.un("show",k)},registerCheckable:function(o){var p=o.group;if(p){if(!d[p]){d[p]=[]}d[p].push(o)}},unregisterCheckable:function(o){var p=o.group;if(p){d[p].remove(o)}},onCheckChange:function(q,r){if(q.group&&r){var t=d[q.group],p=0,o=t.length,s;for(;p',' target="{hrefTarget}"',"",">",'{altText}','{text}',"")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");if(!this.href){this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:true})}Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||" ",altText:this.altText||""}},setText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){clearTimeout(this.showTimer);clearTimeout(this.hideTimer);if(this.menu){delete this.menu.ownerCt;this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.reg("menuitem",Ext.menu.Item);Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){var c=a===true;if(this.checked!=b&&(c||this.fireEvent("beforecheckchange",this,b)!==false)){Ext.menu.MenuMgr.onCheckChange(this,b);if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(!c){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("show",this.picker.focus,this.picker);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,submitValue:true,isFormField:true,msgDisplay:"",hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(c,a){if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}this.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);if(this.submitValue===false){this.el.dom.removeAttribute("name")}var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}if(this.readOnly){this.setReadOnly(true)}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){return this.itemCt},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){return false}return String(this.getValue())!==String(this.originalValue)},setReadOnly:function(a){if(this.rendered){this.el.dom.readOnly=a}this.readOnly=a},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,a)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.getKeyEvent(),this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus();if(this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&(this.validateOnBlur||this.validationEvent=="blur")){this.validate()}var a=this.getValue();if(String(a)!==String(this.startValue)){this.fireEvent("change",this,a,this.startValue)}this.fireEvent("blur",this);this.postBlur()},postBlur:Ext.emptyFn,isValid:function(a){if(this.disabled){return true}var c=this.preventMark;this.preventMark=a===true;var b=this.validateValue(this.processValue(this.getRawValue()),a);this.preventMark=c;return b},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(a){return a},validateValue:function(b){var a=this.getErrors(b)[0];if(a==undefined){return true}else{this.markInvalid(a);return false}},getErrors:function(){return[]},getActiveError:function(){return this.activeError||""},markInvalid:function(c){if(this.rendered&&!this.preventMark){c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}}this.setActiveError(c)},clearInvalid:function(){if(this.rendered&&!this.preventMark){this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}}this.unsetActiveError()},setActiveError:function(b,a){this.activeError=b;if(a!==true){this.fireEvent("invalid",this,b)}},unsetActiveError:function(a){delete this.activeError;if(a!==true){this.fireEvent("valid",this)}},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorEl:function(){this.errorEl.setWidth(this.getErrorCt().getWidth(true)-20)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},getRawValue:function(){var a=this.rendered?this.el.getValue():Ext.value(this.value,"");if(a===this.emptyText){a=""}return a},getValue:function(){if(!this.rendered){return this.value}var a=this.el.getValue();if(a===this.emptyText||a===undefined){a=""}return a},setRawValue:function(a){return this.rendered?(this.el.dom.value=(Ext.isEmpty(a)?"":a)):""},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.on("resize",b.alignErrorEl,b);b.on("destroy",function(){Ext.destroy(this.errorEl)},b)}b.alignErrorEl();b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"});if(b.ownerCt){b.ownerCt.on("afterlayout",b.alignErrorIcon,b);b.ownerCt.on("expand",b.alignErrorIcon,b)}b.on("resize",b.alignErrorIcon,b);b.on("destroy",function(){Ext.destroy(this.errorIcon)},b)}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show()},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide()}else{a.el.dom.title=""}}}};Ext.form.Field.msgFx={normal:{show:function(a,b){a.setDisplayed("block")},hide:function(a,b){a.setDisplayed(false).update("")}},slide:{show:function(a,b){a.slideIn("t",{stopFx:true})},hide:function(a,b){a.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(a,b){a.fixDisplay();a.alignTo(b.el,"tl-tr");a.slideIn("l",{stopFx:true})},hide:function(a,b){a.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false&&this.validationEvent!="blur"){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.mon(this.el,"mousedown",this.onMouseDown,this);if(this.emptyText){this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,{scope:this,keyup:this.onKeyUp,keydown:this.onKeyDown,keypress:this.onKeyPress})}},onMouseDown:function(a){if(!this.hasFocus){this.mon(this.el,"mouseup",Ext.emptyFn,this,{single:true,preventDefault:true})}},processValue:function(a){if(this.stripCharsRe){var b=a.replace(this.stripCharsRe,"");if(b!==a){this.setRawValue(b);return b}}return a},filterValidation:function(a){if(!a.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},onKeyUpBuffered:function(a){if(this.doAutoSize(a)){this.autoSize()}},doAutoSize:function(a){return !a.isNavKeyPress()},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el,b;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("");b=true}a.removeClass(this.emptyClass)}if(this.selectOnFocus||b){a.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(b){if(b.ctrlKey){return}var a=b.getKey();if(Ext.isGecko&&(b.isNavKeyPress()||a==b.BACKSPACE||(a==b.DELETE&&b.button==-1))){return}var c=String.fromCharCode(b.getCharCode());if(!Ext.isGecko&&b.isSpecialKey()&&!c){return}if(!this.maskRe.test(c)){b.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},getErrors:function(a){var d=Ext.form.TextField.superclass.getErrors.apply(this,arguments);a=Ext.isDefined(a)?a:this.processValue(this.getRawValue());if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){d.push(c)}}if(a.length<1||a===this.emptyText){if(this.allowBlank){return d}else{d.push(this.blankText)}}if(!this.allowBlank&&(a.length<1||a===this.emptyText)){d.push(this.blankText)}if(a.lengththis.maxLength){d.push(String.format(this.maxLengthText,this.maxLength))}if(this.vtype){var b=Ext.form.VTypes;if(!b[this.vtype](a,this)){d.push(this.vtypeText||b[this.vtype+"Text"])}}if(this.regex&&!this.regex.test(a)){d.push(this.regexText)}return d},selectText:function(h,a){var c=this.getRawValue();var e=false;if(c.length>0){h=h===undefined?0:h;a=a===undefined?c.length:a;var g=this.el.dom;if(g.setSelectionRange){g.setSelectionRange(h,a)}else{if(g.createTextRange){var b=g.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},autoSize:function(){if(!this.grow||!this.rendered){return}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var c=this.el;var b=c.dom.value;var e=document.createElement("div");e.appendChild(document.createTextNode(b));b=e.innerHTML;Ext.removeNode(e);e=null;b+=" ";var a=Math.min(this.growMax,Math.max(this.metrics.getWidth(b)+10,this.growMin));this.el.setWidth(a);this.fireEvent("autosize",this,a)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,editable:true,readOnly:false,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",defaultTriggerWidth:17,onResize:function(a,c){Ext.form.TriggerField.superclass.onResize.call(this,a,c);var b=this.getTriggerWidth();if(Ext.isNumber(a)){this.el.setWidth(a-b)}this.wrap.setWidth(this.el.getWidth()+b)},getTriggerWidth:function(){var a=this.trigger.getWidth();if(!this.hideTrigger&&!this.readOnly&&a===0){a=this.defaultTriggerWidth}return a},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(b,a){this.doc=Ext.isIE?Ext.getBody():Ext.getDoc();Ext.form.TriggerField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.triggerClass});this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}this.resizeEl=this.positionEl=this.wrap},getWidth:function(){return(this.el.getWidth()+this.trigger.getWidth())},updateEditState:function(){if(this.rendered){if(this.readOnly){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this);this.trigger.setDisplayed(false)}else{if(!this.editable){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mon(this.el,"click",this.onTriggerClick,this)}else{this.el.dom.readOnly=false;this.el.removeClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this)}this.trigger.setDisplayed(!this.hideTrigger)}this.onResize(this.width||this.wrap.getWidth())}},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);this.updateEditState()},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){this.doc.un("mousedown",this.mimicBlur,this)}delete this.doc;Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);this.mimicing=true;this.doc.on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.on("specialkey",this.checkTab,this)}}},checkTab:function(a,b){if(b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.wrap.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;this.doc.un("mousedown",this.mimicBlur,this);if(this.monitorTab&&this.el){this.un("specialkey",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(a){return this.triggers[a]},afterRender:function(){Ext.form.TwinTriggerField.superclass.afterRender.call(this);var c=this.triggers,b=0,a=c.length;for(;b")}}d.innerHTML=a;b=Math.min(this.growMax,Math.max(d.offsetHeight,this.growMin));if(b!=this.lastHeight){this.lastHeight=b;this.el.setHeight(b);this.fireEvent("autosize",this,b)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",autoStripChars:false,initEvents:function(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}a=Ext.escapeRe(a);this.maskRe=new RegExp("["+a+"]");if(this.autoStripChars){this.stripCharsRe=new RegExp("[^"+a+"]","gi")}Ext.form.NumberField.superclass.initEvents.call(this)},getErrors:function(b){var c=Ext.form.NumberField.superclass.getErrors.apply(this,arguments);b=Ext.isDefined(b)?b:this.processValue(this.getRawValue());if(b.length<1){return c}b=String(b).replace(this.decimalSeparator,".");if(isNaN(b)){c.push(String.format(this.nanText,b))}var a=this.parseValue(b);if(athis.maxValue){c.push(String.format(this.maxText,this.maxValue))}return c},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(a){a=Ext.isNumber(a)?a:parseFloat(String(a).replace(this.decimalSeparator,"."));a=this.fixPrecision(a);a=isNaN(a)?"":String(a).replace(".",this.decimalSeparator);return Ext.form.NumberField.superclass.setValue.call(this,a)},setMinValue:function(a){this.minValue=Ext.num(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.num(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?"":a},fixPrecision:function(b){var a=isNaN(b);if(!this.allowDecimals||this.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.decimalPrecision))},beforeBlur:function(){var a=this.parseValue(this.getRawValue());if(!Ext.isEmpty(a)){this.setValue(a)}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,startDay:0,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initTime:"12",initTimeFormat:"H",safeParse:function(b,c){if(Date.formatContainsHourInfo(c)){return Date.parseDate(b,c)}else{var a=Date.parseDate(b+" "+this.initTime,c+" "+this.initTimeFormat);if(a){return a.clearTime()}}},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initEvents:function(){Ext.form.DateField.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{down:function(a){this.onTriggerClick()},scope:this,forceKeyDown:true})},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){this.disabledDates=a;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE)}},setDisabledDays:function(a){this.disabledDays=a;if(this.menu){this.menu.picker.setDisabledDays(a)}},setMinValue:function(a){this.minValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},getErrors:function(e){var h=Ext.form.DateField.superclass.getErrors.apply(this,arguments);e=this.formatDate(e||this.processValue(this.getRawValue()));if(e.length<1){return h}var c=e;e=this.parseDate(e);if(!e){h.push(String.format(this.invalidText,c,this.format));return h}var g=e.getTime();if(this.minValue&&gthis.maxValue.clearTime().getTime()){h.push(String.format(this.maxText,this.formatDate(this.maxValue)))}if(this.disabledDays){var a=e.getDay();for(var b=0;b
      {'+this.displayField+"}
      "}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText,deferEmptyText:false});this.mon(this.view,{containerclick:this.onViewClick,click:this.onViewClick,scope:this});this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(g,d,e){this.maxHeight=e-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=d;this.innerList.setWidth(d-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this)}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}if(this.pageTb){this.pageTb.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},reset:function(){if(this.clearFilterOnReset&&this.mode=="local"){this.store.clearFilter()}Ext.form.ComboBox.superclass.reset.call(this)},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick()},esc:function(a){this.collapse()},tab:function(a){if(this.forceSelection===true){this.collapse()}else{this.onViewClick(false)}return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){var d=Ext.KeyNav.prototype.doRelay.apply(this,arguments);if(!Ext.isIE&&Ext.EventManager.useKeydown){this.scope.fireKey(c)}return d}return true},forceKeyDown:true,defaultEventAction:"stopEvent"});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.destroyMembers(this,"hiddenField");Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(a){if(!this.isExpanded()){Ext.form.ComboBox.superclass.fireKey.call(this,a)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(!isNaN(a)&&this.isVisible()&&this.list){this.doResize(a)}else{this.bufferSize=a}},doResize:function(a){if(!Ext.isDefined(this.listWidth)){var b=Math.max(a,this.minListWidth);this.list.setWidth(b);this.innerList.setWidth(b-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'
      '+this.loadingText+"
      ":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0||this.listEmptyText){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(this.autoSelect!==false&&!this.selectByValue(this.value,true)){this.select(0,true)}}else{if(this.autoSelect!==false){this.selectNext()}if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.collapse()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},assertValue:function(){var b=this.getRawValue(),a;if(this.valueField&&Ext.isDefined(this.value)){a=this.findRecord(this.valueField,this.value)}if(!a||a.get(this.displayField)!=b){a=this.findRecord(this.displayField,b)}if(!a&&this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.value(this.lastSelectionText,"");this.applyEmptyText()}else{this.clearValue()}}else{if(a&&this.valueField){if(this.value==b){return}b=a.get(this.valueField||this.displayField)}this.setValue(b)}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=Ext.value(a,"")}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0],c=this.store,d=c.getAt(a);if(d){this.onSelect(d,a)}else{this.collapse()}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom,e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight,c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight),a=this.getPosition()[1]-Ext.getBody().getScroll().top,g=Ext.lib.Dom.getViewHeight()-a-this.getSize().height,d=Math.max(a,g,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.endUpdate()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&this.readOnly!==true&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){this.assertValue()},postBlur:function(){Ext.form.ComboBox.superclass.postBlur.call(this);this.collapse();this.inKeyMode=false},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={},c=this.store.paramNames;if(this.pageSize){b[c.start]=0;b[c.limit]=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!this.isDestroyed&&!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}if(this.title||this.pageSize){this.assetHeight=0;if(this.title){this.assetHeight+=this.header.getHeight()}if(this.pageSize){this.assetHeight+=this.footer.getHeight()}}if(this.bufferSize){this.doResize(this.bufferSize);delete this.bufferSize}this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.setZIndex(this.getZIndex());this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}this.mon(Ext.getDoc(),{scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.readOnly||this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,boxLabel:" ",defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,{scope:this,click:this.onClick,change:this.onClick})},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}if(Ext.isIE&&!Ext.isStrict){this.wrap.repaint()}this.resizeEl=this.positionEl=this.wrap},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return this.checked},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var c=this.checked,b=this.inputValue;if(a===false){this.checked=false}else{this.checked=(a===true||a==="true"||a=="1"||(b?a==b:String(a).toLowerCase()=="on"))}if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(c!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");this.on("change",this.validate,this);Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(j,g){if(!this.el){var p={autoEl:{id:this.id},cls:this.groupCls,layout:"column",renderTo:j,bufferResize:false};var a={xtype:"container",defaultType:this.defaultType,layout:"form",defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(p,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,m=this.items.length;e0&&e%r==0){o++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}n[o].items.push(this.items[e])}}else{for(var e=0,m=this.items.length;e-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(b,a){if(this.items&&this.items.each){this.items.each(b,a||this)}},getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.CompositeField=Ext.extend(Ext.form.Field,{defaultMargins:"0 5 0 0",skipLastItemMargin:true,isComposite:true,combineErrors:true,labelConnector:", ",initComponent:function(){var g=[],b=this.items,e;for(var d=0,c=b.length;d")},sortErrors:function(){var a=this.items;this.fieldErrors.sort("ASC",function(g,d){var c=function(b){return function(i){return i.getName()==b}};var h=a.findIndexBy(c(g.field)),e=a.findIndexBy(c(d.field));return h1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}},setValueForItem:function(a){a=String(a).split(",")[0];this.eachItem(function(b){b.setValue(a==b.inputValue)})},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",shouldLayout:false,onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=Ext.extend(Ext.util.Observable,{constructor:function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.getItemId()});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)},timeout:30,paramOrder:undefined,paramsAsHash:false,waitTitle:"Please Wait...",activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(a){if(a!==true){this.items.each(function(b){Ext.destroy(b)});Ext.destroy(this.el)}this.items.clear();this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){b=b||{};if(this.standardSubmit){var a=b.clientValidation===false||this.isValid();if(a){var c=this.el.dom;if(this.url&&Ext.isEmpty(c.action)){c.action=this.url}c.submit()}return a}var d=String.format("{0}submit",this.api?"direct":"");this.doAction(d,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields,d,c;a.each(function(e){d=this.findField(e.name);if(d){c=d.getValue();if(Ext.type(c)!==false&&c.getGroupValue){c=c.getGroupValue()}else{if(d.eachItem){c=[];d.eachItem(function(g){c.push(g.getValue())})}}b.set(e.name,c)}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){this.items.each(function(c){if(c.isFormField&&c.syncValue){c.syncValue()}});var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle)}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(c){var b=this.items.get(c);if(!Ext.isObject(b)){var a=function(d){if(d.isFormField){if(d.dataIndex==c||d.id==c||d.getName()==c){b=d;return false}else{if(d.isComposite){return d.items.each(a)}else{if(d instanceof Ext.form.CheckboxGroup&&d.rendered){return d.eachItem(a)}}}}};this.items.each(a)}return b||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c':">"),c,"")}return d.join("")},createToolbar:function(e){var c=[];var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function d(j,h,i){return{itemId:j,cls:"x-btn-icon",iconCls:"x-edit-"+j,enableToggle:h!==false,scope:e,handler:i||e.relayBtnCmd,clickEvent:"mousedown",tooltip:a?e.buttonTips[j]||undefined:undefined,overflowText:e.buttonTips[j].title||undefined,tabIndex:-1}}if(this.enableFont&&!Ext.isSafari2){var g=new Ext.Toolbar.Item({autoEl:{tag:"select",cls:"x-font-select",html:this.createFontOptions()}});c.push(g,"-")}if(this.enableFormat){c.push(d("bold"),d("italic"),d("underline"))}if(this.enableFontSize){c.push("-",d("increasefontsize",false,this.adjustFont),d("decreasefontsize",false,this.adjustFont))}if(this.enableColors){c.push("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(i,h){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(i,h){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",h);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){c.push("-",d("justifyleft"),d("justifycenter"),d("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){c.push("-",d("createlink",false,this.createLink))}if(this.enableLists){c.push("-",d("insertorderedlist"),d("insertunorderedlist"))}if(this.enableSourceEdit){c.push("-",d("sourceedit",true,function(h){this.toggleSourceEdit(!this.sourceEditMode)}))}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild,items:c});if(g){this.fontSelect=g.el;this.mon(this.fontSelect,"change",function(){var h=this.fontSelect.dom.value;this.relayCmd("fontname",h);this.deferFocus()},this)}this.mon(b.el,"click",function(h){h.preventDefault()});this.tb=b;this.tb.doLayout()},onDisable:function(){this.wrap.mask();Ext.form.HtmlEditor.superclass.onDisable.call(this)},onEnable:function(){this.wrap.unmask();Ext.form.HtmlEditor.superclass.onEnable.call(this)},setReadOnly:function(b){Ext.form.HtmlEditor.superclass.setReadOnly.call(this,b);if(this.initialized){if(Ext.isIE){this.getEditorBody().contentEditable=!b}else{this.setDesignMode(!b)}var a=this.getEditorBody();if(a){a.style.cursor=this.readOnly?"default":"text"}this.disableItems(b)}},getDocMarkup:function(){var a=Ext.fly(this.iframe).getHeight()-this.iframePad*2;return String.format('',this.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.tb.doLayout();this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}this.resizeEl=this.positionEl=this.wrap},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.style.overflow="auto";a.src=Ext.SSL_SECURE_URL;this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);var b=this.getDoc();this.win=this.getWin();b.open();b.write(this.getDocMarkup());b.close();var a={run:function(){var c=this.getDoc();if(c.body||c.readyState=="complete"){Ext.TaskMgr.stop(a);this.setDesignMode(true);this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||this.getDesignMode()!="on"){this.initFrame()}}},setDesignMode:function(b){var a=this.getDoc();if(a){if(this.readOnly){b=false}a.designMode=(/on|true/i).test(String(b).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();if(!a){return""}return String(a.designMode).toLowerCase()},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.getItemId()!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(Ext.isNumber(b)){var e=b-this.wrap.getFrameWidth("lr");this.el.setWidth(e);this.tb.setWidth(e);this.iframe.style.width=Math.max(e,0)+"px"}if(Ext.isNumber(c)){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(a);this.iframe.style.height=Math.max(a,0)+"px";var d=this.getEditorBody();if(d){d.style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(b){var d,a;if(b===undefined){b=!this.sourceEditMode}this.sourceEditMode=b===true;var c=this.tb.getComponent("sourceedit");if(c.pressed!==this.sourceEditMode){c.toggle(this.sourceEditMode);if(!c.xtbHidden){return}}if(this.sourceEditMode){this.previousSize=this.getSize();d=Ext.get(this.iframe).getHeight();this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus();this.el.dom.style.height=d+"px"}else{a=parseInt(this.el.dom.style.height,10);if(this.initialized){this.disableItems(this.readOnly)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus();this.setSize(this.previousSize);delete this.previousSize;this.iframe.style.height=a+"px"}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)==this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='
      '+c+"
      "}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){this.setDesignMode(false);this.setDesignMode(true)}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var c=this.getEditorBody(),a=this.el.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),g,b;a["background-attachment"]="fixed";c.bgProperties="fixed";Ext.DomHelper.applyStyles(c,a);g=this.getDoc();if(g){try{Ext.EventManager.removeAll(g)}catch(d){}}b=this.onEditorEvent.createDelegate(this);Ext.EventManager.on(g,{mousedown:b,dblclick:b,click:b,keyup:b,buffer:100});if(Ext.isGecko){Ext.EventManager.on(g,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(g,"keydown",this.fixKeys,this)}g.editorInitialized=true;this.initialized=true;this.pushValue();this.setReadOnly(this.readOnly);this.fireEvent("initialize",this)}catch(d){}},beforeDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);var b=this.getDoc();if(b){try{Ext.EventManager.removeAll(b);for(var c in b){delete b[c]}}catch(a){}}if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}Ext.form.HtmlEditor.superclass.beforeDestroy.call(this)},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var d=b.getItemId()=="increasefontsize"?1:-1,c=this.getDoc(),a=parseInt(c.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+d}else{if(a<=13){a=2+d}else{if(a<=16){a=3+d}else{if(a<=18){a=4+d}else{if(a<=24){a=5+d}else{a=6+d}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){d*=2}a=Math.max(1,a+d)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(this.readOnly){return}if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.getDoc();if(this.enableFont&&!Ext.isSafari2){var a=(c.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){var c=this.getDoc();c.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(c){if(!this.activated){return}if(Ext.isIE){this.win.focus();var b=this.getDoc(),a=b.selection.createRange();if(a){a.pasteHTML(c);this.syncValue();this.deferFocus()}}else{this.win.focus();this.execCmd("InsertHTML",c);this.deferFocus()}},fixKeys:function(){if(Ext.isIE){return function(g){var a=g.getKey(),d=this.getDoc(),b;if(a==g.TAB){g.stopEvent();b=d.selection.createRange();if(b){b.collapse(true);b.pasteHTML("    ");this.deferFocus()}}else{if(a==g.ENTER){b=d.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){g.stopEvent();b.pasteHTML("
      ");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}else{if(a==b.ENTER){b.stopEvent();this.execCmd("InsertHtml","

      ");this.deferFocus()}}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:undefined,maxValue:undefined,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){if(Ext.isDefined(this.minValue)){this.setMinValue(this.minValue,true)}if(Ext.isDefined(this.maxValue)){this.setMaxValue(this.maxValue,true)}if(!this.store){this.generateStore(true)}Ext.form.TimeField.superclass.initComponent.call(this)},setMinValue:function(b,a){this.setLimit(b,true,a);return this},setMaxValue:function(b,a){this.setLimit(b,false,a);return this},generateStore:function(b){var c=this.minValue||new Date(this.initDate).clearTime(),a=this.maxValue||new Date(this.initDate).clearTime().add("mi",(24*60)-1),d=[];while(c<=a){d.push(c.dateFormat(this.format));c=c.add("mi",this.increment)}this.bindStore(d,b)},setLimit:function(b,g,a){var e;if(Ext.isString(b)){e=this.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){var c=new Date(this.initDate).clearTime();c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());this[g?"minValue":"maxValue"]=c;if(!a){this.generateStore()}}},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,formatDate:Ext.form.DateField.prototype.formatDate,parseDate:function(h){if(!h||Ext.isDate(h)){return h}var j=this.initDate+" ",g=this.initDateFormat+" ",b=Date.parseDate(j+h,g+this.format),c=this.altFormats;if(!b&&c){if(!this.altFormatsArray){this.altFormatsArray=c.split("|")}for(var e=0,d=this.altFormatsArray,a=d.length;e=0){if(!d){c=g-1}d=false;while(c>=0){if(e.call(j||this,k,c,i)===true){return[k,c]}c--}k--}}else{if(c>=g){k++;d=false}while(k','
      ','
      ','
      ','
      {header}
      ',"
      ",'
      ',"
      ",'
      ','
      {body}
      ','',"
      ","
      ",'
       
      ','
       
      ',""),headerTpl:new Ext.Template('',"",'{cells}',"","
      "),bodyTpl:new Ext.Template("{rows}"),cellTpl:new Ext.Template('','
      {value}
      ',""),initTemplates:function(){var c=this.templates||{},d,b,g=new Ext.Template('','
      ',this.grid.enableHdMenu?'':"","{value}",'',"
      ",""),a=['','','
      {body}
      ',"",""].join(""),e=['',"","{cells}",this.enableRowBody?a:"","","
      "].join("");Ext.applyIf(c,{hcell:g,cell:this.cellTpl,body:this.bodyTpl,header:this.headerTpl,master:this.masterTpl,row:new Ext.Template('
      '+e+"
      "),rowInner:new Ext.Template(e)});for(b in c){d=c[b];if(d&&Ext.isFunction(d.compile)&&!d.compiled){d.disableFormats=true;d.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var b=Ext.Element,d=Ext.get(this.grid.getGridEl().dom.firstChild),e=new b(d.child("div.x-grid3-viewport")),c=new b(e.child("div.x-grid3-header")),a=new b(e.child("div.x-grid3-scroller"));if(this.grid.hideHeaders){c.setDisplayed(false)}if(this.forceFit){a.setStyle("overflow-x","hidden")}Ext.apply(this,{el:d,mainWrap:e,scroller:a,mainHd:c,innerHd:c.child("div.x-grid3-header-inner").dom,mainBody:new b(b.fly(a).child("div.x-grid3-body")),focusEl:new b(b.fly(a).child("a")),resizeMarker:new b(d.child("div.x-grid3-resize-marker")),resizeProxy:new b(d.child("div.x-grid3-resize-proxy"))});this.focusEl.swallowEvent("click",true)},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(d,c){var b=this.findCell(d),a;if(b){a=this.fly(b).hasClass(c);if(!c||a){return this.getCellIndex(b)}}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},findRowBody:function(a){if(!a){return false}return this.fly(a).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return Ext.fly(this.getRow(b)).query(this.cellSelector)[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(b,a){var c=this.getRow(b);if(c){this.fly(c).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom,d;for(d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){var a=this.scroller.dom;a.scrollTop=0;a.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.innerHd,b=this.scroller.dom.scrollLeft;a.scrollLeft=b;a.scrollLeft=b},updateSortIcon:function(d,c){var a=this.sortClasses,b=a[c=="DESC"?1:0],e=this.mainHd.select("td").removeClass(a);e.item(d).addClass(b)},updateAllColumnWidths:function(){var e=this.getTotalWidth(),k=this.cm.getColumnCount(),m=this.getRows(),g=m.length,b=[],l,a,h,d,c;for(d=0;d=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(h),b=this.cm,e=b.getColumnCount(),a;if(!(g===false&&d===0)){while(dm){n.scrollTop=q-a}}if(e!==false){var l=parseInt(h.offsetLeft,10),j=l+h.offsetWidth,i=parseInt(n.scrollLeft,10),b=i+n.clientWidth;if(lb){n.scrollLeft=j-n.clientWidth}}}return this.getResolvedXY(r)},insertRows:function(a,i,e,h){var d=a.getCount()-1;if(!h&&i===0&&e>=d){this.fireEvent("beforerowsinserted",this,i,e);this.refresh();this.fireEvent("rowsinserted",this,i,e)}else{if(!h){this.fireEvent("beforerowsinserted",this,i,e)}var b=this.renderRows(i,e),g=this.getRow(i);if(g){if(i===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",g,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!h){this.processRows(i);this.fireEvent("rowsinserted",this,i,e)}else{if(i===0||i>=d){Ext.fly(this.getRow(i)).addClass(i===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(i)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(b,d){var a=this.cm,g=a.config,c=d?"":g[b].css||"",e=g[b].align;c+=String.format("width: {0};",this.getColumnWidth(b));if(a.isHidden(b)){c+="display: none; "}if(e){c+=String.format("text-align: {0};",e)}return c},getColumnWidth:function(b){var c=this.cm.getColumnWidth(b),a=this.borderWidth;if(Ext.isNumber(c)){if(Ext.isBorderBox||(Ext.isWebKit&&!Ext.isSafari2)){return c+"px"}else{return Math.max(c-a,0)+"px"}}else{return c}},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(g,j,h){var a=this.grid,l=this.cm,s=l.getTotalWidth(false),q=this.getGridInnerWidth(),r=q-s,c=[],o=0,n=0,u,d,p;if(q<20||r===0){return false}var e=l.getColumnCount(true),m=l.getColumnCount(false),b=e-(Ext.isNumber(h)?1:0);if(b===0){b=1;h=undefined}for(p=0;pq){var t=(b==e)?o:h,k=Math.max(1,l.getColumnWidth(t)-(s-q));l.setColumnWidth(t,k,true)}if(g!==true){this.updateAllColumnWidths()}return true},autoExpand:function(k){var a=this.grid,i=this.cm,e=this.getGridInnerWidth(),c=i.getTotalWidth(false),g=a.autoExpandColumn;if(!this.userResized&&g){if(e!=c){var j=i.getIndexById(g),b=i.getColumnWidth(j),h=e-c+b,d=Math.min(Math.max(h,a.autoExpandMin),a.autoExpandMax);if(b!=d){i.setColumnWidth(j,d,true);if(k!==true){this.updateColumnWidth(j,d)}}}}},getGridInnerWidth:function(){return this.grid.getGridEl().getWidth(true)-this.getScrollOffset()},getColumnData:function(){var e=[],c=this.cm,g=c.getColumnCount(),a=this.ds.fields,d,b;for(d=0;d'+this.emptyText+"")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},clearHeaderSortState:function(){if(!this.sortState){return}this.grid.fireEvent("sortchange",this.grid,null);this.mainHd.select("td").removeClass(this.sortClasses);delete this.sortState},destroy:function(){var j=this,a=j.grid,d=a.getGridEl(),i=j.dragZone,g=j.splitZone,h=j.columnDrag,e=j.columnDrop,k=j.scrollToTopTask,c,b;if(k&&k.cancel){k.cancel()}Ext.destroyMembers(j,"colMenu","hmenu");j.initData(null,null);j.purgeListeners();Ext.fly(j.innerHd).un("click",j.handleHdDown,j);if(a.enableColumnMove){c=h.dragData;b=h.proxy;Ext.destroy(h.el,b.ghost,b.el,e.el,e.proxyTop,e.proxyBottom,c.ddel,c.header);if(b.anim){Ext.destroy(b.anim)}delete b.ghost;delete c.ddel;delete c.header;h.destroy();delete Ext.dd.DDM.locationCache[h.id];delete h._domRef;delete e.proxyTop;delete e.proxyBottom;e.destroy();delete Ext.dd.DDM.locationCache["gridHeader"+d.id];delete e._domRef;delete Ext.dd.DDM.ids[e.ddGroup]}if(g){g.destroy();delete g._domRef;delete Ext.dd.DDM.ids["gridSplitters"+d.id]}Ext.fly(j.innerHd).removeAllListeners();Ext.removeNode(j.innerHd);delete j.innerHd;Ext.destroy(j.el,j.mainWrap,j.mainHd,j.scroller,j.mainBody,j.focusEl,j.resizeMarker,j.resizeProxy,j.activeHdBtn,j._flyweight,i,g);delete a.container;if(i){i.destroy()}Ext.dd.DDM.currentTarget=null;delete Ext.dd.DDM.locationCache[d.id];Ext.EventManager.removeResizeListener(j.onWindowResize,j)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders();this.updateHeaderSortState()},this,{single:true})}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.grid.getGridEl().dom.innerHTML=this.renderUI();this.afterRenderUI()},initData:function(a,e){var b=this;if(b.ds){var d=b.ds;d.un("add",b.onAdd,b);d.un("load",b.onLoad,b);d.un("clear",b.onClear,b);d.un("remove",b.onRemove,b);d.un("update",b.onUpdate,b);d.un("datachanged",b.onDataChange,b);if(d!==a&&d.autoDestroy){d.destroy()}}if(a){a.on({scope:b,load:b.onLoad,add:b.onAdd,remove:b.onRemove,update:b.onUpdate,clear:b.onClear,datachanged:b.onDataChange})}if(b.cm){var c=b.cm;c.un("configchange",b.onColConfigChange,b);c.un("widthchange",b.onColWidthChange,b);c.un("headerchange",b.onHeaderChange,b);c.un("hiddenchange",b.onHiddenChange,b);c.un("columnmoved",b.onColumnMove,b)}if(e){delete b.lastViewWidth;e.on({scope:b,configchange:b.onColConfigChange,widthchange:b.onColWidthChange,headerchange:b.onHeaderChange,hiddenchange:b.onHiddenChange,columnmoved:b.onColumnMove})}b.ds=a;b.cm=e},onDataChange:function(){this.refresh(true);this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(b,a,c){this.insertRows(b,c,c+(a.length-1))},onRemove:function(b,a,c,d){if(d!==true){this.fireEvent("beforerowremoved",this,c,a)}this.removeRow(c);if(d!==true){this.processRows(c);this.applyEmptyText();this.fireEvent("rowremoved",this,c,a)}},onLoad:function(){if(Ext.isGecko){if(!this.scrollToTopTask){this.scrollToTopTask=new Ext.util.DelayedTask(this.scrollToTop,this)}this.scrollToTopTask.delay(1)}else{this.scrollToTop()}},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,c,b){this.indexMap=null;this.refresh(true);this.restoreScroll(this.getScrollState());this.afterMove(b);this.grid.fireEvent("columnmove",c,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:Ext.emptyFn,onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c=this.findRowIndex(a);if(c!==false){this.addRowClass(c,this.rowOverCls)}},onRowOut:function(b,a){var c=this.findRowIndex(a);if(c!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,this.rowOverCls)}},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},handleWheel:function(a){a.stopPropagation()},onColumnSplitterMoved:function(a,b){this.userResized=true;this.grid.colModel.setColumnWidth(a,b,true);if(this.forceFit){this.fitColumns(true,false,a);this.updateAllColumnWidths()}else{this.updateColumnWidth(a,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",a,b)},beforeColMenuShow:function(){var b=this.cm,d=b.getColumnCount(),a=this.colMenu,c;a.removeAll();for(c=0;c0){if(!this.cm.isHidden(a-1)){return a}a--}return undefined},handleHdOver:function(c,b){var d=this.findHeaderCell(b);if(d&&!this.headersDisabled){var a=this.fly(d);this.activeHdRef=b;this.activeHdIndex=this.getCellIndex(d);this.activeHdRegion=a.getRegion();if(!this.isMenuDisabled(this.activeHdIndex,a)){a.addClass("x-grid3-hd-over");this.activeHdBtn=a.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(d.firstChild.offsetHeight-1)+"px"}}}},handleHdOut:function(b,a){var c=this.findHeaderCell(a);if(c&&(!Ext.isIE||!b.within(c,true))){this.activeHdRef=null;this.fly(c).removeClass("x-grid3-hd-over");c.style.cursor=""}},isMenuDisabled:function(a,b){return this.cm.isMenuDisabled(a)},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},isHideableColumn:function(a){return !a.hidden},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{constructor:function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5},b4StartDrag:function(a,e){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex),c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},allowHeaderDrag:function(a){return true},handleMouseDown:function(a){var h=this.view.findHeaderCell(a.getTarget());if(h&&this.allowHeaderDrag(a)){var k=this.view.fly(h).getXY(),c=k[0],i=a.getXY(),b=i[0],g=h.offsetWidth,d=false;if((b-c)<=this.hw){d=-1}else{if((c+g)-b<=this.hw){d=0}}if(d!==false){this.cm=this.grid.colModel;var j=this.view.getCellIndex(h);if(d==-1){if(j+d<0){return}while(this.cm.isHidden(j+d)){--d;if(j+d<0){return}}}this.cellIndex=j+d;this.split=h.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(g){this.marker.hide();var a=this.view,c=Math.max(this.minX,g.getPageX()),d=c-this.startPos,b=this.dragHeadersDisabled;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+d);setTimeout(function(){a.headersDisabled=b},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.PivotGridView=Ext.extend(Ext.grid.GridView,{colHeaderCellCls:"grid-hd-group-cell",title:"",getColumnHeaders:function(){return this.grid.topAxis.buildHeaders()},getRowHeaders:function(){return this.grid.leftAxis.buildHeaders()},renderRows:function(a,t){var b=this.grid,o=b.extractData(),p=o.length,g=this.templates,s=b.renderer,h=typeof s=="function",w=this.getCellCls,n=typeof w=="function",d=g.cell,x=g.row,k=[],q={},c="width:"+this.getGridInnerWidth()+"px;",l,r,e,v,m;a=a||0;t=Ext.isDefined(t)?t:p-1;for(v=0;v','
      ','
      ','
      {title}
      ','
      ','
      ',"
      ",'
      ',"
      ",'
      ','
      ','
      {body}
      ','',"
      ","
      ",'
       
      ','
       
      ',""),initTemplates:function(){Ext.grid.PivotGridView.superclass.initTemplates.apply(this,arguments);var a=this.templates||{};if(!a.gcell){a.gcell=new Ext.XTemplate('','
      ',this.grid.enableHdMenu?'':"","{value}","
      ","")}this.templates=a;this.hrowRe=new RegExp("ux-grid-hd-group-row-(\\d+)","")},initElements:function(){Ext.grid.PivotGridView.superclass.initElements.apply(this,arguments);this.rowHeadersEl=new Ext.Element(this.scroller.child("div.x-grid3-row-headers"));this.headerTitleEl=new Ext.Element(this.mainHd.child("div.x-grid3-header-title"))},getGridInnerWidth:function(){var a=Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this,arguments);return a-this.getTotalRowHeaderWidth()},getTotalRowHeaderWidth:function(){var d=this.getRowHeaders(),c=d.length,b=0,a;for(a=0;a0&&d>0){h=h||o.data[a[g-1].dataIndex]!=l[d-1].data[a[g-1].dataIndex]}if(h){s.push({header:q,span:p,start:b});b+=p;p=0}if(k){s.push({header:n,span:p+1,start:b});b+=p;p=0}q=n;p++}c.push({items:s,width:e.width||this.defaultHeaderWidth});q=undefined}return c}});Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false},getDragData:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var a=this.view,b=this.dragHeadersDisabled;setTimeout(function(){a.headersDisabled=b},50)}});Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:" "},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:" "},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)},getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,k,j){var a=Ext.lib.Event.getPageX(j),g=Ext.lib.Dom.getRegion(k.firstChild),c,i,b=g.top+this.proxyOffsets[1];if((g.right-a)<=(g.right-g.left)/2){c=g.right+this.view.borderWidth;i="after"}else{c=g.left;i="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(k))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return i},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(g,b,d,c){var a=false;if(c.header!=g){a=this.positionIndicator(c.header,g,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,m,g,c){var d=c.header;if(d!=b){var k=this.grid.colModel,j=Ext.lib.Event.getPageX(g),a=Ext.lib.Dom.getRegion(b.firstChild),o=(a.right-j)<=((a.right-a.left)/2)?"after":"before",i=this.view.getCellIndex(d),l=this.view.getCellIndex(b);if(o=="after"){l++}if(i=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){var b=this.config.length,a=0;for(;a0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}if(!this.silent){this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(n,l){var d=l.getKey(),h,i=this.grid,p=i.lastEdit,j=i.activeEditor,b=l.shiftKey,o,p,a,m;if(d==l.TAB){l.stopEvent();j.completeEdit();if(b){h=i.walkCells(j.row,j.col-1,-1,this.acceptsNav,this)}else{h=i.walkCells(j.row,j.col+1,1,this.acceptsNav,this)}}else{if(d==l.ENTER){if(this.moveEditorOnEnter!==false){if(b){h=i.walkCells(p.row-1,p.col,-1,this.acceptsNav,this)}else{h=i.walkCells(p.row+1,p.col,1,this.acceptsNav,this)}}}}if(h){a=h[0];m=h[1];this.onEditorSelect(a,p.row);if(i.isEditor&&i.editing){o=i.activeEditor;if(o&&o.field.triggerBlur){o.field.triggerBlur()}}i.startEditing(a,m)}},onEditorSelect:function(b,a){if(a!=b){this.selectRow(b)}},destroy:function(){Ext.destroy(this.rowNav);this.rowNav=null;Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Ext.util.Observable,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a);this.addEvents("click","contextmenu","dblclick","mousedown");Ext.grid.Column.superclass.constructor.call(this)},processEvent:function(b,d,c,g,a){return this.fireEvent(b,this,c,g,d)},destroy:function(){if(this.setEditor){this.setEditor(null)}this.purgeListeners()},renderer:function(a){return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(b){var a=this.editor;if(a){if(a.gridEditor){a.gridEditor.destroy();delete a.gridEditor}else{a.destroy()}}this.editor=null;if(b){if(!b.isXType){b=Ext.create(b,"textfield")}this.editor=b}},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}a=a.gridEditor}}return a}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:" ",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.ActionColumn=Ext.extend(Ext.grid.Column,{header:" ",actionIdRe:/x-action-col-(\d+)/,altText:"",constructor:function(b){var g=this,c=b.items||(g.items=[g]),a=c.length,d,e;Ext.grid.ActionColumn.superclass.constructor.call(g,b);g.renderer=function(h,i){h=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";i.css+=" x-action-col-cell";for(d=0;d"}return h}},destroy:function(){delete this.items;delete this.renderer;return Ext.grid.ActionColumn.superclass.destroy.apply(this,arguments)},processEvent:function(c,i,d,j,b){var a=i.getTarget().className.match(this.actionIdRe),h,g;if(a&&(h=this.items[parseInt(a[1],10)])){if(c=="click"){(g=h.handler||this.handler)&&g.call(h.scope||this.scope||this,d,j,b,h,i)}else{if((c=="mousedown")&&(h.stopSelection!==false)){return false}}}return Ext.grid.ActionColumn.superclass.processEvent.apply(this,arguments)}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn,actioncolumn:Ext.grid.ActionColumn};Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,hideable:false,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'
       
      ',width:20,sortable:false,menuDisabled:true,fixed:true,hideable:false,dataIndex:"",id:"checker",isColumn:true,constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){Ext.fly(this.grid.getView().innerHd).on("mousedown",this.onHdMouseDown,this)},this)},processEvent:function(b,d,c,g,a){if(b=="mousedown"){this.onMouseDown(d,d.getTarget());return false}else{return Ext.grid.Column.prototype.processEvent.apply(this,arguments)}},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true);this.grid.getView().focusRow(a)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'
       
      '},onEditorSelect:function(b,a){if(a!=b&&!this.checkOnly){this.selectRow(b)}}});Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.on(Ext.EventManager.getKeyEvent(),this.handleKeyDown,this);this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections});if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},onEditorKey:function(b,a){if(a.getKey()==a.TAB){this.handleKeyDown(a)}},handleKeyDown:function(j){if(!j.isNavKeyPress()){return}var d=j.getKey(),i=this.grid,p=this.selection,b=this,m=function(g,c,e){return i.walkCells(g,c,e,i.isEditor&&i.editing?b.acceptsNav:b.isSelectable,b)},o,h,a,l,n;switch(d){case j.ESC:case j.PAGE_UP:case j.PAGE_DOWN:break;default:j.stopEvent();break}if(!p){o=m(0,0,1);if(o){this.select(o[0],o[1])}return}o=p.cell;a=o[0];l=o[1];switch(d){case j.TAB:if(j.shiftKey){h=m(a,l-1,-1)}else{h=m(a,l+1,1)}break;case j.DOWN:h=m(a+1,l,1);break;case j.UP:h=m(a-1,l,-1);break;case j.RIGHT:h=m(a,l+1,1);break;case j.LEFT:h=m(a,l-1,-1);break;case j.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,l);return}break}if(h){a=h[0];l=h[1];this.select(a,l);if(i.isEditor&&i.editing){n=i.activeEditor;if(n&&n.field.triggerBlur){n.field.triggerBlur()}i.startEditing(a,l)}}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[true]),this);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{var a=this.getView();if(this.clicksToEdit=="auto"&&a.mainBody){a.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var a=this.activeEditor;if(this.editing&&a){a.realign(true)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b),a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.lastActiveEditor=this.activeEditor;this.activeEditor=null;var c=b.record,h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(i,c){this.stopEditing();if(this.colModel.isCellEditable(c,i)){this.view.ensureVisible(i,c,true);var d=this.store.getAt(i),h=this.colModel.getDataIndex(c),g={grid:this,record:d,field:h,value:d.data[h],row:i,column:c,cancel:false};if(this.fireEvent("beforeedit",g)!==false&&!g.cancel){this.editing=true;var b=this.colModel.getCellEditor(c,i);if(!b){return}if(!b.rendered){b.parentEl=this.view.getEditorParent(b);b.on({scope:this,render:{fn:function(e){e.field.focus(false,true)},single:true,scope:this},specialkey:function(k,j){this.getSelectionModel().onEditorKey(k,j)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[true])})}Ext.apply(b,{row:i,col:c,record:d});this.lastEdit={row:i,col:c};this.activeEditor=b;b.selectSameEditor=(this.activeEditor==this.lastActiveEditor);var a=this.preEditValue(d,h);b.startEdit(this.view.getCell(i,c).firstChild,Ext.isDefined(a)?a:"");(function(){delete b.selectSameEditor}).defer(50)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&Ext.isString(b)?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&Ext.isString(c)?Ext.util.Format.htmlEncode(c):c},stopEditing:function(b){if(this.editing){var a=this.lastActiveEditor=this.activeEditor;if(a){a[b===true?"cancelEdit":"completeEdit"]();this.view.focusCell(a.row,a.col)}this.activeEditor=null}this.editing=false}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);this.destroyEditors(this.editors);this.destroyEditors(this.grid.customEditors)},destroyEditors:function(b){for(var a in b){Ext.destroy(b[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",cancelEditOnToggle:true,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('
      ','
      ',this.groupTextTpl,"
      ",'
      ')}this.startGroup.compile();if(!this.endGroup){this.endGroup="
      "}},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(d,a,b){if(this.canGroup()&&!this.ignoreAdd){var c=this.getScrollState();this.fireEvent("beforerowsinserted",d,b,b+(a.length-1));this.refresh();this.restoreScroll(c);this.fireEvent("rowsinserted",d,b,b+(a.length-1))}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.canGroup(),true)}},renderUI:function(){var a=Ext.grid.GroupingView.superclass.renderUI.call(this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}return a},processEvent:function(b,i){Ext.grid.GroupingView.superclass.processEvent.call(this,b,i);var h=i.getTarget(".x-grid-group-hd",this.mainBody);if(h){var g=this.getGroupField(),d=this.getPrefix(g),a=h.id.substring(d.length),c=new RegExp("gp-"+Ext.escapeRe(g)+"--hd");a=a.substr(0,a.length-3);if(a||c.test(h.id)){this.grid.fireEvent("group"+b,this.grid,g,a,i)}if(b=="mousedown"&&i.button==0){this.toggleGroup(h.parentNode)}}},onGroupByClick:function(){var a=this.grid;this.enableGrouping=true;a.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));a.fireEvent("groupchange",a,a.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c),d=Ext.util.Format.htmlEncode(a.id);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[d]!==b){if(this.cancelEditOnToggle!==false){this.grid.stopEditing(true)}this.state[d]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d"; - } - return b; - }; - - - var createDom = function(o, parentNode){ - var el; - if (Ext.isArray(o)) { el = document.createDocumentFragment(); for(var i = 0, l = o.length; i < l; i++) { - createDom(o[i], el); - } - } else if (typeof o == "string") { el = document.createTextNode(o); - } else { - el = document.createElement(o.tag||'div'); - var useSet = !!el.setAttribute; for(var attr in o){ - if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue; - if(attr=="cls"){ - el.className = o["cls"]; - }else{ - if(useSet) el.setAttribute(attr, o[attr]); - else el[attr] = o[attr]; - } - } - Ext.DomHelper.applyStyles(el, o.style); - var cn = o.children || o.cn; - if(cn){ - createDom(cn, el); - } else if(o.html){ - el.innerHTML = o.html; - } - } - if(parentNode){ - parentNode.appendChild(el); - } - return el; - }; - - var ieTable = function(depth, s, h, e){ - tempTableEl.innerHTML = [s, h, e].join(''); - var i = -1, el = tempTableEl; - while(++i < depth){ - el = el.firstChild; - } - return el; - }; - - var ts = '', - te = '
      ', - tbs = ts+'', - tbe = ''+te, - trs = tbs + '', - tre = ''+tbe; - - - var insertIntoTable = function(tag, where, el, html){ - if(!tempTableEl){ - tempTableEl = document.createElement('div'); - } - var node; - var before = null; - if(tag == 'td'){ - if(where == 'afterbegin' || where == 'beforeend'){ return; - } - if(where == 'beforebegin'){ - before = el; - el = el.parentNode; - } else{ - before = el.nextSibling; - el = el.parentNode; - } - node = ieTable(4, trs, html, tre); - } - else if(tag == 'tr'){ - if(where == 'beforebegin'){ - before = el; - el = el.parentNode; - node = ieTable(3, tbs, html, tbe); - } else if(where == 'afterend'){ - before = el.nextSibling; - el = el.parentNode; - node = ieTable(3, tbs, html, tbe); - } else{ if(where == 'afterbegin'){ - before = el.firstChild; - } - node = ieTable(4, trs, html, tre); - } - } else if(tag == 'tbody'){ - if(where == 'beforebegin'){ - before = el; - el = el.parentNode; - node = ieTable(2, ts, html, te); - } else if(where == 'afterend'){ - before = el.nextSibling; - el = el.parentNode; - node = ieTable(2, ts, html, te); - } else{ - if(where == 'afterbegin'){ - before = el.firstChild; - } - node = ieTable(3, tbs, html, tbe); - } - } else{ if(where == 'beforebegin' || where == 'afterend'){ return; - } - if(where == 'afterbegin'){ - before = el.firstChild; - } - node = ieTable(2, ts, html, te); - } - el.insertBefore(node, before); - return node; - }; - - - return { - - useDom : false, - - - markup : function(o){ - return createHtml(o); - }, - - - applyStyles : function(el, styles){ - if(styles){ - el = Ext.fly(el); - if(typeof styles == "string"){ - var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi; - var matches; - while ((matches = re.exec(styles)) != null){ - el.setStyle(matches[1], matches[2]); - } - }else if (typeof styles == "object"){ - for (var style in styles){ - el.setStyle(style, styles[style]); - } - }else if (typeof styles == "function"){ - Ext.DomHelper.applyStyles(el, styles.call()); - } - } - }, - - - insertHtml : function(where, el, html){ - where = where.toLowerCase(); - if(el.insertAdjacentHTML){ - if(tableRe.test(el.tagName)){ - var rs; - if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){ - return rs; - } - } - switch(where){ - case "beforebegin": - el.insertAdjacentHTML('BeforeBegin', html); - return el.previousSibling; - case "afterbegin": - el.insertAdjacentHTML('AfterBegin', html); - return el.firstChild; - case "beforeend": - el.insertAdjacentHTML('BeforeEnd', html); - return el.lastChild; - case "afterend": - el.insertAdjacentHTML('AfterEnd', html); - return el.nextSibling; - } - throw 'Illegal insertion point -> "' + where + '"'; - } - var range = el.ownerDocument.createRange(); - var frag; - switch(where){ - case "beforebegin": - range.setStartBefore(el); - frag = range.createContextualFragment(html); - el.parentNode.insertBefore(frag, el); - return el.previousSibling; - case "afterbegin": - if(el.firstChild){ - range.setStartBefore(el.firstChild); - frag = range.createContextualFragment(html); - el.insertBefore(frag, el.firstChild); - return el.firstChild; - }else{ - el.innerHTML = html; - return el.firstChild; - } - case "beforeend": - if(el.lastChild){ - range.setStartAfter(el.lastChild); - frag = range.createContextualFragment(html); - el.appendChild(frag); - return el.lastChild; - }else{ - el.innerHTML = html; - return el.lastChild; - } - case "afterend": - range.setStartAfter(el); - frag = range.createContextualFragment(html); - el.parentNode.insertBefore(frag, el.nextSibling); - return el.nextSibling; - } - throw 'Illegal insertion point -> "' + where + '"'; - }, - - - insertBefore : function(el, o, returnElement){ - return this.doInsert(el, o, returnElement, "beforeBegin"); - }, - - - insertAfter : function(el, o, returnElement){ - return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); - }, - - - insertFirst : function(el, o, returnElement){ - return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); - }, - - doInsert : function(el, o, returnElement, pos, sibling){ - el = Ext.getDom(el); - var newNode; - if(this.useDom){ - newNode = createDom(o, null); - (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el); - }else{ - var html = createHtml(o); - newNode = this.insertHtml(pos, el, html); - } - return returnElement ? Ext.get(newNode, true) : newNode; - }, - - - append : function(el, o, returnElement){ - el = Ext.getDom(el); - var newNode; - if(this.useDom){ - newNode = createDom(o, null); - el.appendChild(newNode); - }else{ - var html = createHtml(o); - newNode = this.insertHtml("beforeEnd", el, html); - } - return returnElement ? Ext.get(newNode, true) : newNode; - }, - - - overwrite : function(el, o, returnElement){ - el = Ext.getDom(el); - el.innerHTML = createHtml(o); - return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; - }, - - - createTemplate : function(o){ - var html = createHtml(o); - return new Ext.Template(html); - } - }; -}(); - - -Ext.Template = function(html){ - var a = arguments; - if(Ext.isArray(html)){ - html = html.join(""); - }else if(a.length > 1){ - var buf = []; - for(var i = 0, len = a.length; i < len; i++){ - if(typeof a[i] == 'object'){ - Ext.apply(this, a[i]); - }else{ - buf[buf.length] = a[i]; - } - } - html = buf.join(''); - } - - this.html = html; - if(this.compiled){ - this.compile(); - } -}; -Ext.Template.prototype = { - - applyTemplate : function(values){ - if(this.compiled){ - return this.compiled(values); - } - var useF = this.disableFormats !== true; - var fm = Ext.util.Format, tpl = this; - var fn = function(m, name, format, args){ - if(format && useF){ - if(format.substr(0, 5) == "this."){ - return tpl.call(format.substr(5), values[name], values); - }else{ - if(args){ - var re = /^\s*['"](.*)["']\s*$/; - args = args.split(','); - for(var i = 0, len = args.length; i < len; i++){ - args[i] = args[i].replace(re, "$1"); - } - args = [values[name]].concat(args); - }else{ - args = [values[name]]; - } - return fm[format].apply(fm, args); - } - }else{ - return values[name] !== undefined ? values[name] : ""; - } - }; - return this.html.replace(this.re, fn); - }, - - - set : function(html, compile){ - this.html = html; - this.compiled = null; - if(compile){ - this.compile(); - } - return this; - }, - - - disableFormats : false, - - - re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, - - - compile : function(){ - var fm = Ext.util.Format; - var useF = this.disableFormats !== true; - var sep = Ext.isGecko ? "+" : ","; - var fn = function(m, name, format, args){ - if(format && useF){ - args = args ? ',' + args : ""; - if(format.substr(0, 5) != "this."){ - format = "fm." + format + '('; - }else{ - format = 'this.call("'+ format.substr(5) + '", '; - args = ", values"; - } - }else{ - args= ''; format = "(values['" + name + "'] == undefined ? '' : "; - } - return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; - }; - var body; - if(Ext.isGecko){ - body = "this.compiled = function(values){ return '" + - this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + - "';};"; - }else{ - body = ["this.compiled = function(values){ return ['"]; - body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); - body.push("'].join('');};"); - body = body.join(''); - } - eval(body); - return this; - }, - - call : function(fnName, value, allValues){ - return this[fnName](value, allValues); - }, - - - insertFirst: function(el, values, returnElement){ - return this.doInsert('afterBegin', el, values, returnElement); - }, - - - insertBefore: function(el, values, returnElement){ - return this.doInsert('beforeBegin', el, values, returnElement); - }, - - - insertAfter : function(el, values, returnElement){ - return this.doInsert('afterEnd', el, values, returnElement); - }, - - - append : function(el, values, returnElement){ - return this.doInsert('beforeEnd', el, values, returnElement); - }, - - doInsert : function(where, el, values, returnEl){ - el = Ext.getDom(el); - var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values)); - return returnEl ? Ext.get(newNode, true) : newNode; - }, - - - overwrite : function(el, values, returnElement){ - el = Ext.getDom(el); - el.innerHTML = this.applyTemplate(values); - return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; - } -}; - -Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; - -Ext.DomHelper.Template = Ext.Template; - - -Ext.Template.from = function(el, config){ - el = Ext.getDom(el); - return new Ext.Template(el.value || el.innerHTML, config || ''); -}; - - -Ext.DomQuery = function(){ - var cache = {}, simpleCache = {}, valueCache = {}; - var nonSpace = /\S/; - var trimRe = /^\s+|\s+$/g; - var tplRe = /\{(\d+)\}/g; - var modeRe = /^(\s?[\/>+~]\s?|\s|$)/; - var tagTokenRe = /^(#)?([\w-\*]+)/; - var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/; - - function child(p, index){ - var i = 0; - var n = p.firstChild; - while(n){ - if(n.nodeType == 1){ - if(++i == index){ - return n; - } - } - n = n.nextSibling; - } - return null; - }; - - function next(n){ - while((n = n.nextSibling) && n.nodeType != 1); - return n; - }; - - function prev(n){ - while((n = n.previousSibling) && n.nodeType != 1); - return n; - }; - - function children(d){ - var n = d.firstChild, ni = -1; - while(n){ - var nx = n.nextSibling; - if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ - d.removeChild(n); - }else{ - n.nodeIndex = ++ni; - } - n = nx; - } - return this; - }; - - function byClassName(c, a, v){ - if(!v){ - return c; - } - var r = [], ri = -1, cn; - for(var i = 0, ci; ci = c[i]; i++){ - if((' '+ci.className+' ').indexOf(v) != -1){ - r[++ri] = ci; - } - } - return r; - }; - - function attrValue(n, attr){ - if(!n.tagName && typeof n.length != "undefined"){ - n = n[0]; - } - if(!n){ - return null; - } - if(attr == "for"){ - return n.htmlFor; - } - if(attr == "class" || attr == "className"){ - return n.className; - } - return n.getAttribute(attr) || n[attr]; - - }; - - function getNodes(ns, mode, tagName){ - var result = [], ri = -1, cs; - if(!ns){ - return result; - } - tagName = tagName || "*"; - if(typeof ns.getElementsByTagName != "undefined"){ - ns = [ns]; - } - if(!mode){ - for(var i = 0, ni; ni = ns[i]; i++){ - cs = ni.getElementsByTagName(tagName); - for(var j = 0, ci; ci = cs[j]; j++){ - result[++ri] = ci; - } - } - }else if(mode == "/" || mode == ">"){ - var utag = tagName.toUpperCase(); - for(var i = 0, ni, cn; ni = ns[i]; i++){ - cn = ni.children || ni.childNodes; - for(var j = 0, cj; cj = cn[j]; j++){ - if(cj.nodeName == utag || cj.nodeName == tagName || tagName == '*'){ - result[++ri] = cj; - } - } - } - }else if(mode == "+"){ - var utag = tagName.toUpperCase(); - for(var i = 0, n; n = ns[i]; i++){ - while((n = n.nextSibling) && n.nodeType != 1); - if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){ - result[++ri] = n; - } - } - }else if(mode == "~"){ - for(var i = 0, n; n = ns[i]; i++){ - while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName))); - if(n){ - result[++ri] = n; - } - } - } - return result; - }; - - function concat(a, b){ - if(b.slice){ - return a.concat(b); - } - for(var i = 0, l = b.length; i < l; i++){ - a[a.length] = b[i]; - } - return a; - } - - function byTag(cs, tagName){ - if(cs.tagName || cs == document){ - cs = [cs]; - } - if(!tagName){ - return cs; - } - var r = [], ri = -1; - tagName = tagName.toLowerCase(); - for(var i = 0, ci; ci = cs[i]; i++){ - if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ - r[++ri] = ci; - } - } - return r; - }; - - function byId(cs, attr, id){ - if(cs.tagName || cs == document){ - cs = [cs]; - } - if(!id){ - return cs; - } - var r = [], ri = -1; - for(var i = 0,ci; ci = cs[i]; i++){ - if(ci && ci.id == id){ - r[++ri] = ci; - return r; - } - } - return r; - }; - - function byAttribute(cs, attr, value, op, custom){ - var r = [], ri = -1, st = custom=="{"; - var f = Ext.DomQuery.operators[op]; - for(var i = 0, ci; ci = cs[i]; i++){ - var a; - if(st){ - a = Ext.DomQuery.getStyle(ci, attr); - } - else if(attr == "class" || attr == "className"){ - a = ci.className; - }else if(attr == "for"){ - a = ci.htmlFor; - }else if(attr == "href"){ - a = ci.getAttribute("href", 2); - }else{ - a = ci.getAttribute(attr); - } - if((f && f(a, value)) || (!f && a)){ - r[++ri] = ci; - } - } - return r; - }; - - function byPseudo(cs, name, value){ - return Ext.DomQuery.pseudos[name](cs, value); - }; - - - - - var isIE = window.ActiveXObject ? true : false; - - - - eval("var batch = 30803;"); - - var key = 30803; - - function nodupIEXml(cs){ - var d = ++key; - cs[0].setAttribute("_nodup", d); - var r = [cs[0]]; - for(var i = 1, len = cs.length; i < len; i++){ - var c = cs[i]; - if(!c.getAttribute("_nodup") != d){ - c.setAttribute("_nodup", d); - r[r.length] = c; - } - } - for(var i = 0, len = cs.length; i < len; i++){ - cs[i].removeAttribute("_nodup"); - } - return r; - } - - function nodup(cs){ - if(!cs){ - return []; - } - var len = cs.length, c, i, r = cs, cj, ri = -1; - if(!len || typeof cs.nodeType != "undefined" || len == 1){ - return cs; - } - if(isIE && typeof cs[0].selectSingleNode != "undefined"){ - return nodupIEXml(cs); - } - var d = ++key; - cs[0]._nodup = d; - for(i = 1; c = cs[i]; i++){ - if(c._nodup != d){ - c._nodup = d; - }else{ - r = []; - for(var j = 0; j < i; j++){ - r[++ri] = cs[j]; - } - for(j = i+1; cj = cs[j]; j++){ - if(cj._nodup != d){ - cj._nodup = d; - r[++ri] = cj; - } - } - return r; - } - } - return r; - } - - function quickDiffIEXml(c1, c2){ - var d = ++key; - for(var i = 0, len = c1.length; i < len; i++){ - c1[i].setAttribute("_qdiff", d); - } - var r = []; - for(var i = 0, len = c2.length; i < len; i++){ - if(c2[i].getAttribute("_qdiff") != d){ - r[r.length] = c2[i]; - } - } - for(var i = 0, len = c1.length; i < len; i++){ - c1[i].removeAttribute("_qdiff"); - } - return r; - } - - function quickDiff(c1, c2){ - var len1 = c1.length; - if(!len1){ - return c2; - } - if(isIE && c1[0].selectSingleNode){ - return quickDiffIEXml(c1, c2); - } - var d = ++key; - for(var i = 0; i < len1; i++){ - c1[i]._qdiff = d; - } - var r = []; - for(var i = 0, len = c2.length; i < len; i++){ - if(c2[i]._qdiff != d){ - r[r.length] = c2[i]; - } - } - return r; - } - - function quickId(ns, mode, root, id){ - if(ns == root){ - var d = root.ownerDocument || root; - return d.getElementById(id); - } - ns = getNodes(ns, mode, "*"); - return byId(ns, null, id); - } - - return { - getStyle : function(el, name){ - return Ext.fly(el).getStyle(name); - }, - - compile : function(path, type){ - type = type || "select"; - - var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"]; - var q = path, mode, lq; - var tk = Ext.DomQuery.matchers; - var tklen = tk.length; - var mm; - - - var lmode = q.match(modeRe); - if(lmode && lmode[1]){ - fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; - q = q.replace(lmode[1], ""); - } - - while(path.substr(0, 1)=="/"){ - path = path.substr(1); - } - - while(q && lq != q){ - lq = q; - var tm = q.match(tagTokenRe); - if(type == "select"){ - if(tm){ - if(tm[1] == "#"){ - fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; - }else{ - fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; - } - q = q.replace(tm[0], ""); - }else if(q.substr(0, 1) != '@'){ - fn[fn.length] = 'n = getNodes(n, mode, "*");'; - } - }else{ - if(tm){ - if(tm[1] == "#"){ - fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; - }else{ - fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; - } - q = q.replace(tm[0], ""); - } - } - while(!(mm = q.match(modeRe))){ - var matched = false; - for(var j = 0; j < tklen; j++){ - var t = tk[j]; - var m = q.match(t.re); - if(m){ - fn[fn.length] = t.select.replace(tplRe, function(x, i){ - return m[i]; - }); - q = q.replace(m[0], ""); - matched = true; - break; - } - } - - if(!matched){ - throw 'Error parsing selector, parsing failed at "' + q + '"'; - } - } - if(mm[1]){ - fn[fn.length] = 'mode="'+mm[1].replace(trimRe, "")+'";'; - q = q.replace(mm[1], ""); - } - } - fn[fn.length] = "return nodup(n);\n}"; - eval(fn.join("")); - return f; - }, - - - select : function(path, root, type){ - if(!root || root == document){ - root = document; - } - if(typeof root == "string"){ - root = document.getElementById(root); - } - var paths = path.split(","); - var results = []; - for(var i = 0, len = paths.length; i < len; i++){ - var p = paths[i].replace(trimRe, ""); - if(!cache[p]){ - cache[p] = Ext.DomQuery.compile(p); - if(!cache[p]){ - throw p + " is not a valid selector"; - } - } - var result = cache[p](root); - if(result && result != document){ - results = results.concat(result); - } - } - if(paths.length > 1){ - return nodup(results); - } - return results; - }, - - - selectNode : function(path, root){ - return Ext.DomQuery.select(path, root)[0]; - }, - - - selectValue : function(path, root, defaultValue){ - path = path.replace(trimRe, ""); - if(!valueCache[path]){ - valueCache[path] = Ext.DomQuery.compile(path, "select"); - } - var n = valueCache[path](root); - n = n[0] ? n[0] : n; - var v = (n && n.firstChild ? n.firstChild.nodeValue : null); - return ((v === null||v === undefined||v==='') ? defaultValue : v); - }, - - - selectNumber : function(path, root, defaultValue){ - var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0); - return parseFloat(v); - }, - - - is : function(el, ss){ - if(typeof el == "string"){ - el = document.getElementById(el); - } - var isArray = Ext.isArray(el); - var result = Ext.DomQuery.filter(isArray ? el : [el], ss); - return isArray ? (result.length == el.length) : (result.length > 0); - }, - - - filter : function(els, ss, nonMatches){ - ss = ss.replace(trimRe, ""); - if(!simpleCache[ss]){ - simpleCache[ss] = Ext.DomQuery.compile(ss, "simple"); - } - var result = simpleCache[ss](els); - return nonMatches ? quickDiff(result, els) : result; - }, - - - matchers : [{ - re: /^\.([\w-]+)/, - select: 'n = byClassName(n, null, " {1} ");' - }, { - re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, - select: 'n = byPseudo(n, "{1}", "{2}");' - },{ - re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/, - select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");' - }, { - re: /^#([\w-]+)/, - select: 'n = byId(n, null, "{1}");' - },{ - re: /^@([\w-]+)/, - select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};' - } - ], - - - operators : { - "=" : function(a, v){ - return a == v; - }, - "!=" : function(a, v){ - return a != v; - }, - "^=" : function(a, v){ - return a && a.substr(0, v.length) == v; - }, - "$=" : function(a, v){ - return a && a.substr(a.length-v.length) == v; - }, - "*=" : function(a, v){ - return a && a.indexOf(v) !== -1; - }, - "%=" : function(a, v){ - return (a % v) == 0; - }, - "|=" : function(a, v){ - return a && (a == v || a.substr(0, v.length+1) == v+'-'); - }, - "~=" : function(a, v){ - return a && (' '+a+' ').indexOf(' '+v+' ') != -1; - } - }, - - - pseudos : { - "first-child" : function(c){ - var r = [], ri = -1, n; - for(var i = 0, ci; ci = n = c[i]; i++){ - while((n = n.previousSibling) && n.nodeType != 1); - if(!n){ - r[++ri] = ci; - } - } - return r; - }, - - "last-child" : function(c){ - var r = [], ri = -1, n; - for(var i = 0, ci; ci = n = c[i]; i++){ - while((n = n.nextSibling) && n.nodeType != 1); - if(!n){ - r[++ri] = ci; - } - } - return r; - }, - - "nth-child" : function(c, a) { - var r = [], ri = -1; - var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a); - var f = (m[1] || 1) - 0, l = m[2] - 0; - for(var i = 0, n; n = c[i]; i++){ - var pn = n.parentNode; - if (batch != pn._batch) { - var j = 0; - for(var cn = pn.firstChild; cn; cn = cn.nextSibling){ - if(cn.nodeType == 1){ - cn.nodeIndex = ++j; - } - } - pn._batch = batch; - } - if (f == 1) { - if (l == 0 || n.nodeIndex == l){ - r[++ri] = n; - } - } else if ((n.nodeIndex + l) % f == 0){ - r[++ri] = n; - } - } - - return r; - }, - - "only-child" : function(c){ - var r = [], ri = -1;; - for(var i = 0, ci; ci = c[i]; i++){ - if(!prev(ci) && !next(ci)){ - r[++ri] = ci; - } - } - return r; - }, - - "empty" : function(c){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var cns = ci.childNodes, j = 0, cn, empty = true; - while(cn = cns[j]){ - ++j; - if(cn.nodeType == 1 || cn.nodeType == 3){ - empty = false; - break; - } - } - if(empty){ - r[++ri] = ci; - } - } - return r; - }, - - "contains" : function(c, v){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if((ci.textContent||ci.innerText||'').indexOf(v) != -1){ - r[++ri] = ci; - } - } - return r; - }, - - "nodeValue" : function(c, v){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(ci.firstChild && ci.firstChild.nodeValue == v){ - r[++ri] = ci; - } - } - return r; - }, - - "checked" : function(c){ - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(ci.checked == true){ - r[++ri] = ci; - } - } - return r; - }, - - "not" : function(c, ss){ - return Ext.DomQuery.filter(c, ss, true); - }, - - "any" : function(c, selectors){ - var ss = selectors.split('|'); - var r = [], ri = -1, s; - for(var i = 0, ci; ci = c[i]; i++){ - for(var j = 0; s = ss[j]; j++){ - if(Ext.DomQuery.is(ci, s)){ - r[++ri] = ci; - break; - } - } - } - return r; - }, - - "odd" : function(c){ - return this["nth-child"](c, "odd"); - }, - - "even" : function(c){ - return this["nth-child"](c, "even"); - }, - - "nth" : function(c, a){ - return c[a-1] || []; - }, - - "first" : function(c){ - return c[0] || []; - }, - - "last" : function(c){ - return c[c.length-1] || []; - }, - - "has" : function(c, ss){ - var s = Ext.DomQuery.select; - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - if(s(ss, ci).length > 0){ - r[++ri] = ci; - } - } - return r; - }, - - "next" : function(c, ss){ - var is = Ext.DomQuery.is; - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var n = next(ci); - if(n && is(n, ss)){ - r[++ri] = ci; - } - } - return r; - }, - - "prev" : function(c, ss){ - var is = Ext.DomQuery.is; - var r = [], ri = -1; - for(var i = 0, ci; ci = c[i]; i++){ - var n = prev(ci); - if(n && is(n, ss)){ - r[++ri] = ci; - } - } - return r; - } - } - }; -}(); - - -Ext.query = Ext.DomQuery.select; - - -Ext.util.Observable = function(){ - - if(this.listeners){ - this.on(this.listeners); - delete this.listeners; - } -}; -Ext.util.Observable.prototype = { - - fireEvent : function(){ - if(this.eventsSuspended !== true){ - var ce = this.events[arguments[0].toLowerCase()]; - if(typeof ce == "object"){ - return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); - } - } - return true; - }, - - filterOptRe : /^(?:scope|delay|buffer|single)$/, - - - addListener : function(eventName, fn, scope, o){ - if(typeof eventName == "object"){ - o = eventName; - for(var e in o){ - if(this.filterOptRe.test(e)){ - continue; - } - if(typeof o[e] == "function"){ - this.addListener(e, o[e], o.scope, o); - }else{ - this.addListener(e, o[e].fn, o[e].scope, o[e]); - } - } - return; - } - o = (!o || typeof o == "boolean") ? {} : o; - eventName = eventName.toLowerCase(); - var ce = this.events[eventName] || true; - if(typeof ce == "boolean"){ - ce = new Ext.util.Event(this, eventName); - this.events[eventName] = ce; - } - ce.addListener(fn, scope, o); - }, - - - removeListener : function(eventName, fn, scope){ - var ce = this.events[eventName.toLowerCase()]; - if(typeof ce == "object"){ - ce.removeListener(fn, scope); - } - }, - - - purgeListeners : function(){ - for(var evt in this.events){ - if(typeof this.events[evt] == "object"){ - this.events[evt].clearListeners(); - } - } - }, - - - relayEvents : function(o, events){ - var createHandler = function(ename){ - return function(){ - return this.fireEvent.apply(this, Ext.combine(ename, Array.prototype.slice.call(arguments, 0))); - }; - }; - for(var i = 0, len = events.length; i < len; i++){ - var ename = events[i]; - if(!this.events[ename]){ this.events[ename] = true; }; - o.on(ename, createHandler(ename), this); - } - }, - - - addEvents : function(o){ - if(!this.events){ - this.events = {}; - } - if(typeof o == 'string'){ - for(var i = 0, a = arguments, v; v = a[i]; i++){ - if(!this.events[a[i]]){ - this.events[a[i]] = true; - } - } - }else{ - Ext.applyIf(this.events, o); - } - }, - - - hasListener : function(eventName){ - var e = this.events[eventName]; - return typeof e == "object" && e.listeners.length > 0; - }, - - - suspendEvents : function(){ - this.eventsSuspended = true; - }, - - - resumeEvents : function(){ - this.eventsSuspended = false; - }, - - getMethodEvent : function(method){ - if(!this.methodEvents){ - this.methodEvents = {}; - } - var e = this.methodEvents[method]; - if(!e){ - e = {}; - this.methodEvents[method] = e; - - e.originalFn = this[method]; - e.methodName = method; - e.before = []; - e.after = []; - - - var returnValue, v, cancel; - var obj = this; - - var makeCall = function(fn, scope, args){ - if((v = fn.apply(scope || obj, args)) !== undefined){ - if(typeof v === 'object'){ - if(v.returnValue !== undefined){ - returnValue = v.returnValue; - }else{ - returnValue = v; - } - if(v.cancel === true){ - cancel = true; - } - }else if(v === false){ - cancel = true; - }else { - returnValue = v; - } - } - } - - this[method] = function(){ - returnValue = v = undefined; cancel = false; - var args = Array.prototype.slice.call(arguments, 0); - for(var i = 0, len = e.before.length; i < len; i++){ - makeCall(e.before[i].fn, e.before[i].scope, args); - if(cancel){ - return returnValue; - } - } - - if((v = e.originalFn.apply(obj, args)) !== undefined){ - returnValue = v; - } - - for(var i = 0, len = e.after.length; i < len; i++){ - makeCall(e.after[i].fn, e.after[i].scope, args); - if(cancel){ - return returnValue; - } - } - return returnValue; - }; - } - return e; - }, - - beforeMethod : function(method, fn, scope){ - var e = this.getMethodEvent(method); - e.before.push({fn: fn, scope: scope}); - }, - - afterMethod : function(method, fn, scope){ - var e = this.getMethodEvent(method); - e.after.push({fn: fn, scope: scope}); - }, - - removeMethodListener : function(method, fn, scope){ - var e = this.getMethodEvent(method); - for(var i = 0, len = e.before.length; i < len; i++){ - if(e.before[i].fn == fn && e.before[i].scope == scope){ - e.before.splice(i, 1); - return; - } - } - for(var i = 0, len = e.after.length; i < len; i++){ - if(e.after[i].fn == fn && e.after[i].scope == scope){ - e.after.splice(i, 1); - return; - } - } - } -}; - -Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener; - -Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener; - - -Ext.util.Observable.capture = function(o, fn, scope){ - o.fireEvent = o.fireEvent.createInterceptor(fn, scope); -}; - - -Ext.util.Observable.releaseCapture = function(o){ - o.fireEvent = Ext.util.Observable.prototype.fireEvent; -}; - -(function(){ - - var createBuffered = function(h, o, scope){ - var task = new Ext.util.DelayedTask(); - return function(){ - task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); - }; - }; - - var createSingle = function(h, e, fn, scope){ - return function(){ - e.removeListener(fn, scope); - return h.apply(scope, arguments); - }; - }; - - var createDelayed = function(h, o, scope){ - return function(){ - var args = Array.prototype.slice.call(arguments, 0); - setTimeout(function(){ - h.apply(scope, args); - }, o.delay || 10); - }; - }; - - Ext.util.Event = function(obj, name){ - this.name = name; - this.obj = obj; - this.listeners = []; - }; - - Ext.util.Event.prototype = { - addListener : function(fn, scope, options){ - scope = scope || this.obj; - if(!this.isListening(fn, scope)){ - var l = this.createListener(fn, scope, options); - if(!this.firing){ - this.listeners.push(l); - }else{ this.listeners = this.listeners.slice(0); - this.listeners.push(l); - } - } - }, - - createListener : function(fn, scope, o){ - o = o || {}; - scope = scope || this.obj; - var l = {fn: fn, scope: scope, options: o}; - var h = fn; - if(o.delay){ - h = createDelayed(h, o, scope); - } - if(o.single){ - h = createSingle(h, this, fn, scope); - } - if(o.buffer){ - h = createBuffered(h, o, scope); - } - l.fireFn = h; - return l; - }, - - findListener : function(fn, scope){ - scope = scope || this.obj; - var ls = this.listeners; - for(var i = 0, len = ls.length; i < len; i++){ - var l = ls[i]; - if(l.fn == fn && l.scope == scope){ - return i; - } - } - return -1; - }, - - isListening : function(fn, scope){ - return this.findListener(fn, scope) != -1; - }, - - removeListener : function(fn, scope){ - var index; - if((index = this.findListener(fn, scope)) != -1){ - if(!this.firing){ - this.listeners.splice(index, 1); - }else{ - this.listeners = this.listeners.slice(0); - this.listeners.splice(index, 1); - } - return true; - } - return false; - }, - - clearListeners : function(){ - this.listeners = []; - }, - - fire : function(){ - var ls = this.listeners, scope, len = ls.length; - if(len > 0){ - this.firing = true; - var args = Array.prototype.slice.call(arguments, 0); - for(var i = 0; i < len; i++){ - var l = ls[i]; - if(l.fireFn.apply(l.scope||this.obj||window, arguments) === false){ - this.firing = false; - return false; - } - } - this.firing = false; - } - return true; - } - }; -})(); - -Ext.EventManager = function(){ - var docReadyEvent, docReadyProcId, docReadyState = false; - var resizeEvent, resizeTask, textEvent, textSize; - var E = Ext.lib.Event; - var D = Ext.lib.Dom; - var xname = 'Ex' + 't'; - - var elHash = {}; - - var addListener = function(el, ename, fn, wrap, scope){ - var id = Ext.id(el); - if(!elHash[id]){ - elHash[id] = {}; - } - var es = elHash[id]; - if(!es[ename]){ - es[ename] = []; - } - var ls = es[ename]; - ls.push({ - id: id, - ename: ename, - fn: fn, - wrap: wrap, - scope: scope - }); - - E.on(el, ename, wrap); - - if(ename == "mousewheel" && el.addEventListener){ el.addEventListener("DOMMouseScroll", wrap, false); - E.on(window, 'unload', function(){ - el.removeEventListener("DOMMouseScroll", wrap, false); - }); - } - if(ename == "mousedown" && el == document){ Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); - } - } - - var removeListener = function(el, ename, fn, scope){ - el = Ext.getDom(el); - var id = Ext.id(el), es = elHash[id], wrap; - if(es){ - var ls = es[ename], l; - if(ls){ - for(var i = 0, len = ls.length; i < len; i++){ - l = ls[i]; - if(l.fn == fn && (!scope || l.scope == scope)){ - wrap = l.wrap; - E.un(el, ename, wrap); - ls.splice(i, 1); - break; - } - } - } - } - if(ename == "mousewheel" && el.addEventListener && wrap){ - el.removeEventListener("DOMMouseScroll", wrap, false); - } - if(ename == "mousedown" && el == document && wrap){ Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); - } - } - - var removeAll = function(el){ - el = Ext.getDom(el); - var id = Ext.id(el), es = elHash[id], ls; - if(es){ - for(var ename in es){ - if(es.hasOwnProperty(ename)){ - ls = es[ename]; - for(var i = 0, len = ls.length; i < len; i++){ - E.un(el, ename, ls[i].wrap); - ls[i] = null; - } - } - es[ename] = null; - } - delete elHash[id]; - } - } - - var fireDocReady = function(){ - if(!docReadyState){ - docReadyState = Ext.isReady = true; - if(Ext.isGecko || Ext.isOpera) { - document.removeEventListener("DOMContentLoaded", fireDocReady, false); - } - } - if(docReadyProcId){ - clearInterval(docReadyProcId); - docReadyProcId = null; - } - if(docReadyEvent){ - docReadyEvent.fire(); - docReadyEvent.clearListeners(); - } - }; - - var initDocReady = function(){ - docReadyEvent = new Ext.util.Event(); - - if(Ext.isReady){ - return; - } - - E.on(window, 'load', fireDocReady); - - if(Ext.isGecko || Ext.isOpera) { - document.addEventListener('DOMContentLoaded', fireDocReady, false); - } - else if(Ext.isIE){ - docReadyProcId = setInterval(function(){ - try{ - Ext.isReady || (document.documentElement.doScroll('left')); - }catch(e){ - return; - } - fireDocReady(); }, 5); - - document.onreadystatechange = function(){ - if(document.readyState == 'complete'){ - document.onreadystatechange = null; - fireDocReady(); - } - }; - } - else if(Ext.isSafari){ - docReadyProcId = setInterval(function(){ - var rs = document.readyState; - if(rs == 'complete') { - fireDocReady(); - } - }, 10); - } - }; - - var createBuffered = function(h, o){ - var task = new Ext.util.DelayedTask(h); - return function(e){ - e = new Ext.EventObjectImpl(e); - task.delay(o.buffer, h, null, [e]); - }; - }; - - var createSingle = function(h, el, ename, fn, scope){ - return function(e){ - Ext.EventManager.removeListener(el, ename, fn, scope); - h(e); - }; - }; - - var createDelayed = function(h, o){ - return function(e){ - e = new Ext.EventObjectImpl(e); - setTimeout(function(){ - h(e); - }, o.delay || 10); - }; - }; - - var listen = function(element, ename, opt, fn, scope){ - var o = (!opt || typeof opt == "boolean") ? {} : opt; - fn = fn || o.fn; scope = scope || o.scope; - var el = Ext.getDom(element); - if(!el){ - throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; - } - var h = function(e){ - if(!window[xname]){ - return; - } - e = Ext.EventObject.setEvent(e); - var t; - if(o.delegate){ - t = e.getTarget(o.delegate, el); - if(!t){ - return; - } - }else{ - t = e.target; - } - if(o.stopEvent === true){ - e.stopEvent(); - } - if(o.preventDefault === true){ - e.preventDefault(); - } - if(o.stopPropagation === true){ - e.stopPropagation(); - } - - if(o.normalized === false){ - e = e.browserEvent; - } - - fn.call(scope || el, e, t, o); - }; - if(o.delay){ - h = createDelayed(h, o); - } - if(o.single){ - h = createSingle(h, el, ename, fn, scope); - } - if(o.buffer){ - h = createBuffered(h, o); - } - - addListener(el, ename, fn, h, scope); - return h; - }; - - var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; - var pub = { - - - addListener : function(element, eventName, fn, scope, options){ - if(typeof eventName == "object"){ - var o = eventName; - for(var e in o){ - if(propRe.test(e)){ - continue; - } - if(typeof o[e] == "function"){ - listen(element, e, o, o[e], o.scope); - }else{ - listen(element, e, o[e]); - } - } - return; - } - return listen(element, eventName, options, fn, scope); - }, - - - removeListener : function(element, eventName, fn, scope){ - return removeListener(element, eventName, fn, scope); - }, - - - removeAll : function(element){ - return removeAll(element); - }, - - - onDocumentReady : function(fn, scope, options){ - if(!docReadyEvent){ - initDocReady(); - } - if(docReadyState || Ext.isReady){ options || (options = {}); - fn.defer(options.delay||0, scope); - }else{ - docReadyEvent.addListener(fn, scope, options); - } - }, - - - onWindowResize : function(fn, scope, options){ - if(!resizeEvent){ - resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(function(){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - }); - E.on(window, "resize", this.fireWindowResize, this); - } - resizeEvent.addListener(fn, scope, options); - }, - - fireWindowResize : function(){ - if(resizeEvent){ - if((Ext.isIE||Ext.isAir) && resizeTask){ - resizeTask.delay(50); - }else{ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - } - } - }, - - - onTextResize : function(fn, scope, options){ - if(!textEvent){ - textEvent = new Ext.util.Event(); - var textEl = new Ext.Element(document.createElement('div')); - textEl.dom.className = 'x-text-resize'; - textEl.dom.innerHTML = 'X'; - textEl.appendTo(document.body); - textSize = textEl.dom.offsetHeight; - setInterval(function(){ - if(textEl.dom.offsetHeight != textSize){ - textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); - } - }, this.textResizeInterval); - } - textEvent.addListener(fn, scope, options); - }, - - - removeResizeListener : function(fn, scope){ - if(resizeEvent){ - resizeEvent.removeListener(fn, scope); - } - }, - - fireResize : function(){ - if(resizeEvent){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - } - }, - - ieDeferSrc : false, - - textResizeInterval : 50 - }; - - pub.on = pub.addListener; - - pub.un = pub.removeListener; - - pub.stoppedMouseDownEvent = new Ext.util.Event(); - return pub; -}(); - -Ext.onReady = Ext.EventManager.onDocumentReady; - - -(function(){ - var initExtCss = function(){ - var bd = document.body || document.getElementsByTagName('body')[0]; - if(!bd){ return false; } - var cls = [' ', - Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') - : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') - : Ext.isOpera ? "ext-opera" - : Ext.isSafari ? "ext-safari" : ""]; - - if(Ext.isMac){ - cls.push("ext-mac"); - } - if(Ext.isLinux){ - cls.push("ext-linux"); - } - if(Ext.isBorderBox){ - cls.push('ext-border-box'); - } - if(Ext.isStrict){ var p = bd.parentNode; - if(p){ - p.className += ' ext-strict'; - } - } - bd.className += cls.join(' '); - return true; - } - - if(!initExtCss()){ - Ext.onReady(initExtCss); - } -})(); - - -Ext.EventObject = function(){ - - var E = Ext.lib.Event; - - var safariKeys = { - 3 : 13, 63234 : 37, 63235 : 39, 63232 : 38, 63233 : 40, 63276 : 33, 63277 : 34, 63272 : 46, 63273 : 36, 63275 : 35 }; - - var btnMap = Ext.isIE ? {1:0,4:1,2:2} : - (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2}); - - Ext.EventObjectImpl = function(e){ - if(e){ - this.setEvent(e.browserEvent || e); - } - }; - - Ext.EventObjectImpl.prototype = { - - browserEvent : null, - - button : -1, - - shiftKey : false, - - ctrlKey : false, - - altKey : false, - - - BACKSPACE: 8, - - TAB: 9, - - NUM_CENTER: 12, - - ENTER: 13, - - RETURN: 13, - - SHIFT: 16, - - CTRL: 17, - CONTROL : 17, - ALT: 18, - - PAUSE: 19, - - CAPS_LOCK: 20, - - ESC: 27, - - SPACE: 32, - - PAGE_UP: 33, - PAGEUP : 33, - PAGE_DOWN: 34, - PAGEDOWN : 34, - END: 35, - - HOME: 36, - - LEFT: 37, - - UP: 38, - - RIGHT: 39, - - DOWN: 40, - - PRINT_SCREEN: 44, - - INSERT: 45, - - DELETE: 46, - - ZERO: 48, - - ONE: 49, - - TWO: 50, - - THREE: 51, - - FOUR: 52, - - FIVE: 53, - - SIX: 54, - - SEVEN: 55, - - EIGHT: 56, - - NINE: 57, - - A: 65, - - B: 66, - - C: 67, - - D: 68, - - E: 69, - - F: 70, - - G: 71, - - H: 72, - - I: 73, - - J: 74, - - K: 75, - - L: 76, - - M: 77, - - N: 78, - - O: 79, - - P: 80, - - Q: 81, - - R: 82, - - S: 83, - - T: 84, - - U: 85, - - V: 86, - - W: 87, - - X: 88, - - Y: 89, - - Z: 90, - - CONTEXT_MENU: 93, - - NUM_ZERO: 96, - - NUM_ONE: 97, - - NUM_TWO: 98, - - NUM_THREE: 99, - - NUM_FOUR: 100, - - NUM_FIVE: 101, - - NUM_SIX: 102, - - NUM_SEVEN: 103, - - NUM_EIGHT: 104, - - NUM_NINE: 105, - - NUM_MULTIPLY: 106, - - NUM_PLUS: 107, - - NUM_MINUS: 109, - - NUM_PERIOD: 110, - - NUM_DIVISION: 111, - - F1: 112, - - F2: 113, - - F3: 114, - - F4: 115, - - F5: 116, - - F6: 117, - - F7: 118, - - F8: 119, - - F9: 120, - - F10: 121, - - F11: 122, - - F12: 123, - - - setEvent : function(e){ - if(e == this || (e && e.browserEvent)){ return e; - } - this.browserEvent = e; - if(e){ - this.button = e.button ? btnMap[e.button] : (e.which ? e.which-1 : -1); - if(e.type == 'click' && this.button == -1){ - this.button = 0; - } - this.type = e.type; - this.shiftKey = e.shiftKey; - this.ctrlKey = e.ctrlKey || e.metaKey; - this.altKey = e.altKey; - this.keyCode = e.keyCode; - this.charCode = e.charCode; - this.target = E.getTarget(e); - this.xy = E.getXY(e); - }else{ - this.button = -1; - this.shiftKey = false; - this.ctrlKey = false; - this.altKey = false; - this.keyCode = 0; - this.charCode = 0; - this.target = null; - this.xy = [0, 0]; - } - return this; - }, - - - stopEvent : function(){ - if(this.browserEvent){ - if(this.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(this); - } - E.stopEvent(this.browserEvent); - } - }, - - - preventDefault : function(){ - if(this.browserEvent){ - E.preventDefault(this.browserEvent); - } - }, - - - isNavKeyPress : function(){ - var k = this.keyCode; - k = Ext.isSafari ? (safariKeys[k] || k) : k; - return (k >= 33 && k <= 40) || k == this.RETURN || k == this.TAB || k == this.ESC; - }, - - isSpecialKey : function(){ - var k = this.keyCode; - return (this.type == 'keypress' && this.ctrlKey) || k == 9 || k == 13 || k == 40 || k == 27 || - (k == 16) || (k == 17) || - (k >= 18 && k <= 20) || - (k >= 33 && k <= 35) || - (k >= 36 && k <= 39) || - (k >= 44 && k <= 45); - }, - - - stopPropagation : function(){ - if(this.browserEvent){ - if(this.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(this); - } - E.stopPropagation(this.browserEvent); - } - }, - - - getCharCode : function(){ - return this.charCode || this.keyCode; - }, - - - getKey : function(){ - var k = this.keyCode || this.charCode; - return Ext.isSafari ? (safariKeys[k] || k) : k; - }, - - - getPageX : function(){ - return this.xy[0]; - }, - - - getPageY : function(){ - return this.xy[1]; - }, - - - getTime : function(){ - if(this.browserEvent){ - return E.getTime(this.browserEvent); - } - return null; - }, - - - getXY : function(){ - return this.xy; - }, - - - getTarget : function(selector, maxDepth, returnEl){ - return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target); - }, - - - getRelatedTarget : function(){ - if(this.browserEvent){ - return E.getRelatedTarget(this.browserEvent); - } - return null; - }, - - - getWheelDelta : function(){ - var e = this.browserEvent; - var delta = 0; - if(e.wheelDelta){ - delta = e.wheelDelta/120; - }else if(e.detail){ - delta = -e.detail/3; - } - return delta; - }, - - - hasModifier : function(){ - return ((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false; - }, - - - within : function(el, related){ - var t = this[related ? "getRelatedTarget" : "getTarget"](); - return t && Ext.fly(el).contains(t); - }, - - getPoint : function(){ - return new Ext.lib.Point(this.xy[0], this.xy[1]); - } - }; - - return new Ext.EventObjectImpl(); -}(); - -(function(){ -var D = Ext.lib.Dom; -var E = Ext.lib.Event; -var A = Ext.lib.Anim; - -var propCache = {}; -var camelRe = /(-[a-z])/gi; -var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; -var view = document.defaultView; - -Ext.Element = function(element, forceNew){ - var dom = typeof element == "string" ? - document.getElementById(element) : element; - if(!dom){ return null; - } - var id = dom.id; - if(forceNew !== true && id && Ext.Element.cache[id]){ return Ext.Element.cache[id]; - } - - - this.dom = dom; - - - this.id = id || Ext.id(dom); -}; - -var El = Ext.Element; - -El.prototype = { - - originalDisplay : "", - - visibilityMode : 1, - - defaultUnit : "px", - - setVisibilityMode : function(visMode){ - this.visibilityMode = visMode; - return this; - }, - - enableDisplayMode : function(display){ - this.setVisibilityMode(El.DISPLAY); - if(typeof display != "undefined") this.originalDisplay = display; - return this; - }, - - - findParent : function(simpleSelector, maxDepth, returnEl){ - var p = this.dom, b = document.body, depth = 0, dq = Ext.DomQuery, stopEl; - maxDepth = maxDepth || 50; - if(typeof maxDepth != "number"){ - stopEl = Ext.getDom(maxDepth); - maxDepth = 10; - } - while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ - if(dq.is(p, simpleSelector)){ - return returnEl ? Ext.get(p) : p; - } - depth++; - p = p.parentNode; - } - return null; - }, - - - - findParentNode : function(simpleSelector, maxDepth, returnEl){ - var p = Ext.fly(this.dom.parentNode, '_internal'); - return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null; - }, - - - up : function(simpleSelector, maxDepth){ - return this.findParentNode(simpleSelector, maxDepth, true); - }, - - - - - is : function(simpleSelector){ - return Ext.DomQuery.is(this.dom, simpleSelector); - }, - - - animate : function(args, duration, onComplete, easing, animType){ - this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType); - return this; - }, - - - anim : function(args, opt, animType, defaultDur, defaultEase, cb){ - animType = animType || 'run'; - opt = opt || {}; - var anim = Ext.lib.Anim[animType]( - this.dom, args, - (opt.duration || defaultDur) || .35, - (opt.easing || defaultEase) || 'easeOut', - function(){ - Ext.callback(cb, this); - Ext.callback(opt.callback, opt.scope || this, [this, opt]); - }, - this - ); - opt.anim = anim; - return anim; - }, - - preanim : function(a, i){ - return !a[i] ? false : (typeof a[i] == "object" ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]}); - }, - - - clean : function(forceReclean){ - if(this.isCleaned && forceReclean !== true){ - return this; - } - var ns = /\S/; - var d = this.dom, n = d.firstChild, ni = -1; - while(n){ - var nx = n.nextSibling; - if(n.nodeType == 3 && !ns.test(n.nodeValue)){ - d.removeChild(n); - }else{ - n.nodeIndex = ++ni; - } - n = nx; - } - this.isCleaned = true; - return this; - }, - - - scrollIntoView : function(container, hscroll){ - var c = Ext.getDom(container) || Ext.getBody().dom; - var el = this.dom; - - var o = this.getOffsetsTo(c), - l = o[0] + c.scrollLeft, - t = o[1] + c.scrollTop, - b = t+el.offsetHeight, - r = l+el.offsetWidth; - - var ch = c.clientHeight; - var ct = parseInt(c.scrollTop, 10); - var cl = parseInt(c.scrollLeft, 10); - var cb = ct + ch; - var cr = cl + c.clientWidth; - - if(el.offsetHeight > ch || t < ct){ - c.scrollTop = t; - }else if(b > cb){ - c.scrollTop = b-ch; - } - c.scrollTop = c.scrollTop; - if(hscroll !== false){ - if(el.offsetWidth > c.clientWidth || l < cl){ - c.scrollLeft = l; - }else if(r > cr){ - c.scrollLeft = r-c.clientWidth; - } - c.scrollLeft = c.scrollLeft; - } - return this; - }, - - scrollChildIntoView : function(child, hscroll){ - Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); - }, - - - autoHeight : function(animate, duration, onComplete, easing){ - var oldHeight = this.getHeight(); - this.clip(); - this.setHeight(1); setTimeout(function(){ - var height = parseInt(this.dom.scrollHeight, 10); if(!animate){ - this.setHeight(height); - this.unclip(); - if(typeof onComplete == "function"){ - onComplete(); - } - }else{ - this.setHeight(oldHeight); this.setHeight(height, animate, duration, function(){ - this.unclip(); - if(typeof onComplete == "function") onComplete(); - }.createDelegate(this), easing); - } - }.createDelegate(this), 0); - return this; - }, - - - contains : function(el){ - if(!el){return false;} - return D.isAncestor(this.dom, el.dom ? el.dom : el); - }, - - - isVisible : function(deep) { - var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none"); - if(deep !== true || !vis){ - return vis; - } - var p = this.dom.parentNode; - while(p && p.tagName.toLowerCase() != "body"){ - if(!Ext.fly(p, '_isVisible').isVisible()){ - return false; - } - p = p.parentNode; - } - return true; - }, - - - select : function(selector, unique){ - return El.select(selector, unique, this.dom); - }, - - - query : function(selector){ - return Ext.DomQuery.select(selector, this.dom); - }, - - - child : function(selector, returnDom){ - var n = Ext.DomQuery.selectNode(selector, this.dom); - return returnDom ? n : Ext.get(n); - }, - - - down : function(selector, returnDom){ - var n = Ext.DomQuery.selectNode(" > " + selector, this.dom); - return returnDom ? n : Ext.get(n); - }, - - - initDD : function(group, config, overrides){ - var dd = new Ext.dd.DD(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - - initDDProxy : function(group, config, overrides){ - var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - - initDDTarget : function(group, config, overrides){ - var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config); - return Ext.apply(dd, overrides); - }, - - - setVisible : function(visible, animate){ - if(!animate || !A){ - if(this.visibilityMode == El.DISPLAY){ - this.setDisplayed(visible); - }else{ - this.fixDisplay(); - this.dom.style.visibility = visible ? "visible" : "hidden"; - } - }else{ - var dom = this.dom; - var visMode = this.visibilityMode; - if(visible){ - this.setOpacity(.01); - this.setVisible(true); - } - this.anim({opacity: { to: (visible?1:0) }}, - this.preanim(arguments, 1), - null, .35, 'easeIn', function(){ - if(!visible){ - if(visMode == El.DISPLAY){ - dom.style.display = "none"; - }else{ - dom.style.visibility = "hidden"; - } - Ext.get(dom).setOpacity(1); - } - }); - } - return this; - }, - - - isDisplayed : function() { - return this.getStyle("display") != "none"; - }, - - - toggle : function(animate){ - this.setVisible(!this.isVisible(), this.preanim(arguments, 0)); - return this; - }, - - - setDisplayed : function(value) { - if(typeof value == "boolean"){ - value = value ? this.originalDisplay : "none"; - } - this.setStyle("display", value); - return this; - }, - - - focus : function() { - try{ - this.dom.focus(); - }catch(e){} - return this; - }, - - - blur : function() { - try{ - this.dom.blur(); - }catch(e){} - return this; - }, - - - addClass : function(className){ - if(Ext.isArray(className)){ - for(var i = 0, len = className.length; i < len; i++) { - this.addClass(className[i]); - } - }else{ - if(className && !this.hasClass(className)){ - this.dom.className = this.dom.className + " " + className; - } - } - return this; - }, - - - radioClass : function(className){ - var siblings = this.dom.parentNode.childNodes; - for(var i = 0; i < siblings.length; i++) { - var s = siblings[i]; - if(s.nodeType == 1){ - Ext.get(s).removeClass(className); - } - } - this.addClass(className); - return this; - }, - - - removeClass : function(className){ - if(!className || !this.dom.className){ - return this; - } - if(Ext.isArray(className)){ - for(var i = 0, len = className.length; i < len; i++) { - this.removeClass(className[i]); - } - }else{ - if(this.hasClass(className)){ - var re = this.classReCache[className]; - if (!re) { - re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', "g"); - this.classReCache[className] = re; - } - this.dom.className = - this.dom.className.replace(re, " "); - } - } - return this; - }, - - classReCache: {}, - - - toggleClass : function(className){ - if(this.hasClass(className)){ - this.removeClass(className); - }else{ - this.addClass(className); - } - return this; - }, - - - hasClass : function(className){ - return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; - }, - - - replaceClass : function(oldClassName, newClassName){ - this.removeClass(oldClassName); - this.addClass(newClassName); - return this; - }, - - - getStyles : function(){ - var a = arguments, len = a.length, r = {}; - for(var i = 0; i < len; i++){ - r[a[i]] = this.getStyle(a[i]); - } - return r; - }, - - - getStyle : function(){ - return view && view.getComputedStyle ? - function(prop){ - var el = this.dom, v, cs, camel; - if(prop == 'float'){ - prop = "cssFloat"; - } - if(v = el.style[prop]){ - return v; - } - if(cs = view.getComputedStyle(el, "")){ - if(!(camel = propCache[prop])){ - camel = propCache[prop] = prop.replace(camelRe, camelFn); - } - return cs[camel]; - } - return null; - } : - function(prop){ - var el = this.dom, v, cs, camel; - if(prop == 'opacity'){ - if(typeof el.style.filter == 'string'){ - var m = el.style.filter.match(/alpha\(opacity=(.*)\)/i); - if(m){ - var fv = parseFloat(m[1]); - if(!isNaN(fv)){ - return fv ? fv / 100 : 0; - } - } - } - return 1; - }else if(prop == 'float'){ - prop = "styleFloat"; - } - if(!(camel = propCache[prop])){ - camel = propCache[prop] = prop.replace(camelRe, camelFn); - } - if(v = el.style[camel]){ - return v; - } - if(cs = el.currentStyle){ - return cs[camel]; - } - return null; - }; - }(), - - - setStyle : function(prop, value){ - if(typeof prop == "string"){ - var camel; - if(!(camel = propCache[prop])){ - camel = propCache[prop] = prop.replace(camelRe, camelFn); - } - if(camel == 'opacity') { - this.setOpacity(value); - }else{ - this.dom.style[camel] = value; - } - }else{ - for(var style in prop){ - if(typeof prop[style] != "function"){ - this.setStyle(style, prop[style]); - } - } - } - return this; - }, - - - applyStyles : function(style){ - Ext.DomHelper.applyStyles(this.dom, style); - return this; - }, - - - getX : function(){ - return D.getX(this.dom); - }, - - - getY : function(){ - return D.getY(this.dom); - }, - - - getXY : function(){ - return D.getXY(this.dom); - }, - - - getOffsetsTo : function(el){ - var o = this.getXY(); - var e = Ext.fly(el, '_internal').getXY(); - return [o[0]-e[0],o[1]-e[1]]; - }, - - - setX : function(x, animate){ - if(!animate || !A){ - D.setX(this.dom, x); - }else{ - this.setXY([x, this.getY()], this.preanim(arguments, 1)); - } - return this; - }, - - - setY : function(y, animate){ - if(!animate || !A){ - D.setY(this.dom, y); - }else{ - this.setXY([this.getX(), y], this.preanim(arguments, 1)); - } - return this; - }, - - - setLeft : function(left){ - this.setStyle("left", this.addUnits(left)); - return this; - }, - - - setTop : function(top){ - this.setStyle("top", this.addUnits(top)); - return this; - }, - - - setRight : function(right){ - this.setStyle("right", this.addUnits(right)); - return this; - }, - - - setBottom : function(bottom){ - this.setStyle("bottom", this.addUnits(bottom)); - return this; - }, - - - setXY : function(pos, animate){ - if(!animate || !A){ - D.setXY(this.dom, pos); - }else{ - this.anim({points: {to: pos}}, this.preanim(arguments, 1), 'motion'); - } - return this; - }, - - - setLocation : function(x, y, animate){ - this.setXY([x, y], this.preanim(arguments, 2)); - return this; - }, - - - moveTo : function(x, y, animate){ - this.setXY([x, y], this.preanim(arguments, 2)); - return this; - }, - - - getRegion : function(){ - return D.getRegion(this.dom); - }, - - - getHeight : function(contentHeight){ - var h = this.dom.offsetHeight || 0; - h = contentHeight !== true ? h : h-this.getBorderWidth("tb")-this.getPadding("tb"); - return h < 0 ? 0 : h; - }, - - - getWidth : function(contentWidth){ - var w = this.dom.offsetWidth || 0; - w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr"); - return w < 0 ? 0 : w; - }, - - - getComputedHeight : function(){ - var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight); - if(!h){ - h = parseInt(this.getStyle('height'), 10) || 0; - if(!this.isBorderBox()){ - h += this.getFrameWidth('tb'); - } - } - return h; - }, - - - getComputedWidth : function(){ - var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); - if(!w){ - w = parseInt(this.getStyle('width'), 10) || 0; - if(!this.isBorderBox()){ - w += this.getFrameWidth('lr'); - } - } - return w; - }, - - - getSize : function(contentSize){ - return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; - }, - - getStyleSize : function(){ - var w, h, d = this.dom, s = d.style; - if(s.width && s.width != 'auto'){ - w = parseInt(s.width, 10); - if(Ext.isBorderBox){ - w -= this.getFrameWidth('lr'); - } - } - if(s.height && s.height != 'auto'){ - h = parseInt(s.height, 10); - if(Ext.isBorderBox){ - h -= this.getFrameWidth('tb'); - } - } - return {width: w || this.getWidth(true), height: h || this.getHeight(true)}; - - }, - - - getViewSize : function(){ - var d = this.dom, doc = document, aw = 0, ah = 0; - if(d == doc || d == doc.body){ - return {width : D.getViewWidth(), height: D.getViewHeight()}; - }else{ - return { - width : d.clientWidth, - height: d.clientHeight - }; - } - }, - - - getValue : function(asNumber){ - return asNumber ? parseInt(this.dom.value, 10) : this.dom.value; - }, - - adjustWidth : function(width){ - if(typeof width == "number"){ - if(this.autoBoxAdjust && !this.isBorderBox()){ - width -= (this.getBorderWidth("lr") + this.getPadding("lr")); - } - if(width < 0){ - width = 0; - } - } - return width; - }, - - adjustHeight : function(height){ - if(typeof height == "number"){ - if(this.autoBoxAdjust && !this.isBorderBox()){ - height -= (this.getBorderWidth("tb") + this.getPadding("tb")); - } - if(height < 0){ - height = 0; - } - } - return height; - }, - - - setWidth : function(width, animate){ - width = this.adjustWidth(width); - if(!animate || !A){ - this.dom.style.width = this.addUnits(width); - }else{ - this.anim({width: {to: width}}, this.preanim(arguments, 1)); - } - return this; - }, - - - setHeight : function(height, animate){ - height = this.adjustHeight(height); - if(!animate || !A){ - this.dom.style.height = this.addUnits(height); - }else{ - this.anim({height: {to: height}}, this.preanim(arguments, 1)); - } - return this; - }, - - - setSize : function(width, height, animate){ - if(typeof width == "object"){ height = width.height; width = width.width; - } - width = this.adjustWidth(width); height = this.adjustHeight(height); - if(!animate || !A){ - this.dom.style.width = this.addUnits(width); - this.dom.style.height = this.addUnits(height); - }else{ - this.anim({width: {to: width}, height: {to: height}}, this.preanim(arguments, 2)); - } - return this; - }, - - - setBounds : function(x, y, width, height, animate){ - if(!animate || !A){ - this.setSize(width, height); - this.setLocation(x, y); - }else{ - width = this.adjustWidth(width); height = this.adjustHeight(height); - this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, - this.preanim(arguments, 4), 'motion'); - } - return this; - }, - - - setRegion : function(region, animate){ - this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.preanim(arguments, 1)); - return this; - }, - - - addListener : function(eventName, fn, scope, options){ - Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); - }, - - - removeListener : function(eventName, fn, scope){ - Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this); - return this; - }, - - - removeAllListeners : function(){ - Ext.EventManager.removeAll(this.dom); - return this; - }, - - - relayEvent : function(eventName, observable){ - this.on(eventName, function(e){ - observable.fireEvent(eventName, e); - }); - }, - - - setOpacity : function(opacity, animate){ - if(!animate || !A){ - var s = this.dom.style; - if(Ext.isIE){ - s.zoom = 1; - s.filter = (s.filter || '').replace(/alpha\([^\)]*\)/gi,"") + - (opacity == 1 ? "" : " alpha(opacity=" + opacity * 100 + ")"); - }else{ - s.opacity = opacity; - } - }else{ - this.anim({opacity: {to: opacity}}, this.preanim(arguments, 1), null, .35, 'easeIn'); - } - return this; - }, - - - getLeft : function(local){ - if(!local){ - return this.getX(); - }else{ - return parseInt(this.getStyle("left"), 10) || 0; - } - }, - - - getRight : function(local){ - if(!local){ - return this.getX() + this.getWidth(); - }else{ - return (this.getLeft(true) + this.getWidth()) || 0; - } - }, - - - getTop : function(local) { - if(!local){ - return this.getY(); - }else{ - return parseInt(this.getStyle("top"), 10) || 0; - } - }, - - - getBottom : function(local){ - if(!local){ - return this.getY() + this.getHeight(); - }else{ - return (this.getTop(true) + this.getHeight()) || 0; - } - }, - - - position : function(pos, zIndex, x, y){ - if(!pos){ - if(this.getStyle('position') == 'static'){ - this.setStyle('position', 'relative'); - } - }else{ - this.setStyle("position", pos); - } - if(zIndex){ - this.setStyle("z-index", zIndex); - } - if(x !== undefined && y !== undefined){ - this.setXY([x, y]); - }else if(x !== undefined){ - this.setX(x); - }else if(y !== undefined){ - this.setY(y); - } - }, - - - clearPositioning : function(value){ - value = value ||''; - this.setStyle({ - "left": value, - "right": value, - "top": value, - "bottom": value, - "z-index": "", - "position" : "static" - }); - return this; - }, - - - getPositioning : function(){ - var l = this.getStyle("left"); - var t = this.getStyle("top"); - return { - "position" : this.getStyle("position"), - "left" : l, - "right" : l ? "" : this.getStyle("right"), - "top" : t, - "bottom" : t ? "" : this.getStyle("bottom"), - "z-index" : this.getStyle("z-index") - }; - }, - - - getBorderWidth : function(side){ - return this.addStyles(side, El.borders); - }, - - - getPadding : function(side){ - return this.addStyles(side, El.paddings); - }, - - - setPositioning : function(pc){ - this.applyStyles(pc); - if(pc.right == "auto"){ - this.dom.style.right = ""; - } - if(pc.bottom == "auto"){ - this.dom.style.bottom = ""; - } - return this; - }, - - fixDisplay : function(){ - if(this.getStyle("display") == "none"){ - this.setStyle("visibility", "hidden"); - this.setStyle("display", this.originalDisplay); if(this.getStyle("display") == "none"){ this.setStyle("display", "block"); - } - } - }, - - setOverflow : function(v){ - if(v=='auto' && Ext.isMac && Ext.isGecko2){ this.dom.style.overflow = 'hidden'; - (function(){this.dom.style.overflow = 'auto';}).defer(1, this); - }else{ - this.dom.style.overflow = v; - } - }, - - - setLeftTop : function(left, top){ - this.dom.style.left = this.addUnits(left); - this.dom.style.top = this.addUnits(top); - return this; - }, - - - move : function(direction, distance, animate){ - var xy = this.getXY(); - direction = direction.toLowerCase(); - switch(direction){ - case "l": - case "left": - this.moveTo(xy[0]-distance, xy[1], this.preanim(arguments, 2)); - break; - case "r": - case "right": - this.moveTo(xy[0]+distance, xy[1], this.preanim(arguments, 2)); - break; - case "t": - case "top": - case "up": - this.moveTo(xy[0], xy[1]-distance, this.preanim(arguments, 2)); - break; - case "b": - case "bottom": - case "down": - this.moveTo(xy[0], xy[1]+distance, this.preanim(arguments, 2)); - break; - } - return this; - }, - - - clip : function(){ - if(!this.isClipped){ - this.isClipped = true; - this.originalClip = { - "o": this.getStyle("overflow"), - "x": this.getStyle("overflow-x"), - "y": this.getStyle("overflow-y") - }; - this.setStyle("overflow", "hidden"); - this.setStyle("overflow-x", "hidden"); - this.setStyle("overflow-y", "hidden"); - } - return this; - }, - - - unclip : function(){ - if(this.isClipped){ - this.isClipped = false; - var o = this.originalClip; - if(o.o){this.setStyle("overflow", o.o);} - if(o.x){this.setStyle("overflow-x", o.x);} - if(o.y){this.setStyle("overflow-y", o.y);} - } - return this; - }, - - - - getAnchorXY : function(anchor, local, s){ - - var w, h, vp = false; - if(!s){ - var d = this.dom; - if(d == document.body || d == document){ - vp = true; - w = D.getViewWidth(); h = D.getViewHeight(); - }else{ - w = this.getWidth(); h = this.getHeight(); - } - }else{ - w = s.width; h = s.height; - } - var x = 0, y = 0, r = Math.round; - switch((anchor || "tl").toLowerCase()){ - case "c": - x = r(w*.5); - y = r(h*.5); - break; - case "t": - x = r(w*.5); - y = 0; - break; - case "l": - x = 0; - y = r(h*.5); - break; - case "r": - x = w; - y = r(h*.5); - break; - case "b": - x = r(w*.5); - y = h; - break; - case "tl": - x = 0; - y = 0; - break; - case "bl": - x = 0; - y = h; - break; - case "br": - x = w; - y = h; - break; - case "tr": - x = w; - y = 0; - break; - } - if(local === true){ - return [x, y]; - } - if(vp){ - var sc = this.getScroll(); - return [x + sc.left, y + sc.top]; - } - var o = this.getXY(); - return [x+o[0], y+o[1]]; - }, - - - getAlignToXY : function(el, p, o){ - el = Ext.get(el); - if(!el || !el.dom){ - throw "Element.alignToXY with an element that doesn't exist"; - } - var d = this.dom; - var c = false; var p1 = "", p2 = ""; - o = o || [0,0]; - - if(!p){ - p = "tl-bl"; - }else if(p == "?"){ - p = "tl-bl?"; - }else if(p.indexOf("-") == -1){ - p = "tl-" + p; - } - p = p.toLowerCase(); - var m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); - if(!m){ - throw "Element.alignTo with an invalid alignment " + p; - } - p1 = m[1]; p2 = m[2]; c = !!m[3]; - - var a1 = this.getAnchorXY(p1, true); - var a2 = el.getAnchorXY(p2, false); - - var x = a2[0] - a1[0] + o[0]; - var y = a2[1] - a1[1] + o[1]; - - if(c){ - var w = this.getWidth(), h = this.getHeight(), r = el.getRegion(); - var dw = D.getViewWidth()-5, dh = D.getViewHeight()-5; - - var p1y = p1.charAt(0), p1x = p1.charAt(p1.length-1); - var p2y = p2.charAt(0), p2x = p2.charAt(p2.length-1); - var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); - var swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); - - var doc = document; - var scrollX = (doc.documentElement.scrollLeft || doc.body.scrollLeft || 0)+5; - var scrollY = (doc.documentElement.scrollTop || doc.body.scrollTop || 0)+5; - - if((x+w) > dw + scrollX){ - x = swapX ? r.left-w : dw+scrollX-w; - } - if(x < scrollX){ - x = swapX ? r.right : scrollX; - } - if((y+h) > dh + scrollY){ - y = swapY ? r.top-h : dh+scrollY-h; - } - if (y < scrollY){ - y = swapY ? r.bottom : scrollY; - } - } - return [x,y]; - }, - - getConstrainToXY : function(){ - var os = {top:0, left:0, bottom:0, right: 0}; - - return function(el, local, offsets, proposedXY){ - el = Ext.get(el); - offsets = offsets ? Ext.applyIf(offsets, os) : os; - - var vw, vh, vx = 0, vy = 0; - if(el.dom == document.body || el.dom == document){ - vw = Ext.lib.Dom.getViewWidth(); - vh = Ext.lib.Dom.getViewHeight(); - }else{ - vw = el.dom.clientWidth; - vh = el.dom.clientHeight; - if(!local){ - var vxy = el.getXY(); - vx = vxy[0]; - vy = vxy[1]; - } - } - - var s = el.getScroll(); - - vx += offsets.left + s.left; - vy += offsets.top + s.top; - - vw -= offsets.right; - vh -= offsets.bottom; - - var vr = vx+vw; - var vb = vy+vh; - - var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]); - var x = xy[0], y = xy[1]; - var w = this.dom.offsetWidth, h = this.dom.offsetHeight; - - var moved = false; - - if((x + w) > vr){ - x = vr - w; - moved = true; - } - if((y + h) > vb){ - y = vb - h; - moved = true; - } - if(x < vx){ - x = vx; - moved = true; - } - if(y < vy){ - y = vy; - moved = true; - } - return moved ? [x, y] : false; - }; - }(), - - adjustForConstraints : function(xy, parent, offsets){ - return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; - }, - - - alignTo : function(element, position, offsets, animate){ - var xy = this.getAlignToXY(element, position, offsets); - this.setXY(xy, this.preanim(arguments, 3)); - return this; - }, - - - anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ - var action = function(){ - this.alignTo(el, alignment, offsets, animate); - Ext.callback(callback, this); - }; - Ext.EventManager.onWindowResize(action, this); - var tm = typeof monitorScroll; - if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', action, this, - {buffer: tm == 'number' ? monitorScroll : 50}); - } - action.call(this); return this; - }, - - clearOpacity : function(){ - if (window.ActiveXObject) { - if(typeof this.dom.style.filter == 'string' && (/alpha/i).test(this.dom.style.filter)){ - this.dom.style.filter = ""; - } - } else { - this.dom.style.opacity = ""; - this.dom.style["-moz-opacity"] = ""; - this.dom.style["-khtml-opacity"] = ""; - } - return this; - }, - - - hide : function(animate){ - this.setVisible(false, this.preanim(arguments, 0)); - return this; - }, - - - show : function(animate){ - this.setVisible(true, this.preanim(arguments, 0)); - return this; - }, - - - addUnits : function(size){ - return Ext.Element.addUnits(size, this.defaultUnit); - }, - - - update : function(html, loadScripts, callback){ - if(typeof html == "undefined"){ - html = ""; - } - if(loadScripts !== true){ - this.dom.innerHTML = html; - if(typeof callback == "function"){ - callback(); - } - return this; - } - var id = Ext.id(); - var dom = this.dom; - - html += ''; - - E.onAvailable(id, function(){ - var hd = document.getElementsByTagName("head")[0]; - var re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig; - var srcRe = /\ssrc=([\'\"])(.*?)\1/i; - var typeRe = /\stype=([\'\"])(.*?)\1/i; - - var match; - while(match = re.exec(html)){ - var attrs = match[1]; - var srcMatch = attrs ? attrs.match(srcRe) : false; - if(srcMatch && srcMatch[2]){ - var s = document.createElement("script"); - s.src = srcMatch[2]; - var typeMatch = attrs.match(typeRe); - if(typeMatch && typeMatch[2]){ - s.type = typeMatch[2]; - } - hd.appendChild(s); - }else if(match[2] && match[2].length > 0){ - if(window.execScript) { - window.execScript(match[2]); - } else { - window.eval(match[2]); - } - } - } - var el = document.getElementById(id); - if(el){Ext.removeNode(el);} - if(typeof callback == "function"){ - callback(); - } - }); - dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); - return this; - }, - - - load : function(){ - var um = this.getUpdater(); - um.update.apply(um, arguments); - return this; - }, - - - getUpdater : function(){ - if(!this.updateManager){ - this.updateManager = new Ext.Updater(this); - } - return this.updateManager; - }, - - - unselectable : function(){ - this.dom.unselectable = "on"; - this.swallowEvent("selectstart", true); - this.applyStyles("-moz-user-select:none;-khtml-user-select:none;"); - this.addClass("x-unselectable"); - return this; - }, - - - getCenterXY : function(){ - return this.getAlignToXY(document, 'c-c'); - }, - - - center : function(centerIn){ - this.alignTo(centerIn || document, 'c-c'); - return this; - }, - - - isBorderBox : function(){ - return noBoxAdjust[this.dom.tagName.toLowerCase()] || Ext.isBorderBox; - }, - - - getBox : function(contentBox, local){ - var xy; - if(!local){ - xy = this.getXY(); - }else{ - var left = parseInt(this.getStyle("left"), 10) || 0; - var top = parseInt(this.getStyle("top"), 10) || 0; - xy = [left, top]; - } - var el = this.dom, w = el.offsetWidth, h = el.offsetHeight, bx; - if(!contentBox){ - bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; - }else{ - var l = this.getBorderWidth("l")+this.getPadding("l"); - var r = this.getBorderWidth("r")+this.getPadding("r"); - var t = this.getBorderWidth("t")+this.getPadding("t"); - var b = this.getBorderWidth("b")+this.getPadding("b"); - bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; - } - bx.right = bx.x + bx.width; - bx.bottom = bx.y + bx.height; - return bx; - }, - - - getFrameWidth : function(sides, onlyContentBox){ - return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); - }, - - - setBox : function(box, adjust, animate){ - var w = box.width, h = box.height; - if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){ - w -= (this.getBorderWidth("lr") + this.getPadding("lr")); - h -= (this.getBorderWidth("tb") + this.getPadding("tb")); - } - this.setBounds(box.x, box.y, w, h, this.preanim(arguments, 2)); - return this; - }, - - - repaint : function(){ - var dom = this.dom; - this.addClass("x-repaint"); - setTimeout(function(){ - Ext.get(dom).removeClass("x-repaint"); - }, 1); - return this; - }, - - - getMargins : function(side){ - if(!side){ - return { - top: parseInt(this.getStyle("margin-top"), 10) || 0, - left: parseInt(this.getStyle("margin-left"), 10) || 0, - bottom: parseInt(this.getStyle("margin-bottom"), 10) || 0, - right: parseInt(this.getStyle("margin-right"), 10) || 0 - }; - }else{ - return this.addStyles(side, El.margins); - } - }, - - addStyles : function(sides, styles){ - var val = 0, v, w; - for(var i = 0, len = sides.length; i < len; i++){ - v = this.getStyle(styles[sides.charAt(i)]); - if(v){ - w = parseInt(v, 10); - if(w){ val += (w >= 0 ? w : -1 * w); } - } - } - return val; - }, - - - createProxy : function(config, renderTo, matchBox){ - config = typeof config == "object" ? - config : {tag : "div", cls: config}; - - var proxy; - if(renderTo){ - proxy = Ext.DomHelper.append(renderTo, config, true); - }else { - proxy = Ext.DomHelper.insertBefore(this.dom, config, true); - } - if(matchBox){ - proxy.setBox(this.getBox()); - } - return proxy; - }, - - - mask : function(msg, msgCls){ - if(this.getStyle("position") == "static"){ - this.setStyle("position", "relative"); - } - if(this._maskMsg){ - this._maskMsg.remove(); - } - if(this._mask){ - this._mask.remove(); - } - - this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true); - - this.addClass("x-masked"); - this._mask.setDisplayed(true); - if(typeof msg == 'string'){ - this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg", cn:{tag:'div'}}, true); - var mm = this._maskMsg; - mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg"; - mm.dom.firstChild.innerHTML = msg; - mm.setDisplayed(true); - mm.center(this); - } - if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle('height') == 'auto'){ this._mask.setSize(this.dom.clientWidth, this.getHeight()); - } - return this._mask; - }, - - - unmask : function(){ - if(this._mask){ - if(this._maskMsg){ - this._maskMsg.remove(); - delete this._maskMsg; - } - this._mask.remove(); - delete this._mask; - } - this.removeClass("x-masked"); - }, - - - isMasked : function(){ - return this._mask && this._mask.isVisible(); - }, - - - createShim : function(){ - var el = document.createElement('iframe'); - el.frameBorder = '0'; - el.className = 'ext-shim'; - if(Ext.isIE && Ext.isSecure){ - el.src = Ext.SSL_SECURE_URL; - } - var shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); - shim.autoBoxAdjust = false; - return shim; - }, - - - remove : function(){ - Ext.removeNode(this.dom); - delete El.cache[this.dom.id]; - }, - - - hover : function(overFn, outFn, scope){ - var preOverFn = function(e){ - if(!e.within(this, true)){ - overFn.apply(scope || this, arguments); - } - }; - var preOutFn = function(e){ - if(!e.within(this, true)){ - outFn.apply(scope || this, arguments); - } - }; - this.on("mouseover", preOverFn, this.dom); - this.on("mouseout", preOutFn, this.dom); - return this; - }, - - - addClassOnOver : function(className){ - this.hover( - function(){ - Ext.fly(this, '_internal').addClass(className); - }, - function(){ - Ext.fly(this, '_internal').removeClass(className); - } - ); - return this; - }, - - - addClassOnFocus : function(className){ - this.on("focus", function(){ - Ext.fly(this, '_internal').addClass(className); - }, this.dom); - this.on("blur", function(){ - Ext.fly(this, '_internal').removeClass(className); - }, this.dom); - return this; - }, - - addClassOnClick : function(className){ - var dom = this.dom; - this.on("mousedown", function(){ - Ext.fly(dom, '_internal').addClass(className); - var d = Ext.getDoc(); - var fn = function(){ - Ext.fly(dom, '_internal').removeClass(className); - d.removeListener("mouseup", fn); - }; - d.on("mouseup", fn); - }); - return this; - }, - - - swallowEvent : function(eventName, preventDefault){ - var fn = function(e){ - e.stopPropagation(); - if(preventDefault){ - e.preventDefault(); - } - }; - if(Ext.isArray(eventName)){ - for(var i = 0, len = eventName.length; i < len; i++){ - this.on(eventName[i], fn); - } - return this; - } - this.on(eventName, fn); - return this; - }, - - - parent : function(selector, returnDom){ - return this.matchNode('parentNode', 'parentNode', selector, returnDom); - }, - - - next : function(selector, returnDom){ - return this.matchNode('nextSibling', 'nextSibling', selector, returnDom); - }, - - - prev : function(selector, returnDom){ - return this.matchNode('previousSibling', 'previousSibling', selector, returnDom); - }, - - - - first : function(selector, returnDom){ - return this.matchNode('nextSibling', 'firstChild', selector, returnDom); - }, - - - last : function(selector, returnDom){ - return this.matchNode('previousSibling', 'lastChild', selector, returnDom); - }, - - matchNode : function(dir, start, selector, returnDom){ - var n = this.dom[start]; - while(n){ - if(n.nodeType == 1 && (!selector || Ext.DomQuery.is(n, selector))){ - return !returnDom ? Ext.get(n) : n; - } - n = n[dir]; - } - return null; - }, - - - appendChild: function(el){ - el = Ext.get(el); - el.appendTo(this); - return this; - }, - - - createChild: function(config, insertBefore, returnDom){ - config = config || {tag:'div'}; - if(insertBefore){ - return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true); - } - return Ext.DomHelper[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); - }, - - - appendTo: function(el){ - el = Ext.getDom(el); - el.appendChild(this.dom); - return this; - }, - - - insertBefore: function(el){ - el = Ext.getDom(el); - el.parentNode.insertBefore(this.dom, el); - return this; - }, - - - insertAfter: function(el){ - el = Ext.getDom(el); - el.parentNode.insertBefore(this.dom, el.nextSibling); - return this; - }, - - - insertFirst: function(el, returnDom){ - el = el || {}; - if(typeof el == 'object' && !el.nodeType && !el.dom){ return this.createChild(el, this.dom.firstChild, returnDom); - }else{ - el = Ext.getDom(el); - this.dom.insertBefore(el, this.dom.firstChild); - return !returnDom ? Ext.get(el) : el; - } - }, - - - insertSibling: function(el, where, returnDom){ - var rt; - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++){ - rt = this.insertSibling(el[i], where, returnDom); - } - return rt; - } - where = where ? where.toLowerCase() : 'before'; - el = el || {}; - var refNode = where == 'before' ? this.dom : this.dom.nextSibling; - - if(typeof el == 'object' && !el.nodeType && !el.dom){ if(where == 'after' && !this.dom.nextSibling){ - rt = Ext.DomHelper.append(this.dom.parentNode, el, !returnDom); - }else{ - rt = Ext.DomHelper[where == 'after' ? 'insertAfter' : 'insertBefore'](this.dom, el, !returnDom); - } - - }else{ - rt = this.dom.parentNode.insertBefore(Ext.getDom(el), refNode); - if(!returnDom){ - rt = Ext.get(rt); - } - } - return rt; - }, - - - wrap: function(config, returnDom){ - if(!config){ - config = {tag: "div"}; - } - var newEl = Ext.DomHelper.insertBefore(this.dom, config, !returnDom); - newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); - return newEl; - }, - - - replace: function(el){ - el = Ext.get(el); - this.insertBefore(el); - el.remove(); - return this; - }, - - - replaceWith: function(el){ - if(typeof el == 'object' && !el.nodeType && !el.dom){ el = this.insertSibling(el, 'before'); - }else{ - el = Ext.getDom(el); - this.dom.parentNode.insertBefore(el, this.dom); - } - El.uncache(this.id); - this.dom.parentNode.removeChild(this.dom); - this.dom = el; - this.id = Ext.id(el); - El.cache[this.id] = this; - return this; - }, - - - insertHtml : function(where, html, returnEl){ - var el = Ext.DomHelper.insertHtml(where, this.dom, html); - return returnEl ? Ext.get(el) : el; - }, - - - set : function(o, useSet){ - var el = this.dom; - useSet = typeof useSet == 'undefined' ? (el.setAttribute ? true : false) : useSet; - for(var attr in o){ - if(attr == "style" || typeof o[attr] == "function") continue; - if(attr=="cls"){ - el.className = o["cls"]; - }else if(o.hasOwnProperty(attr)){ - if(useSet) el.setAttribute(attr, o[attr]); - else el[attr] = o[attr]; - } - } - if(o.style){ - Ext.DomHelper.applyStyles(el, o.style); - } - return this; - }, - - - addKeyListener : function(key, fn, scope){ - var config; - if(typeof key != "object" || Ext.isArray(key)){ - config = { - key: key, - fn: fn, - scope: scope - }; - }else{ - config = { - key : key.key, - shift : key.shift, - ctrl : key.ctrl, - alt : key.alt, - fn: fn, - scope: scope - }; - } - return new Ext.KeyMap(this, config); - }, - - - addKeyMap : function(config){ - return new Ext.KeyMap(this, config); - }, - - - isScrollable : function(){ - var dom = this.dom; - return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth; - }, - - - scrollTo : function(side, value, animate){ - var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; - if(!animate || !A){ - this.dom[prop] = value; - }else{ - var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; - this.anim({scroll: {"to": to}}, this.preanim(arguments, 2), 'scroll'); - } - return this; - }, - - - scroll : function(direction, distance, animate){ - if(!this.isScrollable()){ - return; - } - var el = this.dom; - var l = el.scrollLeft, t = el.scrollTop; - var w = el.scrollWidth, h = el.scrollHeight; - var cw = el.clientWidth, ch = el.clientHeight; - direction = direction.toLowerCase(); - var scrolled = false; - var a = this.preanim(arguments, 2); - switch(direction){ - case "l": - case "left": - if(w - l > cw){ - var v = Math.min(l + distance, w-cw); - this.scrollTo("left", v, a); - scrolled = true; - } - break; - case "r": - case "right": - if(l > 0){ - var v = Math.max(l - distance, 0); - this.scrollTo("left", v, a); - scrolled = true; - } - break; - case "t": - case "top": - case "up": - if(t > 0){ - var v = Math.max(t - distance, 0); - this.scrollTo("top", v, a); - scrolled = true; - } - break; - case "b": - case "bottom": - case "down": - if(h - t > ch){ - var v = Math.min(t + distance, h-ch); - this.scrollTo("top", v, a); - scrolled = true; - } - break; - } - return scrolled; - }, - - - translatePoints : function(x, y){ - if(typeof x == 'object' || Ext.isArray(x)){ - y = x[1]; x = x[0]; - } - var p = this.getStyle('position'); - var o = this.getXY(); - - var l = parseInt(this.getStyle('left'), 10); - var t = parseInt(this.getStyle('top'), 10); - - if(isNaN(l)){ - l = (p == "relative") ? 0 : this.dom.offsetLeft; - } - if(isNaN(t)){ - t = (p == "relative") ? 0 : this.dom.offsetTop; - } - - return {left: (x - o[0] + l), top: (y - o[1] + t)}; - }, - - - getScroll : function(){ - var d = this.dom, doc = document; - if(d == doc || d == doc.body){ - var l, t; - if(Ext.isIE && Ext.isStrict){ - l = doc.documentElement.scrollLeft || (doc.body.scrollLeft || 0); - t = doc.documentElement.scrollTop || (doc.body.scrollTop || 0); - }else{ - l = window.pageXOffset || (doc.body.scrollLeft || 0); - t = window.pageYOffset || (doc.body.scrollTop || 0); - } - return {left: l, top: t}; - }else{ - return {left: d.scrollLeft, top: d.scrollTop}; - } - }, - - - getColor : function(attr, defaultValue, prefix){ - var v = this.getStyle(attr); - if(!v || v == "transparent" || v == "inherit") { - return defaultValue; - } - var color = typeof prefix == "undefined" ? "#" : prefix; - if(v.substr(0, 4) == "rgb("){ - var rvs = v.slice(4, v.length -1).split(","); - for(var i = 0; i < 3; i++){ - var h = parseInt(rvs[i]); - var s = h.toString(16); - if(h < 16){ - s = "0" + s; - } - color += s; - } - } else { - if(v.substr(0, 1) == "#"){ - if(v.length == 4) { - for(var i = 1; i < 4; i++){ - var c = v.charAt(i); - color += c + c; - } - }else if(v.length == 7){ - color += v.substr(1); - } - } - } - return(color.length > 5 ? color.toLowerCase() : defaultValue); - }, - - - boxWrap : function(cls){ - cls = cls || 'x-box'; - var el = Ext.get(this.insertHtml('beforeBegin', String.format('
      '+El.boxMarkup+'
      ', cls))); - el.child('.'+cls+'-mc').dom.appendChild(this.dom); - return el; - }, - - - getAttributeNS : Ext.isIE ? function(ns, name){ - var d = this.dom; - var type = typeof d[ns+":"+name]; - if(type != 'undefined' && type != 'unknown'){ - return d[ns+":"+name]; - } - return d[name]; - } : function(ns, name){ - var d = this.dom; - return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; - }, - - - getTextWidth : function(text, min, max){ - return (Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width).constrain(min || 0, max || 1000000); - } -}; - -var ep = El.prototype; - - -ep.on = ep.addListener; - ep.mon = ep.addListener; - -ep.getUpdateManager = ep.getUpdater; - - -ep.un = ep.removeListener; - - -ep.autoBoxAdjust = true; - -El.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i; - -El.addUnits = function(v, defaultUnit){ - if(v === "" || v == "auto"){ - return v; - } - if(v === undefined){ - return ''; - } - if(typeof v == "number" || !El.unitPattern.test(v)){ - return v + (defaultUnit || 'px'); - } - return v; -}; - -El.boxMarkup = '
      '; - -El.VISIBILITY = 1; - -El.DISPLAY = 2; - -El.borders = {l: "border-left-width", r: "border-right-width", t: "border-top-width", b: "border-bottom-width"}; -El.paddings = {l: "padding-left", r: "padding-right", t: "padding-top", b: "padding-bottom"}; -El.margins = {l: "margin-left", r: "margin-right", t: "margin-top", b: "margin-bottom"}; - - - - -El.cache = {}; - -var docEl; - - -El.get = function(el){ - var ex, elm, id; - if(!el){ return null; } - if(typeof el == "string"){ if(!(elm = document.getElementById(el))){ - return null; - } - if(ex = El.cache[el]){ - ex.dom = elm; - }else{ - ex = El.cache[el] = new El(elm); - } - return ex; - }else if(el.tagName){ if(!(id = el.id)){ - id = Ext.id(el); - } - if(ex = El.cache[id]){ - ex.dom = el; - }else{ - ex = El.cache[id] = new El(el); - } - return ex; - }else if(el instanceof El){ - if(el != docEl){ - el.dom = document.getElementById(el.id) || el.dom; El.cache[el.id] = el; } - return el; - }else if(el.isComposite){ - return el; - }else if(Ext.isArray(el)){ - return El.select(el); - }else if(el == document){ - if(!docEl){ - var f = function(){}; - f.prototype = El.prototype; - docEl = new f(); - docEl.dom = document; - } - return docEl; - } - return null; -}; - -El.uncache = function(el){ - for(var i = 0, a = arguments, len = a.length; i < len; i++) { - if(a[i]){ - delete El.cache[a[i].id || a[i]]; - } - } -}; - -El.garbageCollect = function(){ - if(!Ext.enableGarbageCollector){ - clearInterval(El.collectorThread); - return; - } - for(var eid in El.cache){ - var el = El.cache[eid], d = el.dom; - if(!d || !d.parentNode || (!d.offsetParent && !document.getElementById(eid))){ - delete El.cache[eid]; - if(d && Ext.enableListenerCollection){ - Ext.EventManager.removeAll(d); - } - } - } -} -El.collectorThreadId = setInterval(El.garbageCollect, 30000); - -var flyFn = function(){}; -flyFn.prototype = El.prototype; -var _cls = new flyFn(); - -El.Flyweight = function(dom){ - this.dom = dom; -}; - -El.Flyweight.prototype = _cls; -El.Flyweight.prototype.isFlyweight = true; - -El._flyweights = {}; - -El.fly = function(el, named){ - named = named || '_global'; - el = Ext.getDom(el); - if(!el){ - return null; - } - if(!El._flyweights[named]){ - El._flyweights[named] = new El.Flyweight(); - } - El._flyweights[named].dom = el; - return El._flyweights[named]; -}; - - -Ext.get = El.get; - -Ext.fly = El.fly; - -var noBoxAdjust = Ext.isStrict ? { - select:1 -} : { - input:1, select:1, textarea:1 -}; -if(Ext.isIE || Ext.isGecko){ - noBoxAdjust['button'] = 1; -} - - -Ext.EventManager.on(window, 'unload', function(){ - delete El.cache; - delete El._flyweights; -}); -})(); - -Ext.enableFx = true; - - -Ext.Fx = { - - slideIn : function(anchor, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - - anchor = anchor || "t"; - - this.fixDisplay(); - - var r = this.getFxRestore(); - var b = this.getBox(); - this.setSize(b); - - var wrap = this.fxWrap(r.pos, o, "hidden"); - - var st = this.dom.style; - st.visibility = "visible"; - st.position = "absolute"; - - var after = function(){ - el.fxUnwrap(wrap, r.pos, o); - st.width = r.width; - st.height = r.height; - el.afterFx(o); - }; - var a, pt = {to: [b.x, b.y]}, bw = {to: b.width}, bh = {to: b.height}; - - switch(anchor.toLowerCase()){ - case "t": - wrap.setSize(b.width, 0); - st.left = st.bottom = "0"; - a = {height: bh}; - break; - case "l": - wrap.setSize(0, b.height); - st.right = st.top = "0"; - a = {width: bw}; - break; - case "r": - wrap.setSize(0, b.height); - wrap.setX(b.right); - st.left = st.top = "0"; - a = {width: bw, points: pt}; - break; - case "b": - wrap.setSize(b.width, 0); - wrap.setY(b.bottom); - st.left = st.top = "0"; - a = {height: bh, points: pt}; - break; - case "tl": - wrap.setSize(0, 0); - st.right = st.bottom = "0"; - a = {width: bw, height: bh}; - break; - case "bl": - wrap.setSize(0, 0); - wrap.setY(b.y+b.height); - st.right = st.top = "0"; - a = {width: bw, height: bh, points: pt}; - break; - case "br": - wrap.setSize(0, 0); - wrap.setXY([b.right, b.bottom]); - st.left = st.top = "0"; - a = {width: bw, height: bh, points: pt}; - break; - case "tr": - wrap.setSize(0, 0); - wrap.setX(b.x+b.width); - st.left = st.bottom = "0"; - a = {width: bw, height: bh, points: pt}; - break; - } - this.dom.style.visibility = "visible"; - wrap.show(); - - arguments.callee.anim = wrap.fxanim(a, - o, - 'motion', - .5, - 'easeOut', after); - }); - return this; - }, - - - slideOut : function(anchor, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - - anchor = anchor || "t"; - - var r = this.getFxRestore(); - - var b = this.getBox(); - this.setSize(b); - - var wrap = this.fxWrap(r.pos, o, "visible"); - - var st = this.dom.style; - st.visibility = "visible"; - st.position = "absolute"; - - wrap.setSize(b); - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.fxUnwrap(wrap, r.pos, o); - - st.width = r.width; - st.height = r.height; - - el.afterFx(o); - }; - - var a, zero = {to: 0}; - switch(anchor.toLowerCase()){ - case "t": - st.left = st.bottom = "0"; - a = {height: zero}; - break; - case "l": - st.right = st.top = "0"; - a = {width: zero}; - break; - case "r": - st.left = st.top = "0"; - a = {width: zero, points: {to:[b.right, b.y]}}; - break; - case "b": - st.left = st.top = "0"; - a = {height: zero, points: {to:[b.x, b.bottom]}}; - break; - case "tl": - st.right = st.bottom = "0"; - a = {width: zero, height: zero}; - break; - case "bl": - st.right = st.top = "0"; - a = {width: zero, height: zero, points: {to:[b.x, b.bottom]}}; - break; - case "br": - st.left = st.top = "0"; - a = {width: zero, height: zero, points: {to:[b.x+b.width, b.bottom]}}; - break; - case "tr": - st.left = st.bottom = "0"; - a = {width: zero, height: zero, points: {to:[b.right, b.y]}}; - break; - } - - arguments.callee.anim = wrap.fxanim(a, - o, - 'motion', - .5, - "easeOut", after); - }); - return this; - }, - - - puff : function(o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - this.clearOpacity(); - this.show(); - - var r = this.getFxRestore(); - var st = this.dom.style; - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.clearOpacity(); - - el.setPositioning(r.pos); - st.width = r.width; - st.height = r.height; - st.fontSize = ''; - el.afterFx(o); - }; - - var width = this.getWidth(); - var height = this.getHeight(); - - arguments.callee.anim = this.fxanim({ - width : {to: this.adjustWidth(width * 2)}, - height : {to: this.adjustHeight(height * 2)}, - points : {by: [-(width * .5), -(height * .5)]}, - opacity : {to: 0}, - fontSize: {to:200, unit: "%"} - }, - o, - 'motion', - .5, - "easeOut", after); - }); - return this; - }, - - - switchOff : function(o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - this.clearOpacity(); - this.clip(); - - var r = this.getFxRestore(); - var st = this.dom.style; - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.clearOpacity(); - el.setPositioning(r.pos); - st.width = r.width; - st.height = r.height; - - el.afterFx(o); - }; - - this.fxanim({opacity:{to:0.3}}, null, null, .1, null, function(){ - this.clearOpacity(); - (function(){ - this.fxanim({ - height:{to:1}, - points:{by:[0, this.getHeight() * .5]} - }, o, 'motion', 0.3, 'easeIn', after); - }).defer(100, this); - }); - }); - return this; - }, - - - highlight : function(color, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - color = color || "ffff9c"; - var attr = o.attr || "backgroundColor"; - - this.clearOpacity(); - this.show(); - - var origColor = this.getColor(attr); - var restoreColor = this.dom.style[attr]; - var endColor = (o.endColor || origColor) || "ffffff"; - - var after = function(){ - el.dom.style[attr] = restoreColor; - el.afterFx(o); - }; - - var a = {}; - a[attr] = {from: color, to: endColor}; - arguments.callee.anim = this.fxanim(a, - o, - 'color', - 1, - 'easeIn', after); - }); - return this; - }, - - - frame : function(color, count, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - color = color || "#C3DAF9"; - if(color.length == 6){ - color = "#" + color; - } - count = count || 1; - var duration = o.duration || 1; - this.show(); - - var b = this.getBox(); - var animFn = function(){ - var proxy = Ext.getBody().createChild({ - style:{ - visbility:"hidden", - position:"absolute", - "z-index":"35000", border:"0px solid " + color - } - }); - var scale = Ext.isBorderBox ? 2 : 1; - proxy.animate({ - top:{from:b.y, to:b.y - 20}, - left:{from:b.x, to:b.x - 20}, - borderWidth:{from:0, to:10}, - opacity:{from:1, to:0}, - height:{from:b.height, to:(b.height + (20*scale))}, - width:{from:b.width, to:(b.width + (20*scale))} - }, duration, function(){ - proxy.remove(); - if(--count > 0){ - animFn(); - }else{ - el.afterFx(o); - } - }); - }; - animFn.call(this); - }); - return this; - }, - - - pause : function(seconds){ - var el = this.getFxEl(); - var o = {}; - - el.queueFx(o, function(){ - setTimeout(function(){ - el.afterFx(o); - }, seconds * 1000); - }); - return this; - }, - - - fadeIn : function(o){ - var el = this.getFxEl(); - o = o || {}; - el.queueFx(o, function(){ - this.setOpacity(0); - this.fixDisplay(); - this.dom.style.visibility = 'visible'; - var to = o.endOpacity || 1; - arguments.callee.anim = this.fxanim({opacity:{to:to}}, - o, null, .5, "easeOut", function(){ - if(to == 1){ - this.clearOpacity(); - } - el.afterFx(o); - }); - }); - return this; - }, - - - fadeOut : function(o){ - var el = this.getFxEl(); - o = o || {}; - el.queueFx(o, function(){ - arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, - o, null, .5, "easeOut", function(){ - if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ - this.dom.style.display = "none"; - }else{ - this.dom.style.visibility = "hidden"; - } - this.clearOpacity(); - el.afterFx(o); - }); - }); - return this; - }, - - - scale : function(w, h, o){ - this.shift(Ext.apply({}, o, { - width: w, - height: h - })); - return this; - }, - - - shift : function(o){ - var el = this.getFxEl(); - o = o || {}; - el.queueFx(o, function(){ - var a = {}, w = o.width, h = o.height, x = o.x, y = o.y, op = o.opacity; - if(w !== undefined){ - a.width = {to: this.adjustWidth(w)}; - } - if(h !== undefined){ - a.height = {to: this.adjustHeight(h)}; - } - if(o.left !== undefined){ - a.left = {to: o.left}; - } - if(o.top !== undefined){ - a.top = {to: o.top}; - } - if(o.right !== undefined){ - a.right = {to: o.right}; - } - if(o.bottom !== undefined){ - a.bottom = {to: o.bottom}; - } - if(x !== undefined || y !== undefined){ - a.points = {to: [ - x !== undefined ? x : this.getX(), - y !== undefined ? y : this.getY() - ]}; - } - if(op !== undefined){ - a.opacity = {to: op}; - } - if(o.xy !== undefined){ - a.points = {to: o.xy}; - } - arguments.callee.anim = this.fxanim(a, - o, 'motion', .35, "easeOut", function(){ - el.afterFx(o); - }); - }); - return this; - }, - - - ghost : function(anchor, o){ - var el = this.getFxEl(); - o = o || {}; - - el.queueFx(o, function(){ - anchor = anchor || "b"; - - var r = this.getFxRestore(); - var w = this.getWidth(), - h = this.getHeight(); - - var st = this.dom.style; - - var after = function(){ - if(o.useDisplay){ - el.setDisplayed(false); - }else{ - el.hide(); - } - - el.clearOpacity(); - el.setPositioning(r.pos); - st.width = r.width; - st.height = r.height; - - el.afterFx(o); - }; - - var a = {opacity: {to: 0}, points: {}}, pt = a.points; - switch(anchor.toLowerCase()){ - case "t": - pt.by = [0, -h]; - break; - case "l": - pt.by = [-w, 0]; - break; - case "r": - pt.by = [w, 0]; - break; - case "b": - pt.by = [0, h]; - break; - case "tl": - pt.by = [-w, -h]; - break; - case "bl": - pt.by = [-w, h]; - break; - case "br": - pt.by = [w, h]; - break; - case "tr": - pt.by = [w, -h]; - break; - } - - arguments.callee.anim = this.fxanim(a, - o, - 'motion', - .5, - "easeOut", after); - }); - return this; - }, - - - syncFx : function(){ - this.fxDefaults = Ext.apply(this.fxDefaults || {}, { - block : false, - concurrent : true, - stopFx : false - }); - return this; - }, - - - sequenceFx : function(){ - this.fxDefaults = Ext.apply(this.fxDefaults || {}, { - block : false, - concurrent : false, - stopFx : false - }); - return this; - }, - - - nextFx : function(){ - var ef = this.fxQueue[0]; - if(ef){ - ef.call(this); - } - }, - - - hasActiveFx : function(){ - return this.fxQueue && this.fxQueue[0]; - }, - - - stopFx : function(){ - if(this.hasActiveFx()){ - var cur = this.fxQueue[0]; - if(cur && cur.anim && cur.anim.isAnimated()){ - this.fxQueue = [cur]; cur.anim.stop(true); - } - } - return this; - }, - - - beforeFx : function(o){ - if(this.hasActiveFx() && !o.concurrent){ - if(o.stopFx){ - this.stopFx(); - return true; - } - return false; - } - return true; - }, - - - hasFxBlock : function(){ - var q = this.fxQueue; - return q && q[0] && q[0].block; - }, - - - queueFx : function(o, fn){ - if(!this.fxQueue){ - this.fxQueue = []; - } - if(!this.hasFxBlock()){ - Ext.applyIf(o, this.fxDefaults); - if(!o.concurrent){ - var run = this.beforeFx(o); - fn.block = o.block; - this.fxQueue.push(fn); - if(run){ - this.nextFx(); - } - }else{ - fn.call(this); - } - } - return this; - }, - - - fxWrap : function(pos, o, vis){ - var wrap; - if(!o.wrap || !(wrap = Ext.get(o.wrap))){ - var wrapXY; - if(o.fixPosition){ - wrapXY = this.getXY(); - } - var div = document.createElement("div"); - div.style.visibility = vis; - wrap = Ext.get(this.dom.parentNode.insertBefore(div, this.dom)); - wrap.setPositioning(pos); - if(wrap.getStyle("position") == "static"){ - wrap.position("relative"); - } - this.clearPositioning('auto'); - wrap.clip(); - wrap.dom.appendChild(this.dom); - if(wrapXY){ - wrap.setXY(wrapXY); - } - } - return wrap; - }, - - - fxUnwrap : function(wrap, pos, o){ - this.clearPositioning(); - this.setPositioning(pos); - if(!o.wrap){ - wrap.dom.parentNode.insertBefore(this.dom, wrap.dom); - wrap.remove(); - } - }, - - - getFxRestore : function(){ - var st = this.dom.style; - return {pos: this.getPositioning(), width: st.width, height : st.height}; - }, - - - afterFx : function(o){ - if(o.afterStyle){ - this.applyStyles(o.afterStyle); - } - if(o.afterCls){ - this.addClass(o.afterCls); - } - if(o.remove === true){ - this.remove(); - } - Ext.callback(o.callback, o.scope, [this]); - if(!o.concurrent){ - this.fxQueue.shift(); - this.nextFx(); - } - }, - - - getFxEl : function(){ return Ext.get(this.dom); - }, - - - fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ - animType = animType || 'run'; - opt = opt || {}; - var anim = Ext.lib.Anim[animType]( - this.dom, args, - (opt.duration || defaultDur) || .35, - (opt.easing || defaultEase) || 'easeOut', - function(){ - Ext.callback(cb, this); - }, - this - ); - opt.anim = anim; - return anim; - } -}; - -Ext.Fx.resize = Ext.Fx.scale; - -Ext.apply(Ext.Element.prototype, Ext.Fx); - - -Ext.CompositeElement = function(els){ - this.elements = []; - this.addElements(els); -}; -Ext.CompositeElement.prototype = { - isComposite: true, - addElements : function(els){ - if(!els) return this; - if(typeof els == "string"){ - els = Ext.Element.selectorFunction(els); - } - var yels = this.elements; - var index = yels.length-1; - for(var i = 0, len = els.length; i < len; i++) { - yels[++index] = Ext.get(els[i]); - } - return this; - }, - - - fill : function(els){ - this.elements = []; - this.add(els); - return this; - }, - - - filter : function(selector){ - var els = []; - this.each(function(el){ - if(el.is(selector)){ - els[els.length] = el.dom; - } - }); - this.fill(els); - return this; - }, - - invoke : function(fn, args){ - var els = this.elements; - for(var i = 0, len = els.length; i < len; i++) { - Ext.Element.prototype[fn].apply(els[i], args); - } - return this; - }, - - add : function(els){ - if(typeof els == "string"){ - this.addElements(Ext.Element.selectorFunction(els)); - }else if(els.length !== undefined){ - this.addElements(els); - }else{ - this.addElements([els]); - } - return this; - }, - - each : function(fn, scope){ - var els = this.elements; - for(var i = 0, len = els.length; i < len; i++){ - if(fn.call(scope || els[i], els[i], this, i) === false) { - break; - } - } - return this; - }, - - - item : function(index){ - return this.elements[index] || null; - }, - - - first : function(){ - return this.item(0); - }, - - - last : function(){ - return this.item(this.elements.length-1); - }, - - - getCount : function(){ - return this.elements.length; - }, - - - contains : function(el){ - return this.indexOf(el) !== -1; - }, - - - indexOf : function(el){ - return this.elements.indexOf(Ext.get(el)); - }, - - - - removeElement : function(el, removeDom){ - if(Ext.isArray(el)){ - for(var i = 0, len = el.length; i < len; i++){ - this.removeElement(el[i]); - } - return this; - } - var index = typeof el == 'number' ? el : this.indexOf(el); - if(index !== -1 && this.elements[index]){ - if(removeDom){ - var d = this.elements[index]; - if(d.dom){ - d.remove(); - }else{ - Ext.removeNode(d); - } - } - this.elements.splice(index, 1); - } - return this; - }, - - - replaceElement : function(el, replacement, domReplace){ - var index = typeof el == 'number' ? el : this.indexOf(el); - if(index !== -1){ - if(domReplace){ - this.elements[index].replaceWith(replacement); - }else{ - this.elements.splice(index, 1, Ext.get(replacement)) - } - } - return this; - }, - - - clear : function(){ - this.elements = []; - } -}; -(function(){ -Ext.CompositeElement.createCall = function(proto, fnName){ - if(!proto[fnName]){ - proto[fnName] = function(){ - return this.invoke(fnName, arguments); - }; - } -}; -for(var fnName in Ext.Element.prototype){ - if(typeof Ext.Element.prototype[fnName] == "function"){ - Ext.CompositeElement.createCall(Ext.CompositeElement.prototype, fnName); - } -}; -})(); - - -Ext.CompositeElementLite = function(els){ - Ext.CompositeElementLite.superclass.constructor.call(this, els); - this.el = new Ext.Element.Flyweight(); -}; -Ext.extend(Ext.CompositeElementLite, Ext.CompositeElement, { - addElements : function(els){ - if(els){ - if(Ext.isArray(els)){ - this.elements = this.elements.concat(els); - }else{ - var yels = this.elements; - var index = yels.length-1; - for(var i = 0, len = els.length; i < len; i++) { - yels[++index] = els[i]; - } - } - } - return this; - }, - invoke : function(fn, args){ - var els = this.elements; - var el = this.el; - for(var i = 0, len = els.length; i < len; i++) { - el.dom = els[i]; - Ext.Element.prototype[fn].apply(el, args); - } - return this; - }, - - item : function(index){ - if(!this.elements[index]){ - return null; - } - this.el.dom = this.elements[index]; - return this.el; - }, - - - addListener : function(eventName, handler, scope, opt){ - var els = this.elements; - for(var i = 0, len = els.length; i < len; i++) { - Ext.EventManager.on(els[i], eventName, handler, scope || els[i], opt); - } - return this; - }, - - - each : function(fn, scope){ - var els = this.elements; - var el = this.el; - for(var i = 0, len = els.length; i < len; i++){ - el.dom = els[i]; - if(fn.call(scope || el, el, this, i) === false){ - break; - } - } - return this; - }, - - indexOf : function(el){ - return this.elements.indexOf(Ext.getDom(el)); - }, - - replaceElement : function(el, replacement, domReplace){ - var index = typeof el == 'number' ? el : this.indexOf(el); - if(index !== -1){ - replacement = Ext.getDom(replacement); - if(domReplace){ - var d = this.elements[index]; - d.parentNode.insertBefore(replacement, d); - Ext.removeNode(d); - } - this.elements.splice(index, 1, replacement); - } - return this; - } -}); -Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; -if(Ext.DomQuery){ - Ext.Element.selectorFunction = Ext.DomQuery.select; -} - -Ext.Element.select = function(selector, unique, root){ - var els; - if(typeof selector == "string"){ - els = Ext.Element.selectorFunction(selector, root); - }else if(selector.length !== undefined){ - els = selector; - }else{ - throw "Invalid selector"; - } - if(unique === true){ - return new Ext.CompositeElement(els); - }else{ - return new Ext.CompositeElementLite(els); - } -}; - -Ext.select = Ext.Element.select; - -Ext.data.Connection = function(config){ - Ext.apply(this, config); - this.addEvents( - - "beforerequest", - - "requestcomplete", - - "requestexception" - ); - Ext.data.Connection.superclass.constructor.call(this); -}; - -Ext.extend(Ext.data.Connection, Ext.util.Observable, { - - - - - - timeout : 30000, - - autoAbort:false, - - - disableCaching: true, - - - disableCachingParam: '_dc', - - - - request : function(o){ - if(this.fireEvent("beforerequest", this, o) !== false){ - var p = o.params; - - if(typeof p == "function"){ - p = p.call(o.scope||window, o); - } - if(typeof p == "object"){ - p = Ext.urlEncode(p); - } - if(this.extraParams){ - var extras = Ext.urlEncode(this.extraParams); - p = p ? (p + '&' + extras) : extras; - } - - var url = o.url || this.url; - if(typeof url == 'function'){ - url = url.call(o.scope||window, o); - } - - if(o.form){ - var form = Ext.getDom(o.form); - url = url || form.action; - - var enctype = form.getAttribute("enctype"); - if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){ - return this.doFormUpload(o, p, url); - } - var f = Ext.lib.Ajax.serializeForm(form); - p = p ? (p + '&' + f) : f; - } - - var hs = o.headers; - if(this.defaultHeaders){ - hs = Ext.apply(hs || {}, this.defaultHeaders); - if(!o.headers){ - o.headers = hs; - } - } - - var cb = { - success: this.handleResponse, - failure: this.handleFailure, - scope: this, - argument: {options: o}, - timeout : o.timeout || this.timeout - }; - - var method = o.method||this.method||((p || o.xmlData || o.jsonData) ? "POST" : "GET"); - - if(method == 'GET' && (this.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ - var dcp = o.disableCachingParam || this.disableCachingParam; - url += (url.indexOf('?') != -1 ? '&' : '?') + dcp + '=' + (new Date().getTime()); - } - - if(typeof o.autoAbort == 'boolean'){ if(o.autoAbort){ - this.abort(); - } - }else if(this.autoAbort !== false){ - this.abort(); - } - if((method == 'GET' || o.xmlData || o.jsonData) && p){ - url += (url.indexOf('?') != -1 ? '&' : '?') + p; - p = ''; - } - this.transId = Ext.lib.Ajax.request(method, url, cb, p, o); - return this.transId; - }else{ - Ext.callback(o.callback, o.scope, [o, null, null]); - return null; - } - }, - - - isLoading : function(transId){ - if(transId){ - return Ext.lib.Ajax.isCallInProgress(transId); - }else{ - return this.transId ? true : false; - } - }, - - - abort : function(transId){ - if(transId || this.isLoading()){ - Ext.lib.Ajax.abort(transId || this.transId); - } - }, - - handleResponse : function(response){ - this.transId = false; - var options = response.argument.options; - response.argument = options ? options.argument : null; - this.fireEvent("requestcomplete", this, response, options); - Ext.callback(options.success, options.scope, [response, options]); - Ext.callback(options.callback, options.scope, [options, true, response]); - }, - - handleFailure : function(response, e){ - this.transId = false; - var options = response.argument.options; - response.argument = options ? options.argument : null; - this.fireEvent("requestexception", this, response, options, e); - Ext.callback(options.failure, options.scope, [response, options]); - Ext.callback(options.callback, options.scope, [options, false, response]); - }, - - doFormUpload : function(o, ps, url){ - var id = Ext.id(); - var frame = document.createElement('iframe'); - frame.id = id; - frame.name = id; - frame.className = 'x-hidden'; - if(Ext.isIE){ - frame.src = Ext.SSL_SECURE_URL; - } - document.body.appendChild(frame); - - if(Ext.isIE){ - document.frames[id].name = id; - } - - var form = Ext.getDom(o.form); - form.target = id; - form.method = 'POST'; - form.enctype = form.encoding = 'multipart/form-data'; - if(url){ - form.action = url; - } - - var hiddens, hd; - if(ps){ hiddens = []; - ps = Ext.urlDecode(ps, false); - for(var k in ps){ - if(ps.hasOwnProperty(k)){ - hd = document.createElement('input'); - hd.type = 'hidden'; - hd.name = k; - hd.value = ps[k]; - form.appendChild(hd); - hiddens.push(hd); - } - } - } - - function cb(){ - var r = { responseText : '', - responseXML : null - }; - - r.argument = o ? o.argument : null; - - try { var doc; - if(Ext.isIE){ - doc = frame.contentWindow.document; - }else { - doc = (frame.contentDocument || window.frames[id].document); - } - if(doc && doc.body){ - r.responseText = doc.body.innerHTML; - } - if(doc && doc.XMLDocument){ - r.responseXML = doc.XMLDocument; - }else { - r.responseXML = doc; - } - } - catch(e) { - } - - Ext.EventManager.removeListener(frame, 'load', cb, this); - - this.fireEvent("requestcomplete", this, r, o); - - Ext.callback(o.success, o.scope, [r, o]); - Ext.callback(o.callback, o.scope, [o, true, r]); - - setTimeout(function(){Ext.removeNode(frame);}, 100); - } - - Ext.EventManager.on(frame, 'load', cb, this); - form.submit(); - - if(hiddens){ for(var i = 0, len = hiddens.length; i < len; i++){ - Ext.removeNode(hiddens[i]); - } - } - } -}); - - -Ext.Ajax = new Ext.data.Connection({ - - - - - - - - - - - - - - - - - - autoAbort : false, - - - serializeForm : function(form){ - return Ext.lib.Ajax.serializeForm(form); - } -}); - -Ext.Updater = Ext.extend(Ext.util.Observable, { - constructor: function(el, forceNew){ - el = Ext.get(el); - if(!forceNew && el.updateManager){ - return el.updateManager; - } - - this.el = el; - - this.defaultUrl = null; - - this.addEvents( - - "beforeupdate", - - "update", - - "failure" - ); - var d = Ext.Updater.defaults; - - this.sslBlankUrl = d.sslBlankUrl; - - this.disableCaching = d.disableCaching; - - this.indicatorText = d.indicatorText; - - this.showLoadIndicator = d.showLoadIndicator; - - this.timeout = d.timeout; - - this.loadScripts = d.loadScripts; - - this.transaction = null; - - this.refreshDelegate = this.refresh.createDelegate(this); - - this.updateDelegate = this.update.createDelegate(this); - - this.formUpdateDelegate = this.formUpdate.createDelegate(this); - - if(!this.renderer){ - - this.renderer = this.getDefaultRenderer(); - } - Ext.Updater.superclass.constructor.call(this); - }, - - getDefaultRenderer: function() { - return new Ext.Updater.BasicRenderer(); - }, - - getEl : function(){ - return this.el; - }, - - - update : function(url, params, callback, discardUrl){ - if(this.fireEvent("beforeupdate", this.el, url, params) !== false){ - var cfg, callerScope; - if(typeof url == "object"){ cfg = url; - url = cfg.url; - params = params || cfg.params; - callback = callback || cfg.callback; - discardUrl = discardUrl || cfg.discardUrl; - callerScope = cfg.scope; - if(typeof cfg.nocache != "undefined"){this.disableCaching = cfg.nocache;}; - if(typeof cfg.text != "undefined"){this.indicatorText = '
      '+cfg.text+"
      ";}; - if(typeof cfg.scripts != "undefined"){this.loadScripts = cfg.scripts;}; - if(typeof cfg.timeout != "undefined"){this.timeout = cfg.timeout;}; - } - this.showLoading(); - - if(!discardUrl){ - this.defaultUrl = url; - } - if(typeof url == "function"){ - url = url.call(this); - } - - var o = Ext.apply({}, { - url : url, - params: (typeof params == "function" && callerScope) ? params.createDelegate(callerScope) : params, - success: this.processSuccess, - failure: this.processFailure, - scope: this, - callback: undefined, - timeout: (this.timeout*1000), - disableCaching: this.disableCaching, - argument: { - "options": cfg, - "url": url, - "form": null, - "callback": callback, - "scope": callerScope || window, - "params": params - } - }, cfg); - - this.transaction = Ext.Ajax.request(o); - } - }, - - - formUpdate : function(form, url, reset, callback){ - if(this.fireEvent("beforeupdate", this.el, form, url) !== false){ - if(typeof url == "function"){ - url = url.call(this); - } - form = Ext.getDom(form) - this.transaction = Ext.Ajax.request({ - form: form, - url:url, - success: this.processSuccess, - failure: this.processFailure, - scope: this, - timeout: (this.timeout*1000), - argument: { - "url": url, - "form": form, - "callback": callback, - "reset": reset - } - }); - this.showLoading.defer(1, this); - } - }, - - - refresh : function(callback){ - if(this.defaultUrl == null){ - return; - } - this.update(this.defaultUrl, null, callback, true); - }, - - - startAutoRefresh : function(interval, url, params, callback, refreshNow){ - if(refreshNow){ - this.update(url || this.defaultUrl, params, callback, true); - } - if(this.autoRefreshProcId){ - clearInterval(this.autoRefreshProcId); - } - this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); - }, - - - stopAutoRefresh : function(){ - if(this.autoRefreshProcId){ - clearInterval(this.autoRefreshProcId); - delete this.autoRefreshProcId; - } - }, - - - isAutoRefreshing : function(){ - return this.autoRefreshProcId ? true : false; - }, - - - showLoading : function(){ - if(this.showLoadIndicator){ - this.el.update(this.indicatorText); - } - }, - - processSuccess : function(response){ - this.transaction = null; - if(response.argument.form && response.argument.reset){ - try{ response.argument.form.reset(); - }catch(e){} - } - if(this.loadScripts){ - this.renderer.render(this.el, response, this, - this.updateComplete.createDelegate(this, [response])); - }else{ - this.renderer.render(this.el, response, this); - this.updateComplete(response); - } - }, - - updateComplete : function(response){ - this.fireEvent("update", this.el, response); - if(typeof response.argument.callback == "function"){ - response.argument.callback.call(response.argument.scope, this.el, true, response, response.argument.options); - } - }, - - processFailure : function(response){ - this.transaction = null; - this.fireEvent("failure", this.el, response); - if(typeof response.argument.callback == "function"){ - response.argument.callback.call(response.argument.scope, this.el, false, response, response.argument.options); - } - }, - - - setRenderer : function(renderer){ - this.renderer = renderer; - }, - - - getRenderer : function(){ - return this.renderer; - }, - - - setDefaultUrl : function(defaultUrl){ - this.defaultUrl = defaultUrl; - }, - - - abort : function(){ - if(this.transaction){ - Ext.Ajax.abort(this.transaction); - } - }, - - - isUpdating : function(){ - if(this.transaction){ - return Ext.Ajax.isLoading(this.transaction); - } - return false; - } -}); - - - Ext.Updater.defaults = { - - timeout : 30, - - loadScripts : false, - - sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), - - disableCaching : false, - - showLoadIndicator : true, - - indicatorText : '
      Loading...
      ' - }; - - -Ext.Updater.updateElement = function(el, url, params, options){ - var um = Ext.get(el).getUpdater(); - Ext.apply(um, options); - um.update(url, params, options ? options.callback : null); -}; - -Ext.Updater.BasicRenderer = function(){}; - -Ext.Updater.BasicRenderer.prototype = { - - render : function(el, response, updateManager, callback){ - el.update(response.responseText, updateManager.loadScripts, callback); - } -}; - -Ext.UpdateManager = Ext.Updater; - - -Ext.util.DelayedTask = function(fn, scope, args){ - var id = null, d, t; - - var call = function(){ - var now = new Date().getTime(); - if(now - t >= d){ - clearInterval(id); - id = null; - fn.apply(scope, args || []); - } - }; - - this.delay = function(delay, newFn, newScope, newArgs){ - if(id && delay != d){ - this.cancel(); - } - d = delay; - t = new Date().getTime(); - fn = newFn || fn; - scope = newScope || scope; - args = newArgs || args; - if(!id){ - id = setInterval(call, d); - } - }; - - - this.cancel = function(){ - if(id){ - clearInterval(id); - id = null; - } - }; -}; diff --git a/src/webui/static/extjs/ext-core.js b/src/webui/static/extjs/ext-core.js deleted file mode 100644 index aa36cfb5..00000000 --- a/src/webui/static/extjs/ext-core.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -Ext.DomHelper=function(){var L=null;var F=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var B=/^table|tbody|tr|td$/i;var A=function(T){if(typeof T=="string"){return T}var O="";if(Ext.isArray(T)){for(var R=0,P=T.length;R"}else{O+=">";var U=T.children||T.cn;if(U){O+=A(U)}else{if(T.html){O+=T.html}}O+=""}return O};var M=function(T,O){var S;if(Ext.isArray(T)){S=document.createDocumentFragment();for(var R=0,P=T.length;R",K=""+E,H=C+"",D=""+K;var G=function(N,O,Q,P){if(!L){L=document.createElement("div")}var R;var S=null;if(N=="td"){if(O=="afterbegin"||O=="beforeend"){return }if(O=="beforebegin"){S=Q;Q=Q.parentNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else{if(N=="tr"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(4,H,P,D)}}}else{if(N=="tbody"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(3,C,P,K)}}}else{if(O=="beforebegin"||O=="afterend"){return }if(O=="afterbegin"){S=Q.firstChild}R=I(2,J,P,E)}}}Q.insertBefore(R,S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var R;while((R=O.exec(Q))!=null){P.setStyle(R[1],R[2])}}else{if(typeof Q=="object"){for(var N in Q){P.setStyle(N,Q[N])}}else{if(typeof Q=="function"){Ext.DomHelper.applyStyles(P,Q.call())}}}}},insertHtml:function(P,R,Q){P=P.toLowerCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.toLowerCase(),P,R,Q)){return O}}switch(P){case"beforebegin":R.insertAdjacentHTML("BeforeBegin",Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML("AfterBegin",Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("BeforeEnd",Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd",Q);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""}var N=R.ownerDocument.createRange();var S;switch(P){case"beforebegin":N.setStartBefore(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling;case"afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createContextualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.innerHTML=Q;return R.firstChild}case"beforeend":if(R.lastChild){N.setStartAfter(R.lastChild);S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else{R.innerHTML=Q;return R.lastChild}case"afterend":N.setStartAfter(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""},insertBefore:function(N,P,O){return this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this.doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return this.doInsert(N,P,O,"afterBegin","firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext.getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).insertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.get(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R,null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P);return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){var N=A(O);return new Ext.Template(N)}}}(); -Ext.Template=function(E){var B=arguments;if(Ext.isArray(E)){E=E.join("")}else{if(B.length>1){var C=[];for(var D=0,A=B.length;D+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:"n = byClassName(n, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{1}\");"},{re:/^@([\w-]+)/,select:"return {firstChild:{nodeValue:attrValue(n, \"{1}\")}};"}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},"contains":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},"nodeValue":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},"checked":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},"not":function(c,ss){return Ext.DomQuery.filter(c,ss,true)},"any":function(c,selectors){var ss=selectors.split("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},"odd":function(c){return this["nth-child"](c,"odd")},"even":function(c){return this["nth-child"](c,"even")},"nth":function(c,a){return c[a-1]||[]},"first":function(c){return c[0]||[]},"last":function(c){return c[c.length-1]||[]},"has":function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},"prev":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select; -Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,C,B,F){if(typeof A=="object"){F=A;for(var E in F){if(this.filterOptRe.test(E)){continue}if(typeof F[E]=="function"){this.addListener(E,F[E],F.scope,F)}else{this.addListener(E,F[E].fn,F[E].scope,F[E])}}return }F=(!F||typeof F=="boolean")?{}:F;A=A.toLowerCase();var D=this.events[A]||true;if(typeof D=="boolean"){D=new Ext.util.Event(this,A);this.events[A]=D}D.addListener(C,B,F)},removeListener:function(A,C,B){var D=this.events[A.toLowerCase()];if(typeof D=="object"){D.removeListener(C,B)}},purgeListeners:function(){for(var A in this.events){if(typeof this.events[A]=="object"){this.events[A].clearListeners()}}},relayEvents:function(F,D){var E=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,Array.prototype.slice.call(arguments,0)))}};for(var C=0,A=D.length;C0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(G){if(!this.methodEvents){this.methodEvents={}}var F=this.methodEvents[G];if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before=[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H))!==undefined){if(typeof B==="object"){if(B.returnValue!==undefined){C=B.returnValue}else{C=B}if(B.cancel===true){D=true}}else{if(B===false){D=true}else{C=B}}}};this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(arguments,0);for(var J=0,H=F.before.length;J0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}B.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafari?(A[D]||D):D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return B.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(E,F,D){return E?Ext.fly(this.target).findParent(E,F,D):(D?Ext.get(this.target):this.target)},getRelatedTarget:function(){if(this.browserEvent){return B.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var D=this.browserEvent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120}else{if(D.detail){E=-D.detail/3}}return E},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}(); -(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depthch||tcb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||lcr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},initDD:function(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDProxy:function(group,config,overrides){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},initDDTarget:function(group,config,overrides){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(Ext.isArray(className)){for(var i=0,len=className.length;idw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(xdh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(yvr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="0";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName)){for(var i=0,len=eventName.length;idom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||Ext.isArray(x)){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format("
      "+El.boxMarkup+"
      ",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},getTextWidth:function(text,min,max){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(text,this.dom.innerHTML,true)).width).constrain(min||0,max||1000000)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup="
      ";El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(Ext.isArray(el)){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i0){F()}else{B.afterFx(D)}})};F.call(this)});return this},pause:function(C){var A=this.getFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*1000)});return this},fadeIn:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity()}A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;if(D!==undefined){E.width={to:this.adjustWidth(D)}}if(F!==undefined){E.height={to:this.adjustHeight(F)}}if(B.left!==undefined){E.left={to:B.left}}if(B.top!==undefined){E.top={to:B.top}}if(B.right!==undefined){E.right={to:B.right}}if(B.bottom!==undefined){E.bottom={to:B.bottom}}if(C!==undefined||H!==undefined){E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}}if(G!==undefined){E.opacity={to:G}}if(B.xy!==undefined){E.points={to:B.xy}}arguments.callee.anim=this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)})});return this},ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this.dom.style;var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide()}B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.afterFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){case"t":I.by=[0,-G];break;case"l":I.by=[-E,0];break;case"r":I.by=[E,0];break;case"b":I.by=[0,G];break;case"tl":I.by=[-E,-G];break;case"bl":I.by=[-E,G];break;case"br":I.by=[E,G];break;case"tr":I.by=[E,-G];break}arguments.callee.anim=this.fxanim(D,C,"motion",0.5,"easeOut",J)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=this.fxQueue[0];if(A){A.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return this},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B){this.nextFx()}}else{A.call(this)}}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!(B=Ext.get(D.wrap))){var A;if(D.fixPosition){A=this.getXY()}var E=document.createElement("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static"){B.position("relative")}this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);if(A){B.setXY(A)}}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this.setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle)}if(A.afterCls){this.addClass(A.afterCls)}if(A.remove===true){this.remove()}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.dom,D,(E.duration||F)||0.35,(E.easing||C)||"easeOut",function(){Ext.callback(A,this)},this);E.anim=G;return G}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx); -Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E){return this}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)}var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C"+A.text+""}if(typeof A.scripts!="undefined"){this.loadScripts=A.scripts}if(typeof A.timeout!="undefined"){this.timeout=A.timeout}}this.showLoading();if(!D){this.defaultUrl=B}if(typeof B=="function"){B=B.call(this)}var E=Ext.apply({},{url:B,params:(typeof F=="function"&&C)?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),disableCaching:this.disableCaching,argument:{"options":A,"url":B,"form":null,"callback":G,"scope":C||window,"params":F}},A);this.transaction=Ext.Ajax.request(E)}},formUpdate:function(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function"){A=A.call(this)}C=Ext.getDom(C);this.transaction=Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{"url":A,"form":C,"callback":D,"reset":B}});this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C,D,E,A){if(A){this.update(C||this.defaultUrl,D,E,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset()}catch(B){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]))}else{this.renderer.render(this.el,A,this);this.updateComplete(A)}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options)}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)}},setRenderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer},setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:"
      Loading...
      "};Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManager=Ext.Updater; -Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=new Date().getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay=function(I,K,J,H){if(G&&I!=F){this.cancel()}F=I;B=new Date().getTime();E=K||E;D=J||D;A=H||A;if(!G){G=setInterval(C,F)}};this.cancel=function(){if(G){clearInterval(G);G=null}}}; diff --git a/src/webui/static/extjs/resources/css/README.txt b/src/webui/static/extjs/resources/css/README.txt index e476a5a7..84ec2e7f 100644 --- a/src/webui/static/extjs/resources/css/README.txt +++ b/src/webui/static/extjs/resources/css/README.txt @@ -1,3 +1,6 @@ -2006-11-21 jvs: -ext-all.css contains all of the other css files combined and stripped of comments (except themes). - +2010-03-16 jwr: +The CSS file, yourtheme.css, is an exact copy of xtheme-blue.css. Feel free to edit the images inside the yourtheme image directory to build your custom theme--just remember to update your background-image file paths in yourtheme.css. + +2006-11-21 jvs: +ext-all.css contains all of the other css files combined and stripped of comments (except themes). + diff --git a/src/webui/static/extjs/resources/css/box.css b/src/webui/static/extjs/resources/css/box.css deleted file mode 100644 index da2c0f30..00000000 --- a/src/webui/static/extjs/resources/css/box.css +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* - Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: -
      -
      -
      -

      YOUR TITLE HERE (optional)

      -
      YOUR CONTENT HERE
      -
      -
      -
      - */ - -.x-box-tl { - background: transparent url(../images/default/box/corners.gif) no-repeat 0 0; - zoom:1; -} - -.x-box-tc { - height: 8px; - background: transparent url(../images/default/box/tb.gif) repeat-x 0 0; - overflow: hidden; -} - -.x-box-tr { - background: transparent url(../images/default/box/corners.gif) no-repeat right -8px; -} - -.x-box-ml { - background: transparent url(../images/default/box/l.gif) repeat-y 0; - padding-left: 4px; - overflow: hidden; - zoom:1; -} - -.x-box-mc { - background: #eee url(../images/default/box/tb.gif) repeat-x 0 -16px; - padding: 4px 10px; - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; - margin: 0 0 4px 0; - zoom:1; -} - -.x-box-mr { - background: transparent url(../images/default/box/r.gif) repeat-y right; - padding-right: 4px; - overflow: hidden; -} - -.x-box-bl { - background: transparent url(../images/default/box/corners.gif) no-repeat 0 -16px; - zoom:1; -} - -.x-box-bc { - background: transparent url(../images/default/box/tb.gif) repeat-x 0 -8px; - height: 8px; - overflow: hidden; -} - -.x-box-br { - background: transparent url(../images/default/box/corners.gif) no-repeat right -24px; -} - -.x-box-tl, .x-box-bl { - padding-left: 8px; - overflow: hidden; -} - -.x-box-tr, .x-box-br { - padding-right: 8px; - overflow: hidden; -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/button.css b/src/webui/static/extjs/resources/css/button.css deleted file mode 100644 index a6ed7051..00000000 --- a/src/webui/static/extjs/resources/css/button.css +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; - cursor:pointer; - white-space: nowrap; -} -.x-btn button{ - border:0 none; - background:transparent; - font:normal 11px tahoma,verdana,helvetica; - padding-left:3px; - padding-right:3px; - cursor:pointer; - margin:0; - overflow:visible; - width:auto; - -moz-outline:0 none; - outline:0 none; -} -* html .ext-ie .x-btn button { - width:1px; -} -.ext-gecko .x-btn button { - padding-left:0; - padding-right:0; -} -.ext-ie .x-btn button { - padding-top:2px; -} -/* - Predefined css class for buttons with only icon. Add this class (x-btn-icon) and a class with a background-image - to your button for a button with just an icon. - e.g. - .my-class .x-btn-text { background-image: url(foo.gif); } - */ - -.x-btn-icon .x-btn-center .x-btn-text{ - background-position: center; - background-repeat: no-repeat; - height: 16px; - width: 16px; - cursor:pointer; - white-space: nowrap; - padding:0; -} -.x-btn-icon .x-btn-center{ - padding:1px; -} -.x-btn em { - font-style:normal; - font-weight:normal; -} -/* - Button class for icon and text. Add this class (x-btn-text-icon) and a class with a background-image - to your button for both text and icon. -*/ - -.x-btn-text-icon .x-btn-center .x-btn-text{ - background-position: 0 2px; - background-repeat: no-repeat; - padding-left:18px; - padding-top:3px; - padding-bottom:2px; - padding-right:0; -} -.ext-gecko3 .x-btn-text-icon .x-btn-center .x-btn-text { - padding-top:2px; -} -.x-btn-left, .x-btn-right{ - font-size:1px; - line-height:1px; -} -.x-btn-left{ - width:3px; - height:21px; - background:url(../images/default/button/btn-sprite.gif) no-repeat 0 0; -} -.x-btn-right{ - width:3px; - height:21px; - background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -21px; -} -.x-btn-left i, .x-btn-right i{ - display:block; - width:3px; - overflow:hidden; - font-size:1px; - line-height:1px; -} -.x-btn-center{ - background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -42px; - vertical-align: middle; - text-align:center; - padding:0 5px; - cursor:pointer; - white-space:nowrap; -} -.x-btn-over .x-btn-left{ - background-position:0 -63px; -} -.x-btn-over .x-btn-right{ - background-position:0 -84px; -} -.x-btn-over .x-btn-center{ - background-position:0 -105px; -} -.x-btn-click .x-btn-center, .x-btn-menu-active .x-btn-center{ - background-position:0 -126px; -} -.x-btn-disabled *{ - color:gray !important; - cursor:default !important; -} -.x-btn-menu-text-wrap .x-btn-center { - padding:0 3px; -} -.ext-gecko .x-btn-menu-text-wrap .x-btn-center { - padding:0 1px; -} -.x-btn-menu-arrow-wrap .x-btn-center { - padding:0; -} -.x-btn-menu-arrow-wrap .x-btn-center button { - width:12px !important; - height:21px; - padding:0 !important; - display:block; - background:transparent url(../images/default/button/btn-arrow.gif) no-repeat left 3px; -} -.x-btn-with-menu .x-btn-center { - padding-right:2px !important; -} -.x-btn-with-menu .x-btn-center em { - display:block; - background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 0; - padding-right:10px; -} - -.x-btn-text-icon .x-btn-with-menu .x-btn-center em { - display:block; - background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 3px; - padding-right:10px; -} - -/* Toggle button styles */ -.x-btn-pressed .x-btn-left{ - background: url(../images/default/button/btn-sprite.gif) no-repeat 0 -63px; -} -.x-btn-pressed .x-btn-right{ - background: url(../images/default/button/btn-sprite.gif) no-repeat 0 -84px; -} -.x-btn-pressed .x-btn-center{ - background: url(../images/default/button/btn-sprite.gif) repeat-x 0 -126px; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/combo.css b/src/webui/static/extjs/resources/css/combo.css deleted file mode 100644 index c81536ef..00000000 --- a/src/webui/static/extjs/resources/css/combo.css +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-combo-list { - border:1px solid #98c0f4; - background:#ddecfe; - zoom:1; - overflow:hidden; -} -.x-combo-list-inner { - overflow:auto; - background:white; - position:relative; /* for calculating scroll offsets */ - zoom:1; - overflow-x:hidden; -} -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom:1px solid #98c0f4; - padding:3px; -} -.x-resizable-pinned .x-combo-list-inner { - border-bottom:1px solid #98c0f4; -} -.x-combo-list-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; - padding:2px; - border:1px solid #fff; - white-space: nowrap; - overflow:hidden; - text-overflow: ellipsis; -} -.x-combo-list .x-combo-selected{ - border:1px dotted #a3bae9 !important; - background:#DFE8F6; - cursor:pointer; -} -.x-combo-noedit{ - cursor:pointer; -} -.x-combo-list .x-toolbar { - border-top:1px solid #98c0f4; - border-bottom:0 none; -} - -.x-combo-list-small .x-combo-list-item { - font:normal 11px tahoma, arial, helvetica, sans-serif; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/dd.css b/src/webui/static/extjs/resources/css/dd.css deleted file mode 100644 index ef7440ac..00000000 --- a/src/webui/static/extjs/resources/css/dd.css +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-dd-drag-proxy{ - position:absolute; - left:0;top:0; - visibility:hidden; - z-index:15000; -} -.x-dd-drag-ghost{ - color: black; - font: normal 11px arial, helvetica, sans-serif; - -moz-opacity: 0.85; - opacity:.85; - filter: alpha(opacity=85); - border-top:1px solid #dddddd; - border-left:1px solid #dddddd; - border-right:1px solid #bbbbbb; - border-bottom:1px solid #bbbbbb; - padding:3px; - padding-left:20px; - background-color:white; - white-space:nowrap; -} -.x-dd-drag-repair .x-dd-drag-ghost{ - -moz-opacity: 0.4; - opacity:.4; - filter: alpha(opacity=40); - border:0 none; - padding:0; - background-color:transparent; -} -.x-dd-drag-repair .x-dd-drop-icon{ - visibility:hidden; -} -.x-dd-drop-icon{ - position:absolute; - top:3px; - left:3px; - display:block; - width:16px; - height:16px; - background-color:transparent; - background-position: center; - background-repeat: no-repeat; - z-index:1; -} -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - - -.x-view-selector { - position:absolute; - left:0; - top:0; - width:0; - background:#c3daf9; - border:1px dotted #3399bb; - opacity: .5; - -moz-opacity: .5; - filter:alpha(opacity=50); - zoom:1; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/debug.css b/src/webui/static/extjs/resources/css/debug.css index 308378af..23a7cfe1 100644 --- a/src/webui/static/extjs/resources/css/debug.css +++ b/src/webui/static/extjs/resources/css/debug.css @@ -1,37 +1,43 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ #x-debug-browser .x-tree .x-tree-node a span { - color:#222297; - font-size:11px; padding-top:2px; - font-family:"monotype","courier new",sans-serif; line-height:18px; } -#x-debug-browser .x-tree a i { - color:#FF4545; - font-style:normal; -} -#x-debug-browser .x-tree a em { - color:#999; -} -#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ - background:#c3daf9; -} + #x-debug-browser .x-tool-toggle { background-position:0 -75px; } + #x-debug-browser .x-tool-toggle-over { background-position:-15px -75px; } + #x-debug-browser.x-panel-collapsed .x-tool-toggle { background-position:0 -60px; } + #x-debug-browser.x-panel-collapsed .x-tool-toggle-over { background-position:-15px -60px; +}#x-debug-browser .x-tree .x-tree-node a span { + color:#222297; + font-size:11px; + font-family:"monotype","courier new",sans-serif; +} + +#x-debug-browser .x-tree a i { + color:#ff4545; + font-style:normal; +} + +#x-debug-browser .x-tree a em { + color:#999; +} + +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ + background-color:#c3daf9; } \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/dialog.css b/src/webui/static/extjs/resources/css/dialog.css deleted file mode 100644 index 06977f20..00000000 --- a/src/webui/static/extjs/resources/css/dialog.css +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-window-dlg .x-window-body { - border:0 none !important; - padding:5px 10px; - overflow:hidden !important; -} -.x-window-dlg .x-window-mc { - border:0 none !important; -} -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} -.x-window-dlg .ext-mb-input { - margin-top:4px; - width:95%; -} -.x-window-dlg .ext-mb-textarea { - margin-top:4px; - font:normal 12px tahoma,arial,helvetica,sans-serif; -} -.x-window-dlg .x-progress-wrap { - margin-top:4px; -} -.ext-ie .x-window-dlg .x-progress-wrap { - margin-top:6px; -} -.x-window-dlg .x-msg-box-wait { - background: transparent url(../images/default/grid/loading.gif) no-repeat left; - display:block; - width:300px; - padding-left:18px; - line-height:18px; -} -.x-window-dlg .ext-mb-icon { - float:left; - width:47px; - height:32px; -} -.x-window-dlg .ext-mb-icon { - float:left; - width:47px; - height:32px; -} -.ext-ie .x-window-dlg .ext-mb-icon { - width:44px; /* 3px IE margin issue */ -} -.x-window-dlg .ext-mb-info { - background:transparent url(../images/default/window/icon-info.gif) no-repeat top left; -} -.x-window-dlg .ext-mb-warning { - background:transparent url(../images/default/window/icon-warning.gif) no-repeat top left; -} -.x-window-dlg .ext-mb-question { - background:transparent url(../images/default/window/icon-question.gif) no-repeat top left; -} -.x-window-dlg .ext-mb-error { - background:transparent url(../images/default/window/icon-error.gif) no-repeat top left; -} -.ext-gecko2 .ext-mb-fix-cursor { - overflow:auto; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/editor.css b/src/webui/static/extjs/resources/css/editor.css deleted file mode 100644 index c3814292..00000000 --- a/src/webui/static/extjs/resources/css/editor.css +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-html-editor-wrap { - border:1px solid #a9bfd3; - background:white; -} -.x-html-editor-tb .x-btn-text { - background:transparent url(../images/default/editor/tb-sprite.gif) no-repeat; -} -.x-html-editor-tb .x-edit-bold .x-btn-text { - background-position:0 0; -} -.x-html-editor-tb .x-edit-italic .x-btn-text { - background-position:-16px 0; -} -.x-html-editor-tb .x-edit-underline .x-btn-text { - background-position:-32px 0; -} -.x-html-editor-tb .x-edit-forecolor .x-btn-text { - background-position:-160px 0; -} -.x-html-editor-tb .x-edit-backcolor .x-btn-text { - background-position:-176px 0; -} -.x-html-editor-tb .x-edit-justifyleft .x-btn-text { - background-position:-112px 0; -} -.x-html-editor-tb .x-edit-justifycenter .x-btn-text { - background-position:-128px 0; -} -.x-html-editor-tb .x-edit-justifyright .x-btn-text { - background-position:-144px 0; -} -.x-html-editor-tb .x-edit-insertorderedlist .x-btn-text { - background-position:-80px 0; -} -.x-html-editor-tb .x-edit-insertunorderedlist .x-btn-text { - background-position:-96px 0; -} -.x-html-editor-tb .x-edit-increasefontsize .x-btn-text { - background-position:-48px 0; -} -.x-html-editor-tb .x-edit-decreasefontsize .x-btn-text { - background-position:-64px 0; -} -.x-html-editor-tb .x-edit-sourceedit .x-btn-text { - background-position:-192px 0; -} -.x-html-editor-tb .x-edit-createlink .x-btn-text { - background-position:-208px 0; -} - -.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { - padding:5px; - padding-bottom:1px; -} - -.x-html-editor-tb .x-toolbar { - position:static !important; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/ext-all-notheme.css b/src/webui/static/extjs/resources/css/ext-all-notheme.css new file mode 100644 index 00000000..6bc67656 --- /dev/null +++ b/src/webui/static/extjs/resources/css/ext-all-notheme.css @@ -0,0 +1,5326 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} + +.ext-forced-border-box, .ext-forced-border-box * { + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; +} +.ext-el-mask { + z-index: 100; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + width: 100%; + height: 100%; + zoom: 1; +} + +.ext-el-mask-msg { + z-index: 20001; + position: absolute; + top: 0; + left: 0; + border:1px solid; + background:repeat-x 0 -16px; + padding:2px; +} + +.ext-el-mask-msg div { + padding:5px 10px 5px 10px; + border:1px solid; + cursor:wait; +} + +.ext-shim { + position:absolute; + visibility:hidden; + left:0; + top:0; + overflow:hidden; +} + +.ext-ie .ext-shim { + filter: alpha(opacity=0); +} + +.ext-ie6 .ext-shim { + margin-left: 5px; + margin-top: 3px; +} + +.x-mask-loading div { + padding:5px 10px 5px 25px; + background:no-repeat 5px 5px; + line-height:16px; +} + +/* class for hiding elements without using display:none */ +.x-hidden, .x-hide-offsets { + position:absolute !important; + left:-10000px; + top:-10000px; + visibility:hidden; +} + +.x-hide-display { + display:none !important; +} + +.x-hide-nosize, +.x-hide-nosize * /* Emulate display:none for children */ + { + height:0px!important; + width:0px!important; + visibility:hidden!important; + border:none!important; + zoom:1; +} + +.x-hide-visibility { + visibility:hidden !important; +} + +.x-masked { + overflow: hidden !important; +} +.x-masked-relative { + position: relative !important; +} + +.x-masked select, .x-masked object, .x-masked embed { + visibility: hidden; +} + +.x-layer { + visibility: hidden; +} + +.x-unselectable, .x-unselectable * { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select:ignore; +} + +.x-repaint { + zoom: 1; + background-color: transparent; + -moz-outline: none; + outline: none; +} + +.x-item-disabled { + cursor: default; + opacity: .6; + -moz-opacity: .6; + filter: alpha(opacity=60); +} + +.x-item-disabled * { + cursor: default !important; +} + +.x-form-radio-group .x-item-disabled { + filter: none; +} + +.x-splitbar-proxy { + position: absolute; + visibility: hidden; + z-index: 20001; + zoom: 1; + line-height: 1px; + font-size: 1px; + overflow: hidden; +} + +.x-splitbar-h, .x-splitbar-proxy-h { + cursor: e-resize; + cursor: col-resize; +} + +.x-splitbar-v, .x-splitbar-proxy-v { + cursor: s-resize; + cursor: row-resize; +} + +.x-color-palette { + width: 150px; + height: 92px; + cursor: pointer; +} + +.x-color-palette a { + border: 1px solid; + float: left; + padding: 2px; + text-decoration: none; + -moz-outline: 0 none; + outline: 0 none; + cursor: pointer; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border: 1px solid; +} + +.x-color-palette em { + display: block; + border: 1px solid; +} + +.x-color-palette em span { + cursor: pointer; + display: block; + height: 10px; + line-height: 10px; + width: 10px; +} + +.x-ie-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; + zoom:1; +} + +.x-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; +} + +.x-shadow * { + overflow: hidden; +} + +.x-shadow * { + padding: 0; + border: 0; + margin: 0; + clear: none; + zoom: 1; +} + +/* top bottom */ +.x-shadow .xstc, .x-shadow .xsbc { + height: 6px; + float: left; +} + +/* corners */ +.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { + width: 6px; + height: 6px; + float: left; +} + +/* sides */ +.x-shadow .xsc { + width: 100%; +} + +.x-shadow .xsml, .x-shadow .xsmr { + width: 6px; + float: left; + height: 100%; +} + +.x-shadow .xsmc { + float: left; + height: 100%; + background-color: transparent; +} + +.x-shadow .xst, .x-shadow .xsb { + height: 6px; + overflow: hidden; + width: 100%; +} + +.x-shadow .xsml { + background: transparent repeat-y 0 0; +} + +.x-shadow .xsmr { + background: transparent repeat-y -6px 0; +} + +.x-shadow .xstl { + background: transparent no-repeat 0 0; +} + +.x-shadow .xstc { + background: transparent repeat-x 0 -30px; +} + +.x-shadow .xstr { + background: transparent repeat-x 0 -18px; +} + +.x-shadow .xsbl { + background: transparent no-repeat 0 -12px; +} + +.x-shadow .xsbc { + background: transparent repeat-x 0 -36px; +} + +.x-shadow .xsbr { + background: transparent repeat-x 0 -6px; +} + +.loading-indicator { + background: no-repeat left; + padding-left: 20px; + line-height: 16px; + margin: 3px; +} + +.x-text-resize { + position: absolute; + left: -1000px; + top: -1000px; + visibility: hidden; + zoom: 1; +} + +.x-drag-overlay { + width: 100%; + height: 100%; + display: none; + position: absolute; + left: 0; + top: 0; + background-image:url(../images/default/s.gif); + z-index: 20000; +} + +.x-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + +.x-spotlight { + z-index: 8999; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + width:0; + height:0; + zoom: 1; +} + +#x-history-frame { + position:absolute; + top:-1px; + left:0; + width:1px; + height:1px; + visibility:hidden; +} + +#x-history-field { + position:absolute; + top:0; + left:-1px; + width:1px; + height:1px; + visibility:hidden; +} +.x-resizable-handle { + position:absolute; + z-index:100; + /* ie needs these */ + font-size:1px; + line-height:6px; + overflow:hidden; + filter:alpha(opacity=0); + opacity:0; + zoom:1; +} + +.x-resizable-handle-east{ + width:6px; + cursor:e-resize; + right:0; + top:0; + height:100%; +} + +.ext-ie .x-resizable-handle-east { + margin-right:-1px; /*IE rounding error*/ +} + +.x-resizable-handle-south{ + width:100%; + cursor:s-resize; + left:0; + bottom:0; + height:6px; +} + +.ext-ie .x-resizable-handle-south { + margin-bottom:-1px; /*IE rounding error*/ +} + +.x-resizable-handle-west{ + width:6px; + cursor:w-resize; + left:0; + top:0; + height:100%; +} + +.x-resizable-handle-north{ + width:100%; + cursor:n-resize; + left:0; + top:0; + height:6px; +} + +.x-resizable-handle-southeast{ + width:6px; + cursor:se-resize; + right:0; + bottom:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-northwest{ + width:6px; + cursor:nw-resize; + left:0; + top:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-northeast{ + width:6px; + cursor:ne-resize; + right:0; + top:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-southwest{ + width:6px; + cursor:sw-resize; + left:0; + bottom:0; + height:6px; + z-index:101; +} + +.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ + filter:alpha(opacity=100); + opacity:1; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-position: left; +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-position: top; +} + +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-position: top left; +} + +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-position:bottom right; +} + +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-position: bottom left; +} + +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-position: top right; +} + +.x-resizable-proxy{ + border: 1px dashed; + position:absolute; + overflow:hidden; + display:none; + left:0; + top:0; + z-index:50000; +} + +.x-resizable-overlay{ + width:100%; + height:100%; + display:none; + position:absolute; + left:0; + top:0; + z-index:200000; + -moz-opacity: 0; + opacity:0; + filter: alpha(opacity=0); +} +.x-tab-panel { + overflow:hidden; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border: 1px solid; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header { + border: 1px solid; + padding-bottom: 2px; +} + +.x-tab-panel-footer { + border: 1px solid; + padding-top: 2px; +} + +.x-tab-strip-wrap { + width:100%; + overflow:hidden; + position:relative; + zoom:1; +} + +ul.x-tab-strip { + display:block; + width:5000px; + zoom:1; +} + +ul.x-tab-strip-top{ + padding-top: 1px; + background: repeat-x bottom; + border-bottom: 1px solid; +} + +ul.x-tab-strip-bottom{ + padding-bottom: 1px; + background: repeat-x top; + border-top: 1px solid; + border-bottom: 0 none; +} + +.x-tab-panel-header-plain .x-tab-strip-top { + background:transparent !important; + padding-top:0 !important; +} + +.x-tab-panel-header-plain { + background:transparent !important; + border-width:0 !important; + padding-bottom:0 !important; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border:1px solid; + height:2px; + font-size:1px; + line-height:1px; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer { + border-top: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-bottom: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-bottom { + background:transparent !important; + padding-bottom:0 !important; +} + +.x-tab-panel-footer-plain { + background:transparent !important; + border-width:0 !important; + padding-top:0 !important; +} + +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, +.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { + height:3px; +} + +ul.x-tab-strip li { + float:left; + margin-left:2px; +} + +ul.x-tab-strip li.x-tab-edge { + float:left; + margin:0 !important; + padding:0 !important; + border:0 none !important; + font-size:1px !important; + line-height:1px !important; + overflow:hidden; + zoom:1; + background:transparent !important; + width:1px; +} + +.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { + display:block; +} + +.x-tab-strip a { + text-decoration:none !important; + -moz-outline: none; + outline: none; + cursor:pointer; +} + +.x-tab-strip-inner { + overflow:hidden; + text-overflow: ellipsis; +} + +.x-tab-strip span.x-tab-strip-text { + white-space: nowrap; + cursor:pointer; + padding:4px 0; +} + +.x-tab-strip-top .x-tab-with-icon .x-tab-right { + padding-left:6px; +} + +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { + padding-left:20px; + background-position: 0 3px; + background-repeat: no-repeat; +} + +.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { + cursor:default; +} + +.x-tab-strip-active span.x-tab-strip-text { + cursor:default; +} + +.x-tab-strip-disabled .x-tabs-text { + cursor:default; +} + +.x-tab-panel-body { + overflow:hidden; +} + +.x-tab-panel-bwrap { + overflow:hidden; +} + +.ext-ie .x-tab-strip .x-tab-right { + position:relative; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right { + margin-bottom:-1px; +} + +/* + * Horrible hack for IE8 in quirks mode + */ +.ext-ie8 .x-tab-strip li { + position: relative; +} +.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { + top: 1px; +} +.ext-ie8 .x-tab-strip-top { + padding-top: 1; +} +.ext-border-box .ext-ie8 .x-tab-strip-top { + padding-top: 0; +} +.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:3px; +} +.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:4px; +} +.ext-ie8 .x-tab-strip-bottom .x-tab-right{ + top:0; +} + + +.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { + padding-bottom:5px; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + margin-top:-1px; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { + padding-top:5px; +} + +.x-tab-strip-top .x-tab-right { + background: transparent no-repeat 0 -51px; + padding-left:10px; +} + +.x-tab-strip-top .x-tab-left { + background: transparent no-repeat right -351px; + padding-right:10px; +} + +.x-tab-strip-top .x-tab-strip-inner { + background: transparent repeat-x 0 -201px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-right { + background-position:0 -101px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-left { + background-position:right -401px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { + background-position:0 -251px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right { + background-position: 0 0; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-left { + background-position: right -301px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { + background-position: 0 -151px; +} + +.x-tab-strip-bottom .x-tab-right { + background: no-repeat bottom right; +} + +.x-tab-strip-bottom .x-tab-left { + background: no-repeat bottom left; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background: no-repeat bottom right; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background: no-repeat bottom left; +} + +.x-tab-strip-bottom .x-tab-left { + margin-right: 3px; + padding:0 10px; +} + +.x-tab-strip-bottom .x-tab-right { + padding:0; +} + +.x-tab-strip .x-tab-strip-close { + display:none; +} + +.x-tab-strip-closable { + position:relative; +} + +.x-tab-strip-closable .x-tab-left { + padding-right:19px; +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + opacity:.6; + -moz-opacity:.6; + background-repeat:no-repeat; + display:block; + width:11px; + height:11px; + position:absolute; + top:3px; + right:3px; + cursor:pointer; + z-index:2; +} + +.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { + opacity:.8; + -moz-opacity:.8; +} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + opacity:1; + -moz-opacity:1; +} + +.x-tab-panel-body { + border: 1px solid; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background: transparent no-repeat -18px 0; + border-bottom: 1px solid; + width:18px; + position:absolute; + left:0; + top:0; + z-index:10; + cursor:pointer; +} +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background: transparent no-repeat 0 0; + border-bottom: 1px solid; + width:18px; + position:absolute; + right:0; + top:0; + z-index:10; + cursor:pointer; +} + +.x-tab-scroller-right-over { + background-position: -18px 0; +} + +.x-tab-scroller-right-disabled { + background-position: 0 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ + margin-top: 1px; +} + +.x-tab-scrolling .x-tab-strip-wrap { + margin-left:18px; + margin-right:18px; +} + +.x-tab-scrolling { + position:relative; +} + +.x-tab-panel-bbar .x-toolbar { + border:1px solid; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-tab-panel-tbar .x-toolbar { + border:1px solid; + border-top:0 none; + overflow:hidden; + padding:2px; +}/* all fields */ +.x-form-field{ + margin: 0 0 0 0; +} + +.ext-webkit *:focus{ + outline: none !important; +} + +/* ---- text fields ---- */ +.x-form-text, textarea.x-form-field{ + padding:1px 3px; + background:repeat-x 0 0; + border:1px solid; +} + +textarea.x-form-field { + padding:2px 3px; +} + +.x-form-text, .ext-ie .x-form-file { + height:22px; + line-height:18px; + vertical-align:middle; +} + +.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { + margin:-1px 0; /* ie bogus margin bug */ + height:22px; /* ie quirks */ + line-height:18px; +} + +.x-quirks .ext-ie9 .x-form-text { + height: 22px; + padding-top: 3px; + padding-bottom: 0px; +} + +/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ +.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, +.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { + margin-top: -1px; + margin-bottom: -1px; +} +.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { + margin-bottom: -1px; +} + +.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { + top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ +} + +.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { + margin:-1px 0; /* ie bogus margin bug */ +} + +.ext-strict .x-form-text { + height:18px; +} + +.ext-safari.ext-mac textarea.x-form-field { + margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ +} + +/* +.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { + margin-bottom: 1px; +} +*/ + +.ext-gecko .x-form-text , .ext-ie8 .x-form-text { + padding-top:2px; /* FF won't center the text vertically */ + padding-bottom:0; +} + +.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { + margin: 0 !important; /* clear ie bogus margin bug fix */ +} + +textarea { + resize: none; /* Disable browser resizable textarea */ +} + +/* select boxes */ +.x-form-select-one { + height:20px; + line-height:18px; + vertical-align:middle; + border: 1px solid; +} + +/* multi select boxes */ + +/* --- TODO --- */ + +/* 2.0.2 style */ +.x-form-check-wrap { + line-height:18px; + height: auto; +} + +.ext-ie .x-form-check-wrap input { + width:15px; + height:15px; +} + +.x-form-check-wrap input{ + vertical-align: bottom; +} + +.x-editor .x-form-check-wrap { + padding:3px; +} + +.x-editor .x-form-checkbox { + height:13px; +} + +.x-form-check-group-label { + border-bottom: 1px solid; + margin-bottom: 5px; + padding-left: 3px !important; + float: none !important; +} + +/* wrapped fields and triggers */ +.x-form-field-wrap .x-form-trigger{ + width:17px; + height:21px; + border:0; + background:transparent no-repeat 0 0; + cursor:pointer; + border-bottom: 1px solid; + position:absolute; + top:0; +} + +.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ + cursor:pointer; +} + +.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ + position:static; + top:auto; + vertical-align:top; +} + +.x-form-field-wrap { + position:relative; + left:0;top:0; + text-align: left; + zoom:1; + white-space: nowrap; +} + +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { + right: 0; /* IE8 Strict mode trigger bug */ +} + +.x-form-field-wrap .x-form-trigger-over{ + background-position:-17px 0; +} + +.x-form-field-wrap .x-form-trigger-click{ + background-position:-34px 0; +} + +.x-trigger-wrap-focus .x-form-trigger{ + background-position:-51px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-over{ + background-position:-68px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-click{ + background-position:-85px 0; +} + +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom: 1px solid; +} + +.x-item-disabled .x-form-trigger-over{ + background-position:0 0 !important; + border-bottom: 1px solid; +} + +.x-item-disabled .x-form-trigger-click{ + background-position:0 0 !important; + border-bottom: 1px solid; +} + +.x-trigger-noedit{ + cursor:pointer; +} + +/* field focus style */ +.x-form-focus, textarea.x-form-focus{ + border: 1px solid; +} + +/* invalid fields */ +.x-form-invalid, textarea.x-form-invalid{ + background:repeat-x bottom; + border: 1px solid; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background:repeat-x bottom; +} + +/* editors */ +.x-editor { + visibility:hidden; + padding:0; + margin:0; +} + +.x-form-grow-sizer { + left: -10000px; + padding: 8px 3px; + position: absolute; + visibility:hidden; + top: -10000px; + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; + zoom:1; +} + +.x-form-grow-sizer p { + margin:0 !important; + border:0 none !important; + padding:0 !important; +} + +/* Form Items CSS */ + +.x-form-item { + display:block; + margin-bottom:4px; + zoom:1; +} + +.x-form-item label.x-form-item-label { + display:block; + float:left; + width:100px; + padding:3px; + padding-left:0; + clear:left; + z-index:2; + position:relative; +} + +.x-form-element { + padding-left:105px; + position:relative; +} + +.x-form-invalid-msg { + padding:2px; + padding-left:18px; + background: transparent no-repeat 0 2px; + line-height:16px; + width:200px; +} + +.x-form-label-left label.x-form-item-label { + text-align:left; +} + +.x-form-label-right label.x-form-item-label { + text-align:right; +} + +.x-form-label-top .x-form-item label.x-form-item-label { + width:auto; + float:none; + clear:none; + display:inline; + margin-bottom:4px; + position:static; +} + +.x-form-label-top .x-form-element { + padding-left:0; + padding-top:4px; +} + +.x-form-label-top .x-form-item { + padding-bottom:4px; +} + +/* Editor small font for grid, toolbar and tree */ +.x-small-editor .x-form-text { + height:20px; + line-height:16px; + vertical-align:middle; +} + +.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { + margin-top:-1px !important; /* ie bogus margin bug */ + margin-bottom:-1px !important; + height:20px !important; /* ie quirks */ + line-height:16px !important; +} + +.ext-strict .x-small-editor .x-form-text { + height:16px !important; +} + +.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { + height:20px; + line-height:16px; +} + +.ext-border-box .x-small-editor .x-form-text { + height:20px; +} + +.x-small-editor .x-form-select-one { + height:20px; + line-height:16px; + vertical-align:middle; +} + +.x-small-editor .x-form-num-field { + text-align:right; +} + +.x-small-editor .x-form-field-wrap .x-form-trigger{ + height:19px; +} + +.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} + +.ext-strict .ext-webkit .x-small-editor .x-form-text{ + height:14px !important; +} + +.x-form-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} +.x-form-clear-left { + clear:left; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + +.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ + margin-top: 3px; +} + +.x-form-cb-label { + position: relative; + margin-left:4px; + top: 2px; +} + +.ext-ie .x-form-cb-label{ + top: 1px; +} + +.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ + top: 3px; +} + +.x-form-display-field{ + padding-top: 2px; +} + +.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ + padding-top: 1px; +} + +.ext-ie .x-form-display-field{ + padding-top: 3px; +} + +.ext-strict .ext-ie8 .x-form-display-field{ + padding-top: 0; +} + +.x-form-column { + float:left; + padding:0; + margin:0; + width:48%; + overflow:hidden; + zoom:1; +} + +/* buttons */ +.x-form .x-form-btns-ct .x-btn{ + float:right; + clear:none; +} + +.x-form .x-form-btns-ct .x-form-btns td { + border:0; + padding:0; +} + +.x-form .x-form-btns-ct .x-form-btns-right table{ + float:right; + clear:none; +} + +.x-form .x-form-btns-ct .x-form-btns-left table{ + float:left; + clear:none; +} + +.x-form .x-form-btns-ct .x-form-btns-center{ + text-align:center; /*ie*/ +} + +.x-form .x-form-btns-ct .x-form-btns-center table{ + margin:0 auto; /*everyone else*/ +} + +.x-form .x-form-btns-ct table td.x-form-btn-td{ + padding:3px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ + background-position:0 -126px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ + background-position:0 -84px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ + background-position:0 -63px; +} + +.x-form-invalid-icon { + width:16px; + height:18px; + visibility:hidden; + position:absolute; + left:0; + top:0; + display:block; + background:transparent no-repeat 0 2px; +} + +/* fieldsets */ +.x-fieldset { + border:1px solid; + padding:10px; + margin-bottom:10px; + display:block; /* preserve margins in IE */ +} + +/* make top of checkbox/tools visible in webkit */ +.ext-webkit .x-fieldset-header { + padding-top: 1px; +} + +.ext-ie .x-fieldset legend { + margin-bottom:10px; +} + +.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { + padding-top: 1px; +} + +.ext-ie .x-fieldset { + padding-top: 0; + padding-bottom:10px; +} + +.x-fieldset legend .x-tool-toggle { + margin-right:3px; + margin-left:0; + float:left !important; +} + +.x-fieldset legend input { + margin-right:3px; + float:left !important; + height:13px; + width:13px; +} + +fieldset.x-panel-collapsed { + padding-bottom:0 !important; + border-width: 1px 1px 0 1px !important; + border-left-color: transparent; + border-right-color: transparent; +} + +.ext-ie6 fieldset.x-panel-collapsed{ + padding-bottom:0 !important; + border-width: 1px 0 0 0 !important; + margin-left: 1px; + margin-right: 1px; +} + +fieldset.x-panel-collapsed .x-fieldset-bwrap { + visibility:hidden; + position:absolute; + left:-1000px; + top:-1000px; +} + +.ext-ie .x-fieldset-bwrap { + zoom:1; +} + +.x-fieldset-noborder { + border:0px none transparent; +} + +.x-fieldset-noborder legend { + margin-left:-3px; +} + +/* IE legend positioning bug */ +.ext-ie .x-fieldset-noborder legend { + position: relative; + margin-bottom:23px; +} +.ext-ie .x-fieldset-noborder legend span { + position: absolute; + left:16px; +} + +.ext-gecko .x-window-body .x-form-item { + -moz-outline: none; + outline: none; + overflow: auto; +} + +.ext-mac.ext-gecko .x-window-body .x-form-item { + overflow:hidden; +} + +.ext-gecko .x-form-item { + -moz-outline: none; + outline: none; +} + +.x-hide-label label.x-form-item-label { + display:none; +} + +.x-hide-label .x-form-element { + padding-left: 0 !important; +} + +.x-form-label-top .x-hide-label label.x-form-item-label{ + display: none; +} + +.x-fieldset { + overflow:hidden; +} + +.x-fieldset-bwrap { + overflow:hidden; + zoom:1; +} + +.x-fieldset-body { + overflow:hidden; +} +.x-btn{ + cursor:pointer; + white-space: nowrap; +} + +.x-btn button{ + border:0 none; + background-color:transparent; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; +} + +* html .ext-ie .x-btn button { + width:1px; +} + +.ext-gecko .x-btn button, .ext-webkit .x-btn button { + padding-left:0; + padding-right:0; +} + +.ext-gecko .x-btn button::-moz-focus-inner { + padding:0; +} + +.ext-ie .x-btn button { + padding-top:2px; +} + +.x-btn td { + padding:0 !important; +} + +.x-btn-text { + cursor:pointer; + white-space: nowrap; + padding:0; +} + +/* icon placement and sizing styles */ + +/* Only text */ +.x-btn-noicon .x-btn-small .x-btn-text{ + height: 16px; +} + +.x-btn-noicon .x-btn-medium .x-btn-text{ + height: 24px; +} + +.x-btn-noicon .x-btn-large .x-btn-text{ + height: 32px; +} + +/* Only icons */ +.x-btn-icon .x-btn-text{ + background-position: center; + background-repeat: no-repeat; +} + +.x-btn-icon .x-btn-small .x-btn-text{ + height: 16px; + width: 16px; +} + +.x-btn-icon .x-btn-medium .x-btn-text{ + height: 24px; + width: 24px; +} + +.x-btn-icon .x-btn-large .x-btn-text{ + height: 32px; + width: 32px; +} + +/* Icons and text */ +/* left */ +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:18px; + height:16px; +} + +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:26px; + height:24px; +} + +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:34px; + height:32px; +} + +/* top */ +.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:18px; +} + +.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:26px; +} + +.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:34px; +} + +/* right */ +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:18px; + height:16px; +} + +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:26px; + height:24px; +} + +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:34px; + height:32px; +} + +/* bottom */ +.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:18px; +} + +.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:26px; +} + +.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:34px; +} + +/* background positioning */ +.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ + font-size:1px; + line-height:1px; + width:3px; + display:block; + overflow:hidden; +} + +.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ + height:3px; +} + +.x-btn-tl{ + width:3px; + height:3px; + background:no-repeat 0 0; +} +.x-btn-tr{ + width:3px; + height:3px; + background:no-repeat -3px 0; +} +.x-btn-tc{ + height:3px; + background:repeat-x 0 -6px; +} + +.x-btn-ml{ + width:3px; + background:no-repeat 0 -24px; +} +.x-btn-mr{ + width:3px; + background:no-repeat -3px -24px; +} + +.x-btn-mc{ + background:repeat-x 0 -1096px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} + +/* Fixes an issue with the button height */ +.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { + height: 100%; +} + +.x-btn-bl{ + width:3px; + height:3px; + background:no-repeat 0 -3px; +} + +.x-btn-br{ + width:3px; + height:3px; + background:no-repeat -3px -3px; +} + +.x-btn-bc{ + height:3px; + background:repeat-x 0 -15px; +} + +.x-btn-over .x-btn-tl{ + background-position: -6px 0; +} + +.x-btn-over .x-btn-tr{ + background-position: -9px 0; +} + +.x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} + +.x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} + +.x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} + +.x-btn-over .x-btn-br{ + background-position: -9px -3px; +} + +.x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} + +.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} + +.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} + +.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} + +.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} + +.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} + +.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-btn-disabled *{ + cursor:default !important; +} + + +/* With a menu arrow */ +/* right */ +.x-btn-mc em.x-btn-arrow { + display:block; + background:transparent no-repeat right center; + padding-right:10px; +} + +.x-btn-mc em.x-btn-split { + display:block; + background:transparent no-repeat right center; + padding-right:14px; +} + +/* bottom */ +.x-btn-mc em.x-btn-arrow-bottom { + display:block; + background:transparent no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-mc em.x-btn-split-bottom { + display:block; + background:transparent no-repeat center bottom; + padding-bottom:14px; +} + +/* height adjustment class */ +.x-btn-as-arrow .x-btn-mc em { + display:block; + background-color:transparent; + padding-bottom:14px; +} + +/* groups */ +.x-btn-group { + padding:1px; +} + +.x-btn-group-header { + padding:2px; + text-align:center; +} + +.x-btn-group-tc { + background: transparent repeat-x 0 0; + overflow:hidden; +} + +.x-btn-group-tl { + background: transparent no-repeat 0 0; + padding-left:3px; + zoom:1; +} + +.x-btn-group-tr { + background: transparent no-repeat right 0; + zoom:1; + padding-right:3px; +} + +.x-btn-group-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-btn-group-bc .x-panel-footer { + zoom:1; +} + +.x-btn-group-bl { + background: transparent no-repeat 0 bottom; + padding-left:3px; + zoom:1; +} + +.x-btn-group-br { + background: transparent no-repeat right bottom; + padding-right:3px; + zoom:1; +} + +.x-btn-group-mc { + border:0 none; + padding:1px 0 0 0; + margin:0; +} + +.x-btn-group-mc .x-btn-group-body { + background-color:transparent; + border: 0 none; +} + +.x-btn-group-ml { + background: transparent repeat-y 0 0; + padding-left:3px; + zoom:1; +} + +.x-btn-group-mr { + background: transparent repeat-y right 0; + padding-right:3px; + zoom:1; +} + +.x-btn-group-bc .x-btn-group-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-btn-group-bc { + height:3px; + font-size:0; + line-height:0; +} + +.x-btn-group-bwrap { + overflow:hidden; + zoom:1; +} + +.x-btn-group-body { + overflow:hidden; + zoom:1; +} + +.x-btn-group-notitle .x-btn-group-tc { + background: transparent repeat-x 0 0; + overflow:hidden; + height:2px; +}.x-toolbar{ + border-style:solid; + border-width:0 0 1px 0; + display: block; + padding:2px; + background:repeat-x top left; + position:relative; + left:0; + top:0; + zoom:1; + overflow:hidden; +} + +.x-toolbar-left { + width: 100%; +} + +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} + +.x-toolbar td { + vertical-align:middle; +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; +} + +.x-toolbar .x-item-disabled { + cursor:default; + opacity:.6; + -moz-opacity:.6; + filter:alpha(opacity=60); +} + +.x-toolbar .x-item-disabled * { + cursor:default; +} + +.x-toolbar .x-toolbar-cell { + vertical-align:middle; +} + +.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, +.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc +{ + background-position: 500px 500px; +} + +/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ +.x-toolbar .x-btn-over .x-btn-tl{ + background-position: -6px 0; +} + +.x-toolbar .x-btn-over .x-btn-tr{ + background-position: -9px 0; +} + +.x-toolbar .x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-toolbar .x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} + +.x-toolbar .x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} + +.x-toolbar .x-btn-over .x-btn-br{ + background-position: -9px -3px; +} + +.x-toolbar .x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} + +.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} + +.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} + +.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} + +.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} + +.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-toolbar div.xtb-text{ + padding:2px 2px 0; + line-height:16px; + display:block; +} + +.x-toolbar .xtb-sep { + background-position: center; + background-repeat: no-repeat; + display: block; + font-size: 1px; + height: 16px; + width:4px; + overflow: hidden; + cursor:default; + margin: 0 2px 0; + border:0; +} + +.x-toolbar .xtb-spacer { + width:2px; +} + +/* Paging Toolbar */ +.x-tbar-page-number{ + width:30px; + height:14px; +} + +.ext-ie .x-tbar-page-number{ + margin-top: 2px; +} + +.x-paging-info { + position:absolute; + top:5px; + right: 8px; +} + +/* floating */ +.x-toolbar-ct { + width:100%; +} + +.x-toolbar-right td { + text-align: center; +} + +.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { + overflow:hidden; + zoom:1; +} + +.x-toolbar-more .x-btn-small .x-btn-text{ + height: 16px; + width: 12px; +} + +.x-toolbar-more em.x-btn-arrow { + display:inline; + background-color:transparent; + padding-right:0; +} + +.x-toolbar-more .x-btn-mc em.x-btn-arrow { + background-image: none; +} + +div.x-toolbar-no-items { + color:gray !important; + padding:5px 10px !important; +} + +/* fix ie toolbar form items */ +.ext-border-box .x-toolbar-cell .x-form-text { + margin-bottom:-1px !important; +} + +.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { + margin:0 !important; +} + +.ext-ie .x-toolbar-cell .x-form-field-wrap { + height:21px; +} + +.ext-ie .x-toolbar-cell .x-form-text { + position:relative; + top:-1px; +} + +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { + top: 0px; +} + +.x-toolbar-right td .x-form-field-trigger-wrap{ + text-align: left; +} + +.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ + margin-top: 5px; +} + +.x-toolbar-cell .x-form-cb-label{ + vertical-align: bottom; + top: 1px; +} + +.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ + margin-top: 4px; +} + +.ext-ie .x-toolbar-cell .x-form-cb-label{ + top: 0; +} +/* Grid3 styles */ +.x-grid3 { + position:relative; + overflow:hidden; +} + +.x-grid-panel .x-panel-body { + overflow:hidden !important; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border:1px solid; +} + +.x-grid3 table { + table-layout:fixed; +} + +.x-grid3-viewport{ + overflow:hidden; +} + +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + -moz-outline: none; + outline: none; + -moz-user-focus: normal; +} + +.x-grid3-row td, .x-grid3-summary-row td { + line-height:13px; + vertical-align: top; + padding-left:1px; + padding-right:1px; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-cell{ + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-hd-row td { + line-height:15px; + vertical-align:middle; + border-left:1px solid; + border-right:1px solid; +} + +.x-grid3-hd-row .x-grid3-marker-hd { + padding:3px; +} + +.x-grid3-row .x-grid3-marker { + padding:3px; +} + +.x-grid3-cell-inner, .x-grid3-hd-inner{ + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + padding:3px 3px 3px 5px; + white-space: nowrap; +} + +/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ +.x-action-col-cell .x-grid3-cell-inner { + padding-top: 1px; + padding-bottom: 1px; +} + +.x-action-col-icon { + cursor: pointer; +} + +.x-grid3-hd-inner { + position:relative; + cursor:inherit; + padding:4px 3px 4px 5px; +} + +.x-grid3-row-body { + white-space:normal; +} + +.x-grid3-body-cell { + -moz-outline:0 none; + outline:0 none; +} + +/* IE Quirks to clip */ +.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ + width:100%; +} + +/* reverse above in strict mode */ +.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ + width:auto; +} + +.x-grid-row-loading { + background: no-repeat center center; +} + +.x-grid-page { + overflow:hidden; +} + +.x-grid3-row { + cursor: default; + border: 1px solid; + width:100%; +} + +.x-grid3-row-over { + border:1px solid; + background: repeat-x left top; +} + +.x-grid3-resize-proxy { + width:1px; + left:0; + cursor: e-resize; + cursor: col-resize; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} + +.x-grid3-resize-marker { + width:1px; + left:0; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} + +.x-grid3-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + -webkit-user-select:ignore; +} + +/* header styles */ +.x-grid3-header{ + background: repeat-x 0 bottom; + cursor:default; + zoom:1; + padding:1px 0 0 0; +} + +.x-grid3-header-pop { + border-left:1px solid; + float:right; + clear:none; +} + +.x-grid3-header-pop-inner { + border-left:1px solid; + width:14px; + height:19px; + background: transparent no-repeat center center; +} + +.ext-ie .x-grid3-header-pop-inner { + width:15px; +} + +.ext-strict .x-grid3-header-pop-inner { + width:14px; +} + +.x-grid3-header-inner { + overflow:hidden; + zoom:1; + float:left; +} + +.x-grid3-header-offset { + padding-left:1px; + text-align: left; +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left:1px solid; + border-right:1px solid; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background: repeat-x left bottom; + +} + +.x-grid3-sort-icon{ + background-repeat: no-repeat; + display: none; + height: 4px; + width: 13px; + margin-left:3px; + vertical-align: middle; +} + +.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { + display: inline; +} + +/* Header position fixes for IE strict mode */ +.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { + position:relative; +} + +.ext-strict .ext-ie6 .x-grid3-hd-inner{ + position:static; +} + +/* Body Styles */ +.x-grid3-body { + zoom:1; +} + +.x-grid3-scroller { + overflow:auto; + zoom:1; + position:relative; +} + +.x-grid3-cell-text, .x-grid3-hd-text { + display: block; + padding: 3px 5px 3px 5px; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select:ignore; +} + +.x-grid3-split { + background-position: center; + background-repeat: no-repeat; + cursor: e-resize; + cursor: col-resize; + display: block; + font-size: 1px; + height: 16px; + overflow: hidden; + position: absolute; + top: 2px; + width: 6px; + z-index: 3; +} + +/* Column Reorder DD */ +.x-dd-drag-proxy .x-grid3-hd-inner{ + background: repeat-x left bottom; + width:120px; + padding:3px; + border:1px solid; + overflow:hidden; +} + +.col-move-top, .col-move-bottom{ + width:9px; + height:9px; + position:absolute; + top:0; + line-height:1px; + font-size:1px; + overflow:hidden; + visibility:hidden; + z-index:20000; + background:transparent no-repeat left top; +} + +/* Selection Styles */ +.x-grid3-row-selected { + border:1px dotted; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background: repeat-x 0 bottom !important; + vertical-align:middle !important; + padding:0; + border-top:1px solid; + border-bottom:none !important; + border-right:1px solid !important; + text-align:center; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + padding:0 4px; + text-align:center; +} + +/* dirty cells */ +.x-grid3-dirty-cell { + background: transparent no-repeat 0 0; +} + +/* Grid Toolbars */ +.x-grid3-topbar, .x-grid3-bottombar{ + overflow:hidden; + display:none; + zoom:1; + position:relative; +} + +.x-grid3-topbar .x-toolbar{ + border-right:0 none; +} + +.x-grid3-bottombar .x-toolbar{ + border-right:0 none; + border-bottom:0 none; + border-top:1px solid; +} + +/* Props Grid Styles */ +.x-props-grid .x-grid3-cell{ + padding:1px; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background:transparent repeat-y -16px !important; + padding-left:12px; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + padding:1px; + padding-right:0; + border:0 none; + border-right:1px solid; +} + +/* dd */ +.x-grid3-col-dd { + border:0 none; + padding:0; + background-color:transparent; +} + +.x-dd-drag-ghost .x-grid3-dd-wrap { + padding:1px 3px 3px 1px; +} + +.x-grid3-hd { + -moz-user-select:none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-hd-btn { + display:none; + position:absolute; + width:14px; + background:no-repeat left center; + right:0; + top:0; + z-index:2; + cursor:pointer; +} + +.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { + display:block; +} + +a.x-grid3-hd-btn:hover { + background-position:-14px center; +} + +/* Expanders */ +.x-grid3-body .x-grid3-td-expander { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-expander { + width:100%; + height:18px; + background-position:4px 2px; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-row-collapsed .x-grid3-row-expander { + background-position:4px 2px; +} + +.x-grid3-row-expanded .x-grid3-row-expander { + background-position:-21px 2px; +} + +.x-grid3-row-collapsed .x-grid3-row-body { + display:none !important; +} + +.x-grid3-row-expanded .x-grid3-row-body { + display:block !important; +} + +/* Checkers */ +.x-grid3-body .x-grid3-td-checker { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + width:100%; + height:18px; + background-position:2px 2px; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-row .x-grid3-row-checker { + background-position:2px 2px; +} + +.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { + background-position:-23px 2px; +} + +.x-grid3-hd-checker { + background-position:2px 1px; +} + +.ext-border-box .x-grid3-hd-checker { + background-position:2px 3px; +} + +.x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 1px; +} + +.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 3px; +} + +/* Numberer */ +.x-grid3-body .x-grid3-td-numberer { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + padding:3px 5px 0 0 !important; + text-align:right; +} + +/* Row Icon */ + +.x-grid3-body .x-grid3-td-row-icon { + background:transparent repeat-y right; + vertical-align:top; + text-align:center; +} + +.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { + padding:0 !important; + background-position:center center; + background-repeat:no-repeat; + width:16px; + height:16px; + margin-left:2px; + margin-top:3px; +} + +/* All specials */ +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { + padding: 1px 0 0 0 !important; +} + +.x-grid3-check-col { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-check-col-on { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; +} + +/* Grouping classes */ +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom: 2px solid; + cursor:pointer; + padding-top:6px; +} + +.x-grid-group-hd div.x-grid-group-title { + background:transparent no-repeat 3px 3px; + padding:4px 4px 4px 17px; +} + +.x-grid-group-collapsed .x-grid-group-body { + display:none; +} + +.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { + position:relative; + top:-1px; +} + +.ext-ie .x-props-grid .x-editor .x-form-text { + position:static; + top:0; +} + +.x-grid-empty { + padding:10px; +} + +/* fix floating toolbar issue */ +.ext-ie7 .x-grid-panel .x-panel-bbar { + position:relative; +} + + +/* Reset position to static when Grid Panel has been framed */ +/* to resolve 'snapping' from top to bottom behavior. */ +/* @forumThread 86656 */ +.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { + position: static; +} + +.ext-ie6 .x-grid3-header { + position: relative; +} + +/* Fix WebKit bug in Grids */ +.ext-webkit .x-grid-panel .x-panel-bwrap{ + -webkit-user-select:none; +} +.ext-webkit .x-tbar-page-number{ + -webkit-user-select:ignore; +} +/* end*/ + +/* column lines */ +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + padding-right:0; + border-right:1px solid; +} +.x-pivotgrid .x-grid3-header-offset table { + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-header-offset table td { + padding: 4px 3px 4px 5px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 11px; + line-height: 13px; + font-family: tahoma; +} + +.x-pivotgrid .x-grid3-row-headers { + display: block; + float: left; +} + +.x-pivotgrid .x-grid3-row-headers table { + height: 100%; + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-row-headers table td { + height: 18px; + padding: 2px 7px 0 0; + text-align: right; + text-overflow: ellipsis; + font-size: 11px; + font-family: tahoma; +} + +.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { + height: 21px; +} + +.x-grid3-header-title { + top: 0%; + left: 0%; + position: absolute; + text-align: center; + vertical-align: middle; + font-family: tahoma; + font-size: 11px; + padding: auto 1px; + display: table-cell; +} + +.x-grid3-header-title span { + position: absolute; + top: 50%; + left: 0%; + width: 100%; + margin-top: -6px; +}.x-dd-drag-proxy{ + position:absolute; + left:0; + top:0; + visibility:hidden; + z-index:15000; +} + +.x-dd-drag-ghost{ + -moz-opacity: 0.85; + opacity:.85; + filter: alpha(opacity=85); + border: 1px solid; + padding:3px; + padding-left:20px; + white-space:nowrap; +} + +.x-dd-drag-repair .x-dd-drag-ghost{ + -moz-opacity: 0.4; + opacity:.4; + filter: alpha(opacity=40); + border:0 none; + padding:0; + background-color:transparent; +} + +.x-dd-drag-repair .x-dd-drop-icon{ + visibility:hidden; +} + +.x-dd-drop-icon{ + position:absolute; + top:3px; + left:3px; + display:block; + width:16px; + height:16px; + background-color:transparent; + background-position: center; + background-repeat: no-repeat; + z-index:1; +} + +.x-view-selector { + position:absolute; + left:0; + top:0; + width:0; + border:1px dotted; + opacity: .5; + -moz-opacity: .5; + filter:alpha(opacity=50); + zoom:1; +}.ext-strict .ext-ie .x-tree .x-panel-bwrap{ + position:relative; + overflow:hidden; +} + +.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-repeat: no-repeat; +} + +.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-position:center; + background-repeat: no-repeat; +} + +.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { + vertical-align: middle !important; +} + +.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { + vertical-align: top !important; +} + +/* checkboxes */ + +input.x-tree-node-cb { + margin-left:1px; + height: 19px; + vertical-align: bottom; +} + +.ext-ie input.x-tree-node-cb { + margin-left:0; + margin-top: 1px; + width: 16px; + height: 16px; + vertical-align: middle; +} + +.ext-strict .ext-ie8 input.x-tree-node-cb{ + margin: 1px 1px; + height: 14px; + vertical-align: bottom; +} + +.ext-strict .ext-ie8 input.x-tree-node-cb + a{ + vertical-align: bottom; +} + +.ext-opera input.x-tree-node-cb { + height: 14px; + vertical-align: middle; +} + +.x-tree-noicon .x-tree-node-icon{ + width:0; height:0; +} + +/* No line styles */ +.x-tree-no-lines .x-tree-elbow{ + background-color:transparent; +} + +.x-tree-no-lines .x-tree-elbow-end{ + background-color:transparent; +} + +.x-tree-no-lines .x-tree-elbow-line{ + background-color:transparent; +} + +/* Arrows */ +.x-tree-arrows .x-tree-elbow{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent no-repeat 0 0; +} + +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent no-repeat -16px 0; +} + +.x-tree-arrows .x-tree-elbow-end{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent no-repeat 0 0; +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent no-repeat -16px 0; +} + +.x-tree-arrows .x-tree-elbow-line{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} + +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} + +.x-tree-node{ + white-space: nowrap; +} + +.x-tree-node-el { + line-height:18px; + cursor:pointer; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + text-decoration:none; + -khtml-user-select:none; + -moz-user-select:none; + -webkit-user-select:ignore; + -kthml-user-focus:normal; + -moz-user-focus:normal; + -moz-outline: 0 none; + outline:0 none; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + text-decoration:none; + padding:1px 3px 1px 2px; +} + +.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ + -moz-opacity: 0.5; + opacity:.5; + filter: alpha(opacity=50); +} + +.x-tree-node .x-tree-node-inline-icon{ + background-color:transparent; +} + +.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ + text-decoration:none; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom:1px dotted; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top:1px dotted; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ + border-bottom:0 none; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ + border-top:0 none; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom:2px solid; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top:2px solid; +} + +.x-tree-node .x-tree-drag-append a span{ + border:1px dotted; +} + +.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ + display:none !important; +} + +/* Fix for ie rootVisible:false issue */ +.x-tree-root-ct { + zoom:1; +} +.x-date-picker { + border: 1px solid; + border-top:0 none; + position:relative; +} + +.x-date-picker a { + -moz-outline:0 none; + outline:0 none; +} + +.x-date-inner, .x-date-inner td, .x-date-inner th{ + border-collapse:separate; +} + +.x-date-middle,.x-date-left,.x-date-right { + background: repeat-x 0 -83px; + overflow:hidden; +} + +.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, +.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, +.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ + background:transparent !important; + vertical-align:middle; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background:transparent no-repeat right 0; +} + +.x-date-right, .x-date-left { + width:18px; +} + +.x-date-right{ + text-align:right; +} + +.x-date-middle { + padding-top:2px; + padding-bottom:2px; + width:130px; /* FF3 */ +} + +.x-date-right a, .x-date-left a{ + display:block; + width:16px; + height:16px; + background-position: center; + background-repeat: no-repeat; + cursor:pointer; + -moz-opacity: 0.6; + opacity:.6; + filter: alpha(opacity=60); +} + +.x-date-right a:hover, .x-date-left a:hover{ + -moz-opacity: 1; + opacity:1; + filter: alpha(opacity=100); +} + +.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ + -moz-opacity: 0.6; + opacity:.6; + filter: alpha(opacity=60); +} + +.x-date-right a { + margin-right:2px; + text-decoration:none !important; +} + +.x-date-left a{ + margin-left:2px; + text-decoration:none !important; +} + +table.x-date-inner { + width: 100%; + table-layout:fixed; +} + +.ext-webkit table.x-date-inner{ + /* Fix for webkit browsers */ + width: 175px; +} + + +.x-date-inner th { + width:25px; +} + +.x-date-inner th { + background: repeat-x left top; + text-align:right !important; + border-bottom: 1px solid; + cursor:default; + padding:0; + border-collapse:separate; +} + +.x-date-inner th span { + display:block; + padding:2px; + padding-right:7px; +} + +.x-date-inner td { + border: 1px solid; + text-align:right; + padding:0; +} + +.x-date-inner a { + padding:2px 5px; + display:block; + text-decoration:none; + text-align:right; + zoom:1; +} + +.x-date-inner .x-date-active{ + cursor:pointer; + color:black; +} + +.x-date-inner .x-date-selected a{ + background: repeat-x left top; + border:1px solid; + padding:1px 4px; +} + +.x-date-inner .x-date-today a{ + border: 1px solid; + padding:1px 4px; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + text-decoration:none !important; +} + +.x-date-bottom { + padding:4px; + border-top: 1px solid; + background: repeat-x left top; +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + text-decoration:none !important; +} + +.x-item-disabled .x-date-inner a:hover{ + background: none; +} + +.x-date-inner .x-date-disabled a { + cursor:default; +} + +.x-date-menu .x-menu-item { + padding:1px 24px 1px 4px; + white-space: nowrap; +} + +.x-date-menu .x-menu-item .x-menu-item-icon { + width:10px; + height:10px; + margin-right:5px; + background-position:center -4px !important; +} + +.x-date-mp { + position:absolute; + left:0; + top:0; + display:none; +} + +.x-date-mp td { + padding:2px; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { + border: 0 none; + text-align:center; + vertical-align: middle; + width:25%; +} + +.x-date-mp-ok { + margin-right:3px; +} + +.x-date-mp-btns button { + text-decoration:none; + text-align:center; + text-decoration:none !important; + border:1px solid; + padding:1px 3px 1px; + cursor:pointer; +} + +.x-date-mp-btns { + background: repeat-x left top; +} + +.x-date-mp-btns td { + border-top: 1px solid; + text-align:center; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + display:block; + padding:2px 4px; + text-decoration:none; + text-align:center; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + text-decoration:none; + cursor:pointer; +} + +td.x-date-mp-sel a { + padding:1px 3px; + background: repeat-x left top; + border:1px solid; +} + +.x-date-mp-ybtn a { + overflow:hidden; + width:15px; + height:15px; + cursor:pointer; + background:transparent no-repeat; + display:block; + margin:0 auto; +} + +.x-date-mp-ybtn a.x-date-mp-next { + background-position:0 -120px; +} + +.x-date-mp-ybtn a.x-date-mp-next:hover { + background-position:-15px -120px; +} + +.x-date-mp-ybtn a.x-date-mp-prev { + background-position:0 -105px; +} + +.x-date-mp-ybtn a.x-date-mp-prev:hover { + background-position:-15px -105px; +} + +.x-date-mp-ybtn { + text-align:center; +} + +td.x-date-mp-sep { + border-right:1px solid; +}.x-tip{ + position: absolute; + top: 0; + left:0; + visibility: hidden; + z-index: 20002; + border:0 none; +} + +.x-tip .x-tip-close{ + height: 15px; + float:right; + width: 15px; + margin:0 0 2px 2px; + cursor:pointer; + display:none; +} + +.x-tip .x-tip-tc { + background: transparent no-repeat 0 -62px; + padding-top:3px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-tr { + background: transparent no-repeat right 0; + padding-right:6px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-bc { + background: transparent no-repeat 0 -121px; + height:3px; + overflow:hidden; +} + +.x-tip .x-tip-bl { + background: transparent no-repeat 0 -59px; + padding-left:6px; + zoom:1; +} + +.x-tip .x-tip-br { + background: transparent no-repeat right -59px; + padding-right:6px; + zoom:1; +} + +.x-tip .x-tip-mc { + border:0 none; +} + +.x-tip .x-tip-ml { + background: no-repeat 0 -124px; + padding-left:6px; + zoom:1; +} + +.x-tip .x-tip-mr { + background: transparent no-repeat right -124px; + padding-right:6px; + zoom:1; +} + +.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { + font-size:0; + line-height:0; +} + +.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ + line-height: 1px; +} + +.x-tip .x-tip-header-text { + padding:0; + margin:0 0 2px 0; +} + +.x-tip .x-tip-body { + margin:0 !important; + line-height:14px; + padding:0; +} + +.x-tip .x-tip-body .loading-indicator { + margin:0; +} + +.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { + cursor:move; +} + +.x-form-invalid-tip .x-tip-tc { + background: repeat-x 0 -12px; + padding-top:6px; +} + +.x-form-invalid-tip .x-tip-bc { + background: repeat-x 0 -18px; + height:6px; +} + +.x-form-invalid-tip .x-tip-bl { + background: no-repeat 0 -6px; +} + +.x-form-invalid-tip .x-tip-br { + background: no-repeat right -6px; +} + +.x-form-invalid-tip .x-tip-body { + padding:2px; +} + +.x-form-invalid-tip .x-tip-body { + padding-left:24px; + background:transparent no-repeat 2px 2px; +} + +.x-tip-anchor { + position: absolute; + width: 9px; + height: 10px; + overflow:hidden; + background: transparent no-repeat 0 0; + zoom:1; +} +.x-tip-anchor-bottom { + background-position: -9px 0; +} +.x-tip-anchor-right { + background-position: -18px 0; + width: 10px; +} +.x-tip-anchor-left { + background-position: -28px 0; + width: 10px; +}.x-menu { + z-index: 15000; + zoom: 1; + background: repeat-y; +} + +.x-menu-floating{ + border: 1px solid; +} + +.x-menu a { + text-decoration: none !important; +} + +.ext-ie .x-menu { + zoom:1; + overflow:hidden; +} + +.x-menu-list{ + padding: 2px; + background-color:transparent; + border:0 none; + overflow:hidden; + overflow-y: hidden; +} + +.ext-strict .ext-ie .x-menu-list{ + position: relative; +} + +.x-menu li{ + line-height:100%; +} + +.x-menu li.x-menu-sep-li{ + font-size:1px; + line-height:1px; +} + +.x-menu-list-item{ + white-space: nowrap; + display:block; + padding:1px; +} + +.x-menu-item{ + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-menu-item-arrow{ + background:transparent no-repeat right; +} + +.x-menu-sep { + display:block; + font-size:1px; + line-height:1px; + margin: 2px 3px; + border-bottom:1px solid; + overflow:hidden; +} + +.x-menu-focus { + position:absolute; + left:-1px; + top:-1px; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; + overflow:hidden; + display:block; +} + +a.x-menu-item { + cursor: pointer; + display: block; + line-height: 16px; + outline-color: -moz-use-text-color; + outline-style: none; + outline-width: 0; + padding: 3px 21px 3px 27px; + position: relative; + text-decoration: none; + white-space: nowrap; +} + +.x-menu-item-active { + background-repeat: repeat-x; + background-position: left bottom; + border-style:solid; + border-width: 1px 0; + margin:0 1px; + padding: 0; +} + +.x-menu-item-active a.x-menu-item { + border-style:solid; + border-width:0 1px; + margin:0 -1px; +} + +.x-menu-item-icon { + border: 0 none; + height: 16px; + padding: 0; + vertical-align: top; + width: 16px; + position: absolute; + left: 3px; + top: 3px; + margin: 0; + background-position:center; +} + +.ext-ie .x-menu-item-icon { + left: -24px; +} +.ext-strict .x-menu-item-icon { + left: 3px; +} + +.ext-ie6 .x-menu-item-icon { + left: -24px; +} + +.ext-ie .x-menu-item-icon { + vertical-align: middle; +} + +.x-menu-check-item .x-menu-item-icon{ + background: transparent no-repeat center; +} + +.x-menu-group-item .x-menu-item-icon{ + background-color: transparent; +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background: transparent no-repeat center; +} + +.x-date-menu .x-menu-list{ + padding: 0; +} + +.x-menu-date-item{ + padding:0; +} + +.x-menu .x-color-palette, .x-menu .x-date-picker{ + margin-left: 26px; + margin-right:4px; +} + +.x-menu .x-date-picker{ + border:1px solid; + margin-top:2px; + margin-bottom:2px; +} + +.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ + margin: 0; + border: 0 none; +} + +.x-date-menu { + padding:0 !important; +} + +/* + * fixes separator visibility problem in IE 6 + */ +.ext-strict .ext-ie6 .x-menu-sep-li { + padding: 3px 4px; +} +.ext-strict .ext-ie6 .x-menu-sep { + margin: 0; + height: 1px; +} + +/* + * Fixes an issue with "fat" separators in webkit + */ +.ext-webkit .x-menu-sep{ + height: 1px; +} + +/* + * Ugly mess to remove the white border under the picker + */ +.ext-ie .x-date-menu{ + height: 199px; +} + +.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ + height: 197px; +} + +.ext-strict .ext-ie7 .x-date-menu{ + height: 195px; +} + +.ext-strict .ext-ie8 .x-date-menu{ + height: auto; +} + +.x-cycle-menu .x-menu-item-checked { + border:1px dotted !important; + padding:0; +} + +.x-menu .x-menu-scroller { + width: 100%; + background-repeat:no-repeat; + background-position:center; + height:8px; + line-height: 8px; + cursor:pointer; + margin: 0; + padding: 0; +} + +.x-menu .x-menu-scroller-active{ + height: 6px; + line-height: 6px; +} + +.x-menu-list-item-indent{ + padding-left: 27px; +}/* + Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: +
      +
      +
      +

      YOUR TITLE HERE (optional)

      +
      YOUR CONTENT HERE
      +
      +
      +
      + */ + +.x-box-tl { + background: transparent no-repeat 0 0; + zoom:1; +} + +.x-box-tc { + height: 8px; + background: transparent repeat-x 0 0; + overflow: hidden; +} + +.x-box-tr { + background: transparent no-repeat right -8px; +} + +.x-box-ml { + background: transparent repeat-y 0; + padding-left: 4px; + overflow: hidden; + zoom:1; +} + +.x-box-mc { + background: repeat-x 0 -16px; + padding: 4px 10px; +} + +.x-box-mc h3 { + margin: 0 0 4px 0; + zoom:1; +} + +.x-box-mr { + background: transparent repeat-y right; + padding-right: 4px; + overflow: hidden; +} + +.x-box-bl { + background: transparent no-repeat 0 -16px; + zoom:1; +} + +.x-box-bc { + background: transparent repeat-x 0 -8px; + height: 8px; + overflow: hidden; +} + +.x-box-br { + background: transparent no-repeat right -24px; +} + +.x-box-tl, .x-box-bl { + padding-left: 8px; + overflow: hidden; +} + +.x-box-tr, .x-box-br { + padding-right: 8px; + overflow: hidden; +}.x-combo-list { + border:1px solid; + zoom:1; + overflow:hidden; +} + +.x-combo-list-inner { + overflow:auto; + position:relative; /* for calculating scroll offsets */ + zoom:1; + overflow-x:hidden; +} + +.x-combo-list-hd { + border-bottom:1px solid; + padding:3px; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom:1px solid; +} + +.x-combo-list-item { + padding:2px; + border:1px solid; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} + +.x-combo-list .x-combo-selected{ + border:1px dotted !important; + cursor:pointer; +} + +.x-combo-list .x-toolbar { + border-top:1px solid; + border-bottom:0 none; +}.x-panel { + border-style: solid; + border-width:0; +} + +.x-panel-header { + overflow:hidden; + zoom:1; + padding:5px 3px 4px 5px; + border:1px solid; + line-height: 15px; + background: transparent repeat-x 0 -1px; +} + +.x-panel-body { + border:1px solid; + border-top:0 none; + overflow:hidden; + position: relative; /* added for item scroll positioning */ +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border:1px solid; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top:1px solid; + border-bottom: 0 none; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top:1px solid; +} + +.x-panel-header { + overflow:hidden; + zoom:1; +} + +.x-panel-tl .x-panel-header { + padding:5px 0 4px 0; + border:0 none; + background:transparent no-repeat; +} + +.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { + padding-left:20px !important; + background-repeat:no-repeat; + background-position:0 4px; + zoom:1; +} + +.x-panel-inline-icon { + width:16px; + height:16px; + background-repeat:no-repeat; + background-position:0 0; + vertical-align:middle; + margin-right:4px; + margin-top:-1px; + margin-bottom:-1px; +} + +.x-panel-tc { + background: transparent repeat-x 0 0; + overflow:hidden; +} + +/* fix ie7 strict mode bug */ +.ext-strict .ext-ie7 .x-panel-tc { + overflow: visible; +} + +.x-panel-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + zoom:1; + border-bottom:1px solid; +} + +.x-panel-tr { + background: transparent no-repeat right 0; + zoom:1; + padding-right:6px; +} + +.x-panel-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-panel-bc .x-panel-footer { + zoom:1; +} + +.x-panel-bl { + background: transparent no-repeat 0 bottom; + padding-left:6px; + zoom:1; +} + +.x-panel-br { + background: transparent no-repeat right bottom; + padding-right:6px; + zoom:1; +} + +.x-panel-mc { + border:0 none; + padding:0; + margin:0; + padding-top:6px; +} + +.x-panel-mc .x-panel-body { + background-color:transparent; + border: 0 none; +} + +.x-panel-ml { + background: repeat-y 0 0; + padding-left:6px; + zoom:1; +} + +.x-panel-mr { + background: transparent repeat-y right 0; + padding-right:6px; + zoom:1; +} + +.x-panel-bc .x-panel-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { + height:6px; + font-size:0; + line-height:0; +} + +.x-panel-bwrap { + overflow:hidden; + zoom:1; + left:0; + top:0; +} +.x-panel-body { + overflow:hidden; + zoom:1; +} + +.x-panel-collapsed .x-resizable-handle{ + display:none; +} + +.ext-gecko .x-panel-animated div { + overflow:hidden !important; +} + +/* Plain */ +.x-plain-body { + overflow:hidden; +} + +.x-plain-bbar .x-toolbar { + overflow:hidden; + padding:2px; +} + +.x-plain-tbar .x-toolbar { + overflow:hidden; + padding:2px; +} + +.x-plain-bwrap { + overflow:hidden; + zoom:1; +} + +.x-plain { + overflow:hidden; +} + +/* Tools */ +.x-tool { + overflow:hidden; + width:15px; + height:15px; + float:right; + cursor:pointer; + background:transparent no-repeat; + margin-left:2px; +} + +/* expand / collapse tools */ +.x-tool-toggle { + background-position:0 -60px; +} + +.x-tool-toggle-over { + background-position:-15px -60px; +} + +.x-panel-collapsed .x-tool-toggle { + background-position:0 -75px; +} + +.x-panel-collapsed .x-tool-toggle-over { + background-position:-15px -75px; +} + + +.x-tool-close { + background-position:0 -0; +} + +.x-tool-close-over { + background-position:-15px 0; +} + +.x-tool-minimize { + background-position:0 -15px; +} + +.x-tool-minimize-over { + background-position:-15px -15px; +} + +.x-tool-maximize { + background-position:0 -30px; +} + +.x-tool-maximize-over { + background-position:-15px -30px; +} + +.x-tool-restore { + background-position:0 -45px; +} + +.x-tool-restore-over { + background-position:-15px -45px; +} + +.x-tool-gear { + background-position:0 -90px; +} + +.x-tool-gear-over { + background-position:-15px -90px; +} + +.x-tool-prev { + background-position:0 -105px; +} + +.x-tool-prev-over { + background-position:-15px -105px; +} + +.x-tool-next { + background-position:0 -120px; +} + +.x-tool-next-over { + background-position:-15px -120px; +} + +.x-tool-pin { + background-position:0 -135px; +} + +.x-tool-pin-over { + background-position:-15px -135px; +} + +.x-tool-unpin { + background-position:0 -150px; +} + +.x-tool-unpin-over { + background-position:-15px -150px; +} + +.x-tool-right { + background-position:0 -165px; +} + +.x-tool-right-over { + background-position:-15px -165px; +} + +.x-tool-left { + background-position:0 -180px; +} + +.x-tool-left-over { + background-position:-15px -180px; +} + +.x-tool-down { + background-position:0 -195px; +} + +.x-tool-down-over { + background-position:-15px -195px; +} + +.x-tool-up { + background-position:0 -210px; +} + +.x-tool-up-over { + background-position:-15px -210px; +} + +.x-tool-refresh { + background-position:0 -225px; +} + +.x-tool-refresh-over { + background-position:-15px -225px; +} + +.x-tool-plus { + background-position:0 -240px; +} + +.x-tool-plus-over { + background-position:-15px -240px; +} + +.x-tool-minus { + background-position:0 -255px; +} + +.x-tool-minus-over { + background-position:-15px -255px; +} + +.x-tool-search { + background-position:0 -270px; +} + +.x-tool-search-over { + background-position:-15px -270px; +} + +.x-tool-save { + background-position:0 -285px; +} + +.x-tool-save-over { + background-position:-15px -285px; +} + +.x-tool-help { + background-position:0 -300px; +} + +.x-tool-help-over { + background-position:-15px -300px; +} + +.x-tool-print { + background-position:0 -315px; +} + +.x-tool-print-over { + background-position:-15px -315px; +} + +.x-tool-expand { + background-position:0 -330px; +} + +.x-tool-expand-over { + background-position:-15px -330px; +} + +.x-tool-collapse { + background-position:0 -345px; +} + +.x-tool-collapse-over { + background-position:-15px -345px; +} + +.x-tool-resize { + background-position:0 -360px; +} + +.x-tool-resize-over { + background-position:-15px -360px; +} + +.x-tool-move { + background-position:0 -375px; +} + +.x-tool-move-over { + background-position:-15px -375px; +} + +/* Ghosting */ +.x-panel-ghost { + z-index:12000; + overflow:hidden; + position:absolute; + left:0;top:0; + opacity:.65; + -moz-opacity:.65; + filter:alpha(opacity=65); +} + +.x-panel-ghost ul { + margin:0; + padding:0; + overflow:hidden; + font-size:0; + line-height:0; + border:1px solid; + border-top:0 none; + display:block; +} + +.x-panel-ghost * { + cursor:move !important; +} + +.x-panel-dd-spacer { + border:2px dashed; +} + +/* Buttons */ +.x-panel-btns { + padding:5px; + overflow:hidden; +} + +.x-panel-btns td.x-toolbar-cell{ + padding:3px; +} + +.x-panel-btns .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} + +.x-panel-btns .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} + +.x-panel-btns .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-panel-btns .x-btn-over .x-btn-left{ + background-position:0 -63px; +} + +.x-panel-btns .x-btn-over .x-btn-right{ + background-position:0 -84px; +} + +.x-panel-btns .x-btn-over .x-btn-center{ + background-position:0 -105px; +} + +.x-panel-btns .x-btn-click .x-btn-center{ + background-position:0 -126px; +} + +.x-panel-btns .x-btn-click .x-btn-right{ + background-position:0 -84px; +} + +.x-panel-btns .x-btn-click .x-btn-left{ + background-position:0 -63px; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + white-space: nowrap; +} +/** + * W3C Suggested Default style sheet for HTML 4 + * http://www.w3.org/TR/CSS21/sample.html + * + * Resets for Ext.Panel @cfg normal: true + */ +.x-panel-reset .x-panel-body html, +.x-panel-reset .x-panel-body address, +.x-panel-reset .x-panel-body blockquote, +.x-panel-reset .x-panel-body body, +.x-panel-reset .x-panel-body dd, +.x-panel-reset .x-panel-body div, +.x-panel-reset .x-panel-body dl, +.x-panel-reset .x-panel-body dt, +.x-panel-reset .x-panel-body fieldset, +.x-panel-reset .x-panel-body form, +.x-panel-reset .x-panel-body frame, frameset, +.x-panel-reset .x-panel-body h1, +.x-panel-reset .x-panel-body h2, +.x-panel-reset .x-panel-body h3, +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body h5, +.x-panel-reset .x-panel-body h6, +.x-panel-reset .x-panel-body noframes, +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body p, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body center, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body hr, +.x-panel-reset .x-panel-body menu, +.x-panel-reset .x-panel-body pre { display: block } +.x-panel-reset .x-panel-body li { display: list-item } +.x-panel-reset .x-panel-body head { display: none } +.x-panel-reset .x-panel-body table { display: table } +.x-panel-reset .x-panel-body tr { display: table-row } +.x-panel-reset .x-panel-body thead { display: table-header-group } +.x-panel-reset .x-panel-body tbody { display: table-row-group } +.x-panel-reset .x-panel-body tfoot { display: table-footer-group } +.x-panel-reset .x-panel-body col { display: table-column } +.x-panel-reset .x-panel-body colgroup { display: table-column-group } +.x-panel-reset .x-panel-body td, +.x-panel-reset .x-panel-body th { display: table-cell } +.x-panel-reset .x-panel-body caption { display: table-caption } +.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } +.x-panel-reset .x-panel-body caption { text-align: center } +.x-panel-reset .x-panel-body body { margin: 8px } +.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } +.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } +.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body p, +.x-panel-reset .x-panel-body blockquote, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body fieldset, +.x-panel-reset .x-panel-body form, +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body dl, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } +.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } +.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } +.x-panel-reset .x-panel-body h1, +.x-panel-reset .x-panel-body h2, +.x-panel-reset .x-panel-body h3, +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body h5, +.x-panel-reset .x-panel-body h6, +.x-panel-reset .x-panel-body b, +.x-panel-reset .x-panel-body strong { font-weight: bolder } +.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } +.x-panel-reset .x-panel-body i, +.x-panel-reset .x-panel-body cite, +.x-panel-reset .x-panel-body em, +.x-panel-reset .x-panel-body var, +.x-panel-reset .x-panel-body address { font-style: italic } +.x-panel-reset .x-panel-body pre, +.x-panel-reset .x-panel-body tt, +.x-panel-reset .x-panel-body code, +.x-panel-reset .x-panel-body kbd, +.x-panel-reset .x-panel-body samp { font-family: monospace } +.x-panel-reset .x-panel-body pre { white-space: pre } +.x-panel-reset .x-panel-body button, +.x-panel-reset .x-panel-body textarea, +.x-panel-reset .x-panel-body input, +.x-panel-reset .x-panel-body select { display: inline-block } +.x-panel-reset .x-panel-body big { font-size: 1.17em } +.x-panel-reset .x-panel-body small, +.x-panel-reset .x-panel-body sub, +.x-panel-reset .x-panel-body sup { font-size: .83em } +.x-panel-reset .x-panel-body sub { vertical-align: sub } +.x-panel-reset .x-panel-body sup { vertical-align: super } +.x-panel-reset .x-panel-body table { border-spacing: 2px; } +.x-panel-reset .x-panel-body thead, +.x-panel-reset .x-panel-body tbody, +.x-panel-reset .x-panel-body tfoot { vertical-align: middle } +.x-panel-reset .x-panel-body td, +.x-panel-reset .x-panel-body th { vertical-align: inherit } +.x-panel-reset .x-panel-body s, +.x-panel-reset .x-panel-body strike, +.x-panel-reset .x-panel-body del { text-decoration: line-through } +.x-panel-reset .x-panel-body hr { border: 1px inset } +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body menu, +.x-panel-reset .x-panel-body dd { margin-left: 40px } +.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} +.x-panel-reset .x-panel-body ol { list-style-type: decimal } +.x-panel-reset .x-panel-body ol ul, +.x-panel-reset .x-panel-body ul ol, +.x-panel-reset .x-panel-body ul ul, +.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } +.x-panel-reset .x-panel-body u, +.x-panel-reset .x-panel-body ins { text-decoration: underline } +.x-panel-reset .x-panel-body br:before { content: "\A" } +.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } +.x-panel-reset .x-panel-body center { text-align: center } +.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } +.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } + +/* Begin bidirectionality settings (do not change) */ +.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } +.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } +.x-window { + zoom:1; +} + +.x-window .x-window-handle { + opacity:0; + -moz-opacity:0; + filter:alpha(opacity=0); +} + +.x-window-proxy { + border:1px solid; + z-index:12000; + overflow:hidden; + position:absolute; + left:0;top:0; + display:none; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); +} + +.x-window-header { + overflow:hidden; + zoom:1; +} + +.x-window-bwrap { + z-index:1; + position:relative; + zoom:1; + left:0;top:0; +} + +.x-window-tl .x-window-header { + padding:5px 0 4px 0; +} + +.x-window-header-text { + cursor:pointer; +} + +.x-window-tc { + background: transparent repeat-x 0 0; + overflow:hidden; + zoom:1; +} + +.x-window-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + zoom:1; + z-index:1; + position:relative; +} + +.x-window-tr { + background: transparent no-repeat right 0; + padding-right:6px; +} + +.x-window-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-window-bc .x-window-footer { + padding-bottom:6px; + zoom:1; + font-size:0; + line-height:0; +} + +.x-window-bl { + background: transparent no-repeat 0 bottom; + padding-left:6px; + zoom:1; +} + +.x-window-br { + background: transparent no-repeat right bottom; + padding-right:6px; + zoom:1; +} + +.x-window-mc { + border:1px solid; + padding:0; + margin:0; +} + +.x-window-ml { + background: transparent repeat-y 0 0; + padding-left:6px; + zoom:1; +} + +.x-window-mr { + background: transparent repeat-y right 0; + padding-right:6px; + zoom:1; +} + +.x-window-body { + overflow:hidden; +} + +.x-window-bwrap { + overflow:hidden; +} + +.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, + .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, + .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { + padding:0; +} + +.x-window-maximized .x-window-footer { + padding-bottom:0; +} + +.x-window-maximized .x-window-tc { + padding-left:3px; + padding-right:3px; +} + +.x-window-maximized .x-window-mc { + border-left:0 none; + border-right:0 none; +} + +.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { + border-left:0 none; + border-right: 0 none; +} + +.x-window-bbar .x-toolbar { + border-top:1px solid; + border-bottom:0 none; +} + +.x-window-draggable, .x-window-draggable .x-window-header-text { + cursor:move; +} + +.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { + cursor:default; +} + +.x-window-body { + background-color:transparent; +} + +.x-panel-ghost .x-window-tl { + border-bottom:1px solid; +} + +.x-panel-collapsed .x-window-tl { + border-bottom:1px solid; +} + +.x-window-maximized-ct { + overflow:hidden; +} + +.x-window-maximized .x-window-handle { + display:none; +} + +.x-window-sizing-ghost ul { + border:0 none !important; +} + +.x-dlg-focus{ + -moz-outline:0 none; + outline:0 none; + width:0; + height:0; + overflow:hidden; + position:absolute; + top:0; + left:0; +} + +.ext-webkit .x-dlg-focus{ + width: 1px; + height: 1px; +} + +.x-dlg-mask{ + z-index:10000; + display:none; + position:absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity:.50; + filter: alpha(opacity=50); +} + +body.ext-ie6.x-body-masked select { + visibility:hidden; +} + +body.ext-ie6.x-body-masked .x-window select { + visibility:visible; +} + +.x-window-plain .x-window-mc { + border: 1px solid; +} + +.x-window-plain .x-window-body { + border: 1px solid; + background:transparent !important; +}.x-html-editor-wrap { + border:1px solid; +} + +.x-html-editor-tb .x-btn-text { + background:transparent no-repeat; +} + +.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { + background-position:0 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { + background-position:-16px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { + background-position:-32px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { + background-position:-160px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { + background-position:-176px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { + background-position:-112px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { + background-position:-128px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { + background-position:-144px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { + background-position:-80px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { + background-position:-96px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { + background-position:-48px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { + background-position:-64px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { + background-position:-192px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { + background-position:-208px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { + padding:5px; + padding-bottom:1px; +} + +.x-html-editor-tb .x-toolbar { + position:static !important; +}.x-panel-noborder .x-panel-body-noborder { + border-width:0; +} + +.x-panel-noborder .x-panel-header-noborder { + border-width:0 0 1px; + border-style:solid; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-width:0 0 1px; + border-style:solid; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-width:1px 0 0 0; + border-style:solid; +} + +.x-window-noborder .x-window-mc { + border-width:0; +} + +.x-window-plain .x-window-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-header-noborder { + border-width: 0 0 1px 0; +} + +.x-tab-panel-noborder .x-tab-panel-footer-noborder { + border-width: 1px 0 0 0; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-width: 1px 0 0 0; + border-style:solid; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-width:0 0 1px; + border-style:solid; +}.x-border-layout-ct { + position: relative; +} + +.x-border-panel { + position:absolute; + left:0; + top:0; +} + +.x-tool-collapse-south { + background-position:0 -195px; +} + +.x-tool-collapse-south-over { + background-position:-15px -195px; +} + +.x-tool-collapse-north { + background-position:0 -210px; +} + +.x-tool-collapse-north-over { + background-position:-15px -210px; +} + +.x-tool-collapse-west { + background-position:0 -180px; +} + +.x-tool-collapse-west-over { + background-position:-15px -180px; +} + +.x-tool-collapse-east { + background-position:0 -165px; +} + +.x-tool-collapse-east-over { + background-position:-15px -165px; +} + +.x-tool-expand-south { + background-position:0 -210px; +} + +.x-tool-expand-south-over { + background-position:-15px -210px; +} + +.x-tool-expand-north { + background-position:0 -195px; +} +.x-tool-expand-north-over { + background-position:-15px -195px; +} + +.x-tool-expand-west { + background-position:0 -165px; +} + +.x-tool-expand-west-over { + background-position:-15px -165px; +} + +.x-tool-expand-east { + background-position:0 -180px; +} + +.x-tool-expand-east-over { + background-position:-15px -180px; +} + +.x-tool-expand-north, .x-tool-expand-south { + float:right; + margin:3px; +} + +.x-tool-expand-east, .x-tool-expand-west { + float:none; + margin:3px 2px; +} + +.x-accordion-hd .x-tool-toggle { + background-position:0 -255px; +} + +.x-accordion-hd .x-tool-toggle-over { + background-position:-15px -255px; +} + +.x-panel-collapsed .x-accordion-hd .x-tool-toggle { + background-position:0 -240px; +} + +.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { + background-position:-15px -240px; +} + +.x-accordion-hd { + padding-top:4px; + padding-bottom:3px; + border-top:0 none; + background: transparent repeat-x 0 -9px; +} + +.x-layout-collapsed{ + position:absolute; + left:-10000px; + top:-10000px; + visibility:hidden; + width:20px; + height:20px; + overflow:hidden; + border:1px solid; + z-index:20; +} + +.ext-border-box .x-layout-collapsed{ + width:22px; + height:22px; +} + +.x-layout-collapsed-over{ + cursor:pointer; +} + +.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ + position:absolute; + top:0; + left:0; + width:20px; + height:20px; +} + + +.x-layout-split{ + position:absolute; + height:5px; + width:5px; + line-height:1px; + font-size:1px; + z-index:3; + background-color:transparent; +} + +/* IE6 strict won't drag w/out a color */ +.ext-strict .ext-ie6 .x-layout-split{ + background-color: #fff !important; + filter: alpha(opacity=1); +} + +.x-layout-split-h{ + background-image:url(../images/default/s.gif); + background-position: left; +} + +.x-layout-split-v{ + background-image:url(../images/default/s.gif); + background-position: top; +} + +.x-column-layout-ct { + overflow:hidden; + zoom:1; +} + +.x-column { + float:left; + padding:0; + margin:0; + overflow:hidden; + zoom:1; +} + +.x-column-inner { + overflow:hidden; + zoom:1; +} + +/* mini mode */ +.x-layout-mini { + position:absolute; + top:0; + left:0; + display:block; + width:5px; + height:35px; + cursor:pointer; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); +} + +.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ + opacity:1; + -moz-opacity:1; + filter:none; +} + +.x-layout-split-west .x-layout-mini { + top:48%; +} + +.x-layout-split-east .x-layout-mini { + top:48%; +} + +.x-layout-split-north .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-split-south .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-cmini-west .x-layout-mini { + top:48%; +} + +.x-layout-cmini-east .x-layout-mini { + top:48%; +} + +.x-layout-cmini-north .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-cmini-south .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-cmini-west, .x-layout-cmini-east { + border:0 none; + width:5px !important; + padding:0; + background-color:transparent; +} + +.x-layout-cmini-north, .x-layout-cmini-south { + border:0 none; + height:5px !important; + padding:0; + background-color:transparent; +} + +.x-viewport, .x-viewport body { + margin: 0; + padding: 0; + border: 0 none; + overflow: hidden; + height: 100%; +} + +.x-abs-layout-item { + position:absolute; + left:0; + top:0; +} + +.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { + margin:0; +} + +.x-box-layout-ct { + overflow:hidden; + zoom:1; +} + +.x-box-inner { + overflow:hidden; + zoom:1; + position:relative; + left:0; + top:0; +} + +.x-box-item { + position:absolute; + left:0; + top:0; +}.x-progress-wrap { + border:1px solid; + overflow:hidden; +} + +.x-progress-inner { + height:18px; + background:repeat-x; + position:relative; +} + +.x-progress-bar { + height:18px; + float:left; + width:0; + background: repeat-x left center; + border-top:1px solid; + border-bottom:1px solid; + border-right:1px solid; +} + +.x-progress-text { + padding:1px 5px; + overflow:hidden; + position:absolute; + left:0; + text-align:center; +} + +.x-progress-text-back { + line-height:16px; +} + +.ext-ie .x-progress-text-back { + line-height:15px; +} + +.ext-strict .ext-ie7 .x-progress-text-back{ + width: 100%; +} +.x-list-header{ + background: repeat-x 0 bottom; + cursor:default; + zoom:1; + height:22px; +} + +.x-list-header-inner div { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; +} + +.x-list-header-inner div em { + display:block; + border-left:1px solid; + padding:4px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + line-height:14px; +} + +.x-list-body { + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + zoom:1; + float: left; + width: 100%; +} + +.x-list-body dl { + zoom:1; +} + +.x-list-body dt { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + cursor:pointer; + zoom:1; +} + +.x-list-body dt em { + display:block; + padding:3px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; +} + +.x-list-resizer { + border-left:1px solid; + border-right:1px solid; + position:absolute; + left:0; + top:0; +} + +.x-list-header-inner em.sort-asc { + background: transparent no-repeat center 0; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + +.x-list-header-inner em.sort-desc { + background: transparent no-repeat center -23px; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + +/* Shared styles */ +.x-slider { + zoom:1; +} + +.x-slider-inner { + position:relative; + left:0; + top:0; + overflow:visible; + zoom:1; +} + +.x-slider-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; + display:block; + overflow:hidden; +} + +/* Horizontal styles */ +.x-slider-horz { + padding-left:7px; + background:transparent no-repeat 0 -22px; +} + +.x-slider-horz .x-slider-end { + padding-right:7px; + zoom:1; + background:transparent no-repeat right -44px; +} + +.x-slider-horz .x-slider-inner { + background:transparent repeat-x 0 0; + height:22px; +} + +.x-slider-horz .x-slider-thumb { + width:14px; + height:15px; + position:absolute; + left:0; + top:3px; + background:transparent no-repeat 0 0; +} + +.x-slider-horz .x-slider-thumb-over { + background-position: -14px -15px; +} + +.x-slider-horz .x-slider-thumb-drag { + background-position: -28px -30px; +} + +/* Vertical styles */ +.x-slider-vert { + padding-top:7px; + background:transparent no-repeat -44px 0; + width:22px; +} + +.x-slider-vert .x-slider-end { + padding-bottom:7px; + zoom:1; + background:transparent no-repeat -22px bottom; +} + +.x-slider-vert .x-slider-inner { + background:transparent repeat-y 0 0; +} + +.x-slider-vert .x-slider-thumb { + width:15px; + height:14px; + position:absolute; + left:3px; + bottom:0; + background:transparent no-repeat 0 0; +} + +.x-slider-vert .x-slider-thumb-over { + background-position: -15px -14px; +} + +.x-slider-vert .x-slider-thumb-drag { + background-position: -30px -28px; +}.x-window-dlg .x-window-body { + border:0 none !important; + padding:5px 10px; + overflow:hidden !important; +} + +.x-window-dlg .x-window-mc { + border:0 none !important; +} + +.x-window-dlg .ext-mb-input { + margin-top:4px; + width:95%; +} + +.x-window-dlg .ext-mb-textarea { + margin-top:4px; +} + +.x-window-dlg .x-progress-wrap { + margin-top:4px; +} + +.ext-ie .x-window-dlg .x-progress-wrap { + margin-top:6px; +} + +.x-window-dlg .x-msg-box-wait { + background:transparent no-repeat left; + display:block; + width:300px; + padding-left:18px; + line-height:18px; +} + +.x-window-dlg .ext-mb-icon { + float:left; + width:47px; + height:32px; +} + +.x-window-dlg .x-dlg-icon .ext-mb-content{ + zoom: 1; + margin-left: 47px; +} + +.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { + background:transparent no-repeat top left; +} + +.ext-gecko2 .ext-mb-fix-cursor { + overflow:auto; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/ext-all.css b/src/webui/static/extjs/resources/css/ext-all.css index 5f87f8fe..38dff3e0 100644 --- a/src/webui/static/extjs/resources/css/ext-all.css +++ b/src/webui/static/extjs/resources/css/ext-all.css @@ -1,925 +1,6993 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;} -img,body,html{border:0;} -address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;} -ol,ul{list-style:none;} -caption,th{text-align:left;} -h1,h2,h3,h4,h5,h6{font-size:100%;} -q:before,q:after{content:'';} +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} -.ext-el-mask{z-index:20000;position:absolute;top:0;left:0;-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);background-color:#CCC;width:100%;height:100%;zoom:1;} -.ext-el-mask-msg{z-index:20001;position:absolute;top:0;left:0;border:1px solid #6593cf;background:#c3daf9 url(../images/default/box/tb-blue.gif) repeat-x 0 -16px;padding:2px;} -.ext-el-mask-msg div{padding:5px 10px 5px 10px;background:#eee;border:1px solid #a3bad9;color:#222;font:normal 11px tahoma,arial,helvetica,sans-serif;cursor:wait;} -.ext-shim{position:absolute;visibility:hidden;left:0;top:0;overflow:hidden;} -.ext-ie .ext-shim{filter:alpha(opacity=0);} -.ext-ie6 .ext-shim{margin-left:5px;margin-top:3px;} -.x-mask-loading div{padding:5px 10px 5px 25px;background:#fbfbfb url( '../images/default/grid/loading.gif' ) no-repeat 5px 5px;line-height:16px;} -.x-hidden,.x-hide-offsets{position:absolute;left:-10000px;top:-10000px;visibility:hidden;} -.x-hide-display{display:none!important;} -.x-hide-visibility{visibility:hidden!important;} -.x-masked{overflow:hidden!important;} -.x-masked select,.x-masked object,.x-masked embed{visibility:hidden;} -.x-layer{visibility:hidden;} -.x-unselectable,.x-unselectable *{-moz-user-select:none;-khtml-user-select:none;} -.x-repaint{zoom:1;background-color:transparent;-moz-outline:none;} -.x-item-disabled{color:gray;cursor:default;opacity:.6;-moz-opacity:.6;filter:alpha(opacity=60);} -.x-item-disabled *{color:gray!important;cursor:default!important;} -.x-splitbar-proxy{position:absolute;visibility:hidden;z-index:20001;background:#aaa;zoom:1;line-height:1px;font-size:1px;overflow:hidden;} -.x-splitbar-h,.x-splitbar-proxy-h{cursor:e-resize;cursor:col-resize;} -.x-splitbar-v,.x-splitbar-proxy-v{cursor:s-resize;cursor:row-resize;} -.x-color-palette{width:150px;height:92px;cursor:pointer;} -.x-color-palette a{border:1px solid #fff;float:left;padding:2px;text-decoration:none;-moz-outline:0 none;outline:0 none;cursor:pointer;} -.x-color-palette a:hover,.x-color-palette a.x-color-palette-sel{border:1px solid #8BB8F3;background:#deecfd;} -.x-color-palette em{display:block;border:1px solid #ACA899;} -.x-color-palette em span{cursor:pointer;display:block;height:10px;line-height:10px;width:10px;} -.x-ie-shadow{display:none;position:absolute;overflow:hidden;left:0;top:0;background:#777;zoom:1;} -.x-shadow{display:none;position:absolute;overflow:hidden;left:0;top:0;} -.x-shadow *{overflow:hidden;} -.x-shadow *{padding:0;border:0;margin:0;clear:none;zoom:1;} -.x-shadow .xstc,.x-shadow .xsbc{height:6px;float:left;} -.x-shadow .xstl,.x-shadow .xstr,.x-shadow .xsbl,.x-shadow .xsbr{width:6px;height:6px;float:left;} -.x-shadow .xsc{width:100%;} -.x-shadow .xsml,.x-shadow .xsmr{width:6px;float:left;height:100%;} -.x-shadow .xsmc{float:left;height:100%;background:transparent url( ../images/default/shadow-c.png );} -.x-shadow .xst,.x-shadow .xsb{height:6px;overflow:hidden;width:100%;} -.x-shadow .xsml{background:transparent url( ../images/default/shadow-lr.png ) repeat-y 0 0;} -.x-shadow .xsmr{background:transparent url( ../images/default/shadow-lr.png ) repeat-y -6px 0;} -.x-shadow .xstl{background:transparent url( ../images/default/shadow.png ) no-repeat 0 0;} -.x-shadow .xstc{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -30px;} -.x-shadow .xstr{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -18px;} -.x-shadow .xsbl{background:transparent url( ../images/default/shadow.png ) no-repeat 0 -12px;} -.x-shadow .xsbc{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -36px;} -.x-shadow .xsbr{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -6px;} -.loading-indicator{font-size:11px;background-image:url(../images/default/grid/loading.gif);background-repeat:no-repeat;background-position:left;padding-left:20px;line-height:16px;margin:3px;} -.x-text-resize{position:absolute;left:-1000px;top:-1000px;visibility:hidden;zoom:1;} -.x-drag-overlay{width:100%;height:100%;display:none;position:absolute;left:0;top:0;background-image:url(../images/default/s.gif);z-index:20000;} -.x-clear{clear:both;height:0;overflow:hidden;line-height:0;font-size:0;} -.x-spotlight{z-index:8999;position:absolute;top:0;left:0;-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);background-color:#CCC;width:0;height:0;zoom:1;} +.ext-forced-border-box, .ext-forced-border-box * { + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; +} +.ext-el-mask { + z-index: 100; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + width: 100%; + height: 100%; + zoom: 1; +} -.x-tab-panel{overflow:hidden;} -.x-tab-panel-header,.x-tab-panel-footer{background:#deecfd;border:1px solid #8db2e3;overflow:hidden;zoom:1;} -.x-tab-panel-header{border:1px solid #8db2e3;padding-bottom:2px;} -.x-tab-panel-footer{border:1px solid #8db2e3;padding-top:2px;} -.x-tab-strip-wrap{width:100%;overflow:hidden;position:relative;zoom:1;} -ul.x-tab-strip{display:block;width:5000px;zoom:1;} -ul.x-tab-strip-top{padding-top:1px;background:url(../images/default/tabs/tab-strip-bg.gif) #cedff5 repeat-x bottom;border-bottom:1px solid #8db2e3;} -ul.x-tab-strip-bottom{padding-bottom:1px;background:url(../images/default/tabs/tab-strip-btm-bg.gif) #cedff5 repeat-x top;border-top:1px solid #8db2e3;border-bottom:0 none;} -.x-tab-panel-header-plain .x-tab-strip-top{background:transparent!important;padding-top:0!important;} -.x-tab-panel-header-plain{background:transparent!important;border-width:0!important;padding-bottom:0!important;} -.x-tab-panel-header-plain .x-tab-strip-spacer,.x-tab-panel-footer-plain .x-tab-strip-spacer{border:1px solid #8db2e3;height:2px;background:#deecfd;font-size:1px;line-height:1px;} -.x-tab-panel-header-plain .x-tab-strip-spacer{border-top:0 none;} -.x-tab-panel-footer-plain .x-tab-strip-spacer{border-bottom:0 none;} -.x-tab-panel-footer-plain .x-tab-strip-bottom{background:transparent!important;padding-bottom:0!important;} -.x-tab-panel-footer-plain{background:transparent!important;border-width:0!important;padding-top:0!important;} -.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer,.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer{height:3px;} -ul.x-tab-strip li{float:left;margin-left:2px;} -ul.x-tab-strip li.x-tab-edge{float:left;margin:0!important;padding:0!important;border:0 none!important;font-size:1px!important;line-height:1px!important;overflow:hidden;zoom:1;background:transparent!important;width:1px;} -.x-tab-strip a,.x-tab-strip span,.x-tab-strip em{display:block;} -.x-tab-strip a{text-decoration:none!important;-moz-outline:none;outline:none;cursor:pointer;} -.x-tab-strip-inner{overflow:hidden;text-overflow:ellipsis;} -.x-tab-strip span.x-tab-strip-text{font:normal 11px tahoma,arial,helvetica;color:#416aa3;white-space:nowrap;cursor:pointer;padding:4px 0;} -.x-tab-strip-top .x-tab-with-icon .x-tab-right{padding-left:6px;} -.x-tab-strip .x-tab-with-icon span.x-tab-strip-text{padding-left:20px;background-position:0 3px;background-repeat:no-repeat;} -.x-tab-strip-over span.x-tab-strip-text{color:#15428b;} -.x-tab-strip-active,.x-tab-strip-active a.x-tab-right{cursor:default;} -.x-tab-strip-active span.x-tab-strip-text{cursor:default;color:#15428b;font-weight:bold;} -.x-tab-strip-disabled .x-tabs-text{cursor:default;color:#aaa;} -.x-tab-panel-body{overflow:hidden;} -.x-tab-panel-bwrap{overflow:hidden;} -.ext-ie .x-tab-strip .x-tab-right{position:relative;} -.x-tab-strip-top .x-tab-strip-active .x-tab-right{margin-bottom:-1px;} -.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text{padding-bottom:5px;} -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{margin-top:-1px;} -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text{padding-top:5px;} -.x-tab-strip-top .x-tab-right{background:transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat 0 -51px;padding-left:10px;} -.x-tab-strip-top .x-tab-left{background:transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat right -351px;padding-right:10px;} -.x-tab-strip-top .x-tab-strip-inner{background:transparent url(../images/default/tabs/tabs-sprite.gif) repeat-x 0 -201px;} -.x-tab-strip-top .x-tab-strip-over .x-tab-right{background-position:0 -101px;} -.x-tab-strip-top .x-tab-strip-over .x-tab-left{background-position:right -401px;} -.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner{background-position:0 -251px;} -.x-tab-strip-top .x-tab-strip-active .x-tab-right{background-position:0 0;} -.x-tab-strip-top .x-tab-strip-active .x-tab-left{background-position:right -301px;} -.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner{background-position:0 -151px;} -.x-tab-strip-bottom .x-tab-right{background:url(../images/default/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right;} -.x-tab-strip-bottom .x-tab-left{background:url(../images/default/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left;} -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{background:url(../images/default/tabs/tab-btm-right-bg.gif) no-repeat bottom left;} -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left{background:url(../images/default/tabs/tab-btm-left-bg.gif) no-repeat bottom right;} -.x-tab-strip-bottom .x-tab-left{padding:0 10px;} -.x-tab-strip-bottom .x-tab-right{padding:0;} -.x-tab-strip .x-tab-strip-close{display:none;} -.x-tab-strip-closable{position:relative;} -.x-tab-strip-closable .x-tab-left{padding-right:19px;} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close{background-image:url(../images/default/tabs/tab-close.gif);opacity:.6;-moz-opacity:.6;background-repeat:no-repeat;display:block;width:11px;height:11px;position:absolute;top:3px;right:3px;cursor:pointer;z-index:2;} -.x-tab-strip .x-tab-strip-active a.x-tab-strip-close{opacity:.8;-moz-opacity:.8;} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{background-image:url(../images/default/tabs/tab-close.gif);opacity:1;-moz-opacity:1;} -.x-tab-panel-body{border:1px solid #8db2e3;background:#fff;} -.x-tab-panel-body-top{border-top:0 none;} -.x-tab-panel-body-bottom{border-bottom:0 none;} -.x-tab-scroller-left{background:transparent url(../images/default/tabs/scroll-left.gif) no-repeat -18px 0;border-bottom:1px solid #8db2e3;width:18px;position:absolute;left:0;top:0;z-index:10;cursor:pointer;} -.x-tab-scroller-left-over{background-position:0 0;} -.x-tab-scroller-left-disabled{background-position:-18px 0;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);cursor:default;} -.x-tab-scroller-right{background:transparent url(../images/default/tabs/scroll-right.gif) no-repeat 0 0;border-bottom:1px solid #8db2e3;width:18px;position:absolute;right:0;top:0;z-index:10;cursor:pointer;} -.x-tab-scroller-right-over{background-position:-18px 0;} -.x-tab-scroller-right-disabled{background-position:0 0;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);cursor:default;} -.x-tab-scrolling .x-tab-strip-wrap{margin-left:18px;margin-right:18px;} -.x-tab-scrolling{position:relative;} -.x-tab-panel-bbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} -.x-tab-panel-tbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} +.ext-el-mask-msg { + z-index: 20001; + position: absolute; + top: 0; + left: 0; + border:1px solid; + background:repeat-x 0 -16px; + padding:2px; +} - .x-form-field{margin:0;font:normal 12px tahoma,arial,helvetica,sans-serif;} -.x-form-text,textarea.x-form-field{padding:1px 3px;background:#fff url(../images/default/form/text-bg.gif) repeat-x 0 0;border:1px solid #B5B8C8;} -textarea.x-form-field{padding:2px 3px;} -.x-form-text{height:22px;line-height:18px;vertical-align:middle;} -.ext-ie .x-form-text{margin:-1px 0;height:22px;line-height:18px;} -.ext-ie textarea.x-form-field{margin:-1px 0;} -.ext-strict .x-form-text{height:18px;} -.ext-safari .x-form-text{height:20px;padding:0 3px;} -.ext-safari.ext-mac textarea.x-form-field{margin-bottom:-2px;} -.ext-gecko .x-form-text{padding-top:2px;padding-bottom:0;} -textarea{resize:none;} -.x-form-select-one{height:20px;line-height:18px;vertical-align:middle;background-color:#fff;border:1px solid #B5B8C8;} -.x-form-check-group,.x-form-radio-group{margin-bottom:0;} -.x-form-check-group .x-form-invalid .x-panel-body,.x-form-radio-group .x-form-invalid .x-panel-body{background-color:transparent;} -.x-form-check-wrap,.x-form-radio-wrap{padding:3px 0 0 0;line-height:18px;} -.x-form-check-group .x-form-check-wrap,.x-form-radio-group .x-form-radio-wrap{height:18px;} -.ext-ie .x-form-check-group .x-form-check-wrap,.ext-ie .x-form-radio-group .x-form-radio-wrap{height:21px;} -.ext-ie .x-form-check-wrap input,.ext-ie .x-form-radio-wrap input{width:15px;height:15px;} -.x-form-check,.x-form-radio{height:13px;width:13px;vertical-align:bottom;} -.x-form-radio{margin-bottom:3px;} -.x-form-check,.ext-ie .x-form-radio{margin-bottom:2px;} -.x-form-check-wrap-inner,.x-form-radio-wrap-inner{display:inline;padding:3px 0 0 0;} -.x-form-check{background:url('../images/default/form/checkbox.gif') no-repeat 0 0;} -.x-form-radio{background:url('../images/default/form/radio.gif') no-repeat 0 0;} -.x-form-check-focus .x-form-check,.x-form-check-over .x-form-check,.x-form-check-focus .x-form-radio,.x-form-check-over .x-form-radio{background-position:-13px 0;} -.x-form-check-down .x-form-check,.x-form-check-down .x-form-radio{background-position:-26px 0;} -.x-form-check-checked .x-form-check-focus .x-form-check,.x-form-check-checked .x-form-check-over .x-form-check{background-position:-13px -13px;} -.x-form-check-checked .x-form-check-down .x-form-check{background-position:-26px -13px;} -.x-form-check-checked .x-form-check,.x-form-check-checked .x-form-radio{background-position:0 -13px;} -.x-form-check-group-label{border-bottom:1px solid #99BBE8;color:#15428B;margin-bottom:5px;padding-left:3px!important;float:none!important;} -.x-form-field-wrap{position:relative;zoom:1;white-space:nowrap;} -.x-form-field-wrap .x-form-trigger{width:17px;height:21px;border:0;background:transparent url(../images/default/form/trigger.gif) no-repeat 0 0;cursor:pointer;border-bottom:1px solid #B5B8C8;position:absolute;top:0;} -.ext-safari .x-form-field-wrap .x-form-trigger{height:21px;} -.x-form-field-wrap .x-form-date-trigger{background-image:url(../images/default/form/date-trigger.gif);cursor:pointer;} -.x-form-field-wrap .x-form-clear-trigger{background-image:url(../images/default/form/clear-trigger.gif);cursor:pointer;} -.x-form-field-wrap .x-form-search-trigger{background-image:url(../images/default/form/search-trigger.gif);cursor:pointer;} -.ext-safari .x-form-field-wrap .x-form-trigger{right:0;} -.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{position:static;top:auto;vertical-align:top;} -.x-form-field-wrap .x-form-trigger-over{background-position:-17px 0;} -.x-form-field-wrap .x-form-trigger-click{background-position:-34px 0;} -.x-trigger-wrap-focus .x-form-trigger{background-position:-51px 0;} -.x-trigger-wrap-focus .x-form-trigger-over{background-position:-68px 0;} -.x-trigger-wrap-focus .x-form-trigger-click{background-position:-85px 0;} -.x-trigger-wrap-focus .x-form-trigger{border-bottom:1px solid #7eadd9;} -.x-item-disabled .x-form-trigger-over{background-position:0 0!important;border-bottom:1px solid #B5B8C8;} -.x-item-disabled .x-form-trigger-click{background-position:0 0!important;border-bottom:1px solid #B5B8C8;} -.x-form-focus,textarea.x-form-focus{border:1px solid #7eadd9;} -.x-form-invalid,textarea.x-form-invalid{background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom;border:1px solid #dd7870;} -.ext-safari .x-form-invalid{background-color:#fee;border:1px solid #ff7870;} -.x-editor{visibility:hidden;padding:0;margin:0;} -.x-editor .x-form-check-wrap,.x-editor .x-form-radio-wrap{background:#fff;padding:3px;} -.x-editor .x-form-checkbox{height:13px;} -.x-form-grow-sizer{font:normal 12px tahoma,arial,helvetica,sans-serif;left:-10000px;padding:8px 3px;position:absolute;visibility:hidden;top:-10000px;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;zoom:1;} -.x-form-grow-sizer p{margin:0!important;border:0 none!important;padding:0!important;} -.x-form-item{font:normal 12px tahoma,arial,helvetica,sans-serif;display:block;margin-bottom:4px;zoom:1;} -.x-form-item label{display:block;float:left;width:100px;padding:3px;padding-left:0;clear:left;z-index:2;position:relative;} -.x-form-element{padding-left:105px;position:relative;} -.x-form-invalid-msg{color:#e00;padding:2px;padding-left:18px;font:normal 11px tahoma,arial,helvetica,sans-serif;background:transparent url(../images/default/shared/warning.gif) no-repeat 0 2px;line-height:16px;width:200px;} -.x-form-label-right label{text-align:right;} -.x-form-label-left label{text-align:left;} -.x-form-label-top .x-form-item label{width:auto;float:none;clear:none;display:inline;margin-bottom:4px;position:static;} -.x-form-label-top .x-form-element{padding-left:0;padding-top:4px;} -.x-form-label-top .x-form-item{padding-bottom:4px;} -.x-form-empty-field{color:gray;} -.x-small-editor .x-form-field{font:normal 11px arial,tahoma,helvetica,sans-serif;} -.x-small-editor .x-form-text{height:20px;line-height:16px;vertical-align:middle;} -.ext-ie .x-small-editor .x-form-text{margin-top:-1px!important;margin-bottom:-1px!important;height:20px!important;line-height:16px!important;} -.ext-strict .x-small-editor .x-form-text{height:16px!important;} -.ext-safari .x-small-editor .x-form-field{font:normal 12px arial,tahoma,helvetica,sans-serif;} -.ext-ie .x-small-editor .x-form-text{height:20px;line-height:16px;} -.ext-border-box .x-small-editor .x-form-text{height:20px;} -.x-small-editor .x-form-select-one{height:20px;line-height:16px;vertical-align:middle;} -.x-small-editor .x-form-num-field{text-align:right;} -.x-small-editor .x-form-field-wrap .x-form-trigger{height:19px;} -.x-form-clear{clear:both;height:0;overflow:hidden;line-height:0;font-size:0;} -.x-form-clear-left{clear:left;height:0;overflow:hidden;line-height:0;font-size:0;} -.x-form-cb-label{width:'auto'!important;float:none!important;clear:none!important;display:inline!important;margin-left:4px;} -.x-form-column{float:left;padding:0;margin:0;width:48%;overflow:hidden;zoom:1;} -.x-form .x-form-btns-ct .x-btn{float:right;clear:none;} -.x-form .x-form-btns-ct .x-form-btns td{border:0;padding:0;} -.x-form .x-form-btns-ct .x-form-btns-right table{float:right;clear:none;} -.x-form .x-form-btns-ct .x-form-btns-left table{float:left;clear:none;} -.x-form .x-form-btns-ct .x-form-btns-center{text-align:center;} -.x-form .x-form-btns-ct .x-form-btns-center table{margin:0 auto;} -.x-form .x-form-btns-ct table td.x-form-btn-td{padding:3px;} -.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{background-position:0 -147px;} -.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{background-position:0 -168px;} -.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{background-position:0 -189px;} -.x-form .x-form-btns-ct .x-btn-click .x-btn-center{background-position:0 -126px;} -.x-form .x-form-btns-ct .x-btn-click .x-btn-right{background-position:0 -84px;} -.x-form .x-form-btns-ct .x-btn-click .x-btn-left{background-position:0 -63px;} -.x-form-invalid-icon{width:16px;height:18px;visibility:hidden;position:absolute;left:0;top:0;display:block;background:transparent url(../images/default/form/exclamation.gif) no-repeat 0 2px;} -.x-fieldset{border:1px solid #B5B8C8;padding:10px;margin-bottom:10px;display:block;} -.x-fieldset legend{font:bold 11px tahoma,arial,helvetica,sans-serif;color:#15428b;} -.ext-ie .x-fieldset legend{margin-bottom:10px;} -.ext-ie .x-fieldset{padding-top:0;padding-bottom:10px;} -.x-fieldset legend .x-tool-toggle{margin-right:3px;margin-left:0;float:left!important;} -.x-fieldset legend input{margin-right:3px;float:left!important;height:13px;width:13px;} -fieldset.x-panel-collapsed{padding-bottom:0!important;border-width:1px 0 0 0!important;} -fieldset.x-panel-collapsed .x-fieldset-bwrap{visibility:hidden;position:absolute;left:-1000px;top:-1000px;} -.ext-ie .x-fieldset-bwrap{zoom:1;} -.ext-ie td .x-form-text{position:relative;top:-1px;} -.x-fieldset-noborder{border:0 none transparent;} -.x-fieldset-noborder legend{margin-left:-3px;} -.ext-ie .x-fieldset-noborder legend{position:relative;margin-bottom:23px;} -.ext-ie .x-fieldset-noborder legend span{position:absolute;left:-5px;} -.ext-gecko .x-window-body .x-form-item{-moz-outline:none;overflow:auto;} -.ext-gecko .x-form-item{-moz-outline:none;} -.x-hide-label label.x-form-item-label{display:none;} -.x-hide-label .x-form-element{padding-left:0!important;} -.x-fieldset{overflow:hidden;} -.x-fieldset-bwrap{overflow:hidden;zoom:1;} -.x-fieldset-body{overflow:hidden;} +.ext-el-mask-msg div { + padding:5px 10px 5px 10px; + border:1px solid; + cursor:wait; +} -.x-btn{font:normal 11px tahoma,verdana,helvetica;cursor:pointer;white-space:nowrap;} -.x-btn button{border:0 none;background:transparent;font:normal 11px tahoma,verdana,helvetica;padding-left:3px;padding-right:3px;cursor:pointer;margin:0;overflow:visible;width:auto;-moz-outline:0 none;outline:0 none;} -* html .ext-ie .x-btn button{width:1px;} -.ext-gecko .x-btn button{padding-left:0;padding-right:0;} -.ext-ie .x-btn button{padding-top:2px;} -.x-btn-icon .x-btn-center .x-btn-text{background-position:center;background-repeat:no-repeat;height:16px;width:16px;cursor:pointer;white-space:nowrap;padding:0;} -.x-btn-icon .x-btn-center{padding:1px;} -.x-btn em{font-style:normal;font-weight:normal;} -.x-btn-text-icon .x-btn-center .x-btn-text{background-position:0 2px;background-repeat:no-repeat;padding-left:18px;padding-top:3px;padding-bottom:2px;padding-right:0;} -.ext-gecko3 .x-btn-text-icon .x-btn-center .x-btn-text{padding-top:2px;} -.x-btn-left,.x-btn-right{font-size:1px;line-height:1px;} -.x-btn-left{width:3px;height:21px;background:url(../images/default/button/btn-sprite.gif) no-repeat 0 0;} -.x-btn-right{width:3px;height:21px;background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -21px;} -.x-btn-left i,.x-btn-right i{display:block;width:3px;overflow:hidden;font-size:1px;line-height:1px;} -.x-btn-center{background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -42px;vertical-align:middle;text-align:center;padding:0 5px;cursor:pointer;white-space:nowrap;} -.x-btn-over .x-btn-left{background-position:0 -63px;} -.x-btn-over .x-btn-right{background-position:0 -84px;} -.x-btn-over .x-btn-center{background-position:0 -105px;} -.x-btn-click .x-btn-center,.x-btn-menu-active .x-btn-center{background-position:0 -126px;} -.x-btn-disabled *{color:gray!important;cursor:default!important;} -.x-btn-menu-text-wrap .x-btn-center{padding:0 3px;} -.ext-gecko .x-btn-menu-text-wrap .x-btn-center{padding:0 1px;} -.x-btn-menu-arrow-wrap .x-btn-center{padding:0;} -.x-btn-menu-arrow-wrap .x-btn-center button{width:12px!important;height:21px;padding:0!important;display:block;background:transparent url(../images/default/button/btn-arrow.gif) no-repeat left 3px;} -.x-btn-with-menu .x-btn-center{padding-right:2px!important;} -.x-btn-with-menu .x-btn-center em{display:block;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 0;padding-right:10px;} -.x-btn-text-icon .x-btn-with-menu .x-btn-center em{display:block;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 3px;padding-right:10px;} -.x-btn-pressed .x-btn-left{background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -63px;} -.x-btn-pressed .x-btn-right{background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -84px;} -.x-btn-pressed .x-btn-center{background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -126px;} +.ext-shim { + position:absolute; + visibility:hidden; + left:0; + top:0; + overflow:hidden; +} -.x-toolbar{border-color:#a9bfd3;border-style:solid;border-width:0 0 1px 0;display:block;padding:2px;background:#d0def0 url(../images/default/toolbar/bg.gif) repeat-x top left;position:relative;zoom:1;} -.x-toolbar .x-item-disabled .x-btn-icon{opacity:.35;-moz-opacity:.35;filter:alpha(opacity=35);} -.x-toolbar td{vertical-align:middle;} -.mso .x-toolbar,.x-grid-mso .x-toolbar{border:0 none;background:url(../images/default/grid/mso-hd.gif);} -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{white-space:nowrap;font:normal 11px tahoma,arial,helvetica,sans-serif;} -.x-toolbar .x-item-disabled{color:gray;cursor:default;opacity:.6;-moz-opacity:.6;filter:alpha(opacity=60);} -.x-toolbar .x-item-disabled *{color:gray;cursor:default;} -.x-toolbar .x-btn-left{background:none;} -.x-toolbar .x-btn-right{background:none;} -.x-toolbar .x-btn-center{background:none;padding:0;} -.x-toolbar .x-btn-menu-text-wrap .x-btn-center button{padding-right:2px;} -.ext-gecko .x-toolbar .x-btn-menu-text-wrap .x-btn-center button{padding-right:0;} -.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{padding:0 2px;} -.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{width:12px;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px;} -.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button{width:12px;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px;} -.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button{background-position:0 -47px;} -.x-toolbar .x-btn-over .x-btn-left{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0;} -.x-toolbar .x-btn-over .x-btn-right{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;} -.x-toolbar .x-btn-over .x-btn-center{background:url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;} -.x-toolbar .x-btn-click .x-btn-left,.x-toolbar .x-btn-pressed .x-btn-left,.x-toolbar .x-btn-menu-active .x-btn-left{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px;} -.x-toolbar .x-btn-click .x-btn-right,.x-toolbar .x-btn-pressed .x-btn-right,.x-toolbar .x-btn-menu-active .x-btn-right{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px;} -.x-toolbar .x-btn-click .x-btn-center,.x-toolbar .x-btn-pressed .x-btn-center,.x-toolbar .x-btn-menu-active .x-btn-center{background:url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px;} -.x-toolbar .x-btn-with-menu .x-btn-center em{padding-right:8px;} -.x-toolbar .ytb-text{padding:2px;} -.x-toolbar .ytb-sep{background-image:url(../images/default/grid/grid-blue-split.gif);background-position:center;background-repeat:no-repeat;display:block;font-size:1px;height:16px;width:4px;overflow:hidden;cursor:default;margin:0 2px 0;border:0;} -.x-toolbar .ytb-spacer{width:2px;} -.x-tbar-page-number{width:24px;height:14px;} -.x-tbar-page-first{background-image:url(../images/default/grid/page-first.gif)!important;} -.x-tbar-loading{background-image:url(../images/default/grid/refresh.gif)!important;} -.x-tbar-page-last{background-image:url(../images/default/grid/page-last.gif)!important;} -.x-tbar-page-next{background-image:url(../images/default/grid/page-next.gif)!important;} -.x-tbar-page-prev{background-image:url(../images/default/grid/page-prev.gif)!important;} -.x-item-disabled .x-tbar-loading{background-image:url(../images/default/grid/loading.gif)!important;} -.x-item-disabled .x-tbar-page-first{background-image:url(../images/default/grid/page-first-disabled.gif)!important;} -.x-item-disabled .x-tbar-page-last{background-image:url(../images/default/grid/page-last-disabled.gif)!important;} -.x-item-disabled .x-tbar-page-next{background-image:url(../images/default/grid/page-next-disabled.gif)!important;} -.x-item-disabled .x-tbar-page-prev{background-image:url(../images/default/grid/page-prev-disabled.gif)!important;} -.x-paging-info{position:absolute;top:5px;right:8px;color:#444;} -.x-statusbar .x-status-text{height:21px;line-height:21px;padding:0 4px;cursor:default;} -.x-statusbar .x-status-busy{padding-left:25px;background:transparent url(../images/default/grid/loading.gif) no-repeat 3px 3px;} -.x-statusbar .x-status-text-panel{border-top:1px solid #99BBE8;border-right:1px solid #fff;border-bottom:1px solid #fff;border-left:1px solid #99BBE8;padding:2px 8px 2px 5px;} +.ext-ie .ext-shim { + filter: alpha(opacity=0); +} -.x-resizable-handle{position:absolute;z-index:100;font-size:1px;line-height:6px;overflow:hidden;background:white;filter:alpha(opacity=0);opacity:0;zoom:1;} -.x-resizable-handle-east{width:6px;cursor:e-resize;right:0;top:0;height:100%;} -.ext-ie .x-resizable-handle-east{margin-right:-1px;} -.x-resizable-handle-south{width:100%;cursor:s-resize;left:0;bottom:0;height:6px;} -.ext-ie .x-resizable-handle-south{margin-bottom:-1px;} -.x-resizable-handle-west{width:6px;cursor:w-resize;left:0;top:0;height:100%;} -.x-resizable-handle-north{width:100%;cursor:n-resize;left:0;top:0;height:6px;} -.x-resizable-handle-southeast{width:6px;cursor:se-resize;right:0;bottom:0;height:6px;z-index:101;} -.x-resizable-handle-northwest{width:6px;cursor:nw-resize;left:0;top:0;height:6px;z-index:101;} -.x-resizable-handle-northeast{width:6px;cursor:ne-resize;right:0;top:0;height:6px;z-index:101;} -.x-resizable-handle-southwest{width:6px;cursor:sw-resize;left:0;bottom:0;height:6px;z-index:101;} -.x-resizable-over .x-resizable-handle,.x-resizable-pinned .x-resizable-handle{filter:alpha(opacity=100);opacity:1;} -.x-resizable-over .x-resizable-handle-east,.x-resizable-pinned .x-resizable-handle-east{background:url(../images/default/sizer/e-handle.gif);background-position:left;} -.x-resizable-over .x-resizable-handle-west,.x-resizable-pinned .x-resizable-handle-west{background:url(../images/default/sizer/e-handle.gif);background-position:left;} -.x-resizable-over .x-resizable-handle-south,.x-resizable-pinned .x-resizable-handle-south{background:url(../images/default/sizer/s-handle.gif);background-position:top;} -.x-resizable-over .x-resizable-handle-north,.x-resizable-pinned .x-resizable-handle-north{background:url(../images/default/sizer/s-handle.gif);background-position:top;} -.x-resizable-over .x-resizable-handle-southeast,.x-resizable-pinned .x-resizable-handle-southeast{background:url(../images/default/sizer/se-handle.gif);background-position:top left;} -.x-resizable-over .x-resizable-handle-northwest,.x-resizable-pinned .x-resizable-handle-northwest{background:url(../images/default/sizer/nw-handle.gif);background-position:bottom right;} -.x-resizable-over .x-resizable-handle-northeast,.x-resizable-pinned .x-resizable-handle-northeast{background:url(../images/default/sizer/ne-handle.gif);background-position:bottom left;} -.x-resizable-over .x-resizable-handle-southwest,.x-resizable-pinned .x-resizable-handle-southwest{background:url(../images/default/sizer/sw-handle.gif);background-position:top right;} -.x-resizable-proxy{border:1px dashed #3b5a82;position:absolute;overflow:hidden;display:none;left:0;top:0;z-index:50000;} -.x-resizable-overlay{width:100%;height:100%;display:none;position:absolute;left:0;top:0;background:white;z-index:200000;-moz-opacity:0;opacity:0;filter:alpha(opacity=0);} +.ext-ie6 .ext-shim { + margin-left: 5px; + margin-top: 3px; +} - .x-grid3{position:relative;overflow:hidden;background-color:#fff;} -.x-grid-panel .x-panel-body{overflow:hidden!important;} -.x-grid-panel .x-panel-mc .x-panel-body{border:1px solid #99bbe8;} -.x-grid3 table{table-layout:fixed;} -.x-grid3-viewport{overflow:hidden;} -.x-grid3-hd-row td,.x-grid3-row td,.x-grid3-summary-row td{font:normal 11px arial,tahoma,helvetica,sans-serif;-moz-outline:none;-moz-user-focus:normal;} -.x-grid3-row td,.x-grid3-summary-row td{line-height:13px;vertical-align:top;padding-left:1px;padding-right:1px;-moz-user-select:none;} -.x-grid3-hd-row td{line-height:15px;vertical-align:middle;border-left:1px solid #eee;border-right:1px solid #d0d0d0;} -.x-grid3-hd-row .x-grid3-marker-hd{padding:3px;} -.x-grid3-row .x-grid3-marker{padding:3px;} -.x-grid3-cell-inner,.x-grid3-hd-inner{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;padding:3px 3px 3px 5px;white-space:nowrap;} -.x-grid3-hd-inner{position:relative;cursor:inherit;padding:4px 3px 4px 5px;} -.x-grid3-row-body{white-space:normal;} -.x-grid3-body-cell{-moz-outline:0 none;outline:0 none;} -.ext-ie .x-grid3-cell-inner,.ext-ie .x-grid3-hd-inner{width:100%;} -.ext-strict .x-grid3-cell-inner,.ext-strict .x-grid3-hd-inner{width:auto;} -.x-grid-row-loading{background:#fff url(../images/default/shared/loading-balls.gif) no-repeat center center;} -.x-grid-page{overflow:hidden;} -.x-grid3-row{cursor:default;border:1px solid #ededed;border-top-color:#fff;width:100%;} -.x-grid3-row-alt{background-color:#fafafa;} -.x-grid3-row-over{border:1px solid #ddd;background:#efefef url(../images/default/grid/row-over.gif) repeat-x left top;} -.x-grid3-resize-proxy{width:1px;left:0;background-color:#777;cursor:e-resize;cursor:col-resize;position:absolute;top:0;height:100px;overflow:hidden;visibility:hidden;border:0 none;z-index:7;} -.x-grid3-resize-marker{width:1px;left:0;background-color:#777;position:absolute;top:0;height:100px;overflow:hidden;visibility:hidden;border:0 none;z-index:7;} -.x-grid3-focus{position:absolute;left:0;top:0;width:1px;height:1px;line-height:1px;font-size:1px;-moz-outline:0 none;outline:0 none;-moz-user-select:text;-khtml-user-select:text;} -.x-grid3-header{background:#f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom;cursor:default;zoom:1;padding:1px 0 0 0;} -.x-grid3-header-pop{border-left:1px solid #d0d0d0;float:right;clear:none;} -.x-grid3-header-pop-inner{border-left:1px solid #eee;width:14px;height:19px;background:transparent url(../images/default/grid/hd-pop.gif) no-repeat center center;} -.ext-ie .x-grid3-header-pop-inner{width:15px;} -.ext-strict .x-grid3-header-pop-inner{width:14px;} -.x-grid3-header-inner{overflow:hidden;zoom:1;float:left;} -.x-grid3-header-offset{padding-left:1px;width:10000px;} -td.x-grid3-hd-over,td.sort-desc,td.sort-asc,td.x-grid3-hd-menu-open{border-left:1px solid #aaccf6;border-right:1px solid #aaccf6;} -td.x-grid3-hd-over .x-grid3-hd-inner,td.sort-desc .x-grid3-hd-inner,td.sort-asc .x-grid3-hd-inner,td.x-grid3-hd-menu-open .x-grid3-hd-inner{background:#ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom;} -.x-grid3-sort-icon{background-repeat:no-repeat;display:none;height:4px;width:13px;margin-left:3px;vertical-align:middle;} -.sort-asc .x-grid3-sort-icon{background-image:url(../images/default/grid/sort_asc.gif);display:inline;} -.sort-desc .x-grid3-sort-icon{background-image:url(../images/default/grid/sort_desc.gif);display:inline;} -.ext-strict .ext-ie .x-grid3-header-inner{position:relative;} -.ext-strict .ext-ie6 .x-grid3-hd{position:relative;} -.ext-strict .ext-ie6 .x-grid3-hd-inner{position:static;} -.x-grid3-body{zoom:1;} -.x-grid3-scroller{overflow:auto;zoom:1;position:relative;} -.x-grid3-cell-text,.x-grid3-hd-text{display:block;padding:3px 5px 3px 5px;-moz-user-select:none;-khtml-user-select:none;color:black;} -.x-grid3-split{background-image:url(../images/default/grid/grid-split.gif);background-position:center;background-repeat:no-repeat;cursor:e-resize;cursor:col-resize;display:block;font-size:1px;height:16px;overflow:hidden;position:absolute;top:2px;width:6px;z-index:3;} -.x-grid3-hd-text{color:#15428b;} -.x-dd-drag-proxy .x-grid3-hd-inner{background:#ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom;width:120px;padding:3px;border:1px solid #aaccf6;overflow:hidden;} -.col-move-top,.col-move-bottom{width:9px;height:9px;position:absolute;top:0;line-height:1px;font-size:1px;overflow:hidden;visibility:hidden;z-index:20000;} -.col-move-top{background:transparent url(../images/default/grid/col-move-top.gif) no-repeat left top;} -.col-move-bottom{background:transparent url(../images/default/grid/col-move-bottom.gif) no-repeat left top;} -.x-grid3-row-selected{background:#DFE8F6!important;border:1px dotted #a3bae9;} -.x-grid3-cell-selected{background-color:#B8CFEE!important;color:black;} -.x-grid3-cell-selected span{color:black!important;} -.x-grid3-cell-selected .x-grid3-cell-text{color:black;} -.x-grid3-locked td.x-grid3-row-marker,.x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{background:#ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x 0 bottom!important;vertical-align:middle!important;color:black;padding:0;border-top:1px solid white;border-bottom:none!important;border-right:1px solid #6fa0df!important;text-align:center;} -.x-grid3-locked td.x-grid3-row-marker div,.x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{padding:0 4px;color:#15428b!important;text-align:center;} -.x-grid3-dirty-cell{background:transparent url(../images/default/grid/dirty.gif) no-repeat 0 0;} -.x-grid3-topbar,.x-grid3-bottombar{font:normal 11px arial,tahoma,helvetica,sans-serif;overflow:hidden;display:none;zoom:1;position:relative;} -.x-grid3-topbar .x-toolbar{border-right:0 none;} -.x-grid3-bottombar .x-toolbar{border-right:0 none;border-bottom:0 none;border-top:1px solid #a9bfd3;} -.x-props-grid .x-grid3-cell{padding:1px;} -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y -16px!important;padding-left:12px;color:black!important;} -.x-props-grid .x-grid3-body .x-grid3-td-name{padding:1px;padding-right:0;background:white!important;border:0 none;border-right:1px solid #eee;} -.xg-hmenu-sort-asc .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-asc.gif);} -.xg-hmenu-sort-desc .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-desc.gif);} -.xg-hmenu-lock .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-lock.gif);} -.xg-hmenu-unlock .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-unlock.gif);} -.x-grid3-col-dd{border:0 none;padding:0;background:transparent;} -.x-dd-drag-ghost .x-grid3-dd-wrap{padding:1px 3px 3px 1px;} -.x-grid3-hd{-moz-user-select:none;} -.x-grid3-hd-btn{display:none;position:absolute;width:14px;background:#c3daf9 url(../images/default/grid/grid3-hd-btn.gif) no-repeat left center;right:0;top:0;z-index:2;cursor:pointer;} -.x-grid3-hd-over .x-grid3-hd-btn,.x-grid3-hd-menu-open .x-grid3-hd-btn{display:block;} -a.x-grid3-hd-btn:hover{background-position:-14px center;} -.x-grid3-body .x-grid3-td-expander{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right;} -.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner{padding:0!important;height:100%;} -.x-grid3-row-expander{width:100%;height:18px;background-position:4px 2px;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/grid/row-expand-sprite.gif);} -.x-grid3-row-collapsed .x-grid3-row-expander{background-position:4px 2px;} -.x-grid3-row-expanded .x-grid3-row-expander{background-position:-21px 2px;} -.x-grid3-row-collapsed .x-grid3-row-body{display:none!important;} -.x-grid3-row-expanded .x-grid3-row-body{display:block!important;} -.x-grid3-body .x-grid3-td-checker{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right;} -.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner,.x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner{padding:0!important;height:100%;} -.x-grid3-row-checker,.x-grid3-hd-checker{width:100%;height:18px;background-position:2px 2px;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/grid/row-check-sprite.gif);} -.x-grid3-row .x-grid3-row-checker{background-position:2px 2px;} -.x-grid3-row-selected .x-grid3-row-checker,.x-grid3-hd-checker-on .x-grid3-hd-checker{background-position:-23px 2px;} -.x-grid3-hd-checker{background-position:2px 3px;} -.x-grid3-hd-checker-on .x-grid3-hd-checker{background-position:-23px 3px;} -.x-grid3-body .x-grid3-td-numberer{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right;} -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner{padding:3px 5px 0 0!important;text-align:right;color:#444;} -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander{background:transparent url(../images/default/grid/grid3-special-col-sel-bg.gif) repeat-y right;} -.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner{padding:1px 0 0 0!important;} -.x-grid3-check-col{width:100%;height:16px;background-position:center center;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/menu/unchecked.gif);} -.x-grid3-check-col-on{width:100%;height:16px;background-position:center center;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/menu/checked.gif);} -.x-grid-group,.x-grid-group-body,.x-grid-group-hd{zoom:1;} -.x-grid-group-hd{border-bottom:2px solid #99bbe8;cursor:pointer;padding-top:6px;} -.x-grid-group-hd div{background:transparent url(../images/default/grid/group-expand-sprite.gif) no-repeat 3px -47px;padding:4px 4px 4px 17px;color:#3764a0;font:bold 11px tahoma,arial,helvetica,sans-serif;} -.x-grid-group-collapsed .x-grid-group-hd div{background-position:3px 3px;} -.x-grid-group-collapsed .x-grid-group-body{display:none;} -.x-group-by-icon{background-image:url(../images/default/grid/group-by.gif);} -.x-cols-icon{background-image:url(../images/default/grid/columns.gif);} -.x-show-groups-icon{background-image:url(../images/default/grid/group-by.gif);} -.ext-ie .x-grid3 .x-editor .x-form-text{position:relative;top:-1px;} -.ext-ie .x-props-grid .x-editor .x-form-text{position:static;top:0;} -.x-grid-empty{padding:10px;color:gray;font:normal 11px tahoma,arial,helvetica,sans-serif;} -.ext-ie7 .x-grid-panel .x-panel-bbar{position:relative;} +.x-mask-loading div { + padding:5px 10px 5px 25px; + background:no-repeat 5px 5px; + line-height:16px; +} -.x-dd-drag-proxy{position:absolute;left:0;top:0;visibility:hidden;z-index:15000;} -.x-dd-drag-ghost{color:black;font:normal 11px arial,helvetica,sans-serif;-moz-opacity:0.85;opacity:.85;filter:alpha(opacity=85);border-top:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #bbb;border-bottom:1px solid #bbb;padding:3px;padding-left:20px;background-color:white;white-space:nowrap;} -.x-dd-drag-repair .x-dd-drag-ghost{-moz-opacity:0.4;opacity:.4;filter:alpha(opacity=40);border:0 none;padding:0;background-color:transparent;} -.x-dd-drag-repair .x-dd-drop-icon{visibility:hidden;} -.x-dd-drop-icon{position:absolute;top:3px;left:3px;display:block;width:16px;height:16px;background-color:transparent;background-position:center;background-repeat:no-repeat;z-index:1;} -.x-dd-drop-nodrop .x-dd-drop-icon{background-image:url(../images/default/dd/drop-no.gif);} -.x-dd-drop-ok .x-dd-drop-icon{background-image:url(../images/default/dd/drop-yes.gif);} -.x-dd-drop-ok-add .x-dd-drop-icon{background-image:url(../images/default/dd/drop-add.gif);} -.x-view-selector{position:absolute;left:0;top:0;width:0;background:#c3daf9;border:1px dotted #39b;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);zoom:1;} +/* class for hiding elements without using display:none */ +.x-hidden, .x-hide-offsets { + position:absolute !important; + left:-10000px; + top:-10000px; + visibility:hidden; +} -.x-tree .x-panel-body{background-color:#fff;} -.ext-strict .ext-ie .x-tree .x-panel-bwrap{position:relative;overflow:hidden;} -.x-tree-icon,.x-tree-ec-icon,.x-tree-elbow-line,.x-tree-elbow,.x-tree-elbow-end,.x-tree-elbow-plus,.x-tree-elbow-minus,.x-tree-elbow-end-plus,.x-tree-elbow-end-minus{border:0 none;height:18px;margin:0;padding:0;vertical-align:top;width:16px;background-repeat:no-repeat;} -.x-tree-node-collapsed .x-tree-node-icon,.x-tree-node-expanded .x-tree-node-icon,.x-tree-node-leaf .x-tree-node-icon{border:0 none;height:18px;margin:0;padding:0;vertical-align:top;width:16px;background-position:center;background-repeat:no-repeat;} -.ext-ie .x-tree-node-indent img,.ext-ie .x-tree-node-icon,.ext-ie .x-tree-ec-icon{vertical-align:middle!important;} -.x-tree-node-expanded .x-tree-node-icon{background-image:url(../images/default/tree/folder-open.gif);} -.x-tree-node-leaf .x-tree-node-icon{background-image:url(../images/default/tree/leaf.gif);} -.x-tree-node-collapsed .x-tree-node-icon{background-image:url(../images/default/tree/folder.gif);} -.ext-ie input.x-tree-node-cb{width:15px;height:15px;} -input.x-tree-node-cb{margin-left:1px;} -.ext-ie input.x-tree-node-cb{margin-left:0;} -.x-tree-noicon .x-tree-node-icon{width:0;height:0;} -.x-tree-node-loading .x-tree-node-icon{background-image:url(../images/default/tree/loading.gif)!important;} -.x-tree-node-loading a span{font-style:italic;color:#444;} -.ext-ie .x-tree-node-el input{width:15px;height:15px;} -.x-tree-lines .x-tree-elbow{background-image:url(../images/default/tree/elbow.gif);} -.x-tree-lines .x-tree-elbow-plus{background-image:url(../images/default/tree/elbow-plus.gif);} -.x-tree-lines .x-tree-elbow-minus{background-image:url(../images/default/tree/elbow-minus.gif);} -.x-tree-lines .x-tree-elbow-end{background-image:url(../images/default/tree/elbow-end.gif);} -.x-tree-lines .x-tree-elbow-end-plus{background-image:url(../images/default/tree/elbow-end-plus.gif);} -.x-tree-lines .x-tree-elbow-end-minus{background-image:url(../images/default/tree/elbow-end-minus.gif);} -.x-tree-lines .x-tree-elbow-line{background-image:url(../images/default/tree/elbow-line.gif);} -.x-tree-no-lines .x-tree-elbow{background:transparent;} -.x-tree-no-lines .x-tree-elbow-plus{background-image:url(../images/default/tree/elbow-plus-nl.gif);} -.x-tree-no-lines .x-tree-elbow-minus{background-image:url(../images/default/tree/elbow-minus-nl.gif);} -.x-tree-no-lines .x-tree-elbow-end{background:transparent;} -.x-tree-no-lines .x-tree-elbow-end-plus{background-image:url(../images/default/tree/elbow-end-plus-nl.gif);} -.x-tree-no-lines .x-tree-elbow-end-minus{background-image:url(../images/default/tree/elbow-end-minus-nl.gif);} -.x-tree-no-lines .x-tree-elbow-line{background:transparent;} -.x-tree-arrows .x-tree-elbow{background:transparent;} -.x-tree-arrows .x-tree-elbow-plus{background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0;} -.x-tree-arrows .x-tree-elbow-minus{background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0;} -.x-tree-arrows .x-tree-elbow-end{background:transparent;} -.x-tree-arrows .x-tree-elbow-end-plus{background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0;} -.x-tree-arrows .x-tree-elbow-end-minus{background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0;} -.x-tree-arrows .x-tree-elbow-line{background:transparent;} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{background-position:-32px 0;} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{background-position:-48px 0;} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{background-position:-32px 0;} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{background-position:-48px 0;} -.x-tree-elbow-plus,.x-tree-elbow-minus,.x-tree-elbow-end-plus,.x-tree-elbow-end-minus{cursor:pointer;} -.ext-ie ul.x-tree-node-ct{font-size:0;line-height:0;zoom:1;} -.x-tree-node{color:black;font:normal 11px arial,tahoma,helvetica,sans-serif;white-space:nowrap;} -.x-tree-node-el{line-height:18px;cursor:pointer;} -.x-tree-node a,.x-dd-drag-ghost a{text-decoration:none;color:black;-khtml-user-select:none;-moz-user-select:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0 none;} -.x-tree-node a span,.x-dd-drag-ghost a span{text-decoration:none;color:black;padding:1px 3px 1px 2px;} -.x-tree-node .x-tree-node-disabled a span{color:gray!important;} -.x-tree-node .x-tree-node-disabled .x-tree-node-icon{-moz-opacity:0.5;opacity:.5;filter:alpha(opacity=50);} -.x-tree-node .x-tree-node-inline-icon{background:transparent;} -.x-tree-node a:hover,.x-dd-drag-ghost a:hover{text-decoration:none;} -.x-tree-node div.x-tree-drag-insert-below{border-bottom:1px dotted #36c;} -.x-tree-node div.x-tree-drag-insert-above{border-top:1px dotted #36c;} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{border-bottom:0 none;} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{border-top:0 none;} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{border-bottom:2px solid #36c;} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{border-top:2px solid #36c;} -.x-tree-node .x-tree-drag-append a span{background:#ddd;border:1px dotted gray;} -.x-tree-node .x-tree-node-over{background-color:#eee;} -.x-tree-node .x-tree-selected{background-color:#d9e8fb;} -.x-dd-drag-ghost .x-tree-node-indent,.x-dd-drag-ghost .x-tree-ec-icon{display:none!important;} -.x-tree-drop-ok-append .x-dd-drop-icon{background-image:url(../images/default/tree/drop-add.gif);} -.x-tree-drop-ok-above .x-dd-drop-icon{background-image:url(../images/default/tree/drop-over.gif);} -.x-tree-drop-ok-below .x-dd-drop-icon{background-image:url(../images/default/tree/drop-under.gif);} -.x-tree-drop-ok-between .x-dd-drop-icon{background-image:url(../images/default/tree/drop-between.gif);} -.x-tree-root-ct{zoom:1;} +.x-hide-display { + display:none !important; +} -.x-date-picker{border:1px solid #1b376c;border-top:0 none;background:#fff;position:relative;} -.x-date-picker a{-moz-outline:0 none;outline:0 none;} -.x-date-inner,.x-date-inner td,.x-date-inner th{border-collapse:separate;} -.x-date-middle,.x-date-left,.x-date-right{background:url(../images/default/shared/hd-sprite.gif) repeat-x 0 -83px;color:#FFF;font:bold 11px "sans serif",tahoma,verdana,helvetica;overflow:hidden;} -.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{background:transparent!important;vertical-align:middle;} -.x-date-middle .x-btn .x-btn-text{color:#fff;} -.x-date-middle .x-btn-with-menu .x-btn-center em{background:transparent url(../images/default/toolbar/btn-arrow-light.gif) no-repeat right 0;} -.x-date-right,.x-date-left{width:18px;} -.x-date-right{text-align:right;} -.x-date-middle{padding-top:2px;padding-bottom:2px;width:130px;} -.x-date-right a,.x-date-left a{display:block;width:16px;height:16px;background-position:center;background-repeat:no-repeat;cursor:pointer;-moz-opacity:0.6;opacity:.6;filter:alpha(opacity=60);} -.x-date-right a:hover,.x-date-left a:hover{-moz-opacity:1;opacity:1;filter:alpha(opacity=100);} -.x-date-right a{background-image:url(../images/default/shared/right-btn.gif);margin-right:2px;text-decoration:none!important;} -.x-date-left a{background-image:url(../images/default/shared/left-btn.gif);margin-left:2px;text-decoration:none!important;} -table.x-date-inner{width:100%;table-layout:fixed;} -.x-date-inner th{width:25px;} -.x-date-inner th{background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;text-align:right!important;border-bottom:1px solid #a3bad9;font:normal 10px arial,helvetica,tahoma,sans-serif;color:#233d6d;cursor:default;padding:0;border-collapse:separate;} -.x-date-inner th span{display:block;padding:2px;padding-right:7px;} -.x-date-inner td{border:1px solid #fff;text-align:right;padding:0;} -.x-date-inner a{padding:2px 5px;display:block;font:normal 11px arial,helvetica,tahoma,sans-serif;text-decoration:none;color:black;text-align:right;zoom:1;} -.x-date-inner .x-date-active{cursor:pointer;color:black;} -.x-date-inner .x-date-selected a{background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;border:1px solid #8db2e3;padding:1px 4px;} -.x-date-inner .x-date-today a{border:1px solid darkred;padding:1px 4px;} -.x-date-inner .x-date-selected span{font-weight:bold;} -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a{color:#aaa;text-decoration:none!important;} -.x-date-bottom{padding:4px;border-top:1px solid #a3bad9;background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;} -.x-date-inner a:hover,.x-date-inner .x-date-disabled a:hover{text-decoration:none!important;color:black;background:#ddecfe;} -.x-date-inner .x-date-disabled a{cursor:default;background:#eee;color:#bbb;} -.x-date-mmenu{background:#eee!important;} -.x-date-mmenu .x-menu-item{font-size:10px;padding:1px 24px 1px 4px;white-space:nowrap;color:#000;} -.x-date-mmenu .x-menu-item .x-menu-item-icon{width:10px;height:10px;margin-right:5px;background-position:center -4px!important;} -.x-date-mp{position:absolute;left:0;top:0;background:white;display:none;} -.x-date-mp td{padding:2px;font:normal 11px arial,helvetica,tahoma,sans-serif;} -td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn{border:0 none;text-align:center;vertical-align:middle;width:25%;} -.x-date-mp-ok{margin-right:3px;} -.x-date-mp-btns button{text-decoration:none;text-align:center;text-decoration:none!important;background:#083772;color:white;border:1px solid;border-color:#36c #005 #005 #36c;padding:1px 3px 1px;font:normal 11px arial,helvetica,tahoma,sans-serif;cursor:pointer;} -.x-date-mp-btns{background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;} -.x-date-mp-btns td{border-top:1px solid #c5d2df;text-align:center;} -td.x-date-mp-month a,td.x-date-mp-year a{display:block;padding:2px 4px;text-decoration:none;text-align:center;color:#15428b;} -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover{color:#15428b;text-decoration:none;cursor:pointer;background:#ddecfe;} -td.x-date-mp-sel a{padding:1px 3px;background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;border:1px solid #8db2e3;} -.x-date-mp-ybtn a{overflow:hidden;width:15px;height:15px;cursor:pointer;background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat;display:block;margin:0 auto;} -.x-date-mp-ybtn a.x-date-mp-next{background-position:0 -120px;} -.x-date-mp-ybtn a.x-date-mp-next:hover{background-position:-15px -120px;} -.x-date-mp-ybtn a.x-date-mp-prev{background-position:0 -105px;} -.x-date-mp-ybtn a.x-date-mp-prev:hover{background-position:-15px -105px;} -.x-date-mp-ybtn{text-align:center;} -td.x-date-mp-sep{border-right:1px solid #c5d2df;} +.x-hide-nosize, +.x-hide-nosize * /* Emulate display:none for children */ + { + height:0px!important; + width:0px!important; + visibility:hidden!important; + border:none!important; + zoom:1; +} -.x-tip{position:absolute;top:0;left:0;visibility:hidden;z-index:20000;border:0 none;} -.x-tip .x-tip-close{background-image:url(../images/default/qtip/close.gif);height:15px;float:right;width:15px;margin:0 0 2px 2px;cursor:pointer;display:none;} -.x-tip .x-tip-tc{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -62px;padding-top:3px;overflow:hidden;zoom:1;} -.x-tip .x-tip-tl{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 0;padding-left:6px;overflow:hidden;zoom:1;} -.x-tip .x-tip-tr{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right 0;padding-right:6px;overflow:hidden;zoom:1;} -.x-tip .x-tip-bc{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -121px;height:3px;overflow:hidden;} -.x-tip .x-tip-bl{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -59px;padding-left:6px;zoom:1;} -.x-tip .x-tip-br{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -59px;padding-right:6px;zoom:1;} -.x-tip .x-tip-mc{border:0 none;font:normal 11px tahoma,arial,helvetica,sans-serif;} -.x-tip .x-tip-ml{background:#fff url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -124px;padding-left:6px;zoom:1;} -.x-tip .x-tip-mr{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -124px;padding-right:6px;zoom:1;} -.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc{font-size:0;line-height:0;} -.x-tip .x-tip-header-text{font:bold 11px tahoma,arial,helvetica,sans-serif;padding:0;margin:0 0 2px 0;color:#444;} -.x-tip .x-tip-body{font:normal 11px tahoma,arial,helvetica,sans-serif;margin:0!important;line-height:14px;color:#444;padding:0;} -.x-tip .x-tip-body .loading-indicator{margin:0;} -.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text{cursor:move;} -.x-form-invalid-tip .x-tip-tc{background:url(../images/default/form/error-tip-corners.gif) repeat-x 0 -12px;padding-top:6px;} -.x-form-invalid-tip .x-tip-tl{background-image:url(../images/default/form/error-tip-corners.gif);} -.x-form-invalid-tip .x-tip-tr{background-image:url(../images/default/form/error-tip-corners.gif);} -.x-form-invalid-tip .x-tip-bc{background:url(../images/default/form/error-tip-corners.gif) repeat-x 0 -18px;height:6px;} -.x-form-invalid-tip .x-tip-bl{background:url(../images/default/form/error-tip-corners.gif) no-repeat 0 -6px;} -.x-form-invalid-tip .x-tip-br{background:url(../images/default/form/error-tip-corners.gif) no-repeat right -6px;} -.x-form-invalid-tip .x-tip-ml{background-image:url(../images/default/form/error-tip-corners.gif);} -.x-form-invalid-tip .x-tip-mr{background-image:url(../images/default/form/error-tip-corners.gif);} -.x-form-invalid-tip .x-tip-body{padding:2px;} -.x-form-invalid-tip .x-tip-body{padding-left:24px;background:transparent url(../images/default/form/exclamation.gif) no-repeat 2px 2px;} +.x-hide-visibility { + visibility:hidden !important; +} -.x-menu{border:1px solid #718bb7;z-index:15000;zoom:1;background:#f0f0f0 url(../images/default/menu/menu.gif) repeat-y;padding:2px;} -.x-menu a{text-decoration:none!important;} -.ext-ie .x-menu{zoom:1;overflow:hidden;} -.x-menu-list{background:transparent;border:0 none;} -.x-menu li{line-height:100%;} -.x-menu li.x-menu-sep-li{font-size:1px;line-height:1px;} -.x-menu-list-item{font:normal 11px tahoma,arial,sans-serif;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;display:block;padding:1px;} -.x-menu-item-arrow{background:transparent url(../images/default/menu/menu-parent.gif) no-repeat right;} -.x-menu-sep{display:block;font-size:1px;line-height:1px;margin:2px 3px;background-color:#e0e0e0;border-bottom:1px solid #fff;overflow:hidden;} -.x-menu-focus{position:absolute;left:-1px;top:-1px;width:1px;height:1px;line-height:1px;font-size:1px;-moz-outline:0 none;outline:0 none;-moz-user-select:text;-khtml-user-select:text;overflow:hidden;display:block;} -.x-menu a.x-menu-item{display:block;line-height:16px;padding:3px 21px 3px 3px;white-space:nowrap;text-decoration:none;color:#222;-moz-outline:0 none;outline:0 none;cursor:pointer;} -.x-menu-item-active{background:#ebf3fd url(../images/default/menu/item-over.gif) repeat-x left bottom;border:1px solid #aaccf6;padding:0;} -.x-menu-item-active a.x-menu-item{color:#233d6d;} -.x-menu-item-icon{border:0 none;height:16px;padding:0;vertical-align:top;width:16px;margin:0 8px 0 0;background-position:center;} -.x-menu-check-item .x-menu-item-icon{background:transparent url(../images/default/menu/unchecked.gif) no-repeat center;} -.x-menu-item-checked .x-menu-item-icon{background-image:url(../images/default/menu/checked.gif);} -.x-menu-group-item .x-menu-item-icon{background:transparent;} -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{background:transparent url(../images/default/menu/group-checked.gif) no-repeat center;} -.x-menu-plain{background:#fff!important;} -.x-menu-date-item{padding:0;} -.x-menu .x-color-palette,.x-menu .x-date-picker{margin-left:26px;margin-right:4px;} -.x-menu .x-date-picker{border:1px solid #a3bad9;margin-top:2px;margin-bottom:2px;} -.x-menu-plain .x-color-palette,.x-menu-plain .x-date-picker{margin:0;border:0 none;} -.x-date-menu{padding:0!important;} -.x-cycle-menu .x-menu-item-checked{border:1px dotted #a3bae9!important;background:#DFE8F6;padding:0;} +.x-masked { + overflow: hidden !important; +} +.x-masked-relative { + position: relative !important; +} - .x-box-tl{background:transparent url(../images/default/box/corners.gif) no-repeat 0 0;zoom:1;} -.x-box-tc{height:8px;background:transparent url(../images/default/box/tb.gif) repeat-x 0 0;overflow:hidden;} -.x-box-tr{background:transparent url(../images/default/box/corners.gif) no-repeat right -8px;} -.x-box-ml{background:transparent url(../images/default/box/l.gif) repeat-y 0;padding-left:4px;overflow:hidden;zoom:1;} -.x-box-mc{background:#eee url(../images/default/box/tb.gif) repeat-x 0 -16px;padding:4px 10px;font-family:"Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;color:#393939;font-size:12px;} -.x-box-mc h3{font-size:14px;font-weight:bold;margin:0 0 4px 0;zoom:1;} -.x-box-mr{background:transparent url(../images/default/box/r.gif) repeat-y right;padding-right:4px;overflow:hidden;} -.x-box-bl{background:transparent url(../images/default/box/corners.gif) no-repeat 0 -16px;zoom:1;} -.x-box-bc{background:transparent url(../images/default/box/tb.gif) repeat-x 0 -8px;height:8px;overflow:hidden;} -.x-box-br{background:transparent url(../images/default/box/corners.gif) no-repeat right -24px;} -.x-box-tl,.x-box-bl{padding-left:8px;overflow:hidden;} -.x-box-tr,.x-box-br{padding-right:8px;overflow:hidden;} -.x-box-blue .x-box-bl,.x-box-blue .x-box-br,.x-box-blue .x-box-tl,.x-box-blue .x-box-tr{background-image:url(../images/default/box/corners-blue.gif);} -.x-box-blue .x-box-bc,.x-box-blue .x-box-mc,.x-box-blue .x-box-tc{background-image:url(../images/default/box/tb-blue.gif);} -.x-box-blue .x-box-mc{background-color:#c3daf9;} -.x-box-blue .x-box-mc h3{color:#17385b;} -.x-box-blue .x-box-ml{background-image:url(../images/default/box/l-blue.gif);} -.x-box-blue .x-box-mr{background-image:url(../images/default/box/r-blue.gif);} +.x-masked select, .x-masked object, .x-masked embed { + visibility: hidden; +} -#x-debug-browser .x-tree .x-tree-node a span{color:#222297;font-size:11px;padding-top:2px;font-family:"monotype","courier new",sans-serif;line-height:18px;} -#x-debug-browser .x-tree a i{color:#FF4545;font-style:normal;} -#x-debug-browser .x-tree a em{color:#999;} -#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{background:#c3daf9;} -#x-debug-browser .x-tool-toggle{background-position:0 -75px;} -#x-debug-browser .x-tool-toggle-over{background-position:-15px -75px;} -#x-debug-browser.x-panel-collapsed .x-tool-toggle{background-position:0 -60px;} -#x-debug-browser.x-panel-collapsed .x-tool-toggle-over{background-position:-15px -60px;} +.x-layer { + visibility: hidden; +} -.x-combo-list{border:1px solid #98c0f4;background:#ddecfe;zoom:1;overflow:hidden;} -.x-combo-list-inner{overflow:auto;background:white;position:relative;zoom:1;overflow-x:hidden;} -.x-combo-list-hd{font:bold 11px tahoma,arial,helvetica,sans-serif;color:#15428b;background-image:url(../images/default/layout/panel-title-light-bg.gif);border-bottom:1px solid #98c0f4;padding:3px;} -.x-resizable-pinned .x-combo-list-inner{border-bottom:1px solid #98c0f4;} -.x-combo-list-item{font:normal 12px tahoma,arial,helvetica,sans-serif;padding:2px;border:1px solid #fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} -.x-combo-list .x-combo-selected{border:1px dotted #a3bae9!important;background:#DFE8F6;cursor:pointer;} -.x-combo-noedit{cursor:pointer;} -.x-combo-list .x-toolbar{border-top:1px solid #98c0f4;border-bottom:0 none;} -.x-combo-list-small .x-combo-list-item{font:normal 11px tahoma,arial,helvetica,sans-serif;} +.x-unselectable, .x-unselectable * { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select:ignore; +} -.x-panel{border-style:solid;border-color:#99bbe8;border-width:0;} -.x-panel-header{overflow:hidden;zoom:1;color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 3px 4px 5px;border:1px solid #99bbe8;line-height:15px;background:transparent url(../images/default/panel/white-top-bottom.gif) repeat-x 0 -1px;} -.x-panel-body{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;background:white;position:relative;} -.x-panel-bbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} -.x-panel-tbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} -.x-panel-tbar-noheader .x-toolbar,.x-panel-mc .x-panel-tbar .x-toolbar{border-top:1px solid #99bbe8;border-bottom:0 none;} -.x-panel-body-noheader,.x-panel-mc .x-panel-body{border-top:1px solid #99bbe8;} -.x-panel-header{overflow:hidden;zoom:1;} -.x-panel-tl .x-panel-header{color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 0 4px 0;border:0 none;background:transparent;} -.x-panel-tl .x-panel-icon,.x-window-tl .x-panel-icon{padding-left:20px!important;background-repeat:no-repeat;background-position:0 4px;zoom:1;} -.x-panel-inline-icon{width:16px;height:16px;background-repeat:no-repeat;background-position:0 0;vertical-align:middle;margin-right:4px;margin-top:-1px;margin-bottom:-1px;} -.x-panel-tc{background:transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 0;overflow:hidden;} -.ext-strict .ext-ie7 .x-panel-tc{overflow:visible;} -.x-panel-tl{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 0;padding-left:6px;zoom:1;border-bottom:1px solid #99bbe8;} -.x-panel-tr{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat right 0;zoom:1;padding-right:6px;} -.x-panel-bc{background:transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 bottom;zoom:1;} -.x-panel-bc .x-panel-footer{zoom:1;} -.x-panel-bl{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 bottom;padding-left:6px;zoom:1;} -.x-panel-br{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat right bottom;padding-right:6px;zoom:1;} -.x-panel-mc{border:0 none;padding:0;margin:0;font:normal 11px tahoma,arial,helvetica,sans-serif;padding-top:6px;background:#dfe8f6;} -.x-panel-mc .x-panel-body{background:transparent;border:0 none;} -.x-panel-ml{background:#fff url(../images/default/panel/left-right.gif) repeat-y 0 0;padding-left:6px;zoom:1;} -.x-panel-mr{background:transparent url(../images/default/panel/left-right.gif) repeat-y right 0;padding-right:6px;zoom:1;} -.x-panel-bc .x-panel-footer{padding-bottom:6px;} -.x-panel-nofooter .x-panel-bc,.x-panel-nofooter .x-window-bc{height:6px;font-size:0;line-height:0;} -.x-panel-bwrap{overflow:hidden;zoom:1;left:0;top:0;} -.x-panel-body{overflow:hidden;zoom:1;} -.x-panel-collapsed .x-resizable-handle{display:none;} -.ext-gecko .x-panel-animated div{overflow:hidden!important;} -.x-plain-body{overflow:hidden;} -.x-plain-bbar .x-toolbar{overflow:hidden;padding:2px;} -.x-plain-tbar .x-toolbar{overflow:hidden;padding:2px;} -.x-plain-bwrap{overflow:hidden;zoom:1;} -.x-plain{overflow:hidden;} -.x-tool{overflow:hidden;width:15px;height:15px;float:right;cursor:pointer;background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat;margin-left:2px;} -.x-tool-toggle{background-position:0 -60px;} -.x-tool-toggle-over{background-position:-15px -60px;} -.x-panel-collapsed .x-tool-toggle{background-position:0 -75px;} -.x-panel-collapsed .x-tool-toggle-over{background-position:-15px -75px;} -.x-tool-close{background-position:0 -0;} -.x-tool-close-over{background-position:-15px 0;} -.x-tool-minimize{background-position:0 -15px;} -.x-tool-minimize-over{background-position:-15px -15px;} -.x-tool-maximize{background-position:0 -30px;} -.x-tool-maximize-over{background-position:-15px -30px;} -.x-tool-restore{background-position:0 -45px;} -.x-tool-restore-over{background-position:-15px -45px;} -.x-tool-gear{background-position:0 -90px;} -.x-tool-gear-over{background-position:-15px -90px;} -.x-tool-pin{background-position:0 -135px;} -.x-tool-pin-over{background-position:-15px -135px;} -.x-tool-unpin{background-position:0 -150px;} -.x-tool-unpin-over{background-position:-15px -150px;} -.x-tool-right{background-position:0 -165px;} -.x-tool-right-over{background-position:-15px -165px;} -.x-tool-left{background-position:0 -180px;} -.x-tool-left-over{background-position:-15px -180px;} -.x-tool-up{background-position:0 -210px;} -.x-tool-up-over{background-position:-15px -210px;} -.x-tool-down{background-position:0 -195px;} -.x-tool-down-over{background-position:-15px -195px;} -.x-tool-refresh{background-position:0 -225px;} -.x-tool-refresh-over{background-position:-15px -225px;} -.x-tool-minus{background-position:0 -255px;} -.x-tool-minus-over{background-position:-15px -255px;} -.x-tool-plus{background-position:0 -240px;} -.x-tool-plus-over{background-position:-15px -240px;} -.x-tool-search{background-position:0 -270px;} -.x-tool-search-over{background-position:-15px -270px;} -.x-tool-save{background-position:0 -285px;} -.x-tool-save-over{background-position:-15px -285px;} -.x-tool-help{background-position:0 -300px;} -.x-tool-help-over{background-position:-15px -300px;} -.x-tool-print{background-position:0 -315px;} -.x-tool-print-over{background-position:-15px -315px;} -.x-panel-ghost{background:#cbddf3;z-index:12000;overflow:hidden;position:absolute;left:0;top:0;opacity:.65;-moz-opacity:.65;filter:alpha(opacity=65);} -.x-panel-ghost ul{margin:0;padding:0;overflow:hidden;font-size:0;line-height:0;border:1px solid #99bbe8;border-top:0 none;display:block;} -.x-panel-ghost *{cursor:move!important;} -.x-panel-dd-spacer{border:2px dashed #99bbe8;} -.x-panel-btns-ct{padding:5px;} -.x-panel-btns-ct .x-btn{float:right;clear:none;} -.x-panel-btns-ct .x-panel-btns td{border:0;padding:0;} -.x-panel-btns-ct .x-panel-btns-right table{float:right;clear:none;} -.x-panel-btns-ct .x-panel-btns-left table{float:left;clear:none;} -.x-panel-btns-ct .x-panel-btns-center{text-align:center;} -.x-panel-btns-ct .x-panel-btns-center table{margin:0 auto;} -.x-panel-btns-ct table td.x-panel-btn-td{padding:3px;} -.x-panel-btns-ct .x-btn-focus .x-btn-left{background-position:0 -147px;} -.x-panel-btns-ct .x-btn-focus .x-btn-right{background-position:0 -168px;} -.x-panel-btns-ct .x-btn-focus .x-btn-center{background-position:0 -189px;} -.x-panel-btns-ct .x-btn-over .x-btn-left{background-position:0 -63px;} -.x-panel-btns-ct .x-btn-over .x-btn-right{background-position:0 -84px;} -.x-panel-btns-ct .x-btn-over .x-btn-center{background-position:0 -105px;} -.x-panel-btns-ct .x-btn-click .x-btn-center{background-position:0 -126px;} -.x-panel-btns-ct .x-btn-click .x-btn-right{background-position:0 -84px;} -.x-panel-btns-ct .x-btn-click .x-btn-left{background-position:0 -63px;} +.x-repaint { + zoom: 1; + background-color: transparent; + -moz-outline: none; + outline: none; +} -.x-window{zoom:1;} -.x-window .x-resizable-handle{opacity:0;-moz-opacity:0;filter:alpha(opacity=0);} -.x-window-proxy{background:#C7DFFC;border:1px solid #99bbe8;z-index:12000;overflow:hidden;position:absolute;left:0;top:0;display:none;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);} -.x-window-header{overflow:hidden;zoom:1;} -.x-window-bwrap{z-index:1;position:relative;zoom:1;left:0;top:0;} -.x-window-tl .x-window-header{color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 0 4px 0;} -.x-window-header-text{cursor:pointer;} -.x-window-tc{background:transparent url(../images/default/window/top-bottom.png) repeat-x 0 0;overflow:hidden;zoom:1;} -.x-window-tl{background:transparent url(../images/default/window/left-corners.png) no-repeat 0 0;padding-left:6px;zoom:1;z-index:1;position:relative;} -.x-window-tr{background:transparent url(../images/default/window/right-corners.png) no-repeat right 0;padding-right:6px;} -.x-window-bc{background:transparent url(../images/default/window/top-bottom.png) repeat-x 0 bottom;zoom:1;} -.x-window-bc .x-window-footer{padding-bottom:6px;zoom:1;font-size:0;line-height:0;} -.x-window-bl{background:transparent url(../images/default/window/left-corners.png) no-repeat 0 bottom;padding-left:6px;zoom:1;} -.x-window-br{background:transparent url(../images/default/window/right-corners.png) no-repeat right bottom;padding-right:6px;zoom:1;} -.x-window-mc{border:1px solid #99bbe8;padding:0;margin:0;font:normal 11px tahoma,arial,helvetica,sans-serif;background:#dfe8f6;} -.x-window-ml{background:transparent url(../images/default/window/left-right.png) repeat-y 0 0;padding-left:6px;zoom:1;} -.x-window-mr{background:transparent url(../images/default/window/left-right.png) repeat-y right 0;padding-right:6px;zoom:1;} -.x-window-body{overflow:hidden;} -.x-window-bwrap{overflow:hidden;} -.x-window-maximized .x-window-bl,.x-window-maximized .x-window-br,.x-window-maximized .x-window-ml,.x-window-maximized .x-window-mr,.x-window-maximized .x-window-tl,.x-window-maximized .x-window-tr{padding:0;} -.x-window-maximized .x-window-footer{padding-bottom:0;} -.x-window-maximized .x-window-tc{padding-left:3px;padding-right:3px;background-color:white;} -.x-window-maximized .x-window-mc{border-left:0 none;border-right:0 none;} -.x-window-tbar .x-toolbar,.x-window-bbar .x-toolbar{border-left:0 none;border-right:0 none;} -.x-window-bbar .x-toolbar{border-top:1px solid #99bbe8;border-bottom:0 none;} -.x-window-draggable,.x-window-draggable .x-window-header-text{cursor:move;} -.x-window-maximized .x-window-draggable,.x-window-maximized .x-window-draggable .x-window-header-text{cursor:default;} -.x-window-body{background:transparent;} -.x-panel-ghost .x-window-tl{border-bottom:1px solid #99bbe8;} -.x-panel-collapsed .x-window-tl{border-bottom:1px solid #84a0c4;} -.x-window-maximized-ct{overflow:hidden;} -.x-window-maximized .x-resizable-handle{display:none;} -.x-window-sizing-ghost ul{border:0 none!important;} -.x-dlg-focus{-moz-outline:0 none;outline:0 none;width:0;height:0;overflow:hidden;position:absolute;top:0;left:0;} -.x-dlg-mask{z-index:10000;display:none;position:absolute;top:0;left:0;-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);background-color:#CCC;} -body.ext-ie6.x-body-masked select{visibility:hidden;} -body.ext-ie6.x-body-masked .x-window select{visibility:visible;} -.x-window-plain .x-window-mc{background:#CAD9EC;border-right:1px solid #DFE8F6;border-bottom:1px solid #DFE8F6;border-top:1px solid #a3bae9;border-left:1px solid #a3bae9;} -.x-window-plain .x-window-body{border-left:1px solid #DFE8F6;border-top:1px solid #DFE8F6;border-bottom:1px solid #a3bae9;border-right:1px solid #a3bae9;background:transparent!important;} -body.x-body-masked .x-window-plain .x-window-mc{background:#C7D6E9;} +.x-item-disabled { + cursor: default; + opacity: .6; + -moz-opacity: .6; + filter: alpha(opacity=60); +} -.x-html-editor-wrap{border:1px solid #a9bfd3;background:white;} -.x-html-editor-tb .x-btn-text{background:transparent url(../images/default/editor/tb-sprite.gif) no-repeat;} -.x-html-editor-tb .x-edit-bold .x-btn-text{background-position:0 0;} -.x-html-editor-tb .x-edit-italic .x-btn-text{background-position:-16px 0;} -.x-html-editor-tb .x-edit-underline .x-btn-text{background-position:-32px 0;} -.x-html-editor-tb .x-edit-forecolor .x-btn-text{background-position:-160px 0;} -.x-html-editor-tb .x-edit-backcolor .x-btn-text{background-position:-176px 0;} -.x-html-editor-tb .x-edit-justifyleft .x-btn-text{background-position:-112px 0;} -.x-html-editor-tb .x-edit-justifycenter .x-btn-text{background-position:-128px 0;} -.x-html-editor-tb .x-edit-justifyright .x-btn-text{background-position:-144px 0;} -.x-html-editor-tb .x-edit-insertorderedlist .x-btn-text{background-position:-80px 0;} -.x-html-editor-tb .x-edit-insertunorderedlist .x-btn-text{background-position:-96px 0;} -.x-html-editor-tb .x-edit-increasefontsize .x-btn-text{background-position:-48px 0;} -.x-html-editor-tb .x-edit-decreasefontsize .x-btn-text{background-position:-64px 0;} -.x-html-editor-tb .x-edit-sourceedit .x-btn-text{background-position:-192px 0;} -.x-html-editor-tb .x-edit-createlink .x-btn-text{background-position:-208px 0;} -.x-html-editor-tip .x-tip-bd .x-tip-bd-inner{padding:5px;padding-bottom:1px;} -.x-html-editor-tb .x-toolbar{position:static!important;} +.x-item-disabled * { + cursor: default !important; +} -.x-panel-noborder .x-panel-body-noborder{border-width:0;} -.x-panel-noborder .x-panel-header-noborder{border-width:0;border-bottom:1px solid #99bbe8;} -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #99bbe8;} -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #99bbe8;} -.x-window-noborder .x-window-mc{border-width:0;} -.x-window-plain .x-window-body-noborder{border-width:0;} -.x-tab-panel-noborder .x-tab-panel-body-noborder{border-width:0;} -.x-tab-panel-noborder .x-tab-panel-header-noborder{border-top-width:0;border-left-width:0;border-right-width:0;} -.x-tab-panel-noborder .x-tab-panel-footer-noborder{border-bottom-width:0;border-left-width:0;border-right-width:0;} -.x-tab-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #99bbe8;} -.x-tab-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #99bbe8;} +.x-form-radio-group .x-item-disabled { + filter: none; +} -.x-border-layout-ct{background:#dfe8f6;} -.x-border-panel{position:absolute;left:0;top:0;} -.x-tool-collapse-south{background-position:0 -195px;} -.x-tool-collapse-south-over{background-position:-15px -195px;} -.x-tool-collapse-north{background-position:0 -210px;} -.x-tool-collapse-north-over{background-position:-15px -210px;} -.x-tool-collapse-west{background-position:0 -180px;} -.x-tool-collapse-west-over{background-position:-15px -180px;} -.x-tool-collapse-east{background-position:0 -165px;} -.x-tool-collapse-east-over{background-position:-15px -165px;} -.x-tool-expand-south{background-position:0 -210px;} -.x-tool-expand-south-over{background-position:-15px -210px;} -.x-tool-expand-north{background-position:0 -195px;} -.x-tool-expand-north-over{background-position:-15px -195px;} -.x-tool-expand-west{background-position:0 -165px;} -.x-tool-expand-west-over{background-position:-15px -165px;} -.x-tool-expand-east{background-position:0 -180px;} -.x-tool-expand-east-over{background-position:-15px -180px;} -.x-tool-expand-north,.x-tool-expand-south{float:right;margin:3px;} -.x-tool-expand-east,.x-tool-expand-west{float:none;margin:3px auto;} -.x-accordion-hd .x-tool-toggle{background-position:0 -255px;} -.x-accordion-hd .x-tool-toggle-over{background-position:-15px -255px;} -.x-panel-collapsed .x-accordion-hd .x-tool-toggle{background-position:0 -240px;} -.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over{background-position:-15px -240px;} -.x-accordion-hd{color:#222;padding-top:4px;padding-bottom:3px;border-top:0 none;font-weight:normal;background:transparent url(../images/default/panel/light-hd.gif) repeat-x 0 -9px;} -.x-layout-collapsed{position:absolute;left:-10000px;top:-10000px;visibility:hidden;background-color:#d2e0f2;width:20px;height:20px;overflow:hidden;border:1px solid #98c0f4;z-index:20;} -.ext-border-box .x-layout-collapsed{width:22px;height:22px;} -.x-layout-collapsed-over{cursor:pointer;background-color:#d9e8fb;} -.x-layout-collapsed-west .x-layout-collapsed-tools,.x-layout-collapsed-east .x-layout-collapsed-tools{position:absolute;top:0;left:0;width:20px;height:20px;} -.x-layout-split{position:absolute;height:5px;width:5px;line-height:1px;font-size:1px;z-index:3;background-color:transparent;} -.ext-strict .ext-ie6 .x-layout-split{background-color:#fff!important;filter:alpha(opacity=1);} -.x-layout-split-h{background-image:url(../images/default/s.gif);background-position:left;} -.x-layout-split-v{background-image:url(../images/default/s.gif);background-position:top;} -.x-column-layout-ct{overflow:hidden;zoom:1;} -.x-column{float:left;padding:0;margin:0;overflow:hidden;zoom:1;} -.x-layout-mini{position:absolute;top:0;left:0;display:block;width:5px;height:35px;cursor:pointer;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);} -.x-layout-mini-over,.x-layout-collapsed-over .x-layout-mini{opacity:1;-moz-opacity:1;filter:none;} -.x-layout-split-west .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-left.gif);} -.x-layout-split-east .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-right.gif);} -.x-layout-split-north .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-top.gif);} -.x-layout-split-south .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-bottom.gif);} -.x-layout-cmini-west .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-right.gif);} -.x-layout-cmini-east .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-left.gif);} -.x-layout-cmini-north .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-bottom.gif);} -.x-layout-cmini-south .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-top.gif);} -.x-layout-cmini-west,.x-layout-cmini-east{border:0 none;width:5px!important;padding:0;background:transparent;} -.x-layout-cmini-north,.x-layout-cmini-south{border:0 none;height:5px!important;padding:0;background:transparent;} -.x-viewport,.x-viewport body{margin:0;padding:0;border:0 none;overflow:hidden;height:100%;} -.x-abs-layout-item{position:absolute;left:0;top:0;} -.ext-ie input.x-abs-layout-item,.ext-ie textarea.x-abs-layout-item{margin:0;} +.x-splitbar-proxy { + position: absolute; + visibility: hidden; + z-index: 20001; + zoom: 1; + line-height: 1px; + font-size: 1px; + overflow: hidden; +} -.x-progress-wrap{border:1px solid #6593cf;overflow:hidden;} -.x-progress-inner{height:18px;background:#e0e8f3 url(../images/default/qtip/bg.gif) repeat-x;position:relative;} -.x-progress-bar{height:18px;float:left;width:0;background:#9CBFEE url( ../images/default/progress/progress-bg.gif ) repeat-x left center;border-top:1px solid #D1E4FD;border-bottom:1px solid #7FA9E4;border-right:1px solid #7FA9E4;} -.x-progress-text{font-size:11px;font-weight:bold;color:#fff;padding:1px 5px;overflow:hidden;position:absolute;left:0;text-align:center;} -.x-progress-text-back{color:#396095;line-height:16px;} -.ext-ie .x-progress-text-back{line-height:15px;} +.x-splitbar-h, .x-splitbar-proxy-h { + cursor: e-resize; + cursor: col-resize; +} -.x-window-dlg .x-window-body{border:0 none!important;padding:5px 10px;overflow:hidden!important;} -.x-window-dlg .x-window-mc{border:0 none!important;} -.x-window-dlg .ext-mb-text,.x-window-dlg .x-window-header-text{font-size:12px;} -.x-window-dlg .ext-mb-input{margin-top:4px;width:95%;} -.x-window-dlg .ext-mb-textarea{margin-top:4px;font:normal 12px tahoma,arial,helvetica,sans-serif;} -.x-window-dlg .x-progress-wrap{margin-top:4px;} -.ext-ie .x-window-dlg .x-progress-wrap{margin-top:6px;} -.x-window-dlg .x-msg-box-wait{background:transparent url(../images/default/grid/loading.gif) no-repeat left;display:block;width:300px;padding-left:18px;line-height:18px;} -.x-window-dlg .ext-mb-icon{float:left;width:47px;height:32px;} -.x-window-dlg .ext-mb-icon{float:left;width:47px;height:32px;} -.ext-ie .x-window-dlg .ext-mb-icon{width:44px;} -.x-window-dlg .ext-mb-info{background:transparent url(../images/default/window/icon-info.gif) no-repeat top left;} -.x-window-dlg .ext-mb-warning{background:transparent url(../images/default/window/icon-warning.gif) no-repeat top left;} -.x-window-dlg .ext-mb-question{background:transparent url(../images/default/window/icon-question.gif) no-repeat top left;} -.x-window-dlg .ext-mb-error{background:transparent url(../images/default/window/icon-error.gif) no-repeat top left;} -.ext-gecko2 .ext-mb-fix-cursor{overflow:auto;} +.x-splitbar-v, .x-splitbar-proxy-v { + cursor: s-resize; + cursor: row-resize; +} - .x-slider{zoom:1;} -.x-slider-inner{position:relative;left:0;top:0;overflow:visible;zoom:1;} -.x-slider-focus{position:absolute;left:0;top:0;width:1px;height:1px;line-height:1px;font-size:1px;-moz-outline:0 none;outline:0 none;-moz-user-select:text;-khtml-user-select:text;} -.x-slider-horz{padding-left:7px;background:transparent url(../images/default/slider/slider-bg.png) no-repeat 0 -22px;} -.x-slider-horz .x-slider-end{padding-right:7px;zoom:1;background:transparent url(../images/default/slider/slider-bg.png) no-repeat right -44px;} -.x-slider-horz .x-slider-inner{background:transparent url(../images/default/slider/slider-bg.png) repeat-x 0 0;height:22px;} -.x-slider-horz .x-slider-thumb{width:14px;height:15px;position:absolute;left:0;top:3px;background:transparent url(../images/default/slider/slider-thumb.png) no-repeat 0 0;} -.x-slider-horz .x-slider-thumb-over{background-position:-14px -15px;} -.x-slider-horz .x-slider-thumb-drag{background-position:-28px -30px;} -.x-slider-vert{padding-top:7px;background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -44px 0;width:22px;} -.x-slider-vert .x-slider-end{padding-bottom:7px;zoom:1;background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -22px bottom;} -.x-slider-vert .x-slider-inner{background:transparent url(../images/default/slider/slider-v-bg.png) repeat-y 0 0;} -.x-slider-vert .x-slider-thumb{width:15px;height:14px;position:absolute;left:3px;bottom:0;background:transparent url(../images/default/slider/slider-v-thumb.png) no-repeat 0 0;} -.x-slider-vert .x-slider-thumb-over{background-position:-15px -14px;} -.x-slider-vert .x-slider-thumb-drag{background-position:-30px -28px;} +.x-color-palette { + width: 150px; + height: 92px; + cursor: pointer; +} +.x-color-palette a { + border: 1px solid; + float: left; + padding: 2px; + text-decoration: none; + -moz-outline: 0 none; + outline: 0 none; + cursor: pointer; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border: 1px solid; +} + +.x-color-palette em { + display: block; + border: 1px solid; +} + +.x-color-palette em span { + cursor: pointer; + display: block; + height: 10px; + line-height: 10px; + width: 10px; +} + +.x-ie-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; + zoom:1; +} + +.x-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; +} + +.x-shadow * { + overflow: hidden; +} + +.x-shadow * { + padding: 0; + border: 0; + margin: 0; + clear: none; + zoom: 1; +} + +/* top bottom */ +.x-shadow .xstc, .x-shadow .xsbc { + height: 6px; + float: left; +} + +/* corners */ +.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { + width: 6px; + height: 6px; + float: left; +} + +/* sides */ +.x-shadow .xsc { + width: 100%; +} + +.x-shadow .xsml, .x-shadow .xsmr { + width: 6px; + float: left; + height: 100%; +} + +.x-shadow .xsmc { + float: left; + height: 100%; + background-color: transparent; +} + +.x-shadow .xst, .x-shadow .xsb { + height: 6px; + overflow: hidden; + width: 100%; +} + +.x-shadow .xsml { + background: transparent repeat-y 0 0; +} + +.x-shadow .xsmr { + background: transparent repeat-y -6px 0; +} + +.x-shadow .xstl { + background: transparent no-repeat 0 0; +} + +.x-shadow .xstc { + background: transparent repeat-x 0 -30px; +} + +.x-shadow .xstr { + background: transparent repeat-x 0 -18px; +} + +.x-shadow .xsbl { + background: transparent no-repeat 0 -12px; +} + +.x-shadow .xsbc { + background: transparent repeat-x 0 -36px; +} + +.x-shadow .xsbr { + background: transparent repeat-x 0 -6px; +} + +.loading-indicator { + background: no-repeat left; + padding-left: 20px; + line-height: 16px; + margin: 3px; +} + +.x-text-resize { + position: absolute; + left: -1000px; + top: -1000px; + visibility: hidden; + zoom: 1; +} + +.x-drag-overlay { + width: 100%; + height: 100%; + display: none; + position: absolute; + left: 0; + top: 0; + background-image:url(../images/default/s.gif); + z-index: 20000; +} + +.x-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + +.x-spotlight { + z-index: 8999; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + width:0; + height:0; + zoom: 1; +} + +#x-history-frame { + position:absolute; + top:-1px; + left:0; + width:1px; + height:1px; + visibility:hidden; +} + +#x-history-field { + position:absolute; + top:0; + left:-1px; + width:1px; + height:1px; + visibility:hidden; +} +.x-resizable-handle { + position:absolute; + z-index:100; + /* ie needs these */ + font-size:1px; + line-height:6px; + overflow:hidden; + filter:alpha(opacity=0); + opacity:0; + zoom:1; +} + +.x-resizable-handle-east{ + width:6px; + cursor:e-resize; + right:0; + top:0; + height:100%; +} + +.ext-ie .x-resizable-handle-east { + margin-right:-1px; /*IE rounding error*/ +} + +.x-resizable-handle-south{ + width:100%; + cursor:s-resize; + left:0; + bottom:0; + height:6px; +} + +.ext-ie .x-resizable-handle-south { + margin-bottom:-1px; /*IE rounding error*/ +} + +.x-resizable-handle-west{ + width:6px; + cursor:w-resize; + left:0; + top:0; + height:100%; +} + +.x-resizable-handle-north{ + width:100%; + cursor:n-resize; + left:0; + top:0; + height:6px; +} + +.x-resizable-handle-southeast{ + width:6px; + cursor:se-resize; + right:0; + bottom:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-northwest{ + width:6px; + cursor:nw-resize; + left:0; + top:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-northeast{ + width:6px; + cursor:ne-resize; + right:0; + top:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-southwest{ + width:6px; + cursor:sw-resize; + left:0; + bottom:0; + height:6px; + z-index:101; +} + +.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ + filter:alpha(opacity=100); + opacity:1; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-position: left; +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-position: top; +} + +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-position: top left; +} + +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-position:bottom right; +} + +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-position: bottom left; +} + +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-position: top right; +} + +.x-resizable-proxy{ + border: 1px dashed; + position:absolute; + overflow:hidden; + display:none; + left:0; + top:0; + z-index:50000; +} + +.x-resizable-overlay{ + width:100%; + height:100%; + display:none; + position:absolute; + left:0; + top:0; + z-index:200000; + -moz-opacity: 0; + opacity:0; + filter: alpha(opacity=0); +} +.x-tab-panel { + overflow:hidden; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border: 1px solid; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header { + border: 1px solid; + padding-bottom: 2px; +} + +.x-tab-panel-footer { + border: 1px solid; + padding-top: 2px; +} + +.x-tab-strip-wrap { + width:100%; + overflow:hidden; + position:relative; + zoom:1; +} + +ul.x-tab-strip { + display:block; + width:5000px; + zoom:1; +} + +ul.x-tab-strip-top{ + padding-top: 1px; + background: repeat-x bottom; + border-bottom: 1px solid; +} + +ul.x-tab-strip-bottom{ + padding-bottom: 1px; + background: repeat-x top; + border-top: 1px solid; + border-bottom: 0 none; +} + +.x-tab-panel-header-plain .x-tab-strip-top { + background:transparent !important; + padding-top:0 !important; +} + +.x-tab-panel-header-plain { + background:transparent !important; + border-width:0 !important; + padding-bottom:0 !important; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border:1px solid; + height:2px; + font-size:1px; + line-height:1px; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer { + border-top: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-bottom: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-bottom { + background:transparent !important; + padding-bottom:0 !important; +} + +.x-tab-panel-footer-plain { + background:transparent !important; + border-width:0 !important; + padding-top:0 !important; +} + +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, +.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { + height:3px; +} + +ul.x-tab-strip li { + float:left; + margin-left:2px; +} + +ul.x-tab-strip li.x-tab-edge { + float:left; + margin:0 !important; + padding:0 !important; + border:0 none !important; + font-size:1px !important; + line-height:1px !important; + overflow:hidden; + zoom:1; + background:transparent !important; + width:1px; +} + +.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { + display:block; +} + +.x-tab-strip a { + text-decoration:none !important; + -moz-outline: none; + outline: none; + cursor:pointer; +} + +.x-tab-strip-inner { + overflow:hidden; + text-overflow: ellipsis; +} + +.x-tab-strip span.x-tab-strip-text { + white-space: nowrap; + cursor:pointer; + padding:4px 0; +} + +.x-tab-strip-top .x-tab-with-icon .x-tab-right { + padding-left:6px; +} + +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { + padding-left:20px; + background-position: 0 3px; + background-repeat: no-repeat; +} + +.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { + cursor:default; +} + +.x-tab-strip-active span.x-tab-strip-text { + cursor:default; +} + +.x-tab-strip-disabled .x-tabs-text { + cursor:default; +} + +.x-tab-panel-body { + overflow:hidden; +} + +.x-tab-panel-bwrap { + overflow:hidden; +} + +.ext-ie .x-tab-strip .x-tab-right { + position:relative; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right { + margin-bottom:-1px; +} + +/* + * Horrible hack for IE8 in quirks mode + */ +.ext-ie8 .x-tab-strip li { + position: relative; +} +.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { + top: 1px; +} +.ext-ie8 .x-tab-strip-top { + padding-top: 1; +} +.ext-border-box .ext-ie8 .x-tab-strip-top { + padding-top: 0; +} +.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:3px; +} +.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:4px; +} +.ext-ie8 .x-tab-strip-bottom .x-tab-right{ + top:0; +} + + +.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { + padding-bottom:5px; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + margin-top:-1px; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { + padding-top:5px; +} + +.x-tab-strip-top .x-tab-right { + background: transparent no-repeat 0 -51px; + padding-left:10px; +} + +.x-tab-strip-top .x-tab-left { + background: transparent no-repeat right -351px; + padding-right:10px; +} + +.x-tab-strip-top .x-tab-strip-inner { + background: transparent repeat-x 0 -201px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-right { + background-position:0 -101px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-left { + background-position:right -401px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { + background-position:0 -251px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right { + background-position: 0 0; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-left { + background-position: right -301px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { + background-position: 0 -151px; +} + +.x-tab-strip-bottom .x-tab-right { + background: no-repeat bottom right; +} + +.x-tab-strip-bottom .x-tab-left { + background: no-repeat bottom left; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background: no-repeat bottom right; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background: no-repeat bottom left; +} + +.x-tab-strip-bottom .x-tab-left { + margin-right: 3px; + padding:0 10px; +} + +.x-tab-strip-bottom .x-tab-right { + padding:0; +} + +.x-tab-strip .x-tab-strip-close { + display:none; +} + +.x-tab-strip-closable { + position:relative; +} + +.x-tab-strip-closable .x-tab-left { + padding-right:19px; +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + opacity:.6; + -moz-opacity:.6; + background-repeat:no-repeat; + display:block; + width:11px; + height:11px; + position:absolute; + top:3px; + right:3px; + cursor:pointer; + z-index:2; +} + +.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { + opacity:.8; + -moz-opacity:.8; +} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + opacity:1; + -moz-opacity:1; +} + +.x-tab-panel-body { + border: 1px solid; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background: transparent no-repeat -18px 0; + border-bottom: 1px solid; + width:18px; + position:absolute; + left:0; + top:0; + z-index:10; + cursor:pointer; +} +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background: transparent no-repeat 0 0; + border-bottom: 1px solid; + width:18px; + position:absolute; + right:0; + top:0; + z-index:10; + cursor:pointer; +} + +.x-tab-scroller-right-over { + background-position: -18px 0; +} + +.x-tab-scroller-right-disabled { + background-position: 0 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ + margin-top: 1px; +} + +.x-tab-scrolling .x-tab-strip-wrap { + margin-left:18px; + margin-right:18px; +} + +.x-tab-scrolling { + position:relative; +} + +.x-tab-panel-bbar .x-toolbar { + border:1px solid; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-tab-panel-tbar .x-toolbar { + border:1px solid; + border-top:0 none; + overflow:hidden; + padding:2px; +}/* all fields */ +.x-form-field{ + margin: 0 0 0 0; +} + +.ext-webkit *:focus{ + outline: none !important; +} + +/* ---- text fields ---- */ +.x-form-text, textarea.x-form-field{ + padding:1px 3px; + background:repeat-x 0 0; + border:1px solid; +} + +textarea.x-form-field { + padding:2px 3px; +} + +.x-form-text, .ext-ie .x-form-file { + height:22px; + line-height:18px; + vertical-align:middle; +} + +.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { + margin:-1px 0; /* ie bogus margin bug */ + height:22px; /* ie quirks */ + line-height:18px; +} + +.x-quirks .ext-ie9 .x-form-text { + height: 22px; + padding-top: 3px; + padding-bottom: 0px; +} + +/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ +.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, +.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { + margin-top: -1px; + margin-bottom: -1px; +} +.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { + margin-bottom: -1px; +} + +.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { + top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ +} + +.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { + margin:-1px 0; /* ie bogus margin bug */ +} + +.ext-strict .x-form-text { + height:18px; +} + +.ext-safari.ext-mac textarea.x-form-field { + margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ +} + +/* +.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { + margin-bottom: 1px; +} +*/ + +.ext-gecko .x-form-text , .ext-ie8 .x-form-text { + padding-top:2px; /* FF won't center the text vertically */ + padding-bottom:0; +} + +.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { + margin: 0 !important; /* clear ie bogus margin bug fix */ +} + +textarea { + resize: none; /* Disable browser resizable textarea */ +} + +/* select boxes */ +.x-form-select-one { + height:20px; + line-height:18px; + vertical-align:middle; + border: 1px solid; +} + +/* multi select boxes */ + +/* --- TODO --- */ + +/* 2.0.2 style */ +.x-form-check-wrap { + line-height:18px; + height: auto; +} + +.ext-ie .x-form-check-wrap input { + width:15px; + height:15px; +} + +.x-form-check-wrap input{ + vertical-align: bottom; +} + +.x-editor .x-form-check-wrap { + padding:3px; +} + +.x-editor .x-form-checkbox { + height:13px; +} + +.x-form-check-group-label { + border-bottom: 1px solid; + margin-bottom: 5px; + padding-left: 3px !important; + float: none !important; +} + +/* wrapped fields and triggers */ +.x-form-field-wrap .x-form-trigger{ + width:17px; + height:21px; + border:0; + background:transparent no-repeat 0 0; + cursor:pointer; + border-bottom: 1px solid; + position:absolute; + top:0; +} + +.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ + cursor:pointer; +} + +.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ + position:static; + top:auto; + vertical-align:top; +} + +.x-form-field-wrap { + position:relative; + left:0;top:0; + text-align: left; + zoom:1; + white-space: nowrap; +} + +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { + right: 0; /* IE8 Strict mode trigger bug */ +} + +.x-form-field-wrap .x-form-trigger-over{ + background-position:-17px 0; +} + +.x-form-field-wrap .x-form-trigger-click{ + background-position:-34px 0; +} + +.x-trigger-wrap-focus .x-form-trigger{ + background-position:-51px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-over{ + background-position:-68px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-click{ + background-position:-85px 0; +} + +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom: 1px solid; +} + +.x-item-disabled .x-form-trigger-over{ + background-position:0 0 !important; + border-bottom: 1px solid; +} + +.x-item-disabled .x-form-trigger-click{ + background-position:0 0 !important; + border-bottom: 1px solid; +} + +.x-trigger-noedit{ + cursor:pointer; +} + +/* field focus style */ +.x-form-focus, textarea.x-form-focus{ + border: 1px solid; +} + +/* invalid fields */ +.x-form-invalid, textarea.x-form-invalid{ + background:repeat-x bottom; + border: 1px solid; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background:repeat-x bottom; +} + +/* editors */ +.x-editor { + visibility:hidden; + padding:0; + margin:0; +} + +.x-form-grow-sizer { + left: -10000px; + padding: 8px 3px; + position: absolute; + visibility:hidden; + top: -10000px; + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; + zoom:1; +} + +.x-form-grow-sizer p { + margin:0 !important; + border:0 none !important; + padding:0 !important; +} + +/* Form Items CSS */ + +.x-form-item { + display:block; + margin-bottom:4px; + zoom:1; +} + +.x-form-item label.x-form-item-label { + display:block; + float:left; + width:100px; + padding:3px; + padding-left:0; + clear:left; + z-index:2; + position:relative; +} + +.x-form-element { + padding-left:105px; + position:relative; +} + +.x-form-invalid-msg { + padding:2px; + padding-left:18px; + background: transparent no-repeat 0 2px; + line-height:16px; + width:200px; +} + +.x-form-label-left label.x-form-item-label { + text-align:left; +} + +.x-form-label-right label.x-form-item-label { + text-align:right; +} + +.x-form-label-top .x-form-item label.x-form-item-label { + width:auto; + float:none; + clear:none; + display:inline; + margin-bottom:4px; + position:static; +} + +.x-form-label-top .x-form-element { + padding-left:0; + padding-top:4px; +} + +.x-form-label-top .x-form-item { + padding-bottom:4px; +} + +/* Editor small font for grid, toolbar and tree */ +.x-small-editor .x-form-text { + height:20px; + line-height:16px; + vertical-align:middle; +} + +.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { + margin-top:-1px !important; /* ie bogus margin bug */ + margin-bottom:-1px !important; + height:20px !important; /* ie quirks */ + line-height:16px !important; +} + +.ext-strict .x-small-editor .x-form-text { + height:16px !important; +} + +.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { + height:20px; + line-height:16px; +} + +.ext-border-box .x-small-editor .x-form-text { + height:20px; +} + +.x-small-editor .x-form-select-one { + height:20px; + line-height:16px; + vertical-align:middle; +} + +.x-small-editor .x-form-num-field { + text-align:right; +} + +.x-small-editor .x-form-field-wrap .x-form-trigger{ + height:19px; +} + +.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} + +.ext-strict .ext-webkit .x-small-editor .x-form-text{ + height:14px !important; +} + +.x-form-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} +.x-form-clear-left { + clear:left; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + +.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ + margin-top: 3px; +} + +.x-form-cb-label { + position: relative; + margin-left:4px; + top: 2px; +} + +.ext-ie .x-form-cb-label{ + top: 1px; +} + +.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ + top: 3px; +} + +.x-form-display-field{ + padding-top: 2px; +} + +.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ + padding-top: 1px; +} + +.ext-ie .x-form-display-field{ + padding-top: 3px; +} + +.ext-strict .ext-ie8 .x-form-display-field{ + padding-top: 0; +} + +.x-form-column { + float:left; + padding:0; + margin:0; + width:48%; + overflow:hidden; + zoom:1; +} + +/* buttons */ +.x-form .x-form-btns-ct .x-btn{ + float:right; + clear:none; +} + +.x-form .x-form-btns-ct .x-form-btns td { + border:0; + padding:0; +} + +.x-form .x-form-btns-ct .x-form-btns-right table{ + float:right; + clear:none; +} + +.x-form .x-form-btns-ct .x-form-btns-left table{ + float:left; + clear:none; +} + +.x-form .x-form-btns-ct .x-form-btns-center{ + text-align:center; /*ie*/ +} + +.x-form .x-form-btns-ct .x-form-btns-center table{ + margin:0 auto; /*everyone else*/ +} + +.x-form .x-form-btns-ct table td.x-form-btn-td{ + padding:3px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ + background-position:0 -126px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ + background-position:0 -84px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ + background-position:0 -63px; +} + +.x-form-invalid-icon { + width:16px; + height:18px; + visibility:hidden; + position:absolute; + left:0; + top:0; + display:block; + background:transparent no-repeat 0 2px; +} + +/* fieldsets */ +.x-fieldset { + border:1px solid; + padding:10px; + margin-bottom:10px; + display:block; /* preserve margins in IE */ +} + +/* make top of checkbox/tools visible in webkit */ +.ext-webkit .x-fieldset-header { + padding-top: 1px; +} + +.ext-ie .x-fieldset legend { + margin-bottom:10px; +} + +.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { + padding-top: 1px; +} + +.ext-ie .x-fieldset { + padding-top: 0; + padding-bottom:10px; +} + +.x-fieldset legend .x-tool-toggle { + margin-right:3px; + margin-left:0; + float:left !important; +} + +.x-fieldset legend input { + margin-right:3px; + float:left !important; + height:13px; + width:13px; +} + +fieldset.x-panel-collapsed { + padding-bottom:0 !important; + border-width: 1px 1px 0 1px !important; + border-left-color: transparent; + border-right-color: transparent; +} + +.ext-ie6 fieldset.x-panel-collapsed{ + padding-bottom:0 !important; + border-width: 1px 0 0 0 !important; + margin-left: 1px; + margin-right: 1px; +} + +fieldset.x-panel-collapsed .x-fieldset-bwrap { + visibility:hidden; + position:absolute; + left:-1000px; + top:-1000px; +} + +.ext-ie .x-fieldset-bwrap { + zoom:1; +} + +.x-fieldset-noborder { + border:0px none transparent; +} + +.x-fieldset-noborder legend { + margin-left:-3px; +} + +/* IE legend positioning bug */ +.ext-ie .x-fieldset-noborder legend { + position: relative; + margin-bottom:23px; +} +.ext-ie .x-fieldset-noborder legend span { + position: absolute; + left:16px; +} + +.ext-gecko .x-window-body .x-form-item { + -moz-outline: none; + outline: none; + overflow: auto; +} + +.ext-mac.ext-gecko .x-window-body .x-form-item { + overflow:hidden; +} + +.ext-gecko .x-form-item { + -moz-outline: none; + outline: none; +} + +.x-hide-label label.x-form-item-label { + display:none; +} + +.x-hide-label .x-form-element { + padding-left: 0 !important; +} + +.x-form-label-top .x-hide-label label.x-form-item-label{ + display: none; +} + +.x-fieldset { + overflow:hidden; +} + +.x-fieldset-bwrap { + overflow:hidden; + zoom:1; +} + +.x-fieldset-body { + overflow:hidden; +} +.x-btn{ + cursor:pointer; + white-space: nowrap; +} + +.x-btn button{ + border:0 none; + background-color:transparent; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; +} + +* html .ext-ie .x-btn button { + width:1px; +} + +.ext-gecko .x-btn button, .ext-webkit .x-btn button { + padding-left:0; + padding-right:0; +} + +.ext-gecko .x-btn button::-moz-focus-inner { + padding:0; +} + +.ext-ie .x-btn button { + padding-top:2px; +} + +.x-btn td { + padding:0 !important; +} + +.x-btn-text { + cursor:pointer; + white-space: nowrap; + padding:0; +} + +/* icon placement and sizing styles */ + +/* Only text */ +.x-btn-noicon .x-btn-small .x-btn-text{ + height: 16px; +} + +.x-btn-noicon .x-btn-medium .x-btn-text{ + height: 24px; +} + +.x-btn-noicon .x-btn-large .x-btn-text{ + height: 32px; +} + +/* Only icons */ +.x-btn-icon .x-btn-text{ + background-position: center; + background-repeat: no-repeat; +} + +.x-btn-icon .x-btn-small .x-btn-text{ + height: 16px; + width: 16px; +} + +.x-btn-icon .x-btn-medium .x-btn-text{ + height: 24px; + width: 24px; +} + +.x-btn-icon .x-btn-large .x-btn-text{ + height: 32px; + width: 32px; +} + +/* Icons and text */ +/* left */ +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:18px; + height:16px; +} + +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:26px; + height:24px; +} + +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:34px; + height:32px; +} + +/* top */ +.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:18px; +} + +.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:26px; +} + +.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:34px; +} + +/* right */ +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:18px; + height:16px; +} + +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:26px; + height:24px; +} + +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:34px; + height:32px; +} + +/* bottom */ +.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:18px; +} + +.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:26px; +} + +.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:34px; +} + +/* background positioning */ +.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ + font-size:1px; + line-height:1px; + width:3px; + display:block; + overflow:hidden; +} + +.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ + height:3px; +} + +.x-btn-tl{ + width:3px; + height:3px; + background:no-repeat 0 0; +} +.x-btn-tr{ + width:3px; + height:3px; + background:no-repeat -3px 0; +} +.x-btn-tc{ + height:3px; + background:repeat-x 0 -6px; +} + +.x-btn-ml{ + width:3px; + background:no-repeat 0 -24px; +} +.x-btn-mr{ + width:3px; + background:no-repeat -3px -24px; +} + +.x-btn-mc{ + background:repeat-x 0 -1096px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} + +/* Fixes an issue with the button height */ +.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { + height: 100%; +} + +.x-btn-bl{ + width:3px; + height:3px; + background:no-repeat 0 -3px; +} + +.x-btn-br{ + width:3px; + height:3px; + background:no-repeat -3px -3px; +} + +.x-btn-bc{ + height:3px; + background:repeat-x 0 -15px; +} + +.x-btn-over .x-btn-tl{ + background-position: -6px 0; +} + +.x-btn-over .x-btn-tr{ + background-position: -9px 0; +} + +.x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} + +.x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} + +.x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} + +.x-btn-over .x-btn-br{ + background-position: -9px -3px; +} + +.x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} + +.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} + +.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} + +.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} + +.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} + +.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} + +.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-btn-disabled *{ + cursor:default !important; +} + + +/* With a menu arrow */ +/* right */ +.x-btn-mc em.x-btn-arrow { + display:block; + background:transparent no-repeat right center; + padding-right:10px; +} + +.x-btn-mc em.x-btn-split { + display:block; + background:transparent no-repeat right center; + padding-right:14px; +} + +/* bottom */ +.x-btn-mc em.x-btn-arrow-bottom { + display:block; + background:transparent no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-mc em.x-btn-split-bottom { + display:block; + background:transparent no-repeat center bottom; + padding-bottom:14px; +} + +/* height adjustment class */ +.x-btn-as-arrow .x-btn-mc em { + display:block; + background-color:transparent; + padding-bottom:14px; +} + +/* groups */ +.x-btn-group { + padding:1px; +} + +.x-btn-group-header { + padding:2px; + text-align:center; +} + +.x-btn-group-tc { + background: transparent repeat-x 0 0; + overflow:hidden; +} + +.x-btn-group-tl { + background: transparent no-repeat 0 0; + padding-left:3px; + zoom:1; +} + +.x-btn-group-tr { + background: transparent no-repeat right 0; + zoom:1; + padding-right:3px; +} + +.x-btn-group-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-btn-group-bc .x-panel-footer { + zoom:1; +} + +.x-btn-group-bl { + background: transparent no-repeat 0 bottom; + padding-left:3px; + zoom:1; +} + +.x-btn-group-br { + background: transparent no-repeat right bottom; + padding-right:3px; + zoom:1; +} + +.x-btn-group-mc { + border:0 none; + padding:1px 0 0 0; + margin:0; +} + +.x-btn-group-mc .x-btn-group-body { + background-color:transparent; + border: 0 none; +} + +.x-btn-group-ml { + background: transparent repeat-y 0 0; + padding-left:3px; + zoom:1; +} + +.x-btn-group-mr { + background: transparent repeat-y right 0; + padding-right:3px; + zoom:1; +} + +.x-btn-group-bc .x-btn-group-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-btn-group-bc { + height:3px; + font-size:0; + line-height:0; +} + +.x-btn-group-bwrap { + overflow:hidden; + zoom:1; +} + +.x-btn-group-body { + overflow:hidden; + zoom:1; +} + +.x-btn-group-notitle .x-btn-group-tc { + background: transparent repeat-x 0 0; + overflow:hidden; + height:2px; +}.x-toolbar{ + border-style:solid; + border-width:0 0 1px 0; + display: block; + padding:2px; + background:repeat-x top left; + position:relative; + left:0; + top:0; + zoom:1; + overflow:hidden; +} + +.x-toolbar-left { + width: 100%; +} + +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} + +.x-toolbar td { + vertical-align:middle; +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; +} + +.x-toolbar .x-item-disabled { + cursor:default; + opacity:.6; + -moz-opacity:.6; + filter:alpha(opacity=60); +} + +.x-toolbar .x-item-disabled * { + cursor:default; +} + +.x-toolbar .x-toolbar-cell { + vertical-align:middle; +} + +.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, +.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc +{ + background-position: 500px 500px; +} + +/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ +.x-toolbar .x-btn-over .x-btn-tl{ + background-position: -6px 0; +} + +.x-toolbar .x-btn-over .x-btn-tr{ + background-position: -9px 0; +} + +.x-toolbar .x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-toolbar .x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} + +.x-toolbar .x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} + +.x-toolbar .x-btn-over .x-btn-br{ + background-position: -9px -3px; +} + +.x-toolbar .x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} + +.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} + +.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} + +.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} + +.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} + +.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-toolbar div.xtb-text{ + padding:2px 2px 0; + line-height:16px; + display:block; +} + +.x-toolbar .xtb-sep { + background-position: center; + background-repeat: no-repeat; + display: block; + font-size: 1px; + height: 16px; + width:4px; + overflow: hidden; + cursor:default; + margin: 0 2px 0; + border:0; +} + +.x-toolbar .xtb-spacer { + width:2px; +} + +/* Paging Toolbar */ +.x-tbar-page-number{ + width:30px; + height:14px; +} + +.ext-ie .x-tbar-page-number{ + margin-top: 2px; +} + +.x-paging-info { + position:absolute; + top:5px; + right: 8px; +} + +/* floating */ +.x-toolbar-ct { + width:100%; +} + +.x-toolbar-right td { + text-align: center; +} + +.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { + overflow:hidden; + zoom:1; +} + +.x-toolbar-more .x-btn-small .x-btn-text{ + height: 16px; + width: 12px; +} + +.x-toolbar-more em.x-btn-arrow { + display:inline; + background-color:transparent; + padding-right:0; +} + +.x-toolbar-more .x-btn-mc em.x-btn-arrow { + background-image: none; +} + +div.x-toolbar-no-items { + color:gray !important; + padding:5px 10px !important; +} + +/* fix ie toolbar form items */ +.ext-border-box .x-toolbar-cell .x-form-text { + margin-bottom:-1px !important; +} + +.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { + margin:0 !important; +} + +.ext-ie .x-toolbar-cell .x-form-field-wrap { + height:21px; +} + +.ext-ie .x-toolbar-cell .x-form-text { + position:relative; + top:-1px; +} + +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { + top: 0px; +} + +.x-toolbar-right td .x-form-field-trigger-wrap{ + text-align: left; +} + +.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ + margin-top: 5px; +} + +.x-toolbar-cell .x-form-cb-label{ + vertical-align: bottom; + top: 1px; +} + +.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ + margin-top: 4px; +} + +.ext-ie .x-toolbar-cell .x-form-cb-label{ + top: 0; +} +/* Grid3 styles */ +.x-grid3 { + position:relative; + overflow:hidden; +} + +.x-grid-panel .x-panel-body { + overflow:hidden !important; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border:1px solid; +} + +.x-grid3 table { + table-layout:fixed; +} + +.x-grid3-viewport{ + overflow:hidden; +} + +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + -moz-outline: none; + outline: none; + -moz-user-focus: normal; +} + +.x-grid3-row td, .x-grid3-summary-row td { + line-height:13px; + vertical-align: top; + padding-left:1px; + padding-right:1px; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-cell{ + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-hd-row td { + line-height:15px; + vertical-align:middle; + border-left:1px solid; + border-right:1px solid; +} + +.x-grid3-hd-row .x-grid3-marker-hd { + padding:3px; +} + +.x-grid3-row .x-grid3-marker { + padding:3px; +} + +.x-grid3-cell-inner, .x-grid3-hd-inner{ + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + padding:3px 3px 3px 5px; + white-space: nowrap; +} + +/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ +.x-action-col-cell .x-grid3-cell-inner { + padding-top: 1px; + padding-bottom: 1px; +} + +.x-action-col-icon { + cursor: pointer; +} + +.x-grid3-hd-inner { + position:relative; + cursor:inherit; + padding:4px 3px 4px 5px; +} + +.x-grid3-row-body { + white-space:normal; +} + +.x-grid3-body-cell { + -moz-outline:0 none; + outline:0 none; +} + +/* IE Quirks to clip */ +.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ + width:100%; +} + +/* reverse above in strict mode */ +.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ + width:auto; +} + +.x-grid-row-loading { + background: no-repeat center center; +} + +.x-grid-page { + overflow:hidden; +} + +.x-grid3-row { + cursor: default; + border: 1px solid; + width:100%; +} + +.x-grid3-row-over { + border:1px solid; + background: repeat-x left top; +} + +.x-grid3-resize-proxy { + width:1px; + left:0; + cursor: e-resize; + cursor: col-resize; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} + +.x-grid3-resize-marker { + width:1px; + left:0; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} + +.x-grid3-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + -webkit-user-select:ignore; +} + +/* header styles */ +.x-grid3-header{ + background: repeat-x 0 bottom; + cursor:default; + zoom:1; + padding:1px 0 0 0; +} + +.x-grid3-header-pop { + border-left:1px solid; + float:right; + clear:none; +} + +.x-grid3-header-pop-inner { + border-left:1px solid; + width:14px; + height:19px; + background: transparent no-repeat center center; +} + +.ext-ie .x-grid3-header-pop-inner { + width:15px; +} + +.ext-strict .x-grid3-header-pop-inner { + width:14px; +} + +.x-grid3-header-inner { + overflow:hidden; + zoom:1; + float:left; +} + +.x-grid3-header-offset { + padding-left:1px; + text-align: left; +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left:1px solid; + border-right:1px solid; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background: repeat-x left bottom; + +} + +.x-grid3-sort-icon{ + background-repeat: no-repeat; + display: none; + height: 4px; + width: 13px; + margin-left:3px; + vertical-align: middle; +} + +.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { + display: inline; +} + +/* Header position fixes for IE strict mode */ +.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { + position:relative; +} + +.ext-strict .ext-ie6 .x-grid3-hd-inner{ + position:static; +} + +/* Body Styles */ +.x-grid3-body { + zoom:1; +} + +.x-grid3-scroller { + overflow:auto; + zoom:1; + position:relative; +} + +.x-grid3-cell-text, .x-grid3-hd-text { + display: block; + padding: 3px 5px 3px 5px; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select:ignore; +} + +.x-grid3-split { + background-position: center; + background-repeat: no-repeat; + cursor: e-resize; + cursor: col-resize; + display: block; + font-size: 1px; + height: 16px; + overflow: hidden; + position: absolute; + top: 2px; + width: 6px; + z-index: 3; +} + +/* Column Reorder DD */ +.x-dd-drag-proxy .x-grid3-hd-inner{ + background: repeat-x left bottom; + width:120px; + padding:3px; + border:1px solid; + overflow:hidden; +} + +.col-move-top, .col-move-bottom{ + width:9px; + height:9px; + position:absolute; + top:0; + line-height:1px; + font-size:1px; + overflow:hidden; + visibility:hidden; + z-index:20000; + background:transparent no-repeat left top; +} + +/* Selection Styles */ +.x-grid3-row-selected { + border:1px dotted; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background: repeat-x 0 bottom !important; + vertical-align:middle !important; + padding:0; + border-top:1px solid; + border-bottom:none !important; + border-right:1px solid !important; + text-align:center; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + padding:0 4px; + text-align:center; +} + +/* dirty cells */ +.x-grid3-dirty-cell { + background: transparent no-repeat 0 0; +} + +/* Grid Toolbars */ +.x-grid3-topbar, .x-grid3-bottombar{ + overflow:hidden; + display:none; + zoom:1; + position:relative; +} + +.x-grid3-topbar .x-toolbar{ + border-right:0 none; +} + +.x-grid3-bottombar .x-toolbar{ + border-right:0 none; + border-bottom:0 none; + border-top:1px solid; +} + +/* Props Grid Styles */ +.x-props-grid .x-grid3-cell{ + padding:1px; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background:transparent repeat-y -16px !important; + padding-left:12px; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + padding:1px; + padding-right:0; + border:0 none; + border-right:1px solid; +} + +/* dd */ +.x-grid3-col-dd { + border:0 none; + padding:0; + background-color:transparent; +} + +.x-dd-drag-ghost .x-grid3-dd-wrap { + padding:1px 3px 3px 1px; +} + +.x-grid3-hd { + -moz-user-select:none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-hd-btn { + display:none; + position:absolute; + width:14px; + background:no-repeat left center; + right:0; + top:0; + z-index:2; + cursor:pointer; +} + +.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { + display:block; +} + +a.x-grid3-hd-btn:hover { + background-position:-14px center; +} + +/* Expanders */ +.x-grid3-body .x-grid3-td-expander { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-expander { + width:100%; + height:18px; + background-position:4px 2px; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-row-collapsed .x-grid3-row-expander { + background-position:4px 2px; +} + +.x-grid3-row-expanded .x-grid3-row-expander { + background-position:-21px 2px; +} + +.x-grid3-row-collapsed .x-grid3-row-body { + display:none !important; +} + +.x-grid3-row-expanded .x-grid3-row-body { + display:block !important; +} + +/* Checkers */ +.x-grid3-body .x-grid3-td-checker { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + width:100%; + height:18px; + background-position:2px 2px; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-row .x-grid3-row-checker { + background-position:2px 2px; +} + +.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { + background-position:-23px 2px; +} + +.x-grid3-hd-checker { + background-position:2px 1px; +} + +.ext-border-box .x-grid3-hd-checker { + background-position:2px 3px; +} + +.x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 1px; +} + +.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 3px; +} + +/* Numberer */ +.x-grid3-body .x-grid3-td-numberer { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + padding:3px 5px 0 0 !important; + text-align:right; +} + +/* Row Icon */ + +.x-grid3-body .x-grid3-td-row-icon { + background:transparent repeat-y right; + vertical-align:top; + text-align:center; +} + +.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { + padding:0 !important; + background-position:center center; + background-repeat:no-repeat; + width:16px; + height:16px; + margin-left:2px; + margin-top:3px; +} + +/* All specials */ +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { + padding: 1px 0 0 0 !important; +} + +.x-grid3-check-col { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-check-col-on { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; +} + +/* Grouping classes */ +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom: 2px solid; + cursor:pointer; + padding-top:6px; +} + +.x-grid-group-hd div.x-grid-group-title { + background:transparent no-repeat 3px 3px; + padding:4px 4px 4px 17px; +} + +.x-grid-group-collapsed .x-grid-group-body { + display:none; +} + +.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { + position:relative; + top:-1px; +} + +.ext-ie .x-props-grid .x-editor .x-form-text { + position:static; + top:0; +} + +.x-grid-empty { + padding:10px; +} + +/* fix floating toolbar issue */ +.ext-ie7 .x-grid-panel .x-panel-bbar { + position:relative; +} + + +/* Reset position to static when Grid Panel has been framed */ +/* to resolve 'snapping' from top to bottom behavior. */ +/* @forumThread 86656 */ +.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { + position: static; +} + +.ext-ie6 .x-grid3-header { + position: relative; +} + +/* Fix WebKit bug in Grids */ +.ext-webkit .x-grid-panel .x-panel-bwrap{ + -webkit-user-select:none; +} +.ext-webkit .x-tbar-page-number{ + -webkit-user-select:ignore; +} +/* end*/ + +/* column lines */ +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + padding-right:0; + border-right:1px solid; +} +.x-pivotgrid .x-grid3-header-offset table { + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-header-offset table td { + padding: 4px 3px 4px 5px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 11px; + line-height: 13px; + font-family: tahoma; +} + +.x-pivotgrid .x-grid3-row-headers { + display: block; + float: left; +} + +.x-pivotgrid .x-grid3-row-headers table { + height: 100%; + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-row-headers table td { + height: 18px; + padding: 2px 7px 0 0; + text-align: right; + text-overflow: ellipsis; + font-size: 11px; + font-family: tahoma; +} + +.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { + height: 21px; +} + +.x-grid3-header-title { + top: 0%; + left: 0%; + position: absolute; + text-align: center; + vertical-align: middle; + font-family: tahoma; + font-size: 11px; + padding: auto 1px; + display: table-cell; +} + +.x-grid3-header-title span { + position: absolute; + top: 50%; + left: 0%; + width: 100%; + margin-top: -6px; +}.x-dd-drag-proxy{ + position:absolute; + left:0; + top:0; + visibility:hidden; + z-index:15000; +} + +.x-dd-drag-ghost{ + -moz-opacity: 0.85; + opacity:.85; + filter: alpha(opacity=85); + border: 1px solid; + padding:3px; + padding-left:20px; + white-space:nowrap; +} + +.x-dd-drag-repair .x-dd-drag-ghost{ + -moz-opacity: 0.4; + opacity:.4; + filter: alpha(opacity=40); + border:0 none; + padding:0; + background-color:transparent; +} + +.x-dd-drag-repair .x-dd-drop-icon{ + visibility:hidden; +} + +.x-dd-drop-icon{ + position:absolute; + top:3px; + left:3px; + display:block; + width:16px; + height:16px; + background-color:transparent; + background-position: center; + background-repeat: no-repeat; + z-index:1; +} + +.x-view-selector { + position:absolute; + left:0; + top:0; + width:0; + border:1px dotted; + opacity: .5; + -moz-opacity: .5; + filter:alpha(opacity=50); + zoom:1; +}.ext-strict .ext-ie .x-tree .x-panel-bwrap{ + position:relative; + overflow:hidden; +} + +.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-repeat: no-repeat; +} + +.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-position:center; + background-repeat: no-repeat; +} + +.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { + vertical-align: middle !important; +} + +.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { + vertical-align: top !important; +} + +/* checkboxes */ + +input.x-tree-node-cb { + margin-left:1px; + height: 19px; + vertical-align: bottom; +} + +.ext-ie input.x-tree-node-cb { + margin-left:0; + margin-top: 1px; + width: 16px; + height: 16px; + vertical-align: middle; +} + +.ext-strict .ext-ie8 input.x-tree-node-cb{ + margin: 1px 1px; + height: 14px; + vertical-align: bottom; +} + +.ext-strict .ext-ie8 input.x-tree-node-cb + a{ + vertical-align: bottom; +} + +.ext-opera input.x-tree-node-cb { + height: 14px; + vertical-align: middle; +} + +.x-tree-noicon .x-tree-node-icon{ + width:0; height:0; +} + +/* No line styles */ +.x-tree-no-lines .x-tree-elbow{ + background-color:transparent; +} + +.x-tree-no-lines .x-tree-elbow-end{ + background-color:transparent; +} + +.x-tree-no-lines .x-tree-elbow-line{ + background-color:transparent; +} + +/* Arrows */ +.x-tree-arrows .x-tree-elbow{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent no-repeat 0 0; +} + +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent no-repeat -16px 0; +} + +.x-tree-arrows .x-tree-elbow-end{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent no-repeat 0 0; +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent no-repeat -16px 0; +} + +.x-tree-arrows .x-tree-elbow-line{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} + +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} + +.x-tree-node{ + white-space: nowrap; +} + +.x-tree-node-el { + line-height:18px; + cursor:pointer; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + text-decoration:none; + -khtml-user-select:none; + -moz-user-select:none; + -webkit-user-select:ignore; + -kthml-user-focus:normal; + -moz-user-focus:normal; + -moz-outline: 0 none; + outline:0 none; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + text-decoration:none; + padding:1px 3px 1px 2px; +} + +.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ + -moz-opacity: 0.5; + opacity:.5; + filter: alpha(opacity=50); +} + +.x-tree-node .x-tree-node-inline-icon{ + background-color:transparent; +} + +.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ + text-decoration:none; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom:1px dotted; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top:1px dotted; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ + border-bottom:0 none; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ + border-top:0 none; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom:2px solid; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top:2px solid; +} + +.x-tree-node .x-tree-drag-append a span{ + border:1px dotted; +} + +.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ + display:none !important; +} + +/* Fix for ie rootVisible:false issue */ +.x-tree-root-ct { + zoom:1; +} +.x-date-picker { + border: 1px solid; + border-top:0 none; + position:relative; +} + +.x-date-picker a { + -moz-outline:0 none; + outline:0 none; +} + +.x-date-inner, .x-date-inner td, .x-date-inner th{ + border-collapse:separate; +} + +.x-date-middle,.x-date-left,.x-date-right { + background: repeat-x 0 -83px; + overflow:hidden; +} + +.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, +.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, +.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ + background:transparent !important; + vertical-align:middle; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background:transparent no-repeat right 0; +} + +.x-date-right, .x-date-left { + width:18px; +} + +.x-date-right{ + text-align:right; +} + +.x-date-middle { + padding-top:2px; + padding-bottom:2px; + width:130px; /* FF3 */ +} + +.x-date-right a, .x-date-left a{ + display:block; + width:16px; + height:16px; + background-position: center; + background-repeat: no-repeat; + cursor:pointer; + -moz-opacity: 0.6; + opacity:.6; + filter: alpha(opacity=60); +} + +.x-date-right a:hover, .x-date-left a:hover{ + -moz-opacity: 1; + opacity:1; + filter: alpha(opacity=100); +} + +.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ + -moz-opacity: 0.6; + opacity:.6; + filter: alpha(opacity=60); +} + +.x-date-right a { + margin-right:2px; + text-decoration:none !important; +} + +.x-date-left a{ + margin-left:2px; + text-decoration:none !important; +} + +table.x-date-inner { + width: 100%; + table-layout:fixed; +} + +.ext-webkit table.x-date-inner{ + /* Fix for webkit browsers */ + width: 175px; +} + + +.x-date-inner th { + width:25px; +} + +.x-date-inner th { + background: repeat-x left top; + text-align:right !important; + border-bottom: 1px solid; + cursor:default; + padding:0; + border-collapse:separate; +} + +.x-date-inner th span { + display:block; + padding:2px; + padding-right:7px; +} + +.x-date-inner td { + border: 1px solid; + text-align:right; + padding:0; +} + +.x-date-inner a { + padding:2px 5px; + display:block; + text-decoration:none; + text-align:right; + zoom:1; +} + +.x-date-inner .x-date-active{ + cursor:pointer; + color:black; +} + +.x-date-inner .x-date-selected a{ + background: repeat-x left top; + border:1px solid; + padding:1px 4px; +} + +.x-date-inner .x-date-today a{ + border: 1px solid; + padding:1px 4px; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + text-decoration:none !important; +} + +.x-date-bottom { + padding:4px; + border-top: 1px solid; + background: repeat-x left top; +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + text-decoration:none !important; +} + +.x-item-disabled .x-date-inner a:hover{ + background: none; +} + +.x-date-inner .x-date-disabled a { + cursor:default; +} + +.x-date-menu .x-menu-item { + padding:1px 24px 1px 4px; + white-space: nowrap; +} + +.x-date-menu .x-menu-item .x-menu-item-icon { + width:10px; + height:10px; + margin-right:5px; + background-position:center -4px !important; +} + +.x-date-mp { + position:absolute; + left:0; + top:0; + display:none; +} + +.x-date-mp td { + padding:2px; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { + border: 0 none; + text-align:center; + vertical-align: middle; + width:25%; +} + +.x-date-mp-ok { + margin-right:3px; +} + +.x-date-mp-btns button { + text-decoration:none; + text-align:center; + text-decoration:none !important; + border:1px solid; + padding:1px 3px 1px; + cursor:pointer; +} + +.x-date-mp-btns { + background: repeat-x left top; +} + +.x-date-mp-btns td { + border-top: 1px solid; + text-align:center; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + display:block; + padding:2px 4px; + text-decoration:none; + text-align:center; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + text-decoration:none; + cursor:pointer; +} + +td.x-date-mp-sel a { + padding:1px 3px; + background: repeat-x left top; + border:1px solid; +} + +.x-date-mp-ybtn a { + overflow:hidden; + width:15px; + height:15px; + cursor:pointer; + background:transparent no-repeat; + display:block; + margin:0 auto; +} + +.x-date-mp-ybtn a.x-date-mp-next { + background-position:0 -120px; +} + +.x-date-mp-ybtn a.x-date-mp-next:hover { + background-position:-15px -120px; +} + +.x-date-mp-ybtn a.x-date-mp-prev { + background-position:0 -105px; +} + +.x-date-mp-ybtn a.x-date-mp-prev:hover { + background-position:-15px -105px; +} + +.x-date-mp-ybtn { + text-align:center; +} + +td.x-date-mp-sep { + border-right:1px solid; +}.x-tip{ + position: absolute; + top: 0; + left:0; + visibility: hidden; + z-index: 20002; + border:0 none; +} + +.x-tip .x-tip-close{ + height: 15px; + float:right; + width: 15px; + margin:0 0 2px 2px; + cursor:pointer; + display:none; +} + +.x-tip .x-tip-tc { + background: transparent no-repeat 0 -62px; + padding-top:3px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-tr { + background: transparent no-repeat right 0; + padding-right:6px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-bc { + background: transparent no-repeat 0 -121px; + height:3px; + overflow:hidden; +} + +.x-tip .x-tip-bl { + background: transparent no-repeat 0 -59px; + padding-left:6px; + zoom:1; +} + +.x-tip .x-tip-br { + background: transparent no-repeat right -59px; + padding-right:6px; + zoom:1; +} + +.x-tip .x-tip-mc { + border:0 none; +} + +.x-tip .x-tip-ml { + background: no-repeat 0 -124px; + padding-left:6px; + zoom:1; +} + +.x-tip .x-tip-mr { + background: transparent no-repeat right -124px; + padding-right:6px; + zoom:1; +} + +.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { + font-size:0; + line-height:0; +} + +.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ + line-height: 1px; +} + +.x-tip .x-tip-header-text { + padding:0; + margin:0 0 2px 0; +} + +.x-tip .x-tip-body { + margin:0 !important; + line-height:14px; + padding:0; +} + +.x-tip .x-tip-body .loading-indicator { + margin:0; +} + +.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { + cursor:move; +} + +.x-form-invalid-tip .x-tip-tc { + background: repeat-x 0 -12px; + padding-top:6px; +} + +.x-form-invalid-tip .x-tip-bc { + background: repeat-x 0 -18px; + height:6px; +} + +.x-form-invalid-tip .x-tip-bl { + background: no-repeat 0 -6px; +} + +.x-form-invalid-tip .x-tip-br { + background: no-repeat right -6px; +} + +.x-form-invalid-tip .x-tip-body { + padding:2px; +} + +.x-form-invalid-tip .x-tip-body { + padding-left:24px; + background:transparent no-repeat 2px 2px; +} + +.x-tip-anchor { + position: absolute; + width: 9px; + height: 10px; + overflow:hidden; + background: transparent no-repeat 0 0; + zoom:1; +} +.x-tip-anchor-bottom { + background-position: -9px 0; +} +.x-tip-anchor-right { + background-position: -18px 0; + width: 10px; +} +.x-tip-anchor-left { + background-position: -28px 0; + width: 10px; +}.x-menu { + z-index: 15000; + zoom: 1; + background: repeat-y; +} + +.x-menu-floating{ + border: 1px solid; +} + +.x-menu a { + text-decoration: none !important; +} + +.ext-ie .x-menu { + zoom:1; + overflow:hidden; +} + +.x-menu-list{ + padding: 2px; + background-color:transparent; + border:0 none; + overflow:hidden; + overflow-y: hidden; +} + +.ext-strict .ext-ie .x-menu-list{ + position: relative; +} + +.x-menu li{ + line-height:100%; +} + +.x-menu li.x-menu-sep-li{ + font-size:1px; + line-height:1px; +} + +.x-menu-list-item{ + white-space: nowrap; + display:block; + padding:1px; +} + +.x-menu-item{ + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-menu-item-arrow{ + background:transparent no-repeat right; +} + +.x-menu-sep { + display:block; + font-size:1px; + line-height:1px; + margin: 2px 3px; + border-bottom:1px solid; + overflow:hidden; +} + +.x-menu-focus { + position:absolute; + left:-1px; + top:-1px; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; + overflow:hidden; + display:block; +} + +a.x-menu-item { + cursor: pointer; + display: block; + line-height: 16px; + outline-color: -moz-use-text-color; + outline-style: none; + outline-width: 0; + padding: 3px 21px 3px 27px; + position: relative; + text-decoration: none; + white-space: nowrap; +} + +.x-menu-item-active { + background-repeat: repeat-x; + background-position: left bottom; + border-style:solid; + border-width: 1px 0; + margin:0 1px; + padding: 0; +} + +.x-menu-item-active a.x-menu-item { + border-style:solid; + border-width:0 1px; + margin:0 -1px; +} + +.x-menu-item-icon { + border: 0 none; + height: 16px; + padding: 0; + vertical-align: top; + width: 16px; + position: absolute; + left: 3px; + top: 3px; + margin: 0; + background-position:center; +} + +.ext-ie .x-menu-item-icon { + left: -24px; +} +.ext-strict .x-menu-item-icon { + left: 3px; +} + +.ext-ie6 .x-menu-item-icon { + left: -24px; +} + +.ext-ie .x-menu-item-icon { + vertical-align: middle; +} + +.x-menu-check-item .x-menu-item-icon{ + background: transparent no-repeat center; +} + +.x-menu-group-item .x-menu-item-icon{ + background-color: transparent; +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background: transparent no-repeat center; +} + +.x-date-menu .x-menu-list{ + padding: 0; +} + +.x-menu-date-item{ + padding:0; +} + +.x-menu .x-color-palette, .x-menu .x-date-picker{ + margin-left: 26px; + margin-right:4px; +} + +.x-menu .x-date-picker{ + border:1px solid; + margin-top:2px; + margin-bottom:2px; +} + +.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ + margin: 0; + border: 0 none; +} + +.x-date-menu { + padding:0 !important; +} + +/* + * fixes separator visibility problem in IE 6 + */ +.ext-strict .ext-ie6 .x-menu-sep-li { + padding: 3px 4px; +} +.ext-strict .ext-ie6 .x-menu-sep { + margin: 0; + height: 1px; +} + +/* + * Fixes an issue with "fat" separators in webkit + */ +.ext-webkit .x-menu-sep{ + height: 1px; +} + +/* + * Ugly mess to remove the white border under the picker + */ +.ext-ie .x-date-menu{ + height: 199px; +} + +.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ + height: 197px; +} + +.ext-strict .ext-ie7 .x-date-menu{ + height: 195px; +} + +.ext-strict .ext-ie8 .x-date-menu{ + height: auto; +} + +.x-cycle-menu .x-menu-item-checked { + border:1px dotted !important; + padding:0; +} + +.x-menu .x-menu-scroller { + width: 100%; + background-repeat:no-repeat; + background-position:center; + height:8px; + line-height: 8px; + cursor:pointer; + margin: 0; + padding: 0; +} + +.x-menu .x-menu-scroller-active{ + height: 6px; + line-height: 6px; +} + +.x-menu-list-item-indent{ + padding-left: 27px; +}/* + Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: +
      +
      +
      +

      YOUR TITLE HERE (optional)

      +
      YOUR CONTENT HERE
      +
      +
      +
      + */ + +.x-box-tl { + background: transparent no-repeat 0 0; + zoom:1; +} + +.x-box-tc { + height: 8px; + background: transparent repeat-x 0 0; + overflow: hidden; +} + +.x-box-tr { + background: transparent no-repeat right -8px; +} + +.x-box-ml { + background: transparent repeat-y 0; + padding-left: 4px; + overflow: hidden; + zoom:1; +} + +.x-box-mc { + background: repeat-x 0 -16px; + padding: 4px 10px; +} + +.x-box-mc h3 { + margin: 0 0 4px 0; + zoom:1; +} + +.x-box-mr { + background: transparent repeat-y right; + padding-right: 4px; + overflow: hidden; +} + +.x-box-bl { + background: transparent no-repeat 0 -16px; + zoom:1; +} + +.x-box-bc { + background: transparent repeat-x 0 -8px; + height: 8px; + overflow: hidden; +} + +.x-box-br { + background: transparent no-repeat right -24px; +} + +.x-box-tl, .x-box-bl { + padding-left: 8px; + overflow: hidden; +} + +.x-box-tr, .x-box-br { + padding-right: 8px; + overflow: hidden; +}.x-combo-list { + border:1px solid; + zoom:1; + overflow:hidden; +} + +.x-combo-list-inner { + overflow:auto; + position:relative; /* for calculating scroll offsets */ + zoom:1; + overflow-x:hidden; +} + +.x-combo-list-hd { + border-bottom:1px solid; + padding:3px; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom:1px solid; +} + +.x-combo-list-item { + padding:2px; + border:1px solid; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} + +.x-combo-list .x-combo-selected{ + border:1px dotted !important; + cursor:pointer; +} + +.x-combo-list .x-toolbar { + border-top:1px solid; + border-bottom:0 none; +}.x-panel { + border-style: solid; + border-width:0; +} + +.x-panel-header { + overflow:hidden; + zoom:1; + padding:5px 3px 4px 5px; + border:1px solid; + line-height: 15px; + background: transparent repeat-x 0 -1px; +} + +.x-panel-body { + border:1px solid; + border-top:0 none; + overflow:hidden; + position: relative; /* added for item scroll positioning */ +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border:1px solid; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top:1px solid; + border-bottom: 0 none; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top:1px solid; +} + +.x-panel-header { + overflow:hidden; + zoom:1; +} + +.x-panel-tl .x-panel-header { + padding:5px 0 4px 0; + border:0 none; + background:transparent no-repeat; +} + +.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { + padding-left:20px !important; + background-repeat:no-repeat; + background-position:0 4px; + zoom:1; +} + +.x-panel-inline-icon { + width:16px; + height:16px; + background-repeat:no-repeat; + background-position:0 0; + vertical-align:middle; + margin-right:4px; + margin-top:-1px; + margin-bottom:-1px; +} + +.x-panel-tc { + background: transparent repeat-x 0 0; + overflow:hidden; +} + +/* fix ie7 strict mode bug */ +.ext-strict .ext-ie7 .x-panel-tc { + overflow: visible; +} + +.x-panel-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + zoom:1; + border-bottom:1px solid; +} + +.x-panel-tr { + background: transparent no-repeat right 0; + zoom:1; + padding-right:6px; +} + +.x-panel-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-panel-bc .x-panel-footer { + zoom:1; +} + +.x-panel-bl { + background: transparent no-repeat 0 bottom; + padding-left:6px; + zoom:1; +} + +.x-panel-br { + background: transparent no-repeat right bottom; + padding-right:6px; + zoom:1; +} + +.x-panel-mc { + border:0 none; + padding:0; + margin:0; + padding-top:6px; +} + +.x-panel-mc .x-panel-body { + background-color:transparent; + border: 0 none; +} + +.x-panel-ml { + background: repeat-y 0 0; + padding-left:6px; + zoom:1; +} + +.x-panel-mr { + background: transparent repeat-y right 0; + padding-right:6px; + zoom:1; +} + +.x-panel-bc .x-panel-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { + height:6px; + font-size:0; + line-height:0; +} + +.x-panel-bwrap { + overflow:hidden; + zoom:1; + left:0; + top:0; +} +.x-panel-body { + overflow:hidden; + zoom:1; +} + +.x-panel-collapsed .x-resizable-handle{ + display:none; +} + +.ext-gecko .x-panel-animated div { + overflow:hidden !important; +} + +/* Plain */ +.x-plain-body { + overflow:hidden; +} + +.x-plain-bbar .x-toolbar { + overflow:hidden; + padding:2px; +} + +.x-plain-tbar .x-toolbar { + overflow:hidden; + padding:2px; +} + +.x-plain-bwrap { + overflow:hidden; + zoom:1; +} + +.x-plain { + overflow:hidden; +} + +/* Tools */ +.x-tool { + overflow:hidden; + width:15px; + height:15px; + float:right; + cursor:pointer; + background:transparent no-repeat; + margin-left:2px; +} + +/* expand / collapse tools */ +.x-tool-toggle { + background-position:0 -60px; +} + +.x-tool-toggle-over { + background-position:-15px -60px; +} + +.x-panel-collapsed .x-tool-toggle { + background-position:0 -75px; +} + +.x-panel-collapsed .x-tool-toggle-over { + background-position:-15px -75px; +} + + +.x-tool-close { + background-position:0 -0; +} + +.x-tool-close-over { + background-position:-15px 0; +} + +.x-tool-minimize { + background-position:0 -15px; +} + +.x-tool-minimize-over { + background-position:-15px -15px; +} + +.x-tool-maximize { + background-position:0 -30px; +} + +.x-tool-maximize-over { + background-position:-15px -30px; +} + +.x-tool-restore { + background-position:0 -45px; +} + +.x-tool-restore-over { + background-position:-15px -45px; +} + +.x-tool-gear { + background-position:0 -90px; +} + +.x-tool-gear-over { + background-position:-15px -90px; +} + +.x-tool-prev { + background-position:0 -105px; +} + +.x-tool-prev-over { + background-position:-15px -105px; +} + +.x-tool-next { + background-position:0 -120px; +} + +.x-tool-next-over { + background-position:-15px -120px; +} + +.x-tool-pin { + background-position:0 -135px; +} + +.x-tool-pin-over { + background-position:-15px -135px; +} + +.x-tool-unpin { + background-position:0 -150px; +} + +.x-tool-unpin-over { + background-position:-15px -150px; +} + +.x-tool-right { + background-position:0 -165px; +} + +.x-tool-right-over { + background-position:-15px -165px; +} + +.x-tool-left { + background-position:0 -180px; +} + +.x-tool-left-over { + background-position:-15px -180px; +} + +.x-tool-down { + background-position:0 -195px; +} + +.x-tool-down-over { + background-position:-15px -195px; +} + +.x-tool-up { + background-position:0 -210px; +} + +.x-tool-up-over { + background-position:-15px -210px; +} + +.x-tool-refresh { + background-position:0 -225px; +} + +.x-tool-refresh-over { + background-position:-15px -225px; +} + +.x-tool-plus { + background-position:0 -240px; +} + +.x-tool-plus-over { + background-position:-15px -240px; +} + +.x-tool-minus { + background-position:0 -255px; +} + +.x-tool-minus-over { + background-position:-15px -255px; +} + +.x-tool-search { + background-position:0 -270px; +} + +.x-tool-search-over { + background-position:-15px -270px; +} + +.x-tool-save { + background-position:0 -285px; +} + +.x-tool-save-over { + background-position:-15px -285px; +} + +.x-tool-help { + background-position:0 -300px; +} + +.x-tool-help-over { + background-position:-15px -300px; +} + +.x-tool-print { + background-position:0 -315px; +} + +.x-tool-print-over { + background-position:-15px -315px; +} + +.x-tool-expand { + background-position:0 -330px; +} + +.x-tool-expand-over { + background-position:-15px -330px; +} + +.x-tool-collapse { + background-position:0 -345px; +} + +.x-tool-collapse-over { + background-position:-15px -345px; +} + +.x-tool-resize { + background-position:0 -360px; +} + +.x-tool-resize-over { + background-position:-15px -360px; +} + +.x-tool-move { + background-position:0 -375px; +} + +.x-tool-move-over { + background-position:-15px -375px; +} + +/* Ghosting */ +.x-panel-ghost { + z-index:12000; + overflow:hidden; + position:absolute; + left:0;top:0; + opacity:.65; + -moz-opacity:.65; + filter:alpha(opacity=65); +} + +.x-panel-ghost ul { + margin:0; + padding:0; + overflow:hidden; + font-size:0; + line-height:0; + border:1px solid; + border-top:0 none; + display:block; +} + +.x-panel-ghost * { + cursor:move !important; +} + +.x-panel-dd-spacer { + border:2px dashed; +} + +/* Buttons */ +.x-panel-btns { + padding:5px; + overflow:hidden; +} + +.x-panel-btns td.x-toolbar-cell{ + padding:3px; +} + +.x-panel-btns .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} + +.x-panel-btns .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} + +.x-panel-btns .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-panel-btns .x-btn-over .x-btn-left{ + background-position:0 -63px; +} + +.x-panel-btns .x-btn-over .x-btn-right{ + background-position:0 -84px; +} + +.x-panel-btns .x-btn-over .x-btn-center{ + background-position:0 -105px; +} + +.x-panel-btns .x-btn-click .x-btn-center{ + background-position:0 -126px; +} + +.x-panel-btns .x-btn-click .x-btn-right{ + background-position:0 -84px; +} + +.x-panel-btns .x-btn-click .x-btn-left{ + background-position:0 -63px; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + white-space: nowrap; +} +/** + * W3C Suggested Default style sheet for HTML 4 + * http://www.w3.org/TR/CSS21/sample.html + * + * Resets for Ext.Panel @cfg normal: true + */ +.x-panel-reset .x-panel-body html, +.x-panel-reset .x-panel-body address, +.x-panel-reset .x-panel-body blockquote, +.x-panel-reset .x-panel-body body, +.x-panel-reset .x-panel-body dd, +.x-panel-reset .x-panel-body div, +.x-panel-reset .x-panel-body dl, +.x-panel-reset .x-panel-body dt, +.x-panel-reset .x-panel-body fieldset, +.x-panel-reset .x-panel-body form, +.x-panel-reset .x-panel-body frame, frameset, +.x-panel-reset .x-panel-body h1, +.x-panel-reset .x-panel-body h2, +.x-panel-reset .x-panel-body h3, +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body h5, +.x-panel-reset .x-panel-body h6, +.x-panel-reset .x-panel-body noframes, +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body p, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body center, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body hr, +.x-panel-reset .x-panel-body menu, +.x-panel-reset .x-panel-body pre { display: block } +.x-panel-reset .x-panel-body li { display: list-item } +.x-panel-reset .x-panel-body head { display: none } +.x-panel-reset .x-panel-body table { display: table } +.x-panel-reset .x-panel-body tr { display: table-row } +.x-panel-reset .x-panel-body thead { display: table-header-group } +.x-panel-reset .x-panel-body tbody { display: table-row-group } +.x-panel-reset .x-panel-body tfoot { display: table-footer-group } +.x-panel-reset .x-panel-body col { display: table-column } +.x-panel-reset .x-panel-body colgroup { display: table-column-group } +.x-panel-reset .x-panel-body td, +.x-panel-reset .x-panel-body th { display: table-cell } +.x-panel-reset .x-panel-body caption { display: table-caption } +.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } +.x-panel-reset .x-panel-body caption { text-align: center } +.x-panel-reset .x-panel-body body { margin: 8px } +.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } +.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } +.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body p, +.x-panel-reset .x-panel-body blockquote, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body fieldset, +.x-panel-reset .x-panel-body form, +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body dl, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } +.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } +.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } +.x-panel-reset .x-panel-body h1, +.x-panel-reset .x-panel-body h2, +.x-panel-reset .x-panel-body h3, +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body h5, +.x-panel-reset .x-panel-body h6, +.x-panel-reset .x-panel-body b, +.x-panel-reset .x-panel-body strong { font-weight: bolder } +.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } +.x-panel-reset .x-panel-body i, +.x-panel-reset .x-panel-body cite, +.x-panel-reset .x-panel-body em, +.x-panel-reset .x-panel-body var, +.x-panel-reset .x-panel-body address { font-style: italic } +.x-panel-reset .x-panel-body pre, +.x-panel-reset .x-panel-body tt, +.x-panel-reset .x-panel-body code, +.x-panel-reset .x-panel-body kbd, +.x-panel-reset .x-panel-body samp { font-family: monospace } +.x-panel-reset .x-panel-body pre { white-space: pre } +.x-panel-reset .x-panel-body button, +.x-panel-reset .x-panel-body textarea, +.x-panel-reset .x-panel-body input, +.x-panel-reset .x-panel-body select { display: inline-block } +.x-panel-reset .x-panel-body big { font-size: 1.17em } +.x-panel-reset .x-panel-body small, +.x-panel-reset .x-panel-body sub, +.x-panel-reset .x-panel-body sup { font-size: .83em } +.x-panel-reset .x-panel-body sub { vertical-align: sub } +.x-panel-reset .x-panel-body sup { vertical-align: super } +.x-panel-reset .x-panel-body table { border-spacing: 2px; } +.x-panel-reset .x-panel-body thead, +.x-panel-reset .x-panel-body tbody, +.x-panel-reset .x-panel-body tfoot { vertical-align: middle } +.x-panel-reset .x-panel-body td, +.x-panel-reset .x-panel-body th { vertical-align: inherit } +.x-panel-reset .x-panel-body s, +.x-panel-reset .x-panel-body strike, +.x-panel-reset .x-panel-body del { text-decoration: line-through } +.x-panel-reset .x-panel-body hr { border: 1px inset } +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body menu, +.x-panel-reset .x-panel-body dd { margin-left: 40px } +.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} +.x-panel-reset .x-panel-body ol { list-style-type: decimal } +.x-panel-reset .x-panel-body ol ul, +.x-panel-reset .x-panel-body ul ol, +.x-panel-reset .x-panel-body ul ul, +.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } +.x-panel-reset .x-panel-body u, +.x-panel-reset .x-panel-body ins { text-decoration: underline } +.x-panel-reset .x-panel-body br:before { content: "\A" } +.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } +.x-panel-reset .x-panel-body center { text-align: center } +.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } +.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } + +/* Begin bidirectionality settings (do not change) */ +.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } +.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } +.x-window { + zoom:1; +} + +.x-window .x-window-handle { + opacity:0; + -moz-opacity:0; + filter:alpha(opacity=0); +} + +.x-window-proxy { + border:1px solid; + z-index:12000; + overflow:hidden; + position:absolute; + left:0;top:0; + display:none; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); +} + +.x-window-header { + overflow:hidden; + zoom:1; +} + +.x-window-bwrap { + z-index:1; + position:relative; + zoom:1; + left:0;top:0; +} + +.x-window-tl .x-window-header { + padding:5px 0 4px 0; +} + +.x-window-header-text { + cursor:pointer; +} + +.x-window-tc { + background: transparent repeat-x 0 0; + overflow:hidden; + zoom:1; +} + +.x-window-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + zoom:1; + z-index:1; + position:relative; +} + +.x-window-tr { + background: transparent no-repeat right 0; + padding-right:6px; +} + +.x-window-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-window-bc .x-window-footer { + padding-bottom:6px; + zoom:1; + font-size:0; + line-height:0; +} + +.x-window-bl { + background: transparent no-repeat 0 bottom; + padding-left:6px; + zoom:1; +} + +.x-window-br { + background: transparent no-repeat right bottom; + padding-right:6px; + zoom:1; +} + +.x-window-mc { + border:1px solid; + padding:0; + margin:0; +} + +.x-window-ml { + background: transparent repeat-y 0 0; + padding-left:6px; + zoom:1; +} + +.x-window-mr { + background: transparent repeat-y right 0; + padding-right:6px; + zoom:1; +} + +.x-window-body { + overflow:hidden; +} + +.x-window-bwrap { + overflow:hidden; +} + +.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, + .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, + .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { + padding:0; +} + +.x-window-maximized .x-window-footer { + padding-bottom:0; +} + +.x-window-maximized .x-window-tc { + padding-left:3px; + padding-right:3px; +} + +.x-window-maximized .x-window-mc { + border-left:0 none; + border-right:0 none; +} + +.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { + border-left:0 none; + border-right: 0 none; +} + +.x-window-bbar .x-toolbar { + border-top:1px solid; + border-bottom:0 none; +} + +.x-window-draggable, .x-window-draggable .x-window-header-text { + cursor:move; +} + +.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { + cursor:default; +} + +.x-window-body { + background-color:transparent; +} + +.x-panel-ghost .x-window-tl { + border-bottom:1px solid; +} + +.x-panel-collapsed .x-window-tl { + border-bottom:1px solid; +} + +.x-window-maximized-ct { + overflow:hidden; +} + +.x-window-maximized .x-window-handle { + display:none; +} + +.x-window-sizing-ghost ul { + border:0 none !important; +} + +.x-dlg-focus{ + -moz-outline:0 none; + outline:0 none; + width:0; + height:0; + overflow:hidden; + position:absolute; + top:0; + left:0; +} + +.ext-webkit .x-dlg-focus{ + width: 1px; + height: 1px; +} + +.x-dlg-mask{ + z-index:10000; + display:none; + position:absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity:.50; + filter: alpha(opacity=50); +} + +body.ext-ie6.x-body-masked select { + visibility:hidden; +} + +body.ext-ie6.x-body-masked .x-window select { + visibility:visible; +} + +.x-window-plain .x-window-mc { + border: 1px solid; +} + +.x-window-plain .x-window-body { + border: 1px solid; + background:transparent !important; +}.x-html-editor-wrap { + border:1px solid; +} + +.x-html-editor-tb .x-btn-text { + background:transparent no-repeat; +} + +.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { + background-position:0 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { + background-position:-16px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { + background-position:-32px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { + background-position:-160px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { + background-position:-176px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { + background-position:-112px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { + background-position:-128px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { + background-position:-144px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { + background-position:-80px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { + background-position:-96px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { + background-position:-48px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { + background-position:-64px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { + background-position:-192px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { + background-position:-208px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { + padding:5px; + padding-bottom:1px; +} + +.x-html-editor-tb .x-toolbar { + position:static !important; +}.x-panel-noborder .x-panel-body-noborder { + border-width:0; +} + +.x-panel-noborder .x-panel-header-noborder { + border-width:0 0 1px; + border-style:solid; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-width:0 0 1px; + border-style:solid; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-width:1px 0 0 0; + border-style:solid; +} + +.x-window-noborder .x-window-mc { + border-width:0; +} + +.x-window-plain .x-window-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-header-noborder { + border-width: 0 0 1px 0; +} + +.x-tab-panel-noborder .x-tab-panel-footer-noborder { + border-width: 1px 0 0 0; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-width: 1px 0 0 0; + border-style:solid; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-width:0 0 1px; + border-style:solid; +}.x-border-layout-ct { + position: relative; +} + +.x-border-panel { + position:absolute; + left:0; + top:0; +} + +.x-tool-collapse-south { + background-position:0 -195px; +} + +.x-tool-collapse-south-over { + background-position:-15px -195px; +} + +.x-tool-collapse-north { + background-position:0 -210px; +} + +.x-tool-collapse-north-over { + background-position:-15px -210px; +} + +.x-tool-collapse-west { + background-position:0 -180px; +} + +.x-tool-collapse-west-over { + background-position:-15px -180px; +} + +.x-tool-collapse-east { + background-position:0 -165px; +} + +.x-tool-collapse-east-over { + background-position:-15px -165px; +} + +.x-tool-expand-south { + background-position:0 -210px; +} + +.x-tool-expand-south-over { + background-position:-15px -210px; +} + +.x-tool-expand-north { + background-position:0 -195px; +} +.x-tool-expand-north-over { + background-position:-15px -195px; +} + +.x-tool-expand-west { + background-position:0 -165px; +} + +.x-tool-expand-west-over { + background-position:-15px -165px; +} + +.x-tool-expand-east { + background-position:0 -180px; +} + +.x-tool-expand-east-over { + background-position:-15px -180px; +} + +.x-tool-expand-north, .x-tool-expand-south { + float:right; + margin:3px; +} + +.x-tool-expand-east, .x-tool-expand-west { + float:none; + margin:3px 2px; +} + +.x-accordion-hd .x-tool-toggle { + background-position:0 -255px; +} + +.x-accordion-hd .x-tool-toggle-over { + background-position:-15px -255px; +} + +.x-panel-collapsed .x-accordion-hd .x-tool-toggle { + background-position:0 -240px; +} + +.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { + background-position:-15px -240px; +} + +.x-accordion-hd { + padding-top:4px; + padding-bottom:3px; + border-top:0 none; + background: transparent repeat-x 0 -9px; +} + +.x-layout-collapsed{ + position:absolute; + left:-10000px; + top:-10000px; + visibility:hidden; + width:20px; + height:20px; + overflow:hidden; + border:1px solid; + z-index:20; +} + +.ext-border-box .x-layout-collapsed{ + width:22px; + height:22px; +} + +.x-layout-collapsed-over{ + cursor:pointer; +} + +.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ + position:absolute; + top:0; + left:0; + width:20px; + height:20px; +} + + +.x-layout-split{ + position:absolute; + height:5px; + width:5px; + line-height:1px; + font-size:1px; + z-index:3; + background-color:transparent; +} + +/* IE6 strict won't drag w/out a color */ +.ext-strict .ext-ie6 .x-layout-split{ + background-color: #fff !important; + filter: alpha(opacity=1); +} + +.x-layout-split-h{ + background-image:url(../images/default/s.gif); + background-position: left; +} + +.x-layout-split-v{ + background-image:url(../images/default/s.gif); + background-position: top; +} + +.x-column-layout-ct { + overflow:hidden; + zoom:1; +} + +.x-column { + float:left; + padding:0; + margin:0; + overflow:hidden; + zoom:1; +} + +.x-column-inner { + overflow:hidden; + zoom:1; +} + +/* mini mode */ +.x-layout-mini { + position:absolute; + top:0; + left:0; + display:block; + width:5px; + height:35px; + cursor:pointer; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); +} + +.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ + opacity:1; + -moz-opacity:1; + filter:none; +} + +.x-layout-split-west .x-layout-mini { + top:48%; +} + +.x-layout-split-east .x-layout-mini { + top:48%; +} + +.x-layout-split-north .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-split-south .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-cmini-west .x-layout-mini { + top:48%; +} + +.x-layout-cmini-east .x-layout-mini { + top:48%; +} + +.x-layout-cmini-north .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-cmini-south .x-layout-mini { + left:48%; + height:5px; + width:35px; +} + +.x-layout-cmini-west, .x-layout-cmini-east { + border:0 none; + width:5px !important; + padding:0; + background-color:transparent; +} + +.x-layout-cmini-north, .x-layout-cmini-south { + border:0 none; + height:5px !important; + padding:0; + background-color:transparent; +} + +.x-viewport, .x-viewport body { + margin: 0; + padding: 0; + border: 0 none; + overflow: hidden; + height: 100%; +} + +.x-abs-layout-item { + position:absolute; + left:0; + top:0; +} + +.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { + margin:0; +} + +.x-box-layout-ct { + overflow:hidden; + zoom:1; +} + +.x-box-inner { + overflow:hidden; + zoom:1; + position:relative; + left:0; + top:0; +} + +.x-box-item { + position:absolute; + left:0; + top:0; +}.x-progress-wrap { + border:1px solid; + overflow:hidden; +} + +.x-progress-inner { + height:18px; + background:repeat-x; + position:relative; +} + +.x-progress-bar { + height:18px; + float:left; + width:0; + background: repeat-x left center; + border-top:1px solid; + border-bottom:1px solid; + border-right:1px solid; +} + +.x-progress-text { + padding:1px 5px; + overflow:hidden; + position:absolute; + left:0; + text-align:center; +} + +.x-progress-text-back { + line-height:16px; +} + +.ext-ie .x-progress-text-back { + line-height:15px; +} + +.ext-strict .ext-ie7 .x-progress-text-back{ + width: 100%; +} +.x-list-header{ + background: repeat-x 0 bottom; + cursor:default; + zoom:1; + height:22px; +} + +.x-list-header-inner div { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; +} + +.x-list-header-inner div em { + display:block; + border-left:1px solid; + padding:4px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + line-height:14px; +} + +.x-list-body { + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + zoom:1; + float: left; + width: 100%; +} + +.x-list-body dl { + zoom:1; +} + +.x-list-body dt { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + cursor:pointer; + zoom:1; +} + +.x-list-body dt em { + display:block; + padding:3px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; +} + +.x-list-resizer { + border-left:1px solid; + border-right:1px solid; + position:absolute; + left:0; + top:0; +} + +.x-list-header-inner em.sort-asc { + background: transparent no-repeat center 0; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + +.x-list-header-inner em.sort-desc { + background: transparent no-repeat center -23px; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + +/* Shared styles */ +.x-slider { + zoom:1; +} + +.x-slider-inner { + position:relative; + left:0; + top:0; + overflow:visible; + zoom:1; +} + +.x-slider-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; + display:block; + overflow:hidden; +} + +/* Horizontal styles */ +.x-slider-horz { + padding-left:7px; + background:transparent no-repeat 0 -22px; +} + +.x-slider-horz .x-slider-end { + padding-right:7px; + zoom:1; + background:transparent no-repeat right -44px; +} + +.x-slider-horz .x-slider-inner { + background:transparent repeat-x 0 0; + height:22px; +} + +.x-slider-horz .x-slider-thumb { + width:14px; + height:15px; + position:absolute; + left:0; + top:3px; + background:transparent no-repeat 0 0; +} + +.x-slider-horz .x-slider-thumb-over { + background-position: -14px -15px; +} + +.x-slider-horz .x-slider-thumb-drag { + background-position: -28px -30px; +} + +/* Vertical styles */ +.x-slider-vert { + padding-top:7px; + background:transparent no-repeat -44px 0; + width:22px; +} + +.x-slider-vert .x-slider-end { + padding-bottom:7px; + zoom:1; + background:transparent no-repeat -22px bottom; +} + +.x-slider-vert .x-slider-inner { + background:transparent repeat-y 0 0; +} + +.x-slider-vert .x-slider-thumb { + width:15px; + height:14px; + position:absolute; + left:3px; + bottom:0; + background:transparent no-repeat 0 0; +} + +.x-slider-vert .x-slider-thumb-over { + background-position: -15px -14px; +} + +.x-slider-vert .x-slider-thumb-drag { + background-position: -30px -28px; +}.x-window-dlg .x-window-body { + border:0 none !important; + padding:5px 10px; + overflow:hidden !important; +} + +.x-window-dlg .x-window-mc { + border:0 none !important; +} + +.x-window-dlg .ext-mb-input { + margin-top:4px; + width:95%; +} + +.x-window-dlg .ext-mb-textarea { + margin-top:4px; +} + +.x-window-dlg .x-progress-wrap { + margin-top:4px; +} + +.ext-ie .x-window-dlg .x-progress-wrap { + margin-top:6px; +} + +.x-window-dlg .x-msg-box-wait { + background:transparent no-repeat left; + display:block; + width:300px; + padding-left:18px; + line-height:18px; +} + +.x-window-dlg .ext-mb-icon { + float:left; + width:47px; + height:32px; +} + +.x-window-dlg .x-dlg-icon .ext-mb-content{ + zoom: 1; + margin-left: 47px; +} + +.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { + background:transparent no-repeat top left; +} + +.ext-gecko2 .ext-mb-fix-cursor { + overflow:auto; +}.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#6593cf; + background-color:#c3daf9; + background-image:url(../images/default/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#a3bad9; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #deecfd; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} +.x-tab-panel-header, .x-tab-panel-footer { + background-color: #deecfd; + border-color:#8db2e3; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#8db2e3; +} + +ul.x-tab-strip-top{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-bg.gif); + border-bottom-color:#8db2e3; +} + +ul.x-tab-strip-bottom{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); + border-top-color:#8db2e3; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#8db2e3; + background-color: #deecfd; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#15428b; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/default/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#8db2e3; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/default/tabs/scroll-left.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/default/tabs/scroll-right.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#99bbe8; +}.x-form-field { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field { + background-color:#fff; + background-image:url(../images/default/form/text-bg.gif); + border-color:#b5b8c8; +} + +.x-form-select-one { + background-color:#fff; + border-color:#b5b8c8; +} + +.x-form-check-group-label { + border-bottom: 1px solid #99bbe8; + color: #15428b; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger { + background-image:url(../images/default/form/trigger.gif); + border-bottom-color:#b5b8c8; +} + +.x-form-field-wrap .x-form-date-trigger { + background-image: url(../images/default/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger { + background-image: url(../images/default/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger { + background-image: url(../images/default/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger { + border-bottom-color:#7eadd9; +} + +.x-item-disabled .x-form-trigger-over { + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click { + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus { + border-color:#7eadd9; +} + +.x-form-invalid, textarea.x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-invalid.x-form-composite { + border: none; + background-image: none; +} + +.x-form-invalid.x-form-composite .x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:gray; +} + +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.ext-webkit .x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-fieldset { + border-color:#b5b8c8; +} + +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; +} +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/default/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #3e6aaa; +} + +.x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/default/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/default/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +}.x-toolbar{ + border-color:#a9bfd3; + background-color:#d0def0; + background-image:url(../images/default/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-blue-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/default/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/default/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/refresh-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +}.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/default/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/default/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/default/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/default/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/default/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/default/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/default/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#99bbe8; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#aaccf6; + border-right-color:#aaccf6; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#15428b; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +td.grid-hd-group-cell { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; +} + +.x-grid3-row-selected { + background-color: #dfe8f6 !important; + background-image: none; + border-color:#a3bae9; +} + +.x-grid3-cell-selected{ + background-color: #b8cfee !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#15428b !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c3daf9; + background-image:url(../images/default/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/default/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#99bbe8; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-collapse.gif); + color:#3764a0; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +}.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +}.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #d9e8fb; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +}.x-date-picker { + border-color: #1b376c; + background-color:#fff; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/default/shared/hd-sprite.gif); + color:#fff; + font:bold 11px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/default/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/default/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-bottom-color:#a3bad9; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#233d6d; +} + +.x-date-inner td { + border-color:#fff; +} + +.x-date-inner a { + font:normal 11px arial, helvetica,tahoma,sans-serif; + color:#000; +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-inner .x-date-today a{ + border-color:darkred; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#a3bad9; + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#000; + background-color:#ddecfe; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:10px; + color:#000; +} + +.x-date-mp { + background-color:#fff; +} + +.x-date-mp td { + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#083772; + color:#fff; + border-color: #3366cc #000055 #000055 #3366cc; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); +} + +.x-date-mp-btns td { + border-top-color: #c5d2df; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color:#15428b; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#15428b; + background-color: #ddecfe; +} + +td.x-date-mp-sel a { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-mp-ybtn a { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#c5d2df; +}.x-tip .x-tip-close{ + background-image: url(../images/default/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/default/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/default/qtip/tip-anchor-sprite.gif); +}.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#718bb7; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/default/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/default/menu/item-over.gif); + background-color: #dbecf4; + border-color:#aaccf6; +} + +.x-menu-item-active a.x-menu-item { + border-color:#aaccf6; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/default/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#f0f0f0 !important; + background-image: none; +} + +.x-date-menu, .x-color-menu{ + background-color: #fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +}.x-combo-list { + border-color:#98c0f4; + background-color:#ddecfe; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#fff; +} + +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#98c0f4; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#98c0f4; +} + +.x-combo-list-item { + border-color:#fff; +} + +.x-combo-list .x-combo-selected{ + border-color:#a3bae9 !important; + background-color:#dfe8f6; +} + +.x-combo-list .x-toolbar { + border-top-color:#98c0f4; +} + +.x-combo-list-small { + font:normal 11px tahoma, arial, helvetica, sans-serif; +}.x-panel { + border-color: #99bbe8; +} + +.x-panel-header { + color:#15428b; + font-weight:bold; + font-size: 11px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#99bbe8; + background-image: url(../images/default/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#99bbe8; + background-color:#fff; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#99bbe8; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#99bbe8; +} + +.x-panel-tl .x-panel-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/default/panel/corners-sprite.gif); + border-bottom-color:#99bbe8; +} + +.x-panel-bc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-panel-ml { + background-color: #fff; + background-image:url(../images/default/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/default/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#cbddf3; +} + +.x-panel-ghost ul { + border-color:#99bbe8; +} + +.x-panel-dd-spacer { + border-color:#99bbe8; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} +.x-window-proxy { + background-color:#c7dffc; + border-color:#99bbe8; +} + +.x-window-tl .x-window-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-mc { + border-color:#99bbe8; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-window-ml { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#99bbe8; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#84a0c4; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #ccd9e8; + border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; +} + +.x-window-plain .x-window-body { + border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #ccd9e8; +}.x-html-editor-wrap { + border-color:#a9bfd3; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +}.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +}.x-border-layout-ct { + background-color:#dfe8f6; +} + +.x-accordion-hd { + color:#222; + font-weight:normal; + background-image: url(../images/default/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#d2e0f2; + border-color:#98c0f4; +} + +.x-layout-collapsed-over{ + background-color:#d9e8fb; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +}.x-progress-wrap { + border-color:#6593cf; +} + +.x-progress-inner { + background-color:#e0e8f3; + background-image:url(../images/default/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#9cbfee; + background-image:url(../images/default/progress/progress-bg.gif); + border-top-color:#d1e4fd; + border-bottom-color:#7fa9e4; + border-right-color:#7fa9e4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#396095; +}.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#dfe8f6; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/default/grid/sort-hd.gif); + border-color: #99bbe8; +}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/default/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/default/slider/slider-v-thumb.png); +}.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/default/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/default/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/default/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/default/window/icon-error.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/menu.css b/src/webui/static/extjs/resources/css/menu.css deleted file mode 100644 index 3cbe34d5..00000000 --- a/src/webui/static/extjs/resources/css/menu.css +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-menu { - border: 1px solid #718bb7; - z-index: 15000; - zoom: 1; - background: #f0f0f0 url(../images/default/menu/menu.gif) repeat-y; - padding: 2px; -} -.x-menu a { - text-decoration: none !important; -} -.ext-ie .x-menu { - zoom:1; - overflow:hidden; -} -.x-menu-list{ - background:transparent; - border:0 none; -} -.x-menu li{ - line-height:100%; -} -.x-menu li.x-menu-sep-li{ - font-size:1px; - line-height:1px; -} -.x-menu-list-item{ - font:normal 11px tahoma,arial, sans-serif; - white-space: nowrap; - -moz-user-select: none; - -khtml-user-select: none; - display:block; - padding:1px; -} -.x-menu-item-arrow{ - background:transparent url(../images/default/menu/menu-parent.gif) no-repeat right; -} -.x-menu-sep { - display:block; - font-size:1px; - line-height:1px; - margin: 2px 3px; - background-color:#e0e0e0; - border-bottom:1px solid #fff; - overflow:hidden; -} -.x-menu-focus { - position:absolute; - left:-1px; - top:-1px; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; - overflow:hidden; - display:block; -} -.x-menu a.x-menu-item { - display:block; - line-height:16px; - padding:3px 21px 3px 3px; - white-space: nowrap; - text-decoration:none; - color:#222; - -moz-outline: 0 none; - outline: 0 none; - cursor:pointer; -} -.x-menu-item-active { - background: #ebf3fd url(../images/default/menu/item-over.gif) repeat-x left bottom; - border:1px solid #aaccf6; - padding: 0; -} -.x-menu-item-active a.x-menu-item { - color: #233d6d; -} - -.x-menu-item-icon { - border: 0 none; - height: 16px; - padding: 0; - vertical-align: top; - width: 16px; - margin: 0 8px 0 0; - background-position:center; -} - -.x-menu-check-item .x-menu-item-icon{ - background: transparent url(../images/default/menu/unchecked.gif) no-repeat center; -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} -.x-menu-group-item .x-menu-item-icon{ - background: transparent; -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background: transparent url(../images/default/menu/group-checked.gif) no-repeat center; -} - -.x-menu-plain { - background:#fff !important; -} -.x-menu-date-item{ - padding:0; -} - -.x-menu .x-color-palette, .x-menu .x-date-picker{ - margin-left: 26px; - margin-right:4px; -} -.x-menu .x-date-picker{ - border:1px solid #a3bad9; - margin-top:2px; - margin-bottom:2px; -} -.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ - margin: 0; - border: 0 none; -} -.x-date-menu { - padding:0 !important; -} - -.x-cycle-menu .x-menu-item-checked { - border:1px dotted #a3bae9 !important; - background:#DFE8F6; - padding:0; -} diff --git a/src/webui/static/extjs/resources/css/progress.css b/src/webui/static/extjs/resources/css/progress.css deleted file mode 100644 index 7b18da22..00000000 --- a/src/webui/static/extjs/resources/css/progress.css +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-progress-wrap { - border:1px solid #6593cf; - overflow:hidden; -} -.x-progress-inner { - height:18px; - background: #e0e8f3 url(../images/default/qtip/bg.gif) repeat-x; - position:relative; -} -.x-progress-bar { - height:18px; - float:left; - width:0; - background:#9CBFEE url( ../images/default/progress/progress-bg.gif ) repeat-x left center; - border-top:1px solid #D1E4FD; - border-bottom:1px solid #7FA9E4; - border-right:1px solid #7FA9E4; -} -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; - padding:1px 5px; - overflow:hidden; - position:absolute; - left:0; - text-align:center; -} -.x-progress-text-back { - color:#396095; - line-height:16px; -} -.ext-ie .x-progress-text-back { - line-height:15px; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/qtips.css b/src/webui/static/extjs/resources/css/qtips.css deleted file mode 100644 index c82c10e8..00000000 --- a/src/webui/static/extjs/resources/css/qtips.css +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-tip{ - position: absolute; - top: 0; - left:0; - visibility: hidden; - z-index: 20000; - border:0 none; -} -.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); - height: 15px; - float:right; - width: 15px; - margin:0 0 2px 2px; - cursor:pointer; - display:none; -} -.x-tip .x-tip-tc { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -62px; - padding-top:3px; - overflow:hidden; - zoom:1; -} -.x-tip .x-tip-tl { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 0; - padding-left:6px; - overflow:hidden; - zoom:1; -} -.x-tip .x-tip-tr { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right 0; - padding-right:6px; - overflow:hidden; - zoom:1; -} -.x-tip .x-tip-bc { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -121px; - height:3px; - overflow:hidden; -} -.x-tip .x-tip-bl { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -59px; - padding-left:6px; - zoom:1; -} -.x-tip .x-tip-br { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -59px; - padding-right:6px; - zoom:1; -} -.x-tip .x-tip-mc { - border:0 none; - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background: #fff url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -124px; - padding-left:6px; - zoom:1; -} -.x-tip .x-tip-mr { - background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -124px; - padding-right:6px; - zoom:1; -} -.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { - font-size:0; - line-height:0; -} -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - padding:0; - margin:0 0 2px 0; - color:#444; -} -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - margin:0 !important; - line-height:14px; - color:#444; - padding:0; -} - -.x-tip .x-tip-body .loading-indicator { - margin:0; -} - -.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { - cursor:move; -} - -.x-form-invalid-tip { -} - -.x-form-invalid-tip .x-tip-tc { - background: url(../images/default/form/error-tip-corners.gif) repeat-x 0 -12px; - padding-top:6px; -} -.x-form-invalid-tip .x-tip-tl { - background-image: url(../images/default/form/error-tip-corners.gif); -} -.x-form-invalid-tip .x-tip-tr { - background-image: url(../images/default/form/error-tip-corners.gif); -} -.x-form-invalid-tip .x-tip-bc { - background: url(../images/default/form/error-tip-corners.gif) repeat-x 0 -18px; - height:6px; -} -.x-form-invalid-tip .x-tip-bl { - background: url(../images/default/form/error-tip-corners.gif) no-repeat 0 -6px; -} -.x-form-invalid-tip .x-tip-br { - background: url(../images/default/form/error-tip-corners.gif) no-repeat right -6px; -} -.x-form-invalid-tip .x-tip-ml { - background-image: url(../images/default/form/error-tip-corners.gif); -} -.x-form-invalid-tip .x-tip-mr { - background-image: url(../images/default/form/error-tip-corners.gif); -} -.x-form-invalid-tip .x-tip-body { - padding:2px; -} -.x-form-invalid-tip .x-tip-body { - padding-left:24px; - background:transparent url(../images/default/form/exclamation.gif) no-repeat 2px 2px; -} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/reset-min.css b/src/webui/static/extjs/resources/css/reset-min.css index 2cd8445d..f503196b 100644 --- a/src/webui/static/extjs/resources/css/reset-min.css +++ b/src/webui/static/extjs/resources/css/reset-min.css @@ -1,9 +1,7 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/borders.css b/src/webui/static/extjs/resources/css/structure/borders.css similarity index 51% rename from src/webui/static/extjs/resources/css/borders.css rename to src/webui/static/extjs/resources/css/structure/borders.css index 1a4b7328..61512a33 100644 --- a/src/webui/static/extjs/resources/css/borders.css +++ b/src/webui/static/extjs/resources/css/structure/borders.css @@ -1,61 +1,54 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-panel-noborder .x-panel-body-noborder { - border-width:0; -} - -.x-panel-noborder .x-panel-header-noborder { - border-width:0; - border-bottom:1px solid #99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-width:0; - border-bottom:1px solid #99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-width:0; - border-top:1px solid #99bbe8; -} - -.x-window-noborder .x-window-mc { - border-width:0; -} - -.x-window-plain .x-window-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-header-noborder { - border-top-width:0; - border-left-width:0; - border-right-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-footer-noborder { - border-bottom-width:0; - border-left-width:0; - border-right-width:0; -} - - -.x-tab-panel-bbar-noborder .x-toolbar { - border-width:0; - border-top:1px solid #99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-width:0; - border-bottom:1px solid #99bbe8; +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel-noborder .x-panel-body-noborder { + border-width:0; +} + +.x-panel-noborder .x-panel-header-noborder { + border-width:0 0 1px; + border-style:solid; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-width:0 0 1px; + border-style:solid; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-width:1px 0 0 0; + border-style:solid; +} + +.x-window-noborder .x-window-mc { + border-width:0; +} + +.x-window-plain .x-window-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-header-noborder { + border-width: 0 0 1px 0; +} + +.x-tab-panel-noborder .x-tab-panel-footer-noborder { + border-width: 1px 0 0 0; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-width: 1px 0 0 0; + border-style:solid; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-width:0 0 1px; + border-style:solid; } \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/box.css b/src/webui/static/extjs/resources/css/structure/box.css new file mode 100644 index 00000000..f6583042 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/box.css @@ -0,0 +1,80 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +/* + Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: +
      +
      +
      +

      YOUR TITLE HERE (optional)

      +
      YOUR CONTENT HERE
      +
      +
      +
      + */ + +.x-box-tl { + background: transparent no-repeat 0 0; + zoom:1; +} + +.x-box-tc { + height: 8px; + background: transparent repeat-x 0 0; + overflow: hidden; +} + +.x-box-tr { + background: transparent no-repeat right -8px; +} + +.x-box-ml { + background: transparent repeat-y 0; + padding-left: 4px; + overflow: hidden; + zoom:1; +} + +.x-box-mc { + background: repeat-x 0 -16px; + padding: 4px 10px; +} + +.x-box-mc h3 { + margin: 0 0 4px 0; + zoom:1; +} + +.x-box-mr { + background: transparent repeat-y right; + padding-right: 4px; + overflow: hidden; +} + +.x-box-bl { + background: transparent no-repeat 0 -16px; + zoom:1; +} + +.x-box-bc { + background: transparent repeat-x 0 -8px; + height: 8px; + overflow: hidden; +} + +.x-box-br { + background: transparent no-repeat right -24px; +} + +.x-box-tl, .x-box-bl { + padding-left: 8px; + overflow: hidden; +} + +.x-box-tr, .x-box-br { + padding-right: 8px; + overflow: hidden; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/button.css b/src/webui/static/extjs/resources/css/structure/button.css new file mode 100644 index 00000000..fb8cdc28 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/button.css @@ -0,0 +1,445 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-btn{ + cursor:pointer; + white-space: nowrap; +} + +.x-btn button{ + border:0 none; + background-color:transparent; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; +} + +* html .ext-ie .x-btn button { + width:1px; +} + +.ext-gecko .x-btn button, .ext-webkit .x-btn button { + padding-left:0; + padding-right:0; +} + +.ext-gecko .x-btn button::-moz-focus-inner { + padding:0; +} + +.ext-ie .x-btn button { + padding-top:2px; +} + +.x-btn td { + padding:0 !important; +} + +.x-btn-text { + cursor:pointer; + white-space: nowrap; + padding:0; +} + +/* icon placement and sizing styles */ + +/* Only text */ +.x-btn-noicon .x-btn-small .x-btn-text{ + height: 16px; +} + +.x-btn-noicon .x-btn-medium .x-btn-text{ + height: 24px; +} + +.x-btn-noicon .x-btn-large .x-btn-text{ + height: 32px; +} + +/* Only icons */ +.x-btn-icon .x-btn-text{ + background-position: center; + background-repeat: no-repeat; +} + +.x-btn-icon .x-btn-small .x-btn-text{ + height: 16px; + width: 16px; +} + +.x-btn-icon .x-btn-medium .x-btn-text{ + height: 24px; + width: 24px; +} + +.x-btn-icon .x-btn-large .x-btn-text{ + height: 32px; + width: 32px; +} + +/* Icons and text */ +/* left */ +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:18px; + height:16px; +} + +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:26px; + height:24px; +} + +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:34px; + height:32px; +} + +/* top */ +.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:18px; +} + +.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:26px; +} + +.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:34px; +} + +/* right */ +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:18px; + height:16px; +} + +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:26px; + height:24px; +} + +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:34px; + height:32px; +} + +/* bottom */ +.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:18px; +} + +.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:26px; +} + +.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:34px; +} + +/* background positioning */ +.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ + font-size:1px; + line-height:1px; + width:3px; + display:block; + overflow:hidden; +} + +.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ + height:3px; +} + +.x-btn-tl{ + width:3px; + height:3px; + background:no-repeat 0 0; +} +.x-btn-tr{ + width:3px; + height:3px; + background:no-repeat -3px 0; +} +.x-btn-tc{ + height:3px; + background:repeat-x 0 -6px; +} + +.x-btn-ml{ + width:3px; + background:no-repeat 0 -24px; +} +.x-btn-mr{ + width:3px; + background:no-repeat -3px -24px; +} + +.x-btn-mc{ + background:repeat-x 0 -1096px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} + +/* Fixes an issue with the button height */ +.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { + height: 100%; +} + +.x-btn-bl{ + width:3px; + height:3px; + background:no-repeat 0 -3px; +} + +.x-btn-br{ + width:3px; + height:3px; + background:no-repeat -3px -3px; +} + +.x-btn-bc{ + height:3px; + background:repeat-x 0 -15px; +} + +.x-btn-over .x-btn-tl{ + background-position: -6px 0; +} + +.x-btn-over .x-btn-tr{ + background-position: -9px 0; +} + +.x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} + +.x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} + +.x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} + +.x-btn-over .x-btn-br{ + background-position: -9px -3px; +} + +.x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} + +.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} + +.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} + +.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} + +.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} + +.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} + +.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-btn-disabled *{ + cursor:default !important; +} + + +/* With a menu arrow */ +/* right */ +.x-btn-mc em.x-btn-arrow { + display:block; + background:transparent no-repeat right center; + padding-right:10px; +} + +.x-btn-mc em.x-btn-split { + display:block; + background:transparent no-repeat right center; + padding-right:14px; +} + +/* bottom */ +.x-btn-mc em.x-btn-arrow-bottom { + display:block; + background:transparent no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-mc em.x-btn-split-bottom { + display:block; + background:transparent no-repeat center bottom; + padding-bottom:14px; +} + +/* height adjustment class */ +.x-btn-as-arrow .x-btn-mc em { + display:block; + background-color:transparent; + padding-bottom:14px; +} + +/* groups */ +.x-btn-group { + padding:1px; +} + +.x-btn-group-header { + padding:2px; + text-align:center; +} + +.x-btn-group-tc { + background: transparent repeat-x 0 0; + overflow:hidden; +} + +.x-btn-group-tl { + background: transparent no-repeat 0 0; + padding-left:3px; + zoom:1; +} + +.x-btn-group-tr { + background: transparent no-repeat right 0; + zoom:1; + padding-right:3px; +} + +.x-btn-group-bc { + background: transparent repeat-x 0 bottom; + zoom:1; +} + +.x-btn-group-bc .x-panel-footer { + zoom:1; +} + +.x-btn-group-bl { + background: transparent no-repeat 0 bottom; + padding-left:3px; + zoom:1; +} + +.x-btn-group-br { + background: transparent no-repeat right bottom; + padding-right:3px; + zoom:1; +} + +.x-btn-group-mc { + border:0 none; + padding:1px 0 0 0; + margin:0; +} + +.x-btn-group-mc .x-btn-group-body { + background-color:transparent; + border: 0 none; +} + +.x-btn-group-ml { + background: transparent repeat-y 0 0; + padding-left:3px; + zoom:1; +} + +.x-btn-group-mr { + background: transparent repeat-y right 0; + padding-right:3px; + zoom:1; +} + +.x-btn-group-bc .x-btn-group-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-btn-group-bc { + height:3px; + font-size:0; + line-height:0; +} + +.x-btn-group-bwrap { + overflow:hidden; + zoom:1; +} + +.x-btn-group-body { + overflow:hidden; + zoom:1; +} + +.x-btn-group-notitle .x-btn-group-tc { + background: transparent repeat-x 0 0; + overflow:hidden; + height:2px; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/combo.css b/src/webui/static/extjs/resources/css/structure/combo.css new file mode 100644 index 00000000..3edeea1b --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/combo.css @@ -0,0 +1,45 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-combo-list { + border:1px solid; + zoom:1; + overflow:hidden; +} + +.x-combo-list-inner { + overflow:auto; + position:relative; /* for calculating scroll offsets */ + zoom:1; + overflow-x:hidden; +} + +.x-combo-list-hd { + border-bottom:1px solid; + padding:3px; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom:1px solid; +} + +.x-combo-list-item { + padding:2px; + border:1px solid; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} + +.x-combo-list .x-combo-selected{ + border:1px dotted !important; + cursor:pointer; +} + +.x-combo-list .x-toolbar { + border-top:1px solid; + border-bottom:0 none; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/core.css b/src/webui/static/extjs/resources/css/structure/core.css similarity index 67% rename from src/webui/static/extjs/resources/css/core.css rename to src/webui/static/extjs/resources/css/structure/core.css index 9c7da94d..caf75a3b 100644 --- a/src/webui/static/extjs/resources/css/core.css +++ b/src/webui/static/extjs/resources/css/structure/core.css @@ -1,314 +1,341 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.ext-el-mask { - z-index: 20000; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - background-color: #CCC; - width: 100%; - height: 100%; - zoom: 1; -} -.ext-el-mask-msg { - z-index: 20001; - position: absolute; - top: 0; - left: 0; - border:1px solid #6593cf; - background: #c3daf9 url(../images/default/box/tb-blue.gif) repeat-x 0 -16px; - padding:2px; -} -.ext-el-mask-msg div { - padding:5px 10px 5px 10px; - background: #eee; - border:1px solid #a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; - cursor:wait; -} - -.ext-shim { - position:absolute; - visibility:hidden; - left:0; - top:0; - overflow:hidden; -} -.ext-ie .ext-shim { - filter: alpha(opacity=0); -} -.ext-ie6 .ext-shim { - margin-left: 5px; - margin-top: 3px; -} - -.x-mask-loading div { - padding:5px 10px 5px 25px; - background: #fbfbfb url( '../images/default/grid/loading.gif' ) no-repeat 5px 5px; - line-height: 16px; -} -/* class for hiding elements without using display:none */ -.x-hidden, .x-hide-offsets { - position:absolute; - left:-10000px; - top:-10000px; - visibility:hidden; -} -.x-hide-display { - display:none !important; -} - -.x-hide-visibility { - visibility:hidden !important; -} - -.x-masked { - overflow: hidden !important; -} - -.x-masked select, .x-masked object, .x-masked embed { - visibility: hidden; -} - -.x-layer { - visibility: hidden; -} - -.x-unselectable, .x-unselectable * { - -moz-user-select: none; - -khtml-user-select: none; -} - -.x-repaint { - zoom: 1; - background-color: transparent; - -moz-outline: none; -} - -.x-item-disabled { - color: gray; - cursor: default; - opacity: .6; - -moz-opacity: .6; - filter: alpha(opacity=60); -} - -.x-item-disabled * { - color: gray !important; - cursor: default !important; -} - -.x-splitbar-proxy { - position: absolute; - visibility: hidden; - z-index: 20001; - background: #aaa; - zoom: 1; - line-height: 1px; - font-size: 1px; - overflow: hidden; -} - -.x-splitbar-h, .x-splitbar-proxy-h { - cursor: e-resize; - cursor: col-resize; -} - -.x-splitbar-v, .x-splitbar-proxy-v { - cursor: s-resize; - cursor: row-resize; -} - -.x-color-palette { - width: 150px; - height: 92px; - cursor: pointer; -} - -.x-color-palette a { - border: 1px solid #fff; - float: left; - padding: 2px; - text-decoration: none; - -moz-outline: 0 none; - outline: 0 none; - cursor: pointer; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border: 1px solid #8BB8F3; - background: #deecfd; -} - -.x-color-palette em { - display: block; - border: 1px solid #ACA899; -} - -.x-color-palette em span { - cursor: pointer; - display: block; - height: 10px; - line-height: 10px; - width: 10px; -} - -.x-ie-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; - background:#777; - zoom:1; -} - -.x-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; -} - -.x-shadow * { - overflow: hidden; -} - -.x-shadow * { - padding: 0; - border: 0; - margin: 0; - clear: none; - zoom: 1; -} - -/* top bottom */ -.x-shadow .xstc, .x-shadow .xsbc { - height: 6px; - float: left; -} - -/* corners */ -.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { - width: 6px; - height: 6px; - float: left; -} - -/* sides */ -.x-shadow .xsc { - width: 100%; -} - -.x-shadow .xsml, .x-shadow .xsmr { - width: 6px; - float: left; - height: 100%; -} - -.x-shadow .xsmc { - float: left; - height: 100%; - background: transparent url( ../images/default/shadow-c.png ); -} - -.x-shadow .xst, .x-shadow .xsb { - height: 6px; - overflow: hidden; - width: 100%; -} - -.x-shadow .xsml { - background: transparent url( ../images/default/shadow-lr.png ) repeat-y 0 0; -} - -.x-shadow .xsmr { - background: transparent url( ../images/default/shadow-lr.png ) repeat-y -6px 0; -} - -.x-shadow .xstl { - background: transparent url( ../images/default/shadow.png ) no-repeat 0 0; -} - -.x-shadow .xstc { - background: transparent url( ../images/default/shadow.png ) repeat-x 0 -30px; -} - -.x-shadow .xstr { - background: transparent url( ../images/default/shadow.png ) repeat-x 0 -18px; -} - -.x-shadow .xsbl { - background: transparent url( ../images/default/shadow.png ) no-repeat 0 -12px; -} - -.x-shadow .xsbc { - background: transparent url( ../images/default/shadow.png ) repeat-x 0 -36px; -} - -.x-shadow .xsbr { - background: transparent url( ../images/default/shadow.png ) repeat-x 0 -6px; -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); - background-repeat: no-repeat; - background-position: left; - padding-left: 20px; - line-height: 16px; - margin: 3px; -} - -.x-text-resize { - position: absolute; - left: -1000px; - top: -1000px; - visibility: hidden; - zoom: 1; -} - -.x-drag-overlay { - width: 100%; - height: 100%; - display: none; - position: absolute; - left: 0; - top: 0; - background-image:url(../images/default/s.gif); - z-index: 20000; -} - -.x-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - - -.x-spotlight { - z-index: 8999; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - background-color: #CCC; - width:0; - height:0; - zoom: 1; -} +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-el-mask { + z-index: 100; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + width: 100%; + height: 100%; + zoom: 1; +} + +.ext-el-mask-msg { + z-index: 20001; + position: absolute; + top: 0; + left: 0; + border:1px solid; + background:repeat-x 0 -16px; + padding:2px; +} + +.ext-el-mask-msg div { + padding:5px 10px 5px 10px; + border:1px solid; + cursor:wait; +} + +.ext-shim { + position:absolute; + visibility:hidden; + left:0; + top:0; + overflow:hidden; +} + +.ext-ie .ext-shim { + filter: alpha(opacity=0); +} + +.ext-ie6 .ext-shim { + margin-left: 5px; + margin-top: 3px; +} + +.x-mask-loading div { + padding:5px 10px 5px 25px; + background:no-repeat 5px 5px; + line-height:16px; +} + +/* class for hiding elements without using display:none */ +.x-hidden, .x-hide-offsets { + position:absolute !important; + left:-10000px; + top:-10000px; + visibility:hidden; +} + +.x-hide-display { + display:none !important; +} + +.x-hide-nosize, +.x-hide-nosize * /* Emulate display:none for children */ + { + height:0px!important; + width:0px!important; + visibility:hidden!important; + border:none!important; + zoom:1; +} + +.x-hide-visibility { + visibility:hidden !important; +} + +.x-masked { + overflow: hidden !important; +} +.x-masked-relative { + position: relative !important; +} + +.x-masked select, .x-masked object, .x-masked embed { + visibility: hidden; +} + +.x-layer { + visibility: hidden; +} + +.x-unselectable, .x-unselectable * { + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select:ignore; +} + +.x-repaint { + zoom: 1; + background-color: transparent; + -moz-outline: none; + outline: none; +} + +.x-item-disabled { + cursor: default; + opacity: .6; + -moz-opacity: .6; + filter: alpha(opacity=60); +} + +.x-item-disabled * { + cursor: default !important; +} + +.x-form-radio-group .x-item-disabled { + filter: none; +} + +.x-splitbar-proxy { + position: absolute; + visibility: hidden; + z-index: 20001; + zoom: 1; + line-height: 1px; + font-size: 1px; + overflow: hidden; +} + +.x-splitbar-h, .x-splitbar-proxy-h { + cursor: e-resize; + cursor: col-resize; +} + +.x-splitbar-v, .x-splitbar-proxy-v { + cursor: s-resize; + cursor: row-resize; +} + +.x-color-palette { + width: 150px; + height: 92px; + cursor: pointer; +} + +.x-color-palette a { + border: 1px solid; + float: left; + padding: 2px; + text-decoration: none; + -moz-outline: 0 none; + outline: 0 none; + cursor: pointer; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border: 1px solid; +} + +.x-color-palette em { + display: block; + border: 1px solid; +} + +.x-color-palette em span { + cursor: pointer; + display: block; + height: 10px; + line-height: 10px; + width: 10px; +} + +.x-ie-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; + zoom:1; +} + +.x-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; +} + +.x-shadow * { + overflow: hidden; +} + +.x-shadow * { + padding: 0; + border: 0; + margin: 0; + clear: none; + zoom: 1; +} + +/* top bottom */ +.x-shadow .xstc, .x-shadow .xsbc { + height: 6px; + float: left; +} + +/* corners */ +.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { + width: 6px; + height: 6px; + float: left; +} + +/* sides */ +.x-shadow .xsc { + width: 100%; +} + +.x-shadow .xsml, .x-shadow .xsmr { + width: 6px; + float: left; + height: 100%; +} + +.x-shadow .xsmc { + float: left; + height: 100%; + background-color: transparent; +} + +.x-shadow .xst, .x-shadow .xsb { + height: 6px; + overflow: hidden; + width: 100%; +} + +.x-shadow .xsml { + background: transparent repeat-y 0 0; +} + +.x-shadow .xsmr { + background: transparent repeat-y -6px 0; +} + +.x-shadow .xstl { + background: transparent no-repeat 0 0; +} + +.x-shadow .xstc { + background: transparent repeat-x 0 -30px; +} + +.x-shadow .xstr { + background: transparent repeat-x 0 -18px; +} + +.x-shadow .xsbl { + background: transparent no-repeat 0 -12px; +} + +.x-shadow .xsbc { + background: transparent repeat-x 0 -36px; +} + +.x-shadow .xsbr { + background: transparent repeat-x 0 -6px; +} + +.loading-indicator { + background: no-repeat left; + padding-left: 20px; + line-height: 16px; + margin: 3px; +} + +.x-text-resize { + position: absolute; + left: -1000px; + top: -1000px; + visibility: hidden; + zoom: 1; +} + +.x-drag-overlay { + width: 100%; + height: 100%; + display: none; + position: absolute; + left: 0; + top: 0; + background-image:url(../images/default/s.gif); + z-index: 20000; +} + +.x-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + +.x-spotlight { + z-index: 8999; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + width:0; + height:0; + zoom: 1; +} + +#x-history-frame { + position:absolute; + top:-1px; + left:0; + width:1px; + height:1px; + visibility:hidden; +} + +#x-history-field { + position:absolute; + top:0; + left:-1px; + width:1px; + height:1px; + visibility:hidden; +} diff --git a/src/webui/static/extjs/resources/css/date-picker.css b/src/webui/static/extjs/resources/css/structure/date-picker.css similarity index 58% rename from src/webui/static/extjs/resources/css/date-picker.css rename to src/webui/static/extjs/resources/css/structure/date-picker.css index 5fb6229b..8d5f4094 100644 --- a/src/webui/static/extjs/resources/css/date-picker.css +++ b/src/webui/static/extjs/resources/css/structure/date-picker.css @@ -1,51 +1,54 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ .x-date-picker { - border: 1px solid #1b376c; + border: 1px solid; border-top:0 none; - background:#fff; position:relative; } + .x-date-picker a { -moz-outline:0 none; outline:0 none; } + .x-date-inner, .x-date-inner td, .x-date-inner th{ border-collapse:separate; } + .x-date-middle,.x-date-left,.x-date-right { - background: url(../images/default/shared/hd-sprite.gif) repeat-x 0 -83px; - color:#FFF; - font:bold 11px "sans serif", tahoma, verdana, helvetica; + background: repeat-x 0 -83px; overflow:hidden; } -.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{ +.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, +.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, +.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ background:transparent !important; vertical-align:middle; } -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} -.x-date-middle .x-btn-with-menu .x-btn-center em { - background:transparent url(../images/default/toolbar/btn-arrow-light.gif) no-repeat right 0; + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background:transparent no-repeat right 0; } + .x-date-right, .x-date-left { width:18px; } + .x-date-right{ text-align:right; } + .x-date-middle { - padding-top:2px;padding-bottom:2px; + padding-top:2px; + padding-bottom:2px; width:130px; /* FF3 */ } + .x-date-right a, .x-date-left a{ display:block; width:16px; @@ -57,105 +60,120 @@ opacity:.6; filter: alpha(opacity=60); } + .x-date-right a:hover, .x-date-left a:hover{ -moz-opacity: 1; opacity:1; filter: alpha(opacity=100); } + +.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ + -moz-opacity: 0.6; + opacity:.6; + filter: alpha(opacity=60); +} + .x-date-right a { - background-image: url(../images/default/shared/right-btn.gif); margin-right:2px; text-decoration:none !important; } + .x-date-left a{ - background-image: url(../images/default/shared/left-btn.gif); margin-left:2px; text-decoration:none !important; } + table.x-date-inner { - width:100%; + width: 100%; table-layout:fixed; } + +.ext-webkit table.x-date-inner{ + /* Fix for webkit browsers */ + width: 175px; +} + + .x-date-inner th { width:25px; } + .x-date-inner th { - background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; + background: repeat-x left top; text-align:right !important; - border-bottom: 1px solid #a3bad9; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#233d6d; + border-bottom: 1px solid; cursor:default; padding:0; border-collapse:separate; } + .x-date-inner th span { display:block; padding:2px; padding-right:7px; } + .x-date-inner td { - border: 1px solid #fff; + border: 1px solid; text-align:right; padding:0; } + .x-date-inner a { padding:2px 5px; display:block; - font:normal 11px arial, helvetica,tahoma,sans-serif; text-decoration:none; - color:black; text-align:right; zoom:1; } + .x-date-inner .x-date-active{ cursor:pointer; color:black; } + .x-date-inner .x-date-selected a{ - background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; - border:1px solid #8db2e3; - padding:1px 4px; -} -.x-date-inner .x-date-today a{ - border: 1px solid darkred; + background: repeat-x left top; + border:1px solid; padding:1px 4px; } -.x-date-inner .x-date-selected span{ - font-weight:bold; + +.x-date-inner .x-date-today a{ + border: 1px solid; + padding:1px 4px; } + .x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaaaaa; text-decoration:none !important; } + .x-date-bottom { padding:4px; - border-top: 1px solid #a3bad9; - background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; + border-top: 1px solid; + background: repeat-x left top; } .x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ text-decoration:none !important; - color:black; - background: #ddecfe; +} + +.x-item-disabled .x-date-inner a:hover{ + background: none; } .x-date-inner .x-date-disabled a { cursor:default; - background:#eeeeee; - color:#bbbbbb; } -.x-date-mmenu{ - background:#eeeeee !important; -} -.x-date-mmenu .x-menu-item { - font-size:10px; + +.x-date-menu .x-menu-item { padding:1px 24px 1px 4px; white-space: nowrap; - color:#000; } -.x-date-mmenu .x-menu-item .x-menu-item-icon { - width:10px;height:10px;margin-right:5px; + +.x-date-menu .x-menu-item .x-menu-item-icon { + width:10px; + height:10px; + margin-right:5px; background-position:center -4px !important; } @@ -163,85 +181,91 @@ table.x-date-inner { position:absolute; left:0; top:0; - background:white; display:none; } + .x-date-mp td { padding:2px; font:normal 11px arial, helvetica,tahoma,sans-serif; } + td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { - border: 0 none; + border: 0 none; text-align:center; vertical-align: middle; width:25%; } + .x-date-mp-ok { margin-right:3px; } + .x-date-mp-btns button { text-decoration:none; text-align:center; text-decoration:none !important; - background:#083772; - color:white; border:1px solid; - border-color: #3366cc #000055 #000055 #3366cc; padding:1px 3px 1px; - font:normal 11px arial, helvetica,tahoma,sans-serif; cursor:pointer; } + .x-date-mp-btns { - background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; + background: repeat-x left top; } + .x-date-mp-btns td { - border-top: 1px solid #c5d2df; - text-align:center; + border-top: 1px solid; + text-align:center; } + td.x-date-mp-month a,td.x-date-mp-year a { display:block; padding:2px 4px; text-decoration:none; text-align:center; - color:#15428b; } td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#15428b; text-decoration:none; cursor:pointer; - background: #ddecfe; } td.x-date-mp-sel a { padding:1px 3px; - background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; - border:1px solid #8db2e3; + background: repeat-x left top; + border:1px solid; } + .x-date-mp-ybtn a { overflow:hidden; width:15px; height:15px; cursor:pointer; - background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat; + background:transparent no-repeat; display:block; margin:0 auto; } + .x-date-mp-ybtn a.x-date-mp-next { background-position:0 -120px; } + .x-date-mp-ybtn a.x-date-mp-next:hover { background-position:-15px -120px; } + .x-date-mp-ybtn a.x-date-mp-prev { background-position:0 -105px; } + .x-date-mp-ybtn a.x-date-mp-prev:hover { background-position:-15px -105px; } + .x-date-mp-ybtn { text-align:center; } + td.x-date-mp-sep { - border-right:1px solid #c5d2df; + border-right:1px solid; } \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/dd.css b/src/webui/static/extjs/resources/css/structure/dd.css new file mode 100644 index 00000000..6a5a6c34 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/dd.css @@ -0,0 +1,61 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-dd-drag-proxy{ + position:absolute; + left:0; + top:0; + visibility:hidden; + z-index:15000; +} + +.x-dd-drag-ghost{ + -moz-opacity: 0.85; + opacity:.85; + filter: alpha(opacity=85); + border: 1px solid; + padding:3px; + padding-left:20px; + white-space:nowrap; +} + +.x-dd-drag-repair .x-dd-drag-ghost{ + -moz-opacity: 0.4; + opacity:.4; + filter: alpha(opacity=40); + border:0 none; + padding:0; + background-color:transparent; +} + +.x-dd-drag-repair .x-dd-drop-icon{ + visibility:hidden; +} + +.x-dd-drop-icon{ + position:absolute; + top:3px; + left:3px; + display:block; + width:16px; + height:16px; + background-color:transparent; + background-position: center; + background-repeat: no-repeat; + z-index:1; +} + +.x-view-selector { + position:absolute; + left:0; + top:0; + width:0; + border:1px dotted; + opacity: .5; + -moz-opacity: .5; + filter:alpha(opacity=50); + zoom:1; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/debug.css b/src/webui/static/extjs/resources/css/structure/debug.css new file mode 100644 index 00000000..9c18de97 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/debug.css @@ -0,0 +1,26 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +#x-debug-browser .x-tree .x-tree-node a span { + padding-top:2px; + line-height:18px; +} + +#x-debug-browser .x-tool-toggle { + background-position:0 -75px; +} + +#x-debug-browser .x-tool-toggle-over { + background-position:-15px -75px; +} + +#x-debug-browser.x-panel-collapsed .x-tool-toggle { + background-position:0 -60px; +} + +#x-debug-browser.x-panel-collapsed .x-tool-toggle-over { + background-position:-15px -60px; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/dialog.css b/src/webui/static/extjs/resources/css/structure/dialog.css new file mode 100644 index 00000000..09092019 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/dialog.css @@ -0,0 +1,59 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-dlg .x-window-body { + border:0 none !important; + padding:5px 10px; + overflow:hidden !important; +} + +.x-window-dlg .x-window-mc { + border:0 none !important; +} + +.x-window-dlg .ext-mb-input { + margin-top:4px; + width:95%; +} + +.x-window-dlg .ext-mb-textarea { + margin-top:4px; +} + +.x-window-dlg .x-progress-wrap { + margin-top:4px; +} + +.ext-ie .x-window-dlg .x-progress-wrap { + margin-top:6px; +} + +.x-window-dlg .x-msg-box-wait { + background:transparent no-repeat left; + display:block; + width:300px; + padding-left:18px; + line-height:18px; +} + +.x-window-dlg .ext-mb-icon { + float:left; + width:47px; + height:32px; +} + +.x-window-dlg .x-dlg-icon .ext-mb-content{ + zoom: 1; + margin-left: 47px; +} + +.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { + background:transparent no-repeat top left; +} + +.ext-gecko2 .ext-mb-fix-cursor { + overflow:auto; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/editor.css b/src/webui/static/extjs/resources/css/structure/editor.css new file mode 100644 index 00000000..dd5840a8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/editor.css @@ -0,0 +1,92 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-html-editor-wrap { + border:1px solid; +} + +.x-html-editor-tb .x-btn-text { + background:transparent no-repeat; +} + +.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { + background-position:0 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { + background-position:-16px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { + background-position:-32px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { + background-position:-160px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { + background-position:-176px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { + background-position:-112px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { + background-position:-128px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { + background-position:-144px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { + background-position:-80px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { + background-position:-96px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { + background-position:-48px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { + background-position:-64px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { + background-position:-192px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { + background-position:-208px 0; + background-image:url(../images/default/editor/tb-sprite.gif); +} + +.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { + padding:5px; + padding-bottom:1px; +} + +.x-html-editor-tb .x-toolbar { + position:static !important; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/form.css b/src/webui/static/extjs/resources/css/structure/form.css similarity index 57% rename from src/webui/static/extjs/resources/css/form.css rename to src/webui/static/extjs/resources/css/structure/form.css index 02a83122..9e7684bf 100644 --- a/src/webui/static/extjs/resources/css/form.css +++ b/src/webui/static/extjs/resources/css/structure/form.css @@ -1,193 +1,172 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ /* all fields */ .x-form-field{ margin: 0 0 0 0; - font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.ext-webkit *:focus{ + outline: none !important; } /* ---- text fields ---- */ .x-form-text, textarea.x-form-field{ padding:1px 3px; - background:#fff url(../images/default/form/text-bg.gif) repeat-x 0 0; - border:1px solid #B5B8C8; + background:repeat-x 0 0; + border:1px solid; } + textarea.x-form-field { padding:2px 3px; } -.x-form-text { + +.x-form-text, .ext-ie .x-form-file { height:22px; line-height:18px; vertical-align:middle; } -.ext-ie .x-form-text { + +.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { margin:-1px 0; /* ie bogus margin bug */ height:22px; /* ie quirks */ line-height:18px; } -.ext-ie textarea.x-form-field { + +.x-quirks .ext-ie9 .x-form-text { + height: 22px; + padding-top: 3px; + padding-bottom: 0px; +} + +/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ +.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, +.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { + margin-top: -1px; + margin-bottom: -1px; +} +.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { + margin-bottom: -1px; +} + +.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { + top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ +} + +.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { margin:-1px 0; /* ie bogus margin bug */ } + .ext-strict .x-form-text { height:18px; } -.ext-safari .x-form-text { - height:20px; /* safari always same size */ - padding:0 3px; /* remove extra top/bottom padding */ -} + .ext-safari.ext-mac textarea.x-form-field { margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ } -.ext-gecko .x-form-text { + +/* +.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { + margin-bottom: 1px; +} +*/ + +.ext-gecko .x-form-text , .ext-ie8 .x-form-text { padding-top:2px; /* FF won't center the text vertically */ padding-bottom:0; } + +.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { + margin: 0 !important; /* clear ie bogus margin bug fix */ +} + textarea { resize: none; /* Disable browser resizable textarea */ } /* select boxes */ - .x-form-select-one { height:20px; line-height:18px; vertical-align:middle; - background-color:#fff; /* opera */ - border: 1px solid #B5B8C8; + border: 1px solid; } /* multi select boxes */ /* --- TODO --- */ -/* checkboxes / radios */ -.x-form-check-group, .x-form-radio-group { - margin-bottom: 0; -} -.x-form-check-group .x-form-invalid .x-panel-body, -.x-form-radio-group .x-form-invalid .x-panel-body { - background-color: transparent; -} -.x-form-check-wrap, .x-form-radio-wrap { - padding: 3px 0 0 0; +/* 2.0.2 style */ +.x-form-check-wrap { line-height:18px; + height: auto; } -.x-form-check-group .x-form-check-wrap, -.x-form-radio-group .x-form-radio-wrap { - height: 18px; -} -.ext-ie .x-form-check-group .x-form-check-wrap, -.ext-ie .x-form-radio-group .x-form-radio-wrap { - height: 21px; -} -.ext-ie .x-form-check-wrap input, -.ext-ie .x-form-radio-wrap input { + +.ext-ie .x-form-check-wrap input { width:15px; height:15px; } -.x-form-check, .x-form-radio { - height: 13px; - width: 13px; + +.x-form-check-wrap input{ vertical-align: bottom; -} -.x-form-radio { - margin-bottom: 3px; } -.x-form-check, .ext-ie .x-form-radio { - margin-bottom: 2px; + +.x-editor .x-form-check-wrap { + padding:3px; } -.x-form-check-wrap-inner, .x-form-radio-wrap-inner { - display: inline; - padding: 3px 0 0 0; -} -.x-form-check { - background: url('../images/default/form/checkbox.gif') no-repeat 0 0; -} -.x-form-radio { - background: url('../images/default/form/radio.gif') no-repeat 0 0; -} -.x-form-check-focus .x-form-check, .x-form-check-over .x-form-check, -.x-form-check-focus .x-form-radio, .x-form-check-over .x-form-radio { - background-position: -13px 0; -} -.x-form-check-down .x-form-check, -.x-form-check-down .x-form-radio { - background-position:-26px 0; -} -.x-form-check-checked .x-form-check-focus .x-form-check, -.x-form-check-checked .x-form-check-over .x-form-check { - background-position:-13px -13px; -} -.x-form-check-checked .x-form-check-down .x-form-check { - background-position:-26px -13px; -} -.x-form-check-checked .x-form-check, -.x-form-check-checked .x-form-radio { - background-position:0 -13px; + +.x-editor .x-form-checkbox { + height:13px; } + .x-form-check-group-label { - border-bottom: 1px solid #99BBE8; - color: #15428B; + border-bottom: 1px solid; margin-bottom: 5px; padding-left: 3px !important; float: none !important; } /* wrapped fields and triggers */ - -.x-form-field-wrap { - position:relative; - zoom:1; - white-space: nowrap; -} .x-form-field-wrap .x-form-trigger{ width:17px; height:21px; border:0; - background:transparent url(../images/default/form/trigger.gif) no-repeat 0 0; + background:transparent no-repeat 0 0; cursor:pointer; - border-bottom: 1px solid #B5B8C8; + border-bottom: 1px solid; position:absolute; top:0; } -.ext-safari .x-form-field-wrap .x-form-trigger{ - height:21px; /* safari doesn't allow height adjustments to the fields, so adjust trigger */ + +.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ + cursor:pointer; } -.x-form-field-wrap .x-form-date-trigger{ - background-image: url(../images/default/form/date-trigger.gif); - cursor:pointer; -} -.x-form-field-wrap .x-form-clear-trigger{ - background-image: url(../images/default/form/clear-trigger.gif); - cursor:pointer; -} -.x-form-field-wrap .x-form-search-trigger{ - background-image: url(../images/default/form/search-trigger.gif); - cursor:pointer; -} -.ext-safari .x-form-field-wrap .x-form-trigger{ - right:0; -} -.x-form-field-wrap .x-form-twin-triggers{ - -} .x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ position:static; top:auto; vertical-align:top; } +.x-form-field-wrap { + position:relative; + left:0;top:0; + text-align: left; + zoom:1; + white-space: nowrap; +} + +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { + right: 0; /* IE8 Strict mode trigger bug */ +} .x-form-field-wrap .x-form-trigger-over{ background-position:-17px 0; } + .x-form-field-wrap .x-form-trigger-click{ background-position:-34px 0; } @@ -195,38 +174,46 @@ textarea { .x-trigger-wrap-focus .x-form-trigger{ background-position:-51px 0; } + .x-trigger-wrap-focus .x-form-trigger-over{ background-position:-68px 0; } + .x-trigger-wrap-focus .x-form-trigger-click{ background-position:-85px 0; } + .x-trigger-wrap-focus .x-form-trigger{ - border-bottom: 1px solid #7eadd9; + border-bottom: 1px solid; } .x-item-disabled .x-form-trigger-over{ background-position:0 0 !important; - border-bottom: 1px solid #B5B8C8; + border-bottom: 1px solid; } + .x-item-disabled .x-form-trigger-click{ background-position:0 0 !important; - border-bottom: 1px solid #B5B8C8; + border-bottom: 1px solid; +} + +.x-trigger-noedit{ + cursor:pointer; } /* field focus style */ .x-form-focus, textarea.x-form-focus{ - border: 1px solid #7eadd9; + border: 1px solid; } /* invalid fields */ .x-form-invalid, textarea.x-form-invalid{ - background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom; - border: 1px solid #dd7870; + background:repeat-x bottom; + border: 1px solid; } -.ext-safari .x-form-invalid{ - background-color:#ffeeee; - border: 1px solid #ff7870; + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background:repeat-x bottom; } /* editors */ @@ -235,44 +222,36 @@ textarea { padding:0; margin:0; } -.x-editor .x-form-check-wrap, -.x-editor .x-form-radio-wrap { - background:#fff; - padding:3px; -} -.x-editor .x-form-checkbox { - height:13px; -} -/* If you override the default field font above, you would need to change this font as well */ + .x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; left: -10000px; - padding: 8px 3px; + padding: 8px 3px; position: absolute; visibility:hidden; top: -10000px; - white-space: pre-wrap; + white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; zoom:1; } + .x-form-grow-sizer p { margin:0 !important; border:0 none !important; padding:0 !important; } + /* Form Items CSS */ .x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; display:block; margin-bottom:4px; zoom:1; } -.x-form-item label { +.x-form-item label.x-form-item-label { display:block; float:left; width:100px; @@ -289,24 +268,22 @@ textarea { } .x-form-invalid-msg { - color:#ee0000; padding:2px; padding-left:18px; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background: transparent url(../images/default/shared/warning.gif) no-repeat 0 2px; + background: transparent no-repeat 0 2px; line-height:16px; width:200px; } - -.x-form-label-right label { - text-align:right; -} -.x-form-label-left label { +.x-form-label-left label.x-form-item-label { text-align:left; } -.x-form-label-top .x-form-item label { +.x-form-label-right label.x-form-item-label { + text-align:right; +} + +.x-form-label-top .x-form-item label.x-form-item-label { width:auto; float:none; clear:none; @@ -324,36 +301,29 @@ textarea { padding-bottom:4px; } -.x-form-empty-field { - color:gray; -} /* Editor small font for grid, toolbar and tree */ -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} .x-small-editor .x-form-text { height:20px; line-height:16px; vertical-align:middle; } -.ext-ie .x-small-editor .x-form-text { + +.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { margin-top:-1px !important; /* ie bogus margin bug */ margin-bottom:-1px !important; height:20px !important; /* ie quirks */ line-height:16px !important; } + .ext-strict .x-small-editor .x-form-text { height:16px !important; } -.ext-safari .x-small-editor .x-form-field { - /* safari text field will not size so needs bigger font */ - font:normal 12px arial, tahoma, helvetica, sans-serif; -} -.ext-ie .x-small-editor .x-form-text { +.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { height:20px; line-height:16px; } + .ext-border-box .x-small-editor .x-form-text { height:20px; } @@ -363,13 +333,20 @@ textarea { line-height:16px; vertical-align:middle; } + .x-small-editor .x-form-num-field { text-align:right; } + .x-small-editor .x-form-field-wrap .x-form-trigger{ height:19px; } +.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} + +.ext-strict .ext-webkit .x-small-editor .x-form-text{ + height:14px !important; +} .x-form-clear { clear:both; @@ -386,12 +363,38 @@ textarea { font-size:0; } +.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ + margin-top: 3px; +} + .x-form-cb-label { - width:'auto' !important; - float:none !important; - clear:none !important; - display:inline !important; + position: relative; margin-left:4px; + top: 2px; +} + +.ext-ie .x-form-cb-label{ + top: 1px; +} + +.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ + top: 3px; +} + +.x-form-display-field{ + padding-top: 2px; +} + +.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ + padding-top: 1px; +} + +.ext-ie .x-form-display-field{ + padding-top: 3px; +} + +.ext-strict .ext-ie8 .x-form-display-field{ + padding-top: 0; } .x-form-column { @@ -405,50 +408,61 @@ textarea { /* buttons */ .x-form .x-form-btns-ct .x-btn{ - float:right; - clear:none; + float:right; + clear:none; } + .x-form .x-form-btns-ct .x-form-btns td { - border:0; - padding:0; + border:0; + padding:0; } + .x-form .x-form-btns-ct .x-form-btns-right table{ - float:right; - clear:none; + float:right; + clear:none; } + .x-form .x-form-btns-ct .x-form-btns-left table{ - float:left; - clear:none; + float:left; + clear:none; } + .x-form .x-form-btns-ct .x-form-btns-center{ - text-align:center; /*ie*/ + text-align:center; /*ie*/ } + .x-form .x-form-btns-ct .x-form-btns-center table{ - margin:0 auto; /*everyone else*/ + margin:0 auto; /*everyone else*/ } + .x-form .x-form-btns-ct table td.x-form-btn-td{ - padding:3px; + padding:3px; } .x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ - background-position:0 -147px; + background-position:0 -147px; } + .x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ - background-position:0 -168px; + background-position:0 -168px; } + .x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ - background-position:0 -189px; + background-position:0 -189px; } .x-form .x-form-btns-ct .x-btn-click .x-btn-center{ - background-position:0 -126px; + background-position:0 -126px; } + .x-form .x-form-btns-ct .x-btn-click .x-btn-right{ - background-position:0 -84px; + background-position:0 -84px; } + .x-form .x-form-btns-ct .x-btn-click .x-btn-left{ - background-position:0 -63px; + background-position:0 -63px; } + .x-form-invalid-icon { width:16px; height:18px; @@ -457,87 +471,118 @@ textarea { left:0; top:0; display:block; - background:transparent url(../images/default/form/exclamation.gif) no-repeat 0 2px; + background:transparent no-repeat 0 2px; } /* fieldsets */ .x-fieldset { - border:1px solid #B5B8C8; + border:1px solid; padding:10px; margin-bottom:10px; display:block; /* preserve margins in IE */ } -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; + +/* make top of checkbox/tools visible in webkit */ +.ext-webkit .x-fieldset-header { + padding-top: 1px; } + .ext-ie .x-fieldset legend { margin-bottom:10px; } + +.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { + padding-top: 1px; +} + .ext-ie .x-fieldset { padding-top: 0; padding-bottom:10px; } + .x-fieldset legend .x-tool-toggle { margin-right:3px; margin-left:0; float:left !important; } + .x-fieldset legend input { margin-right:3px; float:left !important; height:13px; width:13px; } + fieldset.x-panel-collapsed { padding-bottom:0 !important; - border-width: 1px 0 0 0 !important; + border-width: 1px 1px 0 1px !important; + border-left-color: transparent; + border-right-color: transparent; } + +.ext-ie6 fieldset.x-panel-collapsed{ + padding-bottom:0 !important; + border-width: 1px 0 0 0 !important; + margin-left: 1px; + margin-right: 1px; +} + fieldset.x-panel-collapsed .x-fieldset-bwrap { visibility:hidden; position:absolute; left:-1000px; top:-1000px; } + .ext-ie .x-fieldset-bwrap { zoom:1; } -.ext-ie td .x-form-text { - position:relative; - top:-1px; -} + .x-fieldset-noborder { border:0px none transparent; } + .x-fieldset-noborder legend { margin-left:-3px; } -/* IE legend positioing bug */ + +/* IE legend positioning bug */ .ext-ie .x-fieldset-noborder legend { position: relative; margin-bottom:23px; } .ext-ie .x-fieldset-noborder legend span { position: absolute; - left:-5px; + left:16px; } - + .ext-gecko .x-window-body .x-form-item { -moz-outline: none; + outline: none; overflow: auto; } +.ext-mac.ext-gecko .x-window-body .x-form-item { + overflow:hidden; +} + .ext-gecko .x-form-item { -moz-outline: none; + outline: none; } .x-hide-label label.x-form-item-label { display:none; } + .x-hide-label .x-form-element { padding-left: 0 !important; } +.x-form-label-top .x-hide-label label.x-form-item-label{ + display: none; +} + .x-fieldset { overflow:hidden; } @@ -549,4 +594,4 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { .x-fieldset-body { overflow:hidden; -} \ No newline at end of file +} diff --git a/src/webui/static/extjs/resources/css/grid.css b/src/webui/static/extjs/resources/css/structure/grid.css similarity index 59% rename from src/webui/static/extjs/resources/css/grid.css rename to src/webui/static/extjs/resources/css/structure/grid.css index a2dae886..4a3401e6 100644 --- a/src/webui/static/extjs/resources/css/grid.css +++ b/src/webui/static/extjs/resources/css/structure/grid.css @@ -1,554 +1,588 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* Grid3 styles */ -.x-grid3 { - position:relative; - overflow:hidden; - background-color:#fff; -} - -.x-grid-panel .x-panel-body { - overflow:hidden !important; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border:1px solid #99bbe8; -} - -.x-grid3 table { - table-layout:fixed; -} -.x-grid3-viewport{ - overflow:hidden; -} -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px arial, tahoma, helvetica, sans-serif; - -moz-outline: none; - -moz-user-focus: normal; -} -.x-grid3-row td, .x-grid3-summary-row td { - line-height:13px; - vertical-align: top; - padding-left:1px; - padding-right:1px; - -moz-user-select: none; -} -.x-grid3-hd-row td { - line-height:15px; - vertical-align:middle; - border-left:1px solid #eee; - border-right:1px solid #d0d0d0; -} - -.x-grid3-hd-row .x-grid3-marker-hd { - padding:3px; -} - -.x-grid3-row .x-grid3-marker { - padding:3px; -} - -.x-grid3-cell-inner, .x-grid3-hd-inner{ - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - padding:3px 3px 3px 5px; - white-space: nowrap; -} - -.x-grid3-hd-inner { - position:relative; - cursor:inherit; - padding:4px 3px 4px 5px; -} - -.x-grid3-row-body { - white-space:normal; -} - -.x-grid3-body-cell { - -moz-outline:0 none; - outline:0 none; -} -/* IE Quirks to clip */ -.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ - width:100%; -} -/* reverse above in strict mode */ -.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ - width:auto; -} - -.x-grid3-col { - -} - -.x-grid-row-loading { - background: #fff url(../images/default/shared/loading-balls.gif) no-repeat center center; -} -.x-grid-page { - overflow:hidden; -} -.x-grid3-row { - cursor: default; - border:1px solid #ededed; - border-top-color:#fff; - /*border-bottom: 1px solid #ededed;*/ - width:100%; -} -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border:1px solid #dddddd; - background: #efefef url(../images/default/grid/row-over.gif) repeat-x left top; -} - -.x-grid3-resize-proxy { - width:1px; - left:0; - background-color:#777; - cursor: e-resize; - cursor: col-resize; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} -.x-grid3-resize-marker { - width:1px; - left:0; - background-color:#777; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} -.x-grid3-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; -} - -/* header styles */ -.x-grid3-header{ - background: #f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom; - cursor:default; - zoom:1; - padding:1px 0 0 0; -} - -.x-grid3-header-pop { - border-left:1px solid #d0d0d0; - float:right; - clear:none; -} -.x-grid3-header-pop-inner { - border-left:1px solid #eee; - width:14px; - height:19px; - background: transparent url(../images/default/grid/hd-pop.gif) no-repeat center center; -} -.ext-ie .x-grid3-header-pop-inner { - width:15px; -} -.ext-strict .x-grid3-header-pop-inner { - width:14px; -} -.x-grid3-header-inner { - overflow:hidden; - zoom:1; - float:left; -} -.x-grid3-header-offset { - padding-left:1px; - width:10000px; -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left:1px solid #aaccf6; - border-right:1px solid #aaccf6; -} -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background: #ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom; - -} -.x-grid3-sort-icon{ - background-repeat: no-repeat; - display: none; - height: 4px; - width: 13px; - margin-left:3px; - vertical-align: middle; -} -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); - display: inline; -} -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); - display: inline; -} - -/* Header position fixes for IE strict mode */ -.ext-strict .ext-ie .x-grid3-header-inner{position:relative;} -.ext-strict .ext-ie6 .x-grid3-hd{position:relative;} -.ext-strict .ext-ie6 .x-grid3-hd-inner{position:static;} - -/* Body Styles */ -.x-grid3-body { - zoom:1; -} -.x-grid3-scroller { - overflow:auto; - zoom:1; - position:relative; -} -.x-grid3-cell-text, .x-grid3-hd-text { - display: block; - padding: 3px 5px 3px 5px; - -moz-user-select: none; - -khtml-user-select: none; - color:black; -} -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); - background-position: center; - background-repeat: no-repeat; - cursor: e-resize; - cursor: col-resize; - display: block; - font-size: 1px; - height: 16px; - overflow: hidden; - position: absolute; - top: 2px; - width: 6px; - z-index: 3; -} - -.x-grid3-hd-text { - color:#15428b; -} -/* Column Reorder DD */ -.x-dd-drag-proxy .x-grid3-hd-inner{ - background: #ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom; - width:120px; - padding:3px; - border:1px solid #aaccf6; - overflow:hidden; -} - -.col-move-top, .col-move-bottom{ - width:9px; - height:9px; - position:absolute; - top:0; - line-height:1px; - font-size:1px; - overflow:hidden; - visibility:hidden; - z-index:20000; -} -.col-move-top{ - background:transparent url(../images/default/grid/col-move-top.gif) no-repeat left top; -} -.col-move-bottom{ - background:transparent url(../images/default/grid/col-move-bottom.gif) no-repeat left top; -} - -/* Selection Styles */ -.x-grid3-row-selected { - background: #DFE8F6 !important; - border:1px dotted #a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #B8CFEE !important; - color: black; -} -.x-grid3-cell-selected span{ - color: black !important; -} -.x-grid3-cell-selected .x-grid3-cell-text{ - color: black; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background: #ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x 0 bottom !important; - vertical-align:middle !important; - color:black; - padding:0; - border-top:1px solid white; - border-bottom:none !important; - border-right:1px solid #6fa0df !important; - text-align:center; -} -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - padding:0 4px; - color:#15428b !important; - text-align:center; -} - -/* dirty cells */ -.x-grid3-dirty-cell { - background: transparent url(../images/default/grid/dirty.gif) no-repeat 0 0; -} - -/* Grid Toolbars */ -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; - overflow:hidden; - display:none; - zoom:1; - position:relative; -} -.x-grid3-topbar .x-toolbar{ - border-right:0 none; -} -.x-grid3-bottombar .x-toolbar{ - border-right:0 none; - border-bottom:0 none; - border-top:1px solid #a9bfd3; -} -/* Props Grid Styles */ -.x-props-grid .x-grid3-cell{ - padding:1px; -} -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y -16px !important; - padding-left:12px; - color:black !important; -} -.x-props-grid .x-grid3-body .x-grid3-td-name{ - padding:1px; - padding-right:0; - background:white !important; - border:0 none; - border-right:1px solid #eeeeee; -} - -/* header menu */ -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -/* dd */ -.x-grid3-col-dd { - border:0 none; - padding:0; - background:transparent; -} - -.x-dd-drag-ghost .x-grid3-dd-wrap { - padding:1px 3px 3px 1px; -} - -.x-grid3-hd { - -moz-user-select:none; -} - -.x-grid3-hd-btn { - display:none; - position:absolute; - width:14px; - background:#c3daf9 url(../images/default/grid/grid3-hd-btn.gif) no-repeat left center; - right:0; - top:0; - z-index:2; - cursor:pointer; -} - -.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { - display:block; -} - -a.x-grid3-hd-btn:hover { - background-position:-14px center; -} - -/* Expanders */ - -.x-grid3-body .x-grid3-td-expander { - background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; -} -.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { - padding:0 !important; - height:100%; -} -.x-grid3-row-expander { - width:100%; - height:18px; - background-position:4px 2px; - background-repeat:no-repeat; - background-color:transparent; - background-image:url(../images/default/grid/row-expand-sprite.gif); -} -.x-grid3-row-collapsed .x-grid3-row-expander { - background-position:4px 2px; -} -.x-grid3-row-expanded .x-grid3-row-expander { - background-position:-21px 2px; -} -.x-grid3-row-collapsed .x-grid3-row-body { - display:none !important; -} -.x-grid3-row-expanded .x-grid3-row-body { - display:block !important; -} - -/* Checkers */ - -.x-grid3-body .x-grid3-td-checker { - background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; -} - -.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - width:100%; - height:18px; - background-position:2px 2px; - background-repeat:no-repeat; - background-color:transparent; - background-image:url(../images/default/grid/row-check-sprite.gif); -} -.x-grid3-row .x-grid3-row-checker { - background-position:2px 2px; -} -.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 2px; -} -.x-grid3-hd-checker { - background-position:2px 3px; -} -.x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 3px; -} - -/* Numberer */ - -.x-grid3-body .x-grid3-td-numberer { - background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; -} -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - padding:3px 5px 0 0 !important; - text-align:right; - color:#444; -} - -/* All specials */ - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background:transparent url(../images/default/grid/grid3-special-col-sel-bg.gif) repeat-y right; -} -.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { - padding: 1px 0 0 0 !important; -} - -.x-grid3-check-col { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; - background-image:url(../images/default/menu/unchecked.gif); -} - - -.x-grid3-check-col-on { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; - background-image:url(../images/default/menu/checked.gif); -} - -/* Grouping classes */ -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} -.x-grid-group-hd { - border-bottom: 2px solid #99bbe8; - cursor:pointer; - padding-top:6px; -} -.x-grid-group-hd div { - background:transparent url(../images/default/grid/group-expand-sprite.gif) no-repeat 3px -47px; - padding:4px 4px 4px 17px; - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} -.x-grid-group-collapsed .x-grid-group-hd div { - background-position: 3px 3px; -} -.x-grid-group-collapsed .x-grid-group-body { - display:none; -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.ext-ie .x-grid3 .x-editor .x-form-text { - position:relative; - top:-1px; -} -.ext-ie .x-props-grid .x-editor .x-form-text { - position:static; - top:0; -} - -.x-grid-empty { - padding:10px; - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - - -/* fix floating toolbar issue */ -.ext-ie7 .x-grid-panel .x-panel-bbar { - position:relative; -} +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +/* Grid3 styles */ +.x-grid3 { + position:relative; + overflow:hidden; +} + +.x-grid-panel .x-panel-body { + overflow:hidden !important; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border:1px solid; +} + +.x-grid3 table { + table-layout:fixed; +} + +.x-grid3-viewport{ + overflow:hidden; +} + +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + -moz-outline: none; + outline: none; + -moz-user-focus: normal; +} + +.x-grid3-row td, .x-grid3-summary-row td { + line-height:13px; + vertical-align: top; + padding-left:1px; + padding-right:1px; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-cell{ + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-hd-row td { + line-height:15px; + vertical-align:middle; + border-left:1px solid; + border-right:1px solid; +} + +.x-grid3-hd-row .x-grid3-marker-hd { + padding:3px; +} + +.x-grid3-row .x-grid3-marker { + padding:3px; +} + +.x-grid3-cell-inner, .x-grid3-hd-inner{ + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + padding:3px 3px 3px 5px; + white-space: nowrap; +} + +/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ +.x-action-col-cell .x-grid3-cell-inner { + padding-top: 1px; + padding-bottom: 1px; +} + +.x-action-col-icon { + cursor: pointer; +} + +.x-grid3-hd-inner { + position:relative; + cursor:inherit; + padding:4px 3px 4px 5px; +} + +.x-grid3-row-body { + white-space:normal; +} + +.x-grid3-body-cell { + -moz-outline:0 none; + outline:0 none; +} + +/* IE Quirks to clip */ +.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ + width:100%; +} + +/* reverse above in strict mode */ +.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ + width:auto; +} + +.x-grid-row-loading { + background: no-repeat center center; +} + +.x-grid-page { + overflow:hidden; +} + +.x-grid3-row { + cursor: default; + border: 1px solid; + width:100%; +} + +.x-grid3-row-over { + border:1px solid; + background: repeat-x left top; +} + +.x-grid3-resize-proxy { + width:1px; + left:0; + cursor: e-resize; + cursor: col-resize; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} + +.x-grid3-resize-marker { + width:1px; + left:0; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} + +.x-grid3-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + -webkit-user-select:ignore; +} + +/* header styles */ +.x-grid3-header{ + background: repeat-x 0 bottom; + cursor:default; + zoom:1; + padding:1px 0 0 0; +} + +.x-grid3-header-pop { + border-left:1px solid; + float:right; + clear:none; +} + +.x-grid3-header-pop-inner { + border-left:1px solid; + width:14px; + height:19px; + background: transparent no-repeat center center; +} + +.ext-ie .x-grid3-header-pop-inner { + width:15px; +} + +.ext-strict .x-grid3-header-pop-inner { + width:14px; +} + +.x-grid3-header-inner { + overflow:hidden; + zoom:1; + float:left; +} + +.x-grid3-header-offset { + padding-left:1px; + text-align: left; +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left:1px solid; + border-right:1px solid; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background: repeat-x left bottom; + +} + +.x-grid3-sort-icon{ + background-repeat: no-repeat; + display: none; + height: 4px; + width: 13px; + margin-left:3px; + vertical-align: middle; +} + +.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { + display: inline; +} + +/* Header position fixes for IE strict mode */ +.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { + position:relative; +} + +.ext-strict .ext-ie6 .x-grid3-hd-inner{ + position:static; +} + +/* Body Styles */ +.x-grid3-body { + zoom:1; +} + +.x-grid3-scroller { + overflow:auto; + zoom:1; + position:relative; +} + +.x-grid3-cell-text, .x-grid3-hd-text { + display: block; + padding: 3px 5px 3px 5px; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select:ignore; +} + +.x-grid3-split { + background-position: center; + background-repeat: no-repeat; + cursor: e-resize; + cursor: col-resize; + display: block; + font-size: 1px; + height: 16px; + overflow: hidden; + position: absolute; + top: 2px; + width: 6px; + z-index: 3; +} + +/* Column Reorder DD */ +.x-dd-drag-proxy .x-grid3-hd-inner{ + background: repeat-x left bottom; + width:120px; + padding:3px; + border:1px solid; + overflow:hidden; +} + +.col-move-top, .col-move-bottom{ + width:9px; + height:9px; + position:absolute; + top:0; + line-height:1px; + font-size:1px; + overflow:hidden; + visibility:hidden; + z-index:20000; + background:transparent no-repeat left top; +} + +/* Selection Styles */ +.x-grid3-row-selected { + border:1px dotted; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background: repeat-x 0 bottom !important; + vertical-align:middle !important; + padding:0; + border-top:1px solid; + border-bottom:none !important; + border-right:1px solid !important; + text-align:center; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + padding:0 4px; + text-align:center; +} + +/* dirty cells */ +.x-grid3-dirty-cell { + background: transparent no-repeat 0 0; +} + +/* Grid Toolbars */ +.x-grid3-topbar, .x-grid3-bottombar{ + overflow:hidden; + display:none; + zoom:1; + position:relative; +} + +.x-grid3-topbar .x-toolbar{ + border-right:0 none; +} + +.x-grid3-bottombar .x-toolbar{ + border-right:0 none; + border-bottom:0 none; + border-top:1px solid; +} + +/* Props Grid Styles */ +.x-props-grid .x-grid3-cell{ + padding:1px; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background:transparent repeat-y -16px !important; + padding-left:12px; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + padding:1px; + padding-right:0; + border:0 none; + border-right:1px solid; +} + +/* dd */ +.x-grid3-col-dd { + border:0 none; + padding:0; + background-color:transparent; +} + +.x-dd-drag-ghost .x-grid3-dd-wrap { + padding:1px 3px 3px 1px; +} + +.x-grid3-hd { + -moz-user-select:none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-grid3-hd-btn { + display:none; + position:absolute; + width:14px; + background:no-repeat left center; + right:0; + top:0; + z-index:2; + cursor:pointer; +} + +.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { + display:block; +} + +a.x-grid3-hd-btn:hover { + background-position:-14px center; +} + +/* Expanders */ +.x-grid3-body .x-grid3-td-expander { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-expander { + width:100%; + height:18px; + background-position:4px 2px; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-row-collapsed .x-grid3-row-expander { + background-position:4px 2px; +} + +.x-grid3-row-expanded .x-grid3-row-expander { + background-position:-21px 2px; +} + +.x-grid3-row-collapsed .x-grid3-row-body { + display:none !important; +} + +.x-grid3-row-expanded .x-grid3-row-body { + display:block !important; +} + +/* Checkers */ +.x-grid3-body .x-grid3-td-checker { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + width:100%; + height:18px; + background-position:2px 2px; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-row .x-grid3-row-checker { + background-position:2px 2px; +} + +.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { + background-position:-23px 2px; +} + +.x-grid3-hd-checker { + background-position:2px 1px; +} + +.ext-border-box .x-grid3-hd-checker { + background-position:2px 3px; +} + +.x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 1px; +} + +.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 3px; +} + +/* Numberer */ +.x-grid3-body .x-grid3-td-numberer { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + padding:3px 5px 0 0 !important; + text-align:right; +} + +/* Row Icon */ + +.x-grid3-body .x-grid3-td-row-icon { + background:transparent repeat-y right; + vertical-align:top; + text-align:center; +} + +.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { + padding:0 !important; + background-position:center center; + background-repeat:no-repeat; + width:16px; + height:16px; + margin-left:2px; + margin-top:3px; +} + +/* All specials */ +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background:transparent repeat-y right; +} + +.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { + padding: 1px 0 0 0 !important; +} + +.x-grid3-check-col { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; +} + +.x-grid3-check-col-on { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; +} + +/* Grouping classes */ +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom: 2px solid; + cursor:pointer; + padding-top:6px; +} + +.x-grid-group-hd div.x-grid-group-title { + background:transparent no-repeat 3px 3px; + padding:4px 4px 4px 17px; +} + +.x-grid-group-collapsed .x-grid-group-body { + display:none; +} + +.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { + position:relative; + top:-1px; +} + +.ext-ie .x-props-grid .x-editor .x-form-text { + position:static; + top:0; +} + +.x-grid-empty { + padding:10px; +} + +/* fix floating toolbar issue */ +.ext-ie7 .x-grid-panel .x-panel-bbar { + position:relative; +} + + +/* Reset position to static when Grid Panel has been framed */ +/* to resolve 'snapping' from top to bottom behavior. */ +/* @forumThread 86656 */ +.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { + position: static; +} + +.ext-ie6 .x-grid3-header { + position: relative; +} + +/* Fix WebKit bug in Grids */ +.ext-webkit .x-grid-panel .x-panel-bwrap{ + -webkit-user-select:none; +} +.ext-webkit .x-tbar-page-number{ + -webkit-user-select:ignore; +} +/* end*/ + +/* column lines */ +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + padding-right:0; + border-right:1px solid; +} diff --git a/src/webui/static/extjs/resources/css/layout.css b/src/webui/static/extjs/resources/css/structure/layout.css similarity index 80% rename from src/webui/static/extjs/resources/css/layout.css rename to src/webui/static/extjs/resources/css/structure/layout.css index 3d0d27f7..89c2601b 100644 --- a/src/webui/static/extjs/resources/css/layout.css +++ b/src/webui/static/extjs/resources/css/structure/layout.css @@ -1,14 +1,13 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ .x-border-layout-ct { - background:#dfe8f6; + position: relative; } + .x-border-panel { position:absolute; left:0; @@ -18,6 +17,7 @@ .x-tool-collapse-south { background-position:0 -195px; } + .x-tool-collapse-south-over { background-position:-15px -195px; } @@ -25,6 +25,7 @@ .x-tool-collapse-north { background-position:0 -210px; } + .x-tool-collapse-north-over { background-position:-15px -210px; } @@ -32,6 +33,7 @@ .x-tool-collapse-west { background-position:0 -180px; } + .x-tool-collapse-west-over { background-position:-15px -180px; } @@ -39,14 +41,15 @@ .x-tool-collapse-east { background-position:0 -165px; } + .x-tool-collapse-east-over { background-position:-15px -165px; } - .x-tool-expand-south { background-position:0 -210px; } + .x-tool-expand-south-over { background-position:-15px -210px; } @@ -61,6 +64,7 @@ .x-tool-expand-west { background-position:0 -165px; } + .x-tool-expand-west-over { background-position:-15px -165px; } @@ -68,6 +72,7 @@ .x-tool-expand-east { background-position:0 -180px; } + .x-tool-expand-east-over { background-position:-15px -180px; } @@ -76,33 +81,33 @@ float:right; margin:3px; } + .x-tool-expand-east, .x-tool-expand-west { float:none; - margin:3px auto; + margin:3px 2px; } - - .x-accordion-hd .x-tool-toggle { background-position:0 -255px; } + .x-accordion-hd .x-tool-toggle-over { background-position:-15px -255px; } + .x-panel-collapsed .x-accordion-hd .x-tool-toggle { background-position:0 -240px; } + .x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { background-position:-15px -240px; } .x-accordion-hd { - color:#222; padding-top:4px; padding-bottom:3px; border-top:0 none; - font-weight:normal; - background: transparent url(../images/default/panel/light-hd.gif) repeat-x 0 -9px; + background: transparent repeat-x 0 -9px; } .x-layout-collapsed{ @@ -110,21 +115,22 @@ left:-10000px; top:-10000px; visibility:hidden; - background-color:#d2e0f2; width:20px; height:20px; overflow:hidden; - border:1px solid #98c0f4; + border:1px solid; z-index:20; } + .ext-border-box .x-layout-collapsed{ width:22px; height:22px; } + .x-layout-collapsed-over{ cursor:pointer; - background-color:#d9e8fb; } + .x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ position:absolute; top:0; @@ -149,11 +155,12 @@ background-color: #fff !important; filter: alpha(opacity=1); } - + .x-layout-split-h{ background-image:url(../images/default/s.gif); background-position: left; } + .x-layout-split-v{ background-image:url(../images/default/s.gif); background-position: top; @@ -161,7 +168,6 @@ .x-column-layout-ct { overflow:hidden; - /*padding:3px 3px 3px 3px;*/ zoom:1; } @@ -171,11 +177,14 @@ margin:0; overflow:hidden; zoom:1; - /*margin:3px;*/ +} + +.x-column-inner { + overflow:hidden; + zoom:1; } /* mini mode */ - .x-layout-mini { position:absolute; top:0; @@ -188,6 +197,7 @@ -moz-opacity:.5; filter:alpha(opacity=50); } + .x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ opacity:1; -moz-opacity:1; @@ -196,62 +206,56 @@ .x-layout-split-west .x-layout-mini { top:48%; - background-image:url(../images/default/layout/mini-left.gif); } + .x-layout-split-east .x-layout-mini { top:48%; - background-image:url(../images/default/layout/mini-right.gif); } + .x-layout-split-north .x-layout-mini { left:48%; height:5px; width:35px; - background-image:url(../images/default/layout/mini-top.gif); } + .x-layout-split-south .x-layout-mini { left:48%; height:5px; width:35px; - background-image:url(../images/default/layout/mini-bottom.gif); } - .x-layout-cmini-west .x-layout-mini { top:48%; - background-image:url(../images/default/layout/mini-right.gif); } .x-layout-cmini-east .x-layout-mini { top:48%; - background-image:url(../images/default/layout/mini-left.gif); } .x-layout-cmini-north .x-layout-mini { left:48%; height:5px; width:35px; - background-image:url(../images/default/layout/mini-bottom.gif); } .x-layout-cmini-south .x-layout-mini { left:48%; height:5px; width:35px; - background-image:url(../images/default/layout/mini-top.gif); } .x-layout-cmini-west, .x-layout-cmini-east { border:0 none; width:5px !important; padding:0; - background:transparent; + background-color:transparent; } .x-layout-cmini-north, .x-layout-cmini-south { border:0 none; height:5px !important; padding:0; - background:transparent; + background-color:transparent; } .x-viewport, .x-viewport body { @@ -270,4 +274,23 @@ .ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { margin:0; +} + +.x-box-layout-ct { + overflow:hidden; + zoom:1; +} + +.x-box-inner { + overflow:hidden; + zoom:1; + position:relative; + left:0; + top:0; +} + +.x-box-item { + position:absolute; + left:0; + top:0; } \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/list-view.css b/src/webui/static/extjs/resources/css/structure/list-view.css new file mode 100644 index 00000000..1b166d59 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/list-view.css @@ -0,0 +1,86 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-list-header{ + background: repeat-x 0 bottom; + cursor:default; + zoom:1; + height:22px; +} + +.x-list-header-inner div { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; +} + +.x-list-header-inner div em { + display:block; + border-left:1px solid; + padding:4px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + line-height:14px; +} + +.x-list-body { + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + zoom:1; + float: left; + width: 100%; +} + +.x-list-body dl { + zoom:1; +} + +.x-list-body dt { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + cursor:pointer; + zoom:1; +} + +.x-list-body dt em { + display:block; + padding:3px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; +} + +.x-list-resizer { + border-left:1px solid; + border-right:1px solid; + position:absolute; + left:0; + top:0; +} + +.x-list-header-inner em.sort-asc { + background: transparent no-repeat center 0; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + +.x-list-header-inner em.sort-desc { + background: transparent no-repeat center -23px; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + diff --git a/src/webui/static/extjs/resources/css/structure/menu.css b/src/webui/static/extjs/resources/css/structure/menu.css new file mode 100644 index 00000000..a9565b27 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/menu.css @@ -0,0 +1,245 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-menu { + z-index: 15000; + zoom: 1; + background: repeat-y; +} + +.x-menu-floating{ + border: 1px solid; +} + +.x-menu a { + text-decoration: none !important; +} + +.ext-ie .x-menu { + zoom:1; + overflow:hidden; +} + +.x-menu-list{ + padding: 2px; + background-color:transparent; + border:0 none; + overflow:hidden; + overflow-y: hidden; +} + +.ext-strict .ext-ie .x-menu-list{ + position: relative; +} + +.x-menu li{ + line-height:100%; +} + +.x-menu li.x-menu-sep-li{ + font-size:1px; + line-height:1px; +} + +.x-menu-list-item{ + white-space: nowrap; + display:block; + padding:1px; +} + +.x-menu-item{ + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; +} + +.x-menu-item-arrow{ + background:transparent no-repeat right; +} + +.x-menu-sep { + display:block; + font-size:1px; + line-height:1px; + margin: 2px 3px; + border-bottom:1px solid; + overflow:hidden; +} + +.x-menu-focus { + position:absolute; + left:-1px; + top:-1px; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; + overflow:hidden; + display:block; +} + +a.x-menu-item { + cursor: pointer; + display: block; + line-height: 16px; + outline-color: -moz-use-text-color; + outline-style: none; + outline-width: 0; + padding: 3px 21px 3px 27px; + position: relative; + text-decoration: none; + white-space: nowrap; +} + +.x-menu-item-active { + background-repeat: repeat-x; + background-position: left bottom; + border-style:solid; + border-width: 1px 0; + margin:0 1px; + padding: 0; +} + +.x-menu-item-active a.x-menu-item { + border-style:solid; + border-width:0 1px; + margin:0 -1px; +} + +.x-menu-item-icon { + border: 0 none; + height: 16px; + padding: 0; + vertical-align: top; + width: 16px; + position: absolute; + left: 3px; + top: 3px; + margin: 0; + background-position:center; +} + +.ext-ie .x-menu-item-icon { + left: -24px; +} +.ext-strict .x-menu-item-icon { + left: 3px; +} + +.ext-ie6 .x-menu-item-icon { + left: -24px; +} + +.ext-ie .x-menu-item-icon { + vertical-align: middle; +} + +.x-menu-check-item .x-menu-item-icon{ + background: transparent no-repeat center; +} + +.x-menu-group-item .x-menu-item-icon{ + background-color: transparent; +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background: transparent no-repeat center; +} + +.x-date-menu .x-menu-list{ + padding: 0; +} + +.x-menu-date-item{ + padding:0; +} + +.x-menu .x-color-palette, .x-menu .x-date-picker{ + margin-left: 26px; + margin-right:4px; +} + +.x-menu .x-date-picker{ + border:1px solid; + margin-top:2px; + margin-bottom:2px; +} + +.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ + margin: 0; + border: 0 none; +} + +.x-date-menu { + padding:0 !important; +} + +/* + * fixes separator visibility problem in IE 6 + */ +.ext-strict .ext-ie6 .x-menu-sep-li { + padding: 3px 4px; +} +.ext-strict .ext-ie6 .x-menu-sep { + margin: 0; + height: 1px; +} + +/* + * Fixes an issue with "fat" separators in webkit + */ +.ext-webkit .x-menu-sep{ + height: 1px; +} + +/* + * Ugly mess to remove the white border under the picker + */ +.ext-ie .x-date-menu{ + height: 199px; +} + +.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ + height: 197px; +} + +.ext-strict .ext-ie7 .x-date-menu{ + height: 195px; +} + +.ext-strict .ext-ie8 .x-date-menu{ + height: auto; +} + +.x-cycle-menu .x-menu-item-checked { + border:1px dotted !important; + padding:0; +} + +.x-menu .x-menu-scroller { + width: 100%; + background-repeat:no-repeat; + background-position:center; + height:8px; + line-height: 8px; + cursor:pointer; + margin: 0; + padding: 0; +} + +.x-menu .x-menu-scroller-active{ + height: 6px; + line-height: 6px; +} + +.x-menu-list-item-indent{ + padding-left: 27px; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/panel-reset.css b/src/webui/static/extjs/resources/css/structure/panel-reset.css new file mode 100644 index 00000000..42fe6458 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/panel-reset.css @@ -0,0 +1,130 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +/** + * W3C Suggested Default style sheet for HTML 4 + * http://www.w3.org/TR/CSS21/sample.html + * + * Resets for Ext.Panel @cfg normal: true + */ +.x-panel-reset .x-panel-body html, +.x-panel-reset .x-panel-body address, +.x-panel-reset .x-panel-body blockquote, +.x-panel-reset .x-panel-body body, +.x-panel-reset .x-panel-body dd, +.x-panel-reset .x-panel-body div, +.x-panel-reset .x-panel-body dl, +.x-panel-reset .x-panel-body dt, +.x-panel-reset .x-panel-body fieldset, +.x-panel-reset .x-panel-body form, +.x-panel-reset .x-panel-body frame, frameset, +.x-panel-reset .x-panel-body h1, +.x-panel-reset .x-panel-body h2, +.x-panel-reset .x-panel-body h3, +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body h5, +.x-panel-reset .x-panel-body h6, +.x-panel-reset .x-panel-body noframes, +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body p, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body center, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body hr, +.x-panel-reset .x-panel-body menu, +.x-panel-reset .x-panel-body pre { display: block } +.x-panel-reset .x-panel-body li { display: list-item } +.x-panel-reset .x-panel-body head { display: none } +.x-panel-reset .x-panel-body table { display: table } +.x-panel-reset .x-panel-body tr { display: table-row } +.x-panel-reset .x-panel-body thead { display: table-header-group } +.x-panel-reset .x-panel-body tbody { display: table-row-group } +.x-panel-reset .x-panel-body tfoot { display: table-footer-group } +.x-panel-reset .x-panel-body col { display: table-column } +.x-panel-reset .x-panel-body colgroup { display: table-column-group } +.x-panel-reset .x-panel-body td, +.x-panel-reset .x-panel-body th { display: table-cell } +.x-panel-reset .x-panel-body caption { display: table-caption } +.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } +.x-panel-reset .x-panel-body caption { text-align: center } +.x-panel-reset .x-panel-body body { margin: 8px } +.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } +.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } +.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body p, +.x-panel-reset .x-panel-body blockquote, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body fieldset, +.x-panel-reset .x-panel-body form, +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body dl, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } +.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } +.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } +.x-panel-reset .x-panel-body h1, +.x-panel-reset .x-panel-body h2, +.x-panel-reset .x-panel-body h3, +.x-panel-reset .x-panel-body h4, +.x-panel-reset .x-panel-body h5, +.x-panel-reset .x-panel-body h6, +.x-panel-reset .x-panel-body b, +.x-panel-reset .x-panel-body strong { font-weight: bolder } +.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } +.x-panel-reset .x-panel-body i, +.x-panel-reset .x-panel-body cite, +.x-panel-reset .x-panel-body em, +.x-panel-reset .x-panel-body var, +.x-panel-reset .x-panel-body address { font-style: italic } +.x-panel-reset .x-panel-body pre, +.x-panel-reset .x-panel-body tt, +.x-panel-reset .x-panel-body code, +.x-panel-reset .x-panel-body kbd, +.x-panel-reset .x-panel-body samp { font-family: monospace } +.x-panel-reset .x-panel-body pre { white-space: pre } +.x-panel-reset .x-panel-body button, +.x-panel-reset .x-panel-body textarea, +.x-panel-reset .x-panel-body input, +.x-panel-reset .x-panel-body select { display: inline-block } +.x-panel-reset .x-panel-body big { font-size: 1.17em } +.x-panel-reset .x-panel-body small, +.x-panel-reset .x-panel-body sub, +.x-panel-reset .x-panel-body sup { font-size: .83em } +.x-panel-reset .x-panel-body sub { vertical-align: sub } +.x-panel-reset .x-panel-body sup { vertical-align: super } +.x-panel-reset .x-panel-body table { border-spacing: 2px; } +.x-panel-reset .x-panel-body thead, +.x-panel-reset .x-panel-body tbody, +.x-panel-reset .x-panel-body tfoot { vertical-align: middle } +.x-panel-reset .x-panel-body td, +.x-panel-reset .x-panel-body th { vertical-align: inherit } +.x-panel-reset .x-panel-body s, +.x-panel-reset .x-panel-body strike, +.x-panel-reset .x-panel-body del { text-decoration: line-through } +.x-panel-reset .x-panel-body hr { border: 1px inset } +.x-panel-reset .x-panel-body ol, +.x-panel-reset .x-panel-body ul, +.x-panel-reset .x-panel-body dir, +.x-panel-reset .x-panel-body menu, +.x-panel-reset .x-panel-body dd { margin-left: 40px } +.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} +.x-panel-reset .x-panel-body ol { list-style-type: decimal } +.x-panel-reset .x-panel-body ol ul, +.x-panel-reset .x-panel-body ul ol, +.x-panel-reset .x-panel-body ul ul, +.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } +.x-panel-reset .x-panel-body u, +.x-panel-reset .x-panel-body ins { text-decoration: underline } +.x-panel-reset .x-panel-body br:before { content: "\A" } +.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } +.x-panel-reset .x-panel-body center { text-align: center } +.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } +.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } + +/* Begin bidirectionality settings (do not change) */ +.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } +.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } diff --git a/src/webui/static/extjs/resources/css/panel.css b/src/webui/static/extjs/resources/css/structure/panel.css similarity index 66% rename from src/webui/static/extjs/resources/css/panel.css rename to src/webui/static/extjs/resources/css/structure/panel.css index 31bf53f9..204b7877 100644 --- a/src/webui/static/extjs/resources/css/panel.css +++ b/src/webui/static/extjs/resources/css/structure/panel.css @@ -1,147 +1,147 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ .x-panel { border-style: solid; - border-color: #99bbe8; border-width:0; } .x-panel-header { overflow:hidden; zoom:1; - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; padding:5px 3px 4px 5px; - border:1px solid #99bbe8; + border:1px solid; line-height: 15px; - background: transparent url(../images/default/panel/white-top-bottom.gif) repeat-x 0 -1px; + background: transparent repeat-x 0 -1px; } .x-panel-body { - border:1px solid #99bbe8; + border:1px solid; border-top:0 none; overflow:hidden; - background:white; position: relative; /* added for item scroll positioning */ } -.x-panel-bbar .x-toolbar { - border:1px solid #99bbe8; - border-top:0 none; - overflow:hidden; - padding:2px; -} - - -.x-panel-tbar .x-toolbar { - border:1px solid #99bbe8; +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border:1px solid; border-top:0 none; overflow:hidden; padding:2px; } .x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top:1px solid #99bbe8; + border-top:1px solid; border-bottom: 0 none; } + .x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top:1px solid #99bbe8; + border-top:1px solid; } + .x-panel-header { overflow:hidden; zoom:1; } + .x-panel-tl .x-panel-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; padding:5px 0 4px 0; border:0 none; - background:transparent; + background:transparent no-repeat; } + .x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { padding-left:20px !important; background-repeat:no-repeat; background-position:0 4px; zoom:1; } + .x-panel-inline-icon { width:16px; - height:16px; + height:16px; background-repeat:no-repeat; background-position:0 0; - vertical-align:middle; - margin-right:4px; - margin-top:-1px; - margin-bottom:-1px; + vertical-align:middle; + margin-right:4px; + margin-top:-1px; + margin-bottom:-1px; } + .x-panel-tc { - background: transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 0; + background: transparent repeat-x 0 0; overflow:hidden; } + /* fix ie7 strict mode bug */ .ext-strict .ext-ie7 .x-panel-tc { overflow: visible; } + .x-panel-tl { - background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 0; + background: transparent no-repeat 0 0; padding-left:6px; zoom:1; - border-bottom:1px solid #99bbe8; + border-bottom:1px solid; } + .x-panel-tr { - background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat right 0; + background: transparent no-repeat right 0; zoom:1; padding-right:6px; } + .x-panel-bc { - background: transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 bottom; + background: transparent repeat-x 0 bottom; zoom:1; } + .x-panel-bc .x-panel-footer { zoom:1; } .x-panel-bl { - background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 bottom; + background: transparent no-repeat 0 bottom; padding-left:6px; zoom:1; } + .x-panel-br { - background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat right bottom; + background: transparent no-repeat right bottom; padding-right:6px; zoom:1; } + .x-panel-mc { border:0 none; padding:0; margin:0; - font: normal 11px tahoma,arial,helvetica,sans-serif; padding-top:6px; - background:#dfe8f6; } + .x-panel-mc .x-panel-body { - background:transparent; + background-color:transparent; border: 0 none; } + .x-panel-ml { - background: #fff url(../images/default/panel/left-right.gif) repeat-y 0 0; + background: repeat-y 0 0; padding-left:6px; zoom:1; } + .x-panel-mr { - background: transparent url(../images/default/panel/left-right.gif) repeat-y right 0; + background: transparent repeat-y right 0; padding-right:6px; zoom:1; } + .x-panel-bc .x-panel-footer { padding-bottom:6px; } + .x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { height:6px; font-size:0; @@ -151,7 +151,8 @@ .x-panel-bwrap { overflow:hidden; zoom:1; - left:0;top:0; + left:0; + top:0; } .x-panel-body { overflow:hidden; @@ -197,7 +198,7 @@ height:15px; float:right; cursor:pointer; - background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat; + background:transparent no-repeat; margin-left:2px; } @@ -205,19 +206,24 @@ .x-tool-toggle { background-position:0 -60px; } + .x-tool-toggle-over { background-position:-15px -60px; } + .x-panel-collapsed .x-tool-toggle { background-position:0 -75px; } + .x-panel-collapsed .x-tool-toggle-over { background-position:-15px -75px; } + .x-tool-close { background-position:0 -0; } + .x-tool-close-over { background-position:-15px 0; } @@ -225,6 +231,7 @@ .x-tool-minimize { background-position:0 -15px; } + .x-tool-minimize-over { background-position:-15px -15px; } @@ -232,6 +239,7 @@ .x-tool-maximize { background-position:0 -30px; } + .x-tool-maximize-over { background-position:-15px -30px; } @@ -239,6 +247,7 @@ .x-tool-restore { background-position:0 -45px; } + .x-tool-restore-over { background-position:-15px -45px; } @@ -246,94 +255,165 @@ .x-tool-gear { background-position:0 -90px; } + .x-tool-gear-over { background-position:-15px -90px; } +.x-tool-prev { + background-position:0 -105px; +} + +.x-tool-prev-over { + background-position:-15px -105px; +} + +.x-tool-next { + background-position:0 -120px; +} + +.x-tool-next-over { + background-position:-15px -120px; +} + .x-tool-pin { background-position:0 -135px; } + .x-tool-pin-over { background-position:-15px -135px; } + .x-tool-unpin { background-position:0 -150px; } + .x-tool-unpin-over { background-position:-15px -150px; } + .x-tool-right { background-position:0 -165px; } + .x-tool-right-over { background-position:-15px -165px; } + .x-tool-left { background-position:0 -180px; } + .x-tool-left-over { background-position:-15px -180px; } -.x-tool-up { - background-position:0 -210px; -} -.x-tool-up-over { - background-position:-15px -210px; -} + .x-tool-down { background-position:0 -195px; } + .x-tool-down-over { background-position:-15px -195px; } + +.x-tool-up { + background-position:0 -210px; +} + +.x-tool-up-over { + background-position:-15px -210px; +} + .x-tool-refresh { background-position:0 -225px; } + .x-tool-refresh-over { background-position:-15px -225px; } +.x-tool-plus { + background-position:0 -240px; +} + +.x-tool-plus-over { + background-position:-15px -240px; +} + .x-tool-minus { background-position:0 -255px; } + .x-tool-minus-over { background-position:-15px -255px; } -.x-tool-plus { - background-position:0 -240px; -} -.x-tool-plus-over { - background-position:-15px -240px; -} .x-tool-search { background-position:0 -270px; } + .x-tool-search-over { background-position:-15px -270px; } + .x-tool-save { background-position:0 -285px; } + .x-tool-save-over { background-position:-15px -285px; } + .x-tool-help { background-position:0 -300px; } + .x-tool-help-over { background-position:-15px -300px; } + .x-tool-print { background-position:0 -315px; } + .x-tool-print-over { background-position:-15px -315px; } +.x-tool-expand { + background-position:0 -330px; +} + +.x-tool-expand-over { + background-position:-15px -330px; +} + +.x-tool-collapse { + background-position:0 -345px; +} + +.x-tool-collapse-over { + background-position:-15px -345px; +} + +.x-tool-resize { + background-position:0 -360px; +} + +.x-tool-resize-over { + background-position:-15px -360px; +} + +.x-tool-move { + background-position:0 -375px; +} + +.x-tool-move-over { + background-position:-15px -375px; +} + /* Ghosting */ .x-panel-ghost { - background:#cbddf3; z-index:12000; overflow:hidden; position:absolute; @@ -349,7 +429,7 @@ overflow:hidden; font-size:0; line-height:0; - border:1px solid #99bbe8; + border:1px solid; border-top:0 none; display:block; } @@ -359,66 +439,55 @@ } .x-panel-dd-spacer { - border:2px dashed #99bbe8; + border:2px dashed; } + /* Buttons */ - -.x-panel-btns-ct { +.x-panel-btns { padding:5px; + overflow:hidden; } -.x-panel-btns-ct .x-btn{ - float:right; - clear:none; -} -.x-panel-btns-ct .x-panel-btns td { - border:0; - padding:0; -} -.x-panel-btns-ct .x-panel-btns-right table{ - float:right; - clear:none; -} -.x-panel-btns-ct .x-panel-btns-left table{ - float:left; - clear:none; -} -.x-panel-btns-ct .x-panel-btns-center{ - text-align:center; /*ie*/ -} -.x-panel-btns-ct .x-panel-btns-center table{ - margin:0 auto; /*everyone else*/ -} -.x-panel-btns-ct table td.x-panel-btn-td{ +.x-panel-btns td.x-toolbar-cell{ padding:3px; } -.x-panel-btns-ct .x-btn-focus .x-btn-left{ +.x-panel-btns .x-btn-focus .x-btn-left{ background-position:0 -147px; } -.x-panel-btns-ct .x-btn-focus .x-btn-right{ + +.x-panel-btns .x-btn-focus .x-btn-right{ background-position:0 -168px; } -.x-panel-btns-ct .x-btn-focus .x-btn-center{ + +.x-panel-btns .x-btn-focus .x-btn-center{ background-position:0 -189px; } -.x-panel-btns-ct .x-btn-over .x-btn-left{ +.x-panel-btns .x-btn-over .x-btn-left{ background-position:0 -63px; } -.x-panel-btns-ct .x-btn-over .x-btn-right{ + +.x-panel-btns .x-btn-over .x-btn-right{ background-position:0 -84px; } -.x-panel-btns-ct .x-btn-over .x-btn-center{ + +.x-panel-btns .x-btn-over .x-btn-center{ background-position:0 -105px; } -.x-panel-btns-ct .x-btn-click .x-btn-center{ +.x-panel-btns .x-btn-click .x-btn-center{ background-position:0 -126px; } -.x-panel-btns-ct .x-btn-click .x-btn-right{ + +.x-panel-btns .x-btn-click .x-btn-right{ background-position:0 -84px; } -.x-panel-btns-ct .x-btn-click .x-btn-left{ + +.x-panel-btns .x-btn-click .x-btn-left{ background-position:0 -63px; -} \ No newline at end of file +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + white-space: nowrap; +} diff --git a/src/webui/static/extjs/resources/css/structure/pivotgrid.css b/src/webui/static/extjs/resources/css/structure/pivotgrid.css new file mode 100644 index 00000000..d526d720 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/pivotgrid.css @@ -0,0 +1,65 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-pivotgrid .x-grid3-header-offset table { + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-header-offset table td { + padding: 4px 3px 4px 5px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 11px; + line-height: 13px; + font-family: tahoma; +} + +.x-pivotgrid .x-grid3-row-headers { + display: block; + float: left; +} + +.x-pivotgrid .x-grid3-row-headers table { + height: 100%; + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-row-headers table td { + height: 18px; + padding: 2px 7px 0 0; + text-align: right; + text-overflow: ellipsis; + font-size: 11px; + font-family: tahoma; +} + +.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { + height: 21px; +} + +.x-grid3-header-title { + top: 0%; + left: 0%; + position: absolute; + text-align: center; + vertical-align: middle; + font-family: tahoma; + font-size: 11px; + padding: auto 1px; + display: table-cell; +} + +.x-grid3-header-title span { + position: absolute; + top: 50%; + left: 0%; + width: 100%; + margin-top: -6px; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/structure/progress.css b/src/webui/static/extjs/resources/css/structure/progress.css new file mode 100644 index 00000000..906ddfcd --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/progress.css @@ -0,0 +1,46 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-progress-wrap { + border:1px solid; + overflow:hidden; +} + +.x-progress-inner { + height:18px; + background:repeat-x; + position:relative; +} + +.x-progress-bar { + height:18px; + float:left; + width:0; + background: repeat-x left center; + border-top:1px solid; + border-bottom:1px solid; + border-right:1px solid; +} + +.x-progress-text { + padding:1px 5px; + overflow:hidden; + position:absolute; + left:0; + text-align:center; +} + +.x-progress-text-back { + line-height:16px; +} + +.ext-ie .x-progress-text-back { + line-height:15px; +} + +.ext-strict .ext-ie7 .x-progress-text-back{ + width: 100%; +} diff --git a/src/webui/static/extjs/resources/css/structure/qtips.css b/src/webui/static/extjs/resources/css/structure/qtips.css new file mode 100644 index 00000000..bcc7d3bf --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/qtips.css @@ -0,0 +1,153 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tip{ + position: absolute; + top: 0; + left:0; + visibility: hidden; + z-index: 20002; + border:0 none; +} + +.x-tip .x-tip-close{ + height: 15px; + float:right; + width: 15px; + margin:0 0 2px 2px; + cursor:pointer; + display:none; +} + +.x-tip .x-tip-tc { + background: transparent no-repeat 0 -62px; + padding-top:3px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-tl { + background: transparent no-repeat 0 0; + padding-left:6px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-tr { + background: transparent no-repeat right 0; + padding-right:6px; + overflow:hidden; + zoom:1; +} + +.x-tip .x-tip-bc { + background: transparent no-repeat 0 -121px; + height:3px; + overflow:hidden; +} + +.x-tip .x-tip-bl { + background: transparent no-repeat 0 -59px; + padding-left:6px; + zoom:1; +} + +.x-tip .x-tip-br { + background: transparent no-repeat right -59px; + padding-right:6px; + zoom:1; +} + +.x-tip .x-tip-mc { + border:0 none; +} + +.x-tip .x-tip-ml { + background: no-repeat 0 -124px; + padding-left:6px; + zoom:1; +} + +.x-tip .x-tip-mr { + background: transparent no-repeat right -124px; + padding-right:6px; + zoom:1; +} + +.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { + font-size:0; + line-height:0; +} + +.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ + line-height: 1px; +} + +.x-tip .x-tip-header-text { + padding:0; + margin:0 0 2px 0; +} + +.x-tip .x-tip-body { + margin:0 !important; + line-height:14px; + padding:0; +} + +.x-tip .x-tip-body .loading-indicator { + margin:0; +} + +.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { + cursor:move; +} + +.x-form-invalid-tip .x-tip-tc { + background: repeat-x 0 -12px; + padding-top:6px; +} + +.x-form-invalid-tip .x-tip-bc { + background: repeat-x 0 -18px; + height:6px; +} + +.x-form-invalid-tip .x-tip-bl { + background: no-repeat 0 -6px; +} + +.x-form-invalid-tip .x-tip-br { + background: no-repeat right -6px; +} + +.x-form-invalid-tip .x-tip-body { + padding:2px; +} + +.x-form-invalid-tip .x-tip-body { + padding-left:24px; + background:transparent no-repeat 2px 2px; +} + +.x-tip-anchor { + position: absolute; + width: 9px; + height: 10px; + overflow:hidden; + background: transparent no-repeat 0 0; + zoom:1; +} +.x-tip-anchor-bottom { + background-position: -9px 0; +} +.x-tip-anchor-right { + background-position: -18px 0; + width: 10px; +} +.x-tip-anchor-left { + background-position: -28px 0; + width: 10px; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/reset.css b/src/webui/static/extjs/resources/css/structure/reset.css similarity index 52% rename from src/webui/static/extjs/resources/css/reset.css rename to src/webui/static/extjs/resources/css/structure/reset.css index 2cd8445d..763a46a3 100644 --- a/src/webui/static/extjs/resources/css/reset.css +++ b/src/webui/static/extjs/resources/css/structure/reset.css @@ -1,9 +1,13 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} + +.ext-forced-border-box, .ext-forced-border-box * { + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; +} diff --git a/src/webui/static/extjs/resources/css/resizable.css b/src/webui/static/extjs/resources/css/structure/resizable.css similarity index 64% rename from src/webui/static/extjs/resources/css/resizable.css rename to src/webui/static/extjs/resources/css/structure/resizable.css index ee6c0035..ed3b5e5d 100644 --- a/src/webui/static/extjs/resources/css/resizable.css +++ b/src/webui/static/extjs/resources/css/structure/resizable.css @@ -1,143 +1,149 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-resizable-handle { - position:absolute; - z-index:100; - /* ie needs these */ - font-size:1px; - line-height:6px; - overflow:hidden; - background:white; - filter:alpha(opacity=0); - opacity:0; - zoom:1; -} -.x-resizable-handle-east{ - width:6px; - cursor:e-resize; - right:0; - top:0; - height:100%; -} -.ext-ie .x-resizable-handle-east { - margin-right:-1px; /*IE rounding error*/ -} -.x-resizable-handle-south{ - width:100%; - cursor:s-resize; - left:0; - bottom:0; - height:6px; -} -.ext-ie .x-resizable-handle-south { - margin-bottom:-1px; /*IE rounding error*/ -} -.x-resizable-handle-west{ - width:6px; - cursor:w-resize; - left:0; - top:0; - height:100%; -} -.x-resizable-handle-north{ - width:100%; - cursor:n-resize; - left:0; - top:0; - height:6px; -} -.x-resizable-handle-southeast{ - width:6px; - cursor:se-resize; - right:0; - bottom:0; - height:6px; - z-index:101; -} -.x-resizable-handle-northwest{ - width:6px; - cursor:nw-resize; - left:0; - top:0; - height:6px; - z-index:101; -} -.x-resizable-handle-northeast{ - width:6px; - cursor:ne-resize; - right:0; - top:0; - height:6px; - z-index:101; -} -.x-resizable-handle-southwest{ - width:6px; - cursor:sw-resize; - left:0; - bottom:0; - height:6px; - z-index:101; -} -.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ - filter:alpha(opacity=100); - opacity:1; -} -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east{ - background:url(../images/default/sizer/e-handle.gif); - background-position: left; -} -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west{ - background:url(../images/default/sizer/e-handle.gif); - background-position: left; -} -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south{ - background:url(../images/default/sizer/s-handle.gif); - background-position: top; -} -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background:url(../images/default/sizer/s-handle.gif); - background-position: top; -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background:url(../images/default/sizer/se-handle.gif); - background-position: top left; -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background:url(../images/default/sizer/nw-handle.gif); - background-position:bottom right; -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background:url(../images/default/sizer/ne-handle.gif); - background-position: bottom left; -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background:url(../images/default/sizer/sw-handle.gif); - background-position: top right; -} -.x-resizable-proxy{ - border: 1px dashed #3b5a82; - position:absolute; - overflow:hidden; - display:none; - left:0;top:0; - z-index:50000; -} -.x-resizable-overlay{ - width:100%; - height:100%; - display:none; - position:absolute; - left:0; - top:0; - background:white; - z-index:200000; - -moz-opacity: 0; - opacity:0; - filter: alpha(opacity=0); -} +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-resizable-handle { + position:absolute; + z-index:100; + /* ie needs these */ + font-size:1px; + line-height:6px; + overflow:hidden; + filter:alpha(opacity=0); + opacity:0; + zoom:1; +} + +.x-resizable-handle-east{ + width:6px; + cursor:e-resize; + right:0; + top:0; + height:100%; +} + +.ext-ie .x-resizable-handle-east { + margin-right:-1px; /*IE rounding error*/ +} + +.x-resizable-handle-south{ + width:100%; + cursor:s-resize; + left:0; + bottom:0; + height:6px; +} + +.ext-ie .x-resizable-handle-south { + margin-bottom:-1px; /*IE rounding error*/ +} + +.x-resizable-handle-west{ + width:6px; + cursor:w-resize; + left:0; + top:0; + height:100%; +} + +.x-resizable-handle-north{ + width:100%; + cursor:n-resize; + left:0; + top:0; + height:6px; +} + +.x-resizable-handle-southeast{ + width:6px; + cursor:se-resize; + right:0; + bottom:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-northwest{ + width:6px; + cursor:nw-resize; + left:0; + top:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-northeast{ + width:6px; + cursor:ne-resize; + right:0; + top:0; + height:6px; + z-index:101; +} + +.x-resizable-handle-southwest{ + width:6px; + cursor:sw-resize; + left:0; + bottom:0; + height:6px; + z-index:101; +} + +.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ + filter:alpha(opacity=100); + opacity:1; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-position: left; +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-position: top; +} + +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-position: top left; +} + +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-position:bottom right; +} + +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-position: bottom left; +} + +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-position: top right; +} + +.x-resizable-proxy{ + border: 1px dashed; + position:absolute; + overflow:hidden; + display:none; + left:0; + top:0; + z-index:50000; +} + +.x-resizable-overlay{ + width:100%; + height:100%; + display:none; + position:absolute; + left:0; + top:0; + z-index:200000; + -moz-opacity: 0; + opacity:0; + filter: alpha(opacity=0); +} diff --git a/src/webui/static/extjs/resources/css/slider.css b/src/webui/static/extjs/resources/css/structure/slider.css similarity index 55% rename from src/webui/static/extjs/resources/css/slider.css rename to src/webui/static/extjs/resources/css/structure/slider.css index 65583d91..51538af4 100644 --- a/src/webui/static/extjs/resources/css/slider.css +++ b/src/webui/static/extjs/resources/css/structure/slider.css @@ -1,90 +1,103 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -/* Shared styles */ -.x-slider { - zoom:1; -} -.x-slider-inner { - position:relative; - left:0; - top:0; - overflow:visible; - zoom:1; -} -.x-slider-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; -} - -/* Horizontal styles */ -.x-slider-horz { - padding-left:7px; - background:transparent url(../images/default/slider/slider-bg.png) no-repeat 0 -22px; -} -.x-slider-horz .x-slider-end { - padding-right:7px; - zoom:1; - background:transparent url(../images/default/slider/slider-bg.png) no-repeat right -44px; -} -.x-slider-horz .x-slider-inner { - background:transparent url(../images/default/slider/slider-bg.png) repeat-x 0 0; - height:22px; -} -.x-slider-horz .x-slider-thumb { - width:14px; - height:15px; - position:absolute; - left:0; - top:3px; - background:transparent url(../images/default/slider/slider-thumb.png) no-repeat 0 0; -} -.x-slider-horz .x-slider-thumb-over { - background-position: -14px -15px; -} -.x-slider-horz .x-slider-thumb-drag { - background-position: -28px -30px; -} - -/* Vertical styles */ -.x-slider-vert { - padding-top:7px; - background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -44px 0; - width:22px; -} -.x-slider-vert .x-slider-end { - padding-bottom:7px; - zoom:1; - background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -22px bottom; -} -.x-slider-vert .x-slider-inner { - background:transparent url(../images/default/slider/slider-v-bg.png) repeat-y 0 0; -} -.x-slider-vert .x-slider-thumb { - width:15px; - height:14px; - position:absolute; - left:3px; - bottom:0; - background:transparent url(../images/default/slider/slider-v-thumb.png) no-repeat 0 0; -} -.x-slider-vert .x-slider-thumb-over { - background-position: -15px -14px; -} -.x-slider-vert .x-slider-thumb-drag { - background-position: -30px -28px; +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +/* Shared styles */ +.x-slider { + zoom:1; +} + +.x-slider-inner { + position:relative; + left:0; + top:0; + overflow:visible; + zoom:1; +} + +.x-slider-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: none; + -khtml-user-select:none; + -webkit-user-select:ignore; + display:block; + overflow:hidden; +} + +/* Horizontal styles */ +.x-slider-horz { + padding-left:7px; + background:transparent no-repeat 0 -22px; +} + +.x-slider-horz .x-slider-end { + padding-right:7px; + zoom:1; + background:transparent no-repeat right -44px; +} + +.x-slider-horz .x-slider-inner { + background:transparent repeat-x 0 0; + height:22px; +} + +.x-slider-horz .x-slider-thumb { + width:14px; + height:15px; + position:absolute; + left:0; + top:3px; + background:transparent no-repeat 0 0; +} + +.x-slider-horz .x-slider-thumb-over { + background-position: -14px -15px; +} + +.x-slider-horz .x-slider-thumb-drag { + background-position: -28px -30px; +} + +/* Vertical styles */ +.x-slider-vert { + padding-top:7px; + background:transparent no-repeat -44px 0; + width:22px; +} + +.x-slider-vert .x-slider-end { + padding-bottom:7px; + zoom:1; + background:transparent no-repeat -22px bottom; +} + +.x-slider-vert .x-slider-inner { + background:transparent repeat-y 0 0; +} + +.x-slider-vert .x-slider-thumb { + width:15px; + height:14px; + position:absolute; + left:3px; + bottom:0; + background:transparent no-repeat 0 0; +} + +.x-slider-vert .x-slider-thumb-over { + background-position: -15px -14px; +} + +.x-slider-vert .x-slider-thumb-drag { + background-position: -30px -28px; } \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/tabs.css b/src/webui/static/extjs/resources/css/structure/tabs.css similarity index 75% rename from src/webui/static/extjs/resources/css/tabs.css rename to src/webui/static/extjs/resources/css/structure/tabs.css index 19cbaaf9..e0f542c0 100644 --- a/src/webui/static/extjs/resources/css/tabs.css +++ b/src/webui/static/extjs/resources/css/structure/tabs.css @@ -1,39 +1,36 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ .x-tab-panel { overflow:hidden; } + .x-tab-panel-header, .x-tab-panel-footer { - background: #deecfd; - border: 1px solid #8db2e3; + border: 1px solid; overflow:hidden; zoom:1; } - .x-tab-panel-header { - border: 1px solid #8db2e3; + border: 1px solid; padding-bottom: 2px; } .x-tab-panel-footer { - border: 1px solid #8db2e3; + border: 1px solid; padding-top: 2px; } - .x-tab-strip-wrap { width:100%; overflow:hidden; position:relative; zoom:1; } + ul.x-tab-strip { display:block; width:5000px; @@ -42,14 +39,14 @@ ul.x-tab-strip { ul.x-tab-strip-top{ padding-top: 1px; - background: url(../images/default/tabs/tab-strip-bg.gif) #cedff5 repeat-x bottom; - border-bottom: 1px solid #8db2e3; + background: repeat-x bottom; + border-bottom: 1px solid; } ul.x-tab-strip-bottom{ padding-bottom: 1px; - background: url(../images/default/tabs/tab-strip-btm-bg.gif) #cedff5 repeat-x top; - border-top: 1px solid #8db2e3; + background: repeat-x top; + border-top: 1px solid; border-bottom: 0 none; } @@ -57,6 +54,7 @@ ul.x-tab-strip-bottom{ background:transparent !important; padding-top:0 !important; } + .x-tab-panel-header-plain { background:transparent !important; border-width:0 !important; @@ -65,15 +63,16 @@ ul.x-tab-strip-bottom{ .x-tab-panel-header-plain .x-tab-strip-spacer, .x-tab-panel-footer-plain .x-tab-strip-spacer { - border:1px solid #8db2e3; + border:1px solid; height:2px; - background: #deecfd; font-size:1px; line-height:1px; } + .x-tab-panel-header-plain .x-tab-strip-spacer { border-top: 0 none; } + .x-tab-panel-footer-plain .x-tab-strip-spacer { border-bottom: 0 none; } @@ -82,6 +81,7 @@ ul.x-tab-strip-bottom{ background:transparent !important; padding-bottom:0 !important; } + .x-tab-panel-footer-plain { background:transparent !important; border-width:0 !important; @@ -93,13 +93,11 @@ ul.x-tab-strip-bottom{ height:3px; } - ul.x-tab-strip li { float:left; margin-left:2px; } - ul.x-tab-strip li.x-tab-edge { float:left; margin:0 !important; @@ -130,46 +128,41 @@ ul.x-tab-strip li.x-tab-edge { } .x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#416aa3; white-space: nowrap; cursor:pointer; padding:4px 0; } + .x-tab-strip-top .x-tab-with-icon .x-tab-right { padding-left:6px; } + .x-tab-strip .x-tab-with-icon span.x-tab-strip-text { padding-left:20px; background-position: 0 3px; background-repeat: no-repeat; } -.x-tab-strip-over span.x-tab-strip-text { - color:#15428b; -} - .x-tab-strip-active, .x-tab-strip-active a.x-tab-right { cursor:default; } .x-tab-strip-active span.x-tab-strip-text { cursor:default; - color:#15428b; - font-weight:bold; } .x-tab-strip-disabled .x-tabs-text { cursor:default; - color:#aaaaaa; } .x-tab-panel-body { overflow:hidden; } + .x-tab-panel-bwrap { overflow:hidden; } + .ext-ie .x-tab-strip .x-tab-right { position:relative; } @@ -178,6 +171,32 @@ ul.x-tab-strip li.x-tab-edge { margin-bottom:-1px; } +/* + * Horrible hack for IE8 in quirks mode + */ +.ext-ie8 .x-tab-strip li { + position: relative; +} +.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { + top: 1px; +} +.ext-ie8 .x-tab-strip-top { + padding-top: 1; +} +.ext-border-box .ext-ie8 .x-tab-strip-top { + padding-top: 0; +} +.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:3px; +} +.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:4px; +} +.ext-ie8 .x-tab-strip-bottom .x-tab-right{ + top:0; +} + + .x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { padding-bottom:5px; } @@ -185,31 +204,33 @@ ul.x-tab-strip li.x-tab-edge { .x-tab-strip-bottom .x-tab-strip-active .x-tab-right { margin-top:-1px; } + .x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { padding-top:5px; } - .x-tab-strip-top .x-tab-right { - background: transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat 0 -51px; + background: transparent no-repeat 0 -51px; padding-left:10px; } .x-tab-strip-top .x-tab-left { - background: transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat right -351px; + background: transparent no-repeat right -351px; padding-right:10px; } .x-tab-strip-top .x-tab-strip-inner { - background: transparent url(../images/default/tabs/tabs-sprite.gif) repeat-x 0 -201px; + background: transparent repeat-x 0 -201px; } .x-tab-strip-top .x-tab-strip-over .x-tab-right { background-position:0 -101px; } + .x-tab-strip-top .x-tab-strip-over .x-tab-left { background-position:right -401px; } + .x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { background-position:0 -251px; } @@ -227,29 +248,34 @@ ul.x-tab-strip li.x-tab-edge { } .x-tab-strip-bottom .x-tab-right { - background: url(../images/default/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right; + background: no-repeat bottom right; } .x-tab-strip-bottom .x-tab-left { - background: url(../images/default/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left; + background: no-repeat bottom left; } .x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background: url(../images/default/tabs/tab-btm-right-bg.gif) no-repeat bottom left; + background: no-repeat bottom right; } .x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background: url(../images/default/tabs/tab-btm-left-bg.gif) no-repeat bottom right; + background: no-repeat bottom left; } + .x-tab-strip-bottom .x-tab-left { + margin-right: 3px; padding:0 10px; } + .x-tab-strip-bottom .x-tab-right { padding:0; } + .x-tab-strip .x-tab-strip-close { display:none; } + .x-tab-strip-closable { position:relative; } @@ -259,12 +285,12 @@ ul.x-tab-strip li.x-tab-edge { } .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/default/tabs/tab-close.gif); opacity:.6; -moz-opacity:.6; background-repeat:no-repeat; display:block; - width:11px;height:11px; + width:11px; + height:11px; position:absolute; top:3px; right:3px; @@ -277,25 +303,25 @@ ul.x-tab-strip li.x-tab-edge { -moz-opacity:.8; } .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/default/tabs/tab-close.gif); opacity:1; -moz-opacity:1; } .x-tab-panel-body { - border: 1px solid #8db2e3; - background:#fff; + border: 1px solid; } + .x-tab-panel-body-top { border-top: 0 none; } + .x-tab-panel-body-bottom { border-bottom: 0 none; } .x-tab-scroller-left { - background: transparent url(../images/default/tabs/scroll-left.gif) no-repeat -18px 0; - border-bottom: 1px solid #8db2e3; + background: transparent no-repeat -18px 0; + border-bottom: 1px solid; width:18px; position:absolute; left:0; @@ -306,6 +332,7 @@ ul.x-tab-strip li.x-tab-edge { .x-tab-scroller-left-over { background-position: 0 0; } + .x-tab-scroller-left-disabled { background-position: -18px 0; opacity:.5; @@ -313,9 +340,10 @@ ul.x-tab-strip li.x-tab-edge { filter:alpha(opacity=50); cursor:default; } + .x-tab-scroller-right { - background: transparent url(../images/default/tabs/scroll-right.gif) no-repeat 0 0; - border-bottom: 1px solid #8db2e3; + background: transparent no-repeat 0 0; + border-bottom: 1px solid; width:18px; position:absolute; right:0; @@ -323,9 +351,11 @@ ul.x-tab-strip li.x-tab-edge { z-index:10; cursor:pointer; } + .x-tab-scroller-right-over { background-position: -18px 0; } + .x-tab-scroller-right-disabled { background-position: 0 0; opacity:.5; @@ -334,6 +364,10 @@ ul.x-tab-strip li.x-tab-edge { cursor:default; } +.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ + margin-top: 1px; +} + .x-tab-scrolling .x-tab-strip-wrap { margin-left:18px; margin-right:18px; @@ -344,14 +378,14 @@ ul.x-tab-strip li.x-tab-edge { } .x-tab-panel-bbar .x-toolbar { - border:1px solid #99bbe8; + border:1px solid; border-top:0 none; overflow:hidden; padding:2px; } .x-tab-panel-tbar .x-toolbar { - border:1px solid #99bbe8; + border:1px solid; border-top:0 none; overflow:hidden; padding:2px; diff --git a/src/webui/static/extjs/resources/css/structure/toolbar.css b/src/webui/static/extjs/resources/css/structure/toolbar.css new file mode 100644 index 00000000..e2d962c2 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/toolbar.css @@ -0,0 +1,246 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-toolbar{ + border-style:solid; + border-width:0 0 1px 0; + display: block; + padding:2px; + background:repeat-x top left; + position:relative; + left:0; + top:0; + zoom:1; + overflow:hidden; +} + +.x-toolbar-left { + width: 100%; +} + +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} + +.x-toolbar td { + vertical-align:middle; +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; +} + +.x-toolbar .x-item-disabled { + cursor:default; + opacity:.6; + -moz-opacity:.6; + filter:alpha(opacity=60); +} + +.x-toolbar .x-item-disabled * { + cursor:default; +} + +.x-toolbar .x-toolbar-cell { + vertical-align:middle; +} + +.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, +.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc +{ + background-position: 500px 500px; +} + +/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ +.x-toolbar .x-btn-over .x-btn-tl{ + background-position: -6px 0; +} + +.x-toolbar .x-btn-over .x-btn-tr{ + background-position: -9px 0; +} + +.x-toolbar .x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-toolbar .x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} + +.x-toolbar .x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} + +.x-toolbar .x-btn-over .x-btn-br{ + background-position: -9px -3px; +} + +.x-toolbar .x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} + +.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} + +.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} + +.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} + +.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} + +.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-toolbar div.xtb-text{ + padding:2px 2px 0; + line-height:16px; + display:block; +} + +.x-toolbar .xtb-sep { + background-position: center; + background-repeat: no-repeat; + display: block; + font-size: 1px; + height: 16px; + width:4px; + overflow: hidden; + cursor:default; + margin: 0 2px 0; + border:0; +} + +.x-toolbar .xtb-spacer { + width:2px; +} + +/* Paging Toolbar */ +.x-tbar-page-number{ + width:30px; + height:14px; +} + +.ext-ie .x-tbar-page-number{ + margin-top: 2px; +} + +.x-paging-info { + position:absolute; + top:5px; + right: 8px; +} + +/* floating */ +.x-toolbar-ct { + width:100%; +} + +.x-toolbar-right td { + text-align: center; +} + +.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { + overflow:hidden; + zoom:1; +} + +.x-toolbar-more .x-btn-small .x-btn-text{ + height: 16px; + width: 12px; +} + +.x-toolbar-more em.x-btn-arrow { + display:inline; + background-color:transparent; + padding-right:0; +} + +.x-toolbar-more .x-btn-mc em.x-btn-arrow { + background-image: none; +} + +div.x-toolbar-no-items { + color:gray !important; + padding:5px 10px !important; +} + +/* fix ie toolbar form items */ +.ext-border-box .x-toolbar-cell .x-form-text { + margin-bottom:-1px !important; +} + +.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { + margin:0 !important; +} + +.ext-ie .x-toolbar-cell .x-form-field-wrap { + height:21px; +} + +.ext-ie .x-toolbar-cell .x-form-text { + position:relative; + top:-1px; +} + +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { + top: 0px; +} + +.x-toolbar-right td .x-form-field-trigger-wrap{ + text-align: left; +} + +.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ + margin-top: 5px; +} + +.x-toolbar-cell .x-form-cb-label{ + vertical-align: bottom; + top: 1px; +} + +.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ + margin-top: 4px; +} + +.ext-ie .x-toolbar-cell .x-form-cb-label{ + top: 0; +} diff --git a/src/webui/static/extjs/resources/css/structure/tree.css b/src/webui/static/extjs/resources/css/structure/tree.css new file mode 100644 index 00000000..08d32b97 --- /dev/null +++ b/src/webui/static/extjs/resources/css/structure/tree.css @@ -0,0 +1,218 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-strict .ext-ie .x-tree .x-panel-bwrap{ + position:relative; + overflow:hidden; +} + +.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-repeat: no-repeat; +} + +.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-position:center; + background-repeat: no-repeat; +} + +.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { + vertical-align: middle !important; +} + +.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { + vertical-align: top !important; +} + +/* checkboxes */ + +input.x-tree-node-cb { + margin-left:1px; + height: 19px; + vertical-align: bottom; +} + +.ext-ie input.x-tree-node-cb { + margin-left:0; + margin-top: 1px; + width: 16px; + height: 16px; + vertical-align: middle; +} + +.ext-strict .ext-ie8 input.x-tree-node-cb{ + margin: 1px 1px; + height: 14px; + vertical-align: bottom; +} + +.ext-strict .ext-ie8 input.x-tree-node-cb + a{ + vertical-align: bottom; +} + +.ext-opera input.x-tree-node-cb { + height: 14px; + vertical-align: middle; +} + +.x-tree-noicon .x-tree-node-icon{ + width:0; height:0; +} + +/* No line styles */ +.x-tree-no-lines .x-tree-elbow{ + background-color:transparent; +} + +.x-tree-no-lines .x-tree-elbow-end{ + background-color:transparent; +} + +.x-tree-no-lines .x-tree-elbow-line{ + background-color:transparent; +} + +/* Arrows */ +.x-tree-arrows .x-tree-elbow{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent no-repeat 0 0; +} + +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent no-repeat -16px 0; +} + +.x-tree-arrows .x-tree-elbow-end{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent no-repeat 0 0; +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent no-repeat -16px 0; +} + +.x-tree-arrows .x-tree-elbow-line{ + background-color:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} + +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} + +.x-tree-node{ + white-space: nowrap; +} + +.x-tree-node-el { + line-height:18px; + cursor:pointer; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + text-decoration:none; + -khtml-user-select:none; + -moz-user-select:none; + -webkit-user-select:ignore; + -kthml-user-focus:normal; + -moz-user-focus:normal; + -moz-outline: 0 none; + outline:0 none; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + text-decoration:none; + padding:1px 3px 1px 2px; +} + +.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ + -moz-opacity: 0.5; + opacity:.5; + filter: alpha(opacity=50); +} + +.x-tree-node .x-tree-node-inline-icon{ + background-color:transparent; +} + +.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ + text-decoration:none; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom:1px dotted; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top:1px dotted; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ + border-bottom:0 none; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ + border-top:0 none; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom:2px solid; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top:2px solid; +} + +.x-tree-node .x-tree-drag-append a span{ + border:1px dotted; +} + +.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ + display:none !important; +} + +/* Fix for ie rootVisible:false issue */ +.x-tree-root-ct { + zoom:1; +} diff --git a/src/webui/static/extjs/resources/css/window.css b/src/webui/static/extjs/resources/css/structure/window.css similarity index 58% rename from src/webui/static/extjs/resources/css/window.css rename to src/webui/static/extjs/resources/css/structure/window.css index c4f9e7d6..3871e642 100644 --- a/src/webui/static/extjs/resources/css/window.css +++ b/src/webui/static/extjs/resources/css/structure/window.css @@ -1,23 +1,21 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ .x-window { zoom:1; } -.x-window .x-resizable-handle { + +.x-window .x-window-handle { opacity:0; -moz-opacity:0; filter:alpha(opacity=0); } .x-window-proxy { - background:#C7DFFC; - border:1px solid #99bbe8; + border:1px solid; z-index:12000; overflow:hidden; position:absolute; @@ -32,132 +30,153 @@ overflow:hidden; zoom:1; } + .x-window-bwrap { z-index:1; position:relative; zoom:1; left:0;top:0; } + .x-window-tl .x-window-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; padding:5px 0 4px 0; } + .x-window-header-text { cursor:pointer; } + .x-window-tc { - background: transparent url(../images/default/window/top-bottom.png) repeat-x 0 0; + background: transparent repeat-x 0 0; overflow:hidden; zoom:1; } + .x-window-tl { - background: transparent url(../images/default/window/left-corners.png) no-repeat 0 0; + background: transparent no-repeat 0 0; padding-left:6px; zoom:1; z-index:1; position:relative; } + .x-window-tr { - background: transparent url(../images/default/window/right-corners.png) no-repeat right 0; + background: transparent no-repeat right 0; padding-right:6px; } + .x-window-bc { - background: transparent url(../images/default/window/top-bottom.png) repeat-x 0 bottom; + background: transparent repeat-x 0 bottom; zoom:1; } + .x-window-bc .x-window-footer { padding-bottom:6px; zoom:1; font-size:0; line-height:0; } + .x-window-bl { - background: transparent url(../images/default/window/left-corners.png) no-repeat 0 bottom; + background: transparent no-repeat 0 bottom; padding-left:6px; zoom:1; } + .x-window-br { - background: transparent url(../images/default/window/right-corners.png) no-repeat right bottom; + background: transparent no-repeat right bottom; padding-right:6px; zoom:1; } + .x-window-mc { - border:1px solid #99bbe8; + border:1px solid; padding:0; margin:0; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background:#dfe8f6; } - .x-window-ml { - background: transparent url(../images/default/window/left-right.png) repeat-y 0 0; + background: transparent repeat-y 0 0; padding-left:6px; zoom:1; } + .x-window-mr { - background: transparent url(../images/default/window/left-right.png) repeat-y right 0; + background: transparent repeat-y right 0; padding-right:6px; zoom:1; } + .x-window-body { overflow:hidden; } + .x-window-bwrap { overflow:hidden; } + .x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { padding:0; } + .x-window-maximized .x-window-footer { padding-bottom:0; } + .x-window-maximized .x-window-tc { padding-left:3px; padding-right:3px; - background-color:white; } + .x-window-maximized .x-window-mc { border-left:0 none; border-right:0 none; } + .x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { border-left:0 none; border-right: 0 none; } + .x-window-bbar .x-toolbar { - border-top:1px solid #99bbe8; + border-top:1px solid; border-bottom:0 none; } + .x-window-draggable, .x-window-draggable .x-window-header-text { cursor:move; } + .x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { cursor:default; } + .x-window-body { - background:transparent; + background-color:transparent; } + .x-panel-ghost .x-window-tl { - border-bottom:1px solid #99bbe8; + border-bottom:1px solid; } + .x-panel-collapsed .x-window-tl { - border-bottom:1px solid #84a0c4; + border-bottom:1px solid; } + .x-window-maximized-ct { overflow:hidden; } -.x-window-maximized .x-resizable-handle { + +.x-window-maximized .x-window-handle { display:none; } + .x-window-sizing-ghost ul { border:0 none !important; } - .x-dlg-focus{ -moz-outline:0 none; outline:0 none; @@ -168,41 +187,36 @@ top:0; left:0; } + +.ext-webkit .x-dlg-focus{ + width: 1px; + height: 1px; +} + .x-dlg-mask{ - z-index:10000; - display:none; - position:absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity:.50; - filter: alpha(opacity=50); - background-color:#CCC; + z-index:10000; + display:none; + position:absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity:.50; + filter: alpha(opacity=50); } body.ext-ie6.x-body-masked select { visibility:hidden; } + body.ext-ie6.x-body-masked .x-window select { visibility:visible; } .x-window-plain .x-window-mc { - background: #CAD9EC; - border-right:1px solid #DFE8F6; - border-bottom:1px solid #DFE8F6; - border-top:1px solid #a3bae9; - border-left:1px solid #a3bae9; + border: 1px solid; } .x-window-plain .x-window-body { - border-left:1px solid #DFE8F6; - border-top:1px solid #DFE8F6; - border-bottom:1px solid #a3bae9; - border-right:1px solid #a3bae9; + border: 1px solid; background:transparent !important; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background: #C7D6E9; } \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-access/borders.css b/src/webui/static/extjs/resources/css/theme-access/borders.css new file mode 100644 index 00000000..01a4c1b0 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/borders.css @@ -0,0 +1,25 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#343d4e; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#343d4e; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#343d4e; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#343d4e; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#343d4e; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/box.css b/src/webui/static/extjs/resources/css/theme-access/box.css new file mode 100644 index 00000000..9e4d28df --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/box.css @@ -0,0 +1,74 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 15px; +} + +.x-box-mc h3 { + font-size: 18px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/button.css b/src/webui/static/extjs/resources/css/theme-access/button.css new file mode 100644 index 00000000..be747381 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/button.css @@ -0,0 +1,136 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-btn { + font:normal 14px tahoma, verdana, helvetica; +} + +.x-btn button { + font:normal 14px arial,tahoma,verdana,helvetica; + color:#fffffa; + padding-left:6px !important; + padding-right:6px !important; +} + +.x-btn-over .x-btn button{ + color:#fff; +} + +.x-btn-noicon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-left .x-btn-text, +.x-btn-icon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-right .x-btn-text { + height:18px; +} + +.x-btn-icon .x-btn-small .x-btn-text { + width:18px; +} + +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { + padding-left:21px !important; +} + +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text { + padding-right:21px !important; +} + +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text { + padding-left:29px !important; +} + +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text { + padding-right:29px !important; +} + +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text { + padding-left:37px !important; +} + +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text { + padding-right:37px !important; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/access/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#fff; +} + +.x-btn-disabled *{ + color:#eee !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/access/button/arrow.gif); + padding-right:13px; +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow.gif); + padding-right:20px; +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/access/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #d2d2d2; +} + +.x-btn-group-tc { + background-image: url(../images/access/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/access/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/access/button/group-lr.gif); +} + +.x-btn-group-mr { + background-image: url(../images/access/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/access/button/group-tb.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/combo.css b/src/webui/static/extjs/resources/css/theme-access/combo.css new file mode 100644 index 00000000..d619754b --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/combo.css @@ -0,0 +1,43 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-combo-list { + border:2px solid #232732; + background-color:#555566; + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#414551; +} + +.x-combo-list-hd { + font:bold 14px tahoma, arial, helvetica, sans-serif; + color:#fff; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#98c0f4; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#98c0f4; +} + +.x-combo-list-item { + border-color:#556; +} + +.x-combo-list .x-combo-selected { + border-color:#e5872c !important; + background-color:#e5872c; +} + +.x-combo-list .x-toolbar { + border-top-color:#98c0f4; +} + +.x-combo-list-small { + font:normal 14px tahoma, arial, helvetica, sans-serif; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/core.css b/src/webui/static/extjs/resources/css/theme-access/core.css new file mode 100644 index 00000000..377192af --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/core.css @@ -0,0 +1,81 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +body { + background-color:#16181a; + color:#fcfcfc; +} + +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#223; + background-color:#3f4757; + background-image:url(../images/access/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #232d38; + border-color:#556; + color:#fff; + font:normal 14px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#232d38; + background-image:url(../images/access/grid/loading.gif); +} + +.x-item-disabled { + color: #ddd; +} + +.x-item-disabled * { + color: #ddd !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 14px; + background-image: url(../images/access/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-access/date-picker.css b/src/webui/static/extjs/resources/css/theme-access/date-picker.css new file mode 100644 index 00000000..1509a612 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/date-picker.css @@ -0,0 +1,145 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-date-picker { + border-color: #737b8c; + background-color:#21252e; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/access/shared/hd-sprite.gif); + color:#fff; + font:bold 14px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/access/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/access/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/access/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#363d4a; + background-image:url(../images/access/toolbar/bg.gif); + border-bottom-color:#535b5c; + font:normal 13px arial, helvetica,tahoma,sans-serif; + color:#fff; +} + +.x-date-inner td { + border-color:#112; +} + +.x-date-inner a { + font:normal 14px arial, helvetica,tahoma,sans-serif; + color:#fff; + padding:2px 7px 1px 3px; /* Structure to account for larger, bolder fonts in Access theme. */ +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-color:#e5872c; + background-image:none; + border-color:#864900; + padding:1px 6px 1px 2px; /* Structure to account for larger, bolder fonts in Access theme. */ +} + +.x-date-inner .x-date-today a{ + border-color:#99a; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#737b8c; + background-color:#464d5a; + background-image:url(../images/access/shared/glass-bg.gif); +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#fff; + background-color:#7e5530; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:13px; + color:#000; +} + +.x-date-mp { + background-color:#21252e; +} + +.x-date-mp td { + font:normal 14px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#083772; + color:#fff; + border-color: #3366cc #000055 #000055 #3366cc; + font:normal 14px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color: #dfecfb; + background-image: url(../images/access/shared/glass-bg.gif); +} + +.x-date-mp-btns td { + border-top-color: #c5d2df; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color:#fff; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#fff; + background-color: #7e5530; +} + +td.x-date-mp-sel a { + background-color: #e5872c; + background-image: none; + border-color:#864900; +} + +.x-date-mp-ybtn a { + background-image:url(../images/access/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#c5d2df; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/dd.css b/src/webui/static/extjs/resources/css/theme-access/dd.css new file mode 100644 index 00000000..51c05e45 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/dd.css @@ -0,0 +1,29 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-dd-drag-ghost{ + color:#000; + font: normal 14px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/debug.css b/src/webui/static/extjs/resources/css/theme-access/debug.css new file mode 100644 index 00000000..f23055d8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/debug.css @@ -0,0 +1,24 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +#x-debug-browser .x-tree .x-tree-node a span { + color:#222297; + font-size:14px; + font-family:"monotype","courier new",sans-serif; +} + +#x-debug-browser .x-tree a i { + color:#ff4545; + font-style:normal; +} + +#x-debug-browser .x-tree a em { + color:#999; +} + +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ + background-color:#c3daf9; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/dialog.css b/src/webui/static/extjs/resources/css/theme-access/dialog.css new file mode 100644 index 00000000..fc95f911 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/dialog.css @@ -0,0 +1,34 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:15px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 15px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/access/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/access/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/access/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/access/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/access/window/icon-error.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/editor.css b/src/webui/static/extjs/resources/css/theme-access/editor.css new file mode 100644 index 00000000..b9c88fbf --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/editor.css @@ -0,0 +1,16 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-html-editor-wrap { + border-color:#737B8C; + background-color:#fff; +} +.x-html-editor-wrap iframe { + background-color: #fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/access/editor/tb-sprite.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-access/form.css b/src/webui/static/extjs/resources/css/theme-access/form.css new file mode 100644 index 00000000..2fa569f2 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/form.css @@ -0,0 +1,176 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-form-field { + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field{ + color: #ffffff; + background-color:#33373d; + background-image:url(../images/access/form/text-bg.gif); + border-color:#737b8c; + border-width:2px; +} + +.ext-webkit .x-form-text, .ext-webkit textarea.x-form-field{ + border-width:2px; +} + +.x-form-text, .ext-ie .x-form-file { + height:26px; +} + +.ext-strict .x-form-text { + height:20px; +} + +.x-form-select-one { + background-color:#fff; + border-color:#b5b8c8; +} + +.x-form-check-group-label { + border-bottom: 1px solid #99bbe8; + color: #fff; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger{ + background-image:url(../images/access/form/trigger.gif); + border-bottom-color:#737b8c; + border-bottom-width:2px; + height:24px; + width:20px; +} + +.x-form-field-wrap .x-form-trigger.x-form-trigger-over{ + border-bottom-color:#d97e27; +} + +.x-form-field-wrap .x-form-trigger.x-form-trigger-click{ + border-bottom-color:#c86e19; +} + +.x-small-editor .x-form-field-wrap .x-form-trigger { + height:24px; +} + +.x-form-field-wrap .x-form-trigger-over { + background-position:-20px 0; +} + +.x-form-field-wrap .x-form-trigger-click { + background-position:-40px 0; +} + +.x-trigger-wrap-focus .x-form-trigger { + background-position:-60px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-over { + background-position:-80px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-click { + background-position:-100px 0; +} + +.x-form-field-wrap .x-form-date-trigger{ + background-image: url(../images/access/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger{ + background-image: url(../images/access/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger{ + background-image: url(../images/access/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom-color:#737b8c; +} + +.x-item-disabled .x-form-trigger-over{ + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click{ + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus{ + border-color:#ff9c33; +} + +.x-form-invalid, textarea.x-form-invalid, +.ext-webkit .x-form-invalid, .ext-webkit textarea.x-form-invalid{ + background-color:#15171a; + background-image:url(../images/access/grid/invalid_line.gif); + border-color:#c30; +} + +/* +.ext-safari .x-form-invalid{ + background-color:#fee; + border-color:#ff7870; +} +*/ + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background-color:#fff; + background-image:url(../images/access/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 14px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:#dadadd; +} + +.x-small-editor .x-form-text { + height: 26px; +} + +.x-small-editor .x-form-field { + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.ext-safari .x-small-editor .x-form-field { + font:normal 15px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/access/form/exclamation.gif); + height:25px; + width:19px; + background-position:center right; +} + +.x-fieldset { + border-color:#737B8C; +} + +.x-fieldset legend { + font:bold 14px tahoma, arial, helvetica, sans-serif; + color:#fff; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/grid.css b/src/webui/static/extjs/resources/css/theme-access/grid.css new file mode 100644 index 00000000..5c13dc4c --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/grid.css @@ -0,0 +1,288 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-grid3 { + background-color:#1f2933; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#223; +} + +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + border-left-color:#556; + border-right-color:#223; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border:0 none; + border-bottom:1px solid #111; + border-right:1px solid #1a1a1c; +} + +.x-grid3-row-alt{ + background-color:#1b232b; +} + +.x-grid3-row-over { + background-color:#7e5530; +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#3b3f50; + background-image:url(../images/access/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#889; + border-right-color:#445; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#4e628a; + background-image:url(../images/access/grid/grid3-hrow-over.gif); +} + +.x-grid3-cell-inner, .x-grid3-hd-inner { + color:#fff; +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/access/grid/sort_asc.gif); + width:15px; + height:9px; + margin-left:5px; +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/access/grid/sort_desc.gif); + width:15px; + height:9px; + margin-left:5px; +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#fff; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#fff; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/access/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +.x-grid3-row-selected { + background-color: #e5872c !important; + background-image: none; + border-style: solid; +} + +.x-grid3-row-selected .x-grid3-cell { + color: #fff; +} + +.x-grid3-cell-selected { + background-color: #ffa340 !important; + color:#fff; +} + +.x-grid3-cell-selected span{ + color:#fff !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#fff; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#fff; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#fff !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/access/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/access/grid/grid3-special-col-bg.gif) !important; + color:#fff !important; +} +.x-props-grid .x-grid3-td-value { + color:#fff !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#263240 !important; + border-right-color:#223; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c2c9d0; + background-image:url(../images/access/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/access/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#fff; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/access/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#4e628a; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/access/grid/group-collapse.gif); + background-position:3px 6px; + color:#ffd; + font:bold 14px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/access/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 14px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/layout.css b/src/webui/static/extjs/resources/css/theme-access/layout.css new file mode 100644 index 00000000..22e482dd --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/layout.css @@ -0,0 +1,56 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-border-layout-ct { + background-color:#3f4757; +} + +.x-accordion-hd { + color:#fff; + font-weight:normal; + background-image: url(../images/access/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#323845; + border-color:#1a1a1c; +} + +.x-layout-collapsed-over{ + background-color:#2d3440; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/list-view.css b/src/webui/static/extjs/resources/css/theme-access/list-view.css new file mode 100644 index 00000000..a62ae7a9 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/list-view.css @@ -0,0 +1,43 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-list-header{ + background-color:#393d4e; + background-image:url(../images/access/toolbar/bg.gif); + background-position:0 top; +} + +.x-list-header-inner div em { + border-left-color:#667; + font:normal 14px arial, tahoma, helvetica, sans-serif; + line-height: 14px; +} + +.x-list-body-inner { + background-color:#1B232B; +} + +.x-list-body dt em { + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#7E5530; +} + +.x-list-selected { + background-color:#E5872C; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/access/grid/sort-hd.gif); + border-color: #3e4e6c; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/menu.css b/src/webui/static/extjs/resources/css/theme-access/menu.css new file mode 100644 index 00000000..bebe24f2 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/menu.css @@ -0,0 +1,79 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-menu { + border-color:#222; + background-color:#414551; + background-image:url(../images/access/menu/menu.gif); +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 14px tahoma,arial, sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/access/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#223; + border-bottom-color:#666; +} + +a.x-menu-item { + color:#fffff6; +} + +.x-menu-item-active { + background-color: #f09134; + background-image: none; + border-color:#b36427; +} + +.x-menu-item-active a.x-menu-item { + border-color:#b36427; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/access/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/panel.css b/src/webui/static/extjs/resources/css/theme-access/panel.css new file mode 100644 index 00000000..9c78ad6d --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/panel.css @@ -0,0 +1,94 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel { + border-color: #18181a; + font-size: 14px; +} + +.x-panel-header { + color:#fff; + font-weight:bold; + font-size: 14px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#18181a; + background-image: url(../images/access/panel/white-top-bottom.gif); +} + +.x-panel-body { + color: #fffff6; + border-color:#18181a; + background-color:#232d38; +} + +.x-tab-panel .x-panel-body { + color: #fffff6; + border-color:#18181a; + background-color:#1f2730; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#223; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#223; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#223; +} + +.x-panel-tl .x-panel-header { + color:#fff; + font:bold 14px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/access/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/access/panel/corners-sprite.gif); + border-bottom-color:#222224; +} + +.x-panel-bc { + background-image: url(../images/access/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 14px tahoma,arial,helvetica,sans-serif; + background-color:#3f4757; +} + +.x-panel-ml { + background-image:url(../images/access/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/access/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/access/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#3f4757; +} + +.x-panel-ghost ul { + border-color:#18181a; +} + +.x-panel-dd-spacer { + border-color:#18181a; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 14px arial,tahoma, helvetica, sans-serif; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/progress.css b/src/webui/static/extjs/resources/css/theme-access/progress.css new file mode 100644 index 00000000..f62cfaec --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/progress.css @@ -0,0 +1,35 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-progress-wrap { + border-color:#18181a; +} + +.x-progress-inner { + background-color:#232d38; + background-image:none; +} + +.x-progress-bar { + background-color:#f39a00; + background-image:url(../images/access/progress/progress-bg.gif); + border-top-color:#a66900; + border-bottom-color:#a66900; + border-right-color:#ffb941; + height: 20px !important; /* structural override for Accessibility Theme */ +} + +.x-progress-text { + font-size:14px; + font-weight:bold; + color:#fff; + padding: 0 5px !important; /* structural override for Accessibility Theme */ +} + +.x-progress-text-back { + color:#aaa; + line-height: 19px; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/qtips.css b/src/webui/static/extjs/resources/css/theme-access/qtips.css new file mode 100644 index 00000000..a72bc2cc --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/qtips.css @@ -0,0 +1,44 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tip .x-tip-close{ + background-image: url(../images/access/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/access/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 14px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 14px tahoma,arial,helvetica,sans-serif; + color:#ffd; +} + +.x-tip .x-tip-body { + font: normal 14px tahoma,arial,helvetica,sans-serif; + color:#000; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/access/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/access/qtip/tip-anchor-sprite.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/resizable.css b/src/webui/static/extjs/resources/css/theme-access/resizable.css new file mode 100644 index 00000000..b77c01e1 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/resizable.css @@ -0,0 +1,44 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-resizable-handle { + background-color:#fff; + color: #000; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/access/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/access/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/access/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/access/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/access/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/access/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/access/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/slider.css b/src/webui/static/extjs/resources/css/theme-access/slider.css new file mode 100644 index 00000000..b3632384 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/slider.css @@ -0,0 +1,21 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/access/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/access/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/access/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/access/slider/slider-v-thumb.png); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/tabs.css b/src/webui/static/extjs/resources/css/theme-access/tabs.css new file mode 100644 index 00000000..2c105a37 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/tabs.css @@ -0,0 +1,119 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tab-panel-header, .x-tab-panel-footer { + background-color:#e18325; + border-color:#8db2e3; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#222; +} + +ul.x-tab-strip-top{ + background-color:#343843; + background-image: url(../images/access/tabs/tab-strip-bg.gif); + border-bottom-color:#343d4e; +} + +ul.x-tab-strip-bottom{ + background-color:#343843; + background-image: url(../images/access/tabs/tab-strip-btm-bg.gif); + border-top-color:#343843; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#222; + background-color:#e18325; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 14px tahoma,arial,helvetica; + color:#fff; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#fff; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#fff; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/access/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/access/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/access/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/access/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/access/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/access/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/access/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#18181a; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/access/tabs/scroll-left.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/access/tabs/scroll-right.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#99bbe8; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/toolbar.css b/src/webui/static/extjs/resources/css/theme-access/toolbar.css new file mode 100644 index 00000000..ce24301e --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/toolbar.css @@ -0,0 +1,120 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-toolbar{ + border-color:#18181a; + background-color:#393d4e; + background-image:url(../images/access/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 14px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/access/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/access/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/access/grid/grid-blue-split.gif); +} + +.x-toolbar .x-btn { + padding-left:3px; + padding-right:3px; +} + +.x-toolbar .x-btn-mc em.x-btn-arrow { + padding-right:10px; +} + +.x-toolbar .x-btn-text-icon .x-btn-icon-small-left .x-btn-text { + padding-left:18px !important; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + padding-right:14px; +} + +.x-tbar-page-first{ + background-image: url(../images/access/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/access/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/access/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/access/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/access/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/access/grid/loading.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/access/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/access/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/access/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/access/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/access/toolbar/more.gif) !important; +} + +.x-statusbar .x-status-busy { + background-image: url(../images/access/grid/loading.gif); +} + +.x-statusbar .x-status-text-panel { + border-color: #99bbe8 #fff #fff #99bbe8; +} diff --git a/src/webui/static/extjs/resources/css/theme-access/tree.css b/src/webui/static/extjs/resources/css/theme-access/tree.css new file mode 100644 index 00000000..61fc2e0e --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/tree.css @@ -0,0 +1,165 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/access/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/access/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.ext-ie .x-tree-node-el input { + width:14px; + height:14px; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/access/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/access/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/access/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/access/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/access/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/access/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/access/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#fff; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#fff; +} + +.x-tree-node .x-tree-selected a, .x-dd-drag-ghost a{ + color:#fff; +} + +.x-tree-node .x-tree-selected a span, .x-dd-drag-ghost a span{ + color:#fff; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #7e5530; +} + +.x-tree-node .x-tree-selected { + background-color: #e5872c; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-access/window.css b/src/webui/static/extjs/resources/css/theme-access/window.css new file mode 100644 index 00000000..066c6ac7 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-access/window.css @@ -0,0 +1,87 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-proxy { + background-color:#1f2833; + border-color:#18181a; +} + +.x-window-tl .x-window-header { + color:#fff; + font:bold 14px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/access/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/access/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/access/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/access/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/access/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/access/window/right-corners.png); +} + +.x-window-mc { + border-color:#18181a; + font: normal 14px tahoma,arial,helvetica,sans-serif; + background-color:#1f2833; +} + +.x-window-ml { + background-image: url(../images/access/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/access/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#323945; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#323945; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#323945; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #464f61; + border-color: #636778; +} + +.x-window-plain .x-window-body { + color: #fffff6; + border-color: #464F61; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #464f61; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/borders.css b/src/webui/static/extjs/resources/css/theme-gray/borders.css new file mode 100644 index 00000000..8da99742 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/borders.css @@ -0,0 +1,29 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#d0d0d0; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#d0d0d0; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#d0d0d0; +} + +.x-border-layout-ct { + background-color:#f0f0f0; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/box.css b/src/webui/static/extjs/resources/css/theme-gray/box.css new file mode 100644 index 00000000..50794180 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/box.css @@ -0,0 +1,74 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/button.css b/src/webui/static/extjs/resources/css/theme-gray/button.css new file mode 100644 index 00000000..6cd0c84b --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/button.css @@ -0,0 +1,94 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/gray/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/gray/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/gray/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #666; +} + +.x-btn-group-tc { + background-image: url(../images/gray/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/gray/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/gray/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/gray/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/gray/button/group-tb.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/combo.css b/src/webui/static/extjs/resources/css/theme-gray/combo.css new file mode 100644 index 00000000..48137847 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/combo.css @@ -0,0 +1,43 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-combo-list { + border-color:#ccc; + background-color:#ddd; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#fff; +} + +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#333; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#BCBCBC; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#BEBEBE; +} + +.x-combo-list-item { + border-color:#fff; +} + +.x-combo-list .x-combo-selected{ + border-color:#777 !important; + background-color:#f0f0f0; +} + +.x-combo-list .x-toolbar { + border-top-color:#BCBCBC; +} + +.x-combo-list-small { + font:normal 11px tahoma, arial, helvetica, sans-serif; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/core.css b/src/webui/static/extjs/resources/css/theme-gray/core.css new file mode 100644 index 00000000..76cb5e10 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/core.css @@ -0,0 +1,83 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#999; + background-color:#ddd; + background-image:url(../images/gray/panel/white-top-bottom.gif); + background-position: 0 -1px; +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#d0d0d0; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#CFCFCF; + background-color: #eaeaea; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #eaeaea; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/date-picker.css b/src/webui/static/extjs/resources/css/theme-gray/date-picker.css new file mode 100644 index 00000000..a67d32b9 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/date-picker.css @@ -0,0 +1,143 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-date-picker { + border-color:#585858; + background-color:#fff; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/gray/shared/hd-sprite.gif); + color:#fff; + font:bold 11px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/gray/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/gray/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/gray/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#D8D8D8; + background-image: url(../images/gray/panel/white-top-bottom.gif); + border-bottom-color:#AFAFAF; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#595959; +} + +.x-date-inner td { + border-color:#fff; +} + +.x-date-inner a { + font:normal 11px arial, helvetica,tahoma,sans-serif; + color:#000; +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-image: none; + background-color:#D8D8D8; + border-color:#DCDCDC; +} + +.x-date-inner .x-date-today a{ + border-color:darkred; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#AFAFAF; + background-color:#D8D8D8; + background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#000; + background-color:#D8D8D8; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:10px; + color:#000; +} + +.x-date-mp { + background-color:#fff; +} + +.x-date-mp td { + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#4E565F; + color:#fff; + border-color:#C0C0C0 #434343 #434343 #C0C0C0; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color:#D8D8D8; + background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; +} + +.x-date-mp-btns td { + border-top-color:#AFAFAF; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color: #333; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#333; + background-color:#FDFDFD; +} + +td.x-date-mp-sel a { + background-color:#D8D8D8; + background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; + border-color:#DCDCDC; +} + +.x-date-mp-ybtn a { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#D7D7D7; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/dd.css b/src/webui/static/extjs/resources/css/theme-gray/dd.css new file mode 100644 index 00000000..a84897f0 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/dd.css @@ -0,0 +1,29 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#D6D6D6; + border-color:#888888; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/debug.css b/src/webui/static/extjs/resources/css/theme-gray/debug.css new file mode 100644 index 00000000..6b48bad9 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/debug.css @@ -0,0 +1,24 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +#x-debug-browser .x-tree .x-tree-node a span { + color:#222297; + font-size:11px; + font-family:"monotype","courier new",sans-serif; +} + +#x-debug-browser .x-tree a i { + color:#ff4545; + font-style:normal; +} + +#x-debug-browser .x-tree a em { + color:#999; +} + +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ + background-color:#D5D5D5; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/dialog.css b/src/webui/static/extjs/resources/css/theme-gray/dialog.css new file mode 100644 index 00000000..a9984d58 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/dialog.css @@ -0,0 +1,34 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/gray/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/gray/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/gray/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/gray/window/icon-error.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/editor.css b/src/webui/static/extjs/resources/css/theme-gray/editor.css new file mode 100644 index 00000000..fc967106 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/editor.css @@ -0,0 +1,13 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-html-editor-wrap { + border-color:#BCBCBC; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/form.css b/src/webui/static/extjs/resources/css/theme-gray/form.css new file mode 100644 index 00000000..4b950e66 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/form.css @@ -0,0 +1,117 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-form-field{ + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field{ + background-color:#fff; + background-image:url(../images/default/form/text-bg.gif); + border-color:#C1C1C1; +} + +.x-form-select-one { + background-color:#fff; + border-color:#C1C1C1; +} + +.x-form-check-group-label { + border-bottom: 1px solid #d0d0d0; + color: #333; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger{ + background-image:url(../images/gray/form/trigger.gif); + border-bottom-color:#b5b8c8; +} + +.x-form-field-wrap .x-form-date-trigger{ + background-image: url(../images/gray/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger{ + background-image: url(../images/gray/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger{ + background-image: url(../images/gray/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom-color: #777777; +} + +.x-item-disabled .x-form-trigger-over{ + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click{ + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus{ + border-color:#777777; +} + +.x-form-invalid, textarea.x-form-invalid{ + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.ext-webkit .x-form-invalid{ + background-color:#fee; + border-color:#ff7870; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:gray; +} + +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.ext-webkit .x-small-editor .x-form-field { + font:normal 12px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-fieldset { + border-color:#CCCCCC; +} + +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#777777; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/grid.css b/src/webui/static/extjs/resources/css/theme-gray/grid.css new file mode 100644 index 00000000..b0033182 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/grid.css @@ -0,0 +1,276 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#d0d0d0; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow2.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#ACACAC; + border-right-color:#ACACAC; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow-over2.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/gray/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/gray/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#333; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow-over2.gif); + border-color:#ACACAC; +} + +.col-move-top{ + background-image:url(../images/gray/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/gray/grid/col-move-bottom.gif); +} + +.x-grid3-row-selected { + background-color:#CCCCCC !important; + background-image: none; + border-color:#ACACAC; +} + +.x-grid3-cell-selected{ + background-color: #CBCBCB !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#333 !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/gray/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/gray/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#d0d0d0; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/gray/grid/group-collapse.gif); + color:#5F5F5F; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/gray/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#B9B9B9; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/layout.css b/src/webui/static/extjs/resources/css/theme-gray/layout.css new file mode 100644 index 00000000..86a86f4a --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/layout.css @@ -0,0 +1,53 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-border-layout-ct { + background-color:#f0f0f0; +} + +.x-accordion-hd { + color:#222; + font-weight:normal; + background-image: url(../images/gray/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#dfdfdf; + border-color:#d0d0d0; +} + +.x-layout-collapsed-over{ + background-color:#e7e7e7; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/list-view.css b/src/webui/static/extjs/resources/css/theme-gray/list-view.css new file mode 100644 index 00000000..deb9afdc --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/list-view.css @@ -0,0 +1,37 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow2.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#f0f0f0; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/gray/grid/sort-hd.gif); + border-color: #d0d0d0; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/menu.css b/src/webui/static/extjs/resources/css/theme-gray/menu.css new file mode 100644 index 00000000..cbd57733 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/menu.css @@ -0,0 +1,82 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#7D7D7D; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/gray/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/gray/menu/item-over.gif); + background-color: #f1f1f1; + border-color:#ACACAC; +} + +.x-menu-item-active a.x-menu-item { + border-color:#ACACAC; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/gray/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#fff !important; +} + +.x-menu .x-date-picker{ + border-color:#AFAFAF; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#B9B9B9 !important; + background-color:#F1F1F1; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/panel.css b/src/webui/static/extjs/resources/css/theme-gray/panel.css new file mode 100644 index 00000000..1ea6c3d2 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/panel.css @@ -0,0 +1,87 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel { + border-color: #d0d0d0; +} + +.x-panel-header { + color:#333; + font-weight:bold; + font-size: 11px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#d0d0d0; + background-image: url(../images/gray/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#d0d0d0; + background-color:#fff; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#d0d0d0; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#d0d0d0; +} + +.x-panel-tl .x-panel-header { + color:#333; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/gray/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/gray/panel/corners-sprite.gif); + border-bottom-color:#d0d0d0; +} + +.x-panel-bc { + background-image: url(../images/gray/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#f1f1f1; +} + +.x-panel-ml { + background-color: #fff; + background-image:url(../images/gray/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/gray/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#f2f2f2; +} + +.x-panel-ghost ul { + border-color:#d0d0d0; +} + +.x-panel-dd-spacer { + border-color:#d0d0d0; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/pivotgrid.css b/src/webui/static/extjs/resources/css/theme-gray/pivotgrid.css new file mode 100644 index 00000000..a30305ad --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/pivotgrid.css @@ -0,0 +1,28 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/gray/grid/grid3-hrow2.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #D0D0D0; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/progress.css b/src/webui/static/extjs/resources/css/theme-gray/progress.css new file mode 100644 index 00000000..168debb9 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/progress.css @@ -0,0 +1,32 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-progress-wrap { + border-color:#8E8E8E; +} + +.x-progress-inner { + background-color:#E7E7E7; + background-image:url(../images/gray/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#BCBCBC; + background-image:url(../images/gray/progress/progress-bg.gif); + border-top-color:#E2E2E2; + border-bottom-color:#A4A4A4; + border-right-color:#A4A4A4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#5F5F5F; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/qtips.css b/src/webui/static/extjs/resources/css/theme-gray/qtips.css new file mode 100644 index 00000000..fdd266d6 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/qtips.css @@ -0,0 +1,44 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tip .x-tip-close{ + background-image: url(../images/gray/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/gray/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/gray/qtip/tip-anchor-sprite.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/theme-gray/resizable.css b/src/webui/static/extjs/resources/css/theme-gray/resizable.css new file mode 100644 index 00000000..8f0cbbc8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/resizable.css @@ -0,0 +1,43 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/gray/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/gray/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/gray/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/gray/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/gray/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/gray/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/gray/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#565656; +} +.x-resizable-overlay{ + background-color:#fff; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/slider.css b/src/webui/static/extjs/resources/css/theme-gray/slider.css new file mode 100644 index 00000000..af069a0a --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/slider.css @@ -0,0 +1,21 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/gray/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/gray/slider/slider-v-thumb.png); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/tabs.css b/src/webui/static/extjs/resources/css/theme-gray/tabs.css new file mode 100644 index 00000000..e07d5077 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/tabs.css @@ -0,0 +1,127 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tab-panel-header, .x-tab-panel-footer { + background-color: #eaeaea; + border-color:#d0d0d0; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#d0d0d0; +} + +ul.x-tab-strip-top{ + background-color:#dbdbdb; + background-image: url(../images/gray/tabs/tab-strip-bg.gif); + border-bottom-color:#d0d0d0; +} + +ul.x-tab-strip-bottom{ + background-color:#dbdbdb; + background-image: url(../images/gray/tabs/tab-strip-btm-bg.gif); + border-top-color:#d0d0d0; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#d0d0d0; + background-color: #eaeaea; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#333; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#111; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#333; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/gray/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/gray/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/gray/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { + background-image: url(../images/gray/tabs/tab-btm-over-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { + background-image: url(../images/gray/tabs/tab-btm-over-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/gray/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/gray/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/gray/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/gray/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#d0d0d0; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/gray/tabs/scroll-left.gif); + border-bottom-color:#d0d0d0; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/gray/tabs/scroll-right.gif); + border-bottom-color:#d0d0d0; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#d0d0d0; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/toolbar.css b/src/webui/static/extjs/resources/css/theme-gray/toolbar.css new file mode 100644 index 00000000..453d7d67 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/toolbar.css @@ -0,0 +1,95 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-toolbar{ + border-color:#d0d0d0; + background-color:#f0f0f0; + background-image:url(../images/gray/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/gray/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/gray/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/gray/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/gray/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/gray/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/gray/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/gray/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/loading.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/gray/toolbar/more.gif) !important; +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/tree.css b/src/webui/static/extjs/resources/css/theme-gray/tree.css new file mode 100644 index 00000000..62134df8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/tree.css @@ -0,0 +1,157 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.ext-ie .x-tree-node-el input { + width:15px; + height:15px; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #ddd; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} diff --git a/src/webui/static/extjs/resources/css/theme-gray/window.css b/src/webui/static/extjs/resources/css/theme-gray/window.css new file mode 100644 index 00000000..4098cbe8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/theme-gray/window.css @@ -0,0 +1,86 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-proxy { + background-color:#fcfcfc; + border-color:#d0d0d0; +} + +.x-window-tl .x-window-header { + color:#555; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/gray/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/gray/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/gray/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/gray/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/gray/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/gray/window/right-corners.png); +} + +.x-window-mc { + border-color:#d0d0d0; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#e8e8e8; +} + +.x-window-ml { + background-image: url(../images/gray/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/gray/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#d0d0d0; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#d0d0d0; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #E8E8E8; + border-color: #D0D0D0 #EEEEEE #EEEEEE #D0D0D0; +} + +.x-window-plain .x-window-body { + border-color: #EEEEEE #D0D0D0 #D0D0D0 #EEEEEE; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #E4E4E4; +} diff --git a/src/webui/static/extjs/resources/css/toolbar.css b/src/webui/static/extjs/resources/css/toolbar.css deleted file mode 100644 index 3d820a3f..00000000 --- a/src/webui/static/extjs/resources/css/toolbar.css +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-toolbar{ - border-color:#a9bfd3; - border-style:solid; - border-width:0 0 1px 0; - display: block; - padding:2px; - background:#d0def0 url(../images/default/toolbar/bg.gif) repeat-x top left; - position:relative; - zoom:1; -} -.x-toolbar .x-item-disabled .x-btn-icon { - opacity: .35; - -moz-opacity: .35; - filter: alpha(opacity=35); -} -.x-toolbar td { - vertical-align:middle; -} -.mso .x-toolbar, .x-grid-mso .x-toolbar{ - border: 0 none; - background: url(../images/default/grid/mso-hd.gif); -} -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - white-space: nowrap; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} -.x-toolbar .x-item-disabled { - color:gray; - cursor:default; - opacity:.6; - -moz-opacity:.6; - filter:alpha(opacity=60); -} -.x-toolbar .x-item-disabled * { - color:gray; - cursor:default; -} -.x-toolbar .x-btn-left{ - background:none; -} -.x-toolbar .x-btn-right{ - background:none; -} -.x-toolbar .x-btn-center{ - background:none; - padding:0 0; -} -.x-toolbar .x-btn-menu-text-wrap .x-btn-center button{ - padding-right:2px; -} -.ext-gecko .x-toolbar .x-btn-menu-text-wrap .x-btn-center button{ - padding-right:0; -} -.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{ - padding:0 2px; -} - -.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button { - width:12px; - background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px; -} -.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button { - width:12px; - background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px; -} -.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button { - background-position: 0 -47px; -} -.x-toolbar .x-btn-over .x-btn-left{ - background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0; -} -.x-toolbar .x-btn-over .x-btn-right{ - background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px; -} -.x-toolbar .x-btn-over .x-btn-center{ - background: url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px; -} - -.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{ - background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px; -} -.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{ - background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px; -} - -.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{ - background: url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px; -} - -.x-toolbar .x-btn-with-menu .x-btn-center em{ - padding-right:8px; -} - -.x-toolbar .ytb-text{ - padding:2px; -} -.x-toolbar .ytb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); - background-position: center; - background-repeat: no-repeat; - display: block; - font-size: 1px; - height: 16px; - width:4px; - overflow: hidden; - cursor:default; - margin: 0 2px 0; - border:0; -} -.x-toolbar .ytb-spacer { - width:2px; -} - -/* Paging Toolbar */ - -.x-tbar-page-number{ - width:24px; - height:14px; -} -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/loading.gif) !important; -} -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} -.x-paging-info { - position:absolute; - top:5px; - right: 8px; - color:#444; -} - -/* StatusBar */ - -.x-statusbar .x-status-text { - height: 21px; - line-height: 21px; - padding: 0 4px; - cursor: default; -} -.x-statusbar .x-status-busy { - padding-left: 25px; - background: transparent url(../images/default/grid/loading.gif) no-repeat 3px 3px; -} -.x-statusbar .x-status-text-panel { - border-top: 1px solid #99BBE8; - border-right: 1px solid #fff; - border-bottom: 1px solid #fff; - border-left: 1px solid #99BBE8; - padding: 2px 8px 2px 5px; -} diff --git a/src/webui/static/extjs/resources/css/tree.css b/src/webui/static/extjs/resources/css/tree.css deleted file mode 100644 index 6ac61259..00000000 --- a/src/webui/static/extjs/resources/css/tree.css +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-tree .x-panel-body{ - background-color:#fff; -} -.ext-strict .ext-ie .x-tree .x-panel-bwrap{ - position:relative; - overflow:hidden; -} -.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-repeat: no-repeat; -} -.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-position:center; - background-repeat: no-repeat; -} -.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { - vertical-align:middle !important; -} -/* some default icons for leaf/folder */ -.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} -/* checkboxes */ -.ext-ie input.x-tree-node-cb { - width:15px; - height:15px; -} -input.x-tree-node-cb { - margin-left:1px; -} -.ext-ie input.x-tree-node-cb { - margin-left:0; -} - -.x-tree-noicon .x-tree-node-icon{ - width:0; height:0; -} -/* loading icon */ -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} -.ext-ie .x-tree-node-el input { - width:15px; - height:15px; -} -/* Line styles */ -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -/* No line styles */ -.x-tree-no-lines .x-tree-elbow{ - background:transparent; -} -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} -.x-tree-no-lines .x-tree-elbow-end{ - background:transparent; -} -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} -.x-tree-no-lines .x-tree-elbow-line{ - background:transparent; -} - - -/* Arrows */ -.x-tree-arrows .x-tree-elbow{ - background:transparent; -} -.x-tree-arrows .x-tree-elbow-plus{ - background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; -} -.x-tree-arrows .x-tree-elbow-minus{ - background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; -} -.x-tree-arrows .x-tree-elbow-end{ - background:transparent; -} -.x-tree-arrows .x-tree-elbow-end-plus{ - background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; -} -.x-tree-arrows .x-tree-elbow-end-minus{ - background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; -} -.x-tree-arrows .x-tree-elbow-line{ - background:transparent; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ - background-position:-32px 0; -} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ - background-position:-48px 0; -} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ - background-position:-32px 0; -} -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ - background-position:-48px 0; -} - - - -.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - cursor:pointer; -} -.ext-ie ul.x-tree-node-ct{ - font-size:0; - line-height:0; - zoom:1; -} -.x-tree-node{ - color: black; - font: normal 11px arial, tahoma, helvetica, sans-serif; - white-space: nowrap; -} - -.x-tree-node-el { - line-height:18px; - cursor:pointer; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - text-decoration:none; - color:black; - -khtml-user-select:none; - -moz-user-select:none; - -kthml-user-focus:normal; - -moz-user-focus:normal; - -moz-outline: 0 none; - outline:0 none; -} -.x-tree-node a span, .x-dd-drag-ghost a span{ - text-decoration:none; - color:black; - padding:1px 3px 1px 2px; -} -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} -.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ - -moz-opacity: 0.5; - opacity:.5; - filter: alpha(opacity=50); -} -.x-tree-node .x-tree-node-inline-icon{ - background:transparent; -} -.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ - text-decoration:none; -} -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom:1px dotted #3366cc; -} -.x-tree-node div.x-tree-drag-insert-above{ - border-top:1px dotted #3366cc; -} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ - border-bottom:0 none; -} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ - border-top:0 none; -} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom:2px solid #3366cc; -} -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top:2px solid #3366cc; -} -.x-tree-node .x-tree-drag-append a span{ - background:#dddddd; - border:1px dotted gray; -} -.x-tree-node .x-tree-node-over { - background-color: #eee; -} -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} -.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ - display:none !important; -} -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} -/* Fix for ie rootVisible:false issue */ -.x-tree-root-ct { - zoom:1; -} diff --git a/src/webui/static/extjs/resources/css/visual/borders.css b/src/webui/static/extjs/resources/css/visual/borders.css new file mode 100644 index 00000000..f42ca6ac --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/borders.css @@ -0,0 +1,25 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/box.css b/src/webui/static/extjs/resources/css/visual/box.css new file mode 100644 index 00000000..01f69889 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/box.css @@ -0,0 +1,74 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/button.css b/src/webui/static/extjs/resources/css/visual/button.css new file mode 100644 index 00000000..39a93ee7 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/button.css @@ -0,0 +1,94 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/default/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #3e6aaa; +} + +.x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/default/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/default/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/combo.css b/src/webui/static/extjs/resources/css/visual/combo.css new file mode 100644 index 00000000..7672901a --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/combo.css @@ -0,0 +1,43 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-combo-list { + border-color:#98c0f4; + background-color:#ddecfe; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#fff; +} + +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#98c0f4; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#98c0f4; +} + +.x-combo-list-item { + border-color:#fff; +} + +.x-combo-list .x-combo-selected{ + border-color:#a3bae9 !important; + background-color:#dfe8f6; +} + +.x-combo-list .x-toolbar { + border-top-color:#98c0f4; +} + +.x-combo-list-small { + font:normal 11px tahoma, arial, helvetica, sans-serif; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/core.css b/src/webui/static/extjs/resources/css/visual/core.css new file mode 100644 index 00000000..5c2aea52 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/core.css @@ -0,0 +1,82 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#6593cf; + background-color:#c3daf9; + background-image:url(../images/default/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#a3bad9; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #deecfd; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} diff --git a/src/webui/static/extjs/resources/css/visual/date-picker.css b/src/webui/static/extjs/resources/css/visual/date-picker.css new file mode 100644 index 00000000..93b593a3 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/date-picker.css @@ -0,0 +1,143 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-date-picker { + border-color: #1b376c; + background-color:#fff; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/default/shared/hd-sprite.gif); + color:#fff; + font:bold 11px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/default/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/default/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-bottom-color:#a3bad9; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#233d6d; +} + +.x-date-inner td { + border-color:#fff; +} + +.x-date-inner a { + font:normal 11px arial, helvetica,tahoma,sans-serif; + color:#000; +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-inner .x-date-today a{ + border-color:darkred; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#a3bad9; + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#000; + background-color:#ddecfe; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:10px; + color:#000; +} + +.x-date-mp { + background-color:#fff; +} + +.x-date-mp td { + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#083772; + color:#fff; + border-color: #3366cc #000055 #000055 #3366cc; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); +} + +.x-date-mp-btns td { + border-top-color: #c5d2df; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color:#15428b; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#15428b; + background-color: #ddecfe; +} + +td.x-date-mp-sel a { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-mp-ybtn a { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#c5d2df; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/dd.css b/src/webui/static/extjs/resources/css/visual/dd.css new file mode 100644 index 00000000..3dca9de4 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/dd.css @@ -0,0 +1,29 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/debug.css b/src/webui/static/extjs/resources/css/visual/debug.css new file mode 100644 index 00000000..111dd001 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/debug.css @@ -0,0 +1,24 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +#x-debug-browser .x-tree .x-tree-node a span { + color:#222297; + font-size:11px; + font-family:"monotype","courier new",sans-serif; +} + +#x-debug-browser .x-tree a i { + color:#ff4545; + font-style:normal; +} + +#x-debug-browser .x-tree a em { + color:#999; +} + +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ + background-color:#c3daf9; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/dialog.css b/src/webui/static/extjs/resources/css/visual/dialog.css new file mode 100644 index 00000000..0cb26f8b --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/dialog.css @@ -0,0 +1,34 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/default/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/default/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/default/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/default/window/icon-error.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/editor.css b/src/webui/static/extjs/resources/css/visual/editor.css new file mode 100644 index 00000000..9cc571cd --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/editor.css @@ -0,0 +1,13 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-html-editor-wrap { + border-color:#a9bfd3; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/form.css b/src/webui/static/extjs/resources/css/visual/form.css new file mode 100644 index 00000000..df551889 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/form.css @@ -0,0 +1,123 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-form-field { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field { + background-color:#fff; + background-image:url(../images/default/form/text-bg.gif); + border-color:#b5b8c8; +} + +.x-form-select-one { + background-color:#fff; + border-color:#b5b8c8; +} + +.x-form-check-group-label { + border-bottom: 1px solid #99bbe8; + color: #15428b; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger { + background-image:url(../images/default/form/trigger.gif); + border-bottom-color:#b5b8c8; +} + +.x-form-field-wrap .x-form-date-trigger { + background-image: url(../images/default/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger { + background-image: url(../images/default/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger { + background-image: url(../images/default/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger { + border-bottom-color:#7eadd9; +} + +.x-item-disabled .x-form-trigger-over { + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click { + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus { + border-color:#7eadd9; +} + +.x-form-invalid, textarea.x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-invalid.x-form-composite { + border: none; + background-image: none; +} + +.x-form-invalid.x-form-composite .x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:gray; +} + +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.ext-webkit .x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-fieldset { + border-color:#b5b8c8; +} + +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; +} diff --git a/src/webui/static/extjs/resources/css/visual/grid.css b/src/webui/static/extjs/resources/css/visual/grid.css new file mode 100644 index 00000000..871bcca8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/grid.css @@ -0,0 +1,277 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#99bbe8; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#aaccf6; + border-right-color:#aaccf6; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#15428b; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +td.grid-hd-group-cell { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; +} + +.x-grid3-row-selected { + background-color: #dfe8f6 !important; + background-image: none; + border-color:#a3bae9; +} + +.x-grid3-cell-selected{ + background-color: #b8cfee !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#15428b !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c3daf9; + background-image:url(../images/default/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/default/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#99bbe8; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-collapse.gif); + color:#3764a0; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/layout.css b/src/webui/static/extjs/resources/css/visual/layout.css new file mode 100644 index 00000000..eaa983ea --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/layout.css @@ -0,0 +1,53 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-border-layout-ct { + background-color:#dfe8f6; +} + +.x-accordion-hd { + color:#222; + font-weight:normal; + background-image: url(../images/default/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#d2e0f2; + border-color:#98c0f4; +} + +.x-layout-collapsed-over{ + background-color:#d9e8fb; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/list-view.css b/src/webui/static/extjs/resources/css/visual/list-view.css new file mode 100644 index 00000000..424650b2 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/list-view.css @@ -0,0 +1,37 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#dfe8f6; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/default/grid/sort-hd.gif); + border-color: #99bbe8; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/menu.css b/src/webui/static/extjs/resources/css/visual/menu.css new file mode 100644 index 00000000..49a816ad --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/menu.css @@ -0,0 +1,87 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#718bb7; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/default/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/default/menu/item-over.gif); + background-color: #dbecf4; + border-color:#aaccf6; +} + +.x-menu-item-active a.x-menu-item { + border-color:#aaccf6; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/default/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#f0f0f0 !important; + background-image: none; +} + +.x-date-menu, .x-color-menu{ + background-color: #fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} diff --git a/src/webui/static/extjs/resources/css/visual/panel.css b/src/webui/static/extjs/resources/css/visual/panel.css new file mode 100644 index 00000000..d72ba21d --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/panel.css @@ -0,0 +1,87 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-panel { + border-color: #99bbe8; +} + +.x-panel-header { + color:#15428b; + font-weight:bold; + font-size: 11px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#99bbe8; + background-image: url(../images/default/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#99bbe8; + background-color:#fff; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#99bbe8; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#99bbe8; +} + +.x-panel-tl .x-panel-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/default/panel/corners-sprite.gif); + border-bottom-color:#99bbe8; +} + +.x-panel-bc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-panel-ml { + background-color: #fff; + background-image:url(../images/default/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/default/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#cbddf3; +} + +.x-panel-ghost ul { + border-color:#99bbe8; +} + +.x-panel-dd-spacer { + border-color:#99bbe8; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} diff --git a/src/webui/static/extjs/resources/css/visual/pivotgrid.css b/src/webui/static/extjs/resources/css/visual/pivotgrid.css new file mode 100644 index 00000000..fb158a70 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/pivotgrid.css @@ -0,0 +1,28 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} diff --git a/src/webui/static/extjs/resources/css/visual/progress.css b/src/webui/static/extjs/resources/css/visual/progress.css new file mode 100644 index 00000000..7d90190c --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/progress.css @@ -0,0 +1,32 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-progress-wrap { + border-color:#6593cf; +} + +.x-progress-inner { + background-color:#e0e8f3; + background-image:url(../images/default/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#9cbfee; + background-image:url(../images/default/progress/progress-bg.gif); + border-top-color:#d1e4fd; + border-bottom-color:#7fa9e4; + border-right-color:#7fa9e4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#396095; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/qtips.css b/src/webui/static/extjs/resources/css/visual/qtips.css new file mode 100644 index 00000000..8c9eda5f --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/qtips.css @@ -0,0 +1,44 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tip .x-tip-close{ + background-image: url(../images/default/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/default/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/default/qtip/tip-anchor-sprite.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/resizable.css b/src/webui/static/extjs/resources/css/visual/resizable.css new file mode 100644 index 00000000..2ee80911 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/resizable.css @@ -0,0 +1,43 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/default/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/default/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/default/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/default/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/default/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/default/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/default/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} diff --git a/src/webui/static/extjs/resources/css/visual/slider.css b/src/webui/static/extjs/resources/css/visual/slider.css new file mode 100644 index 00000000..b82a4e07 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/slider.css @@ -0,0 +1,21 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/default/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/default/slider/slider-v-thumb.png); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/tabs.css b/src/webui/static/extjs/resources/css/visual/tabs.css new file mode 100644 index 00000000..c3615288 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/tabs.css @@ -0,0 +1,127 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tab-panel-header, .x-tab-panel-footer { + background-color: #deecfd; + border-color:#8db2e3; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#8db2e3; +} + +ul.x-tab-strip-top{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-bg.gif); + border-bottom-color:#8db2e3; +} + +ul.x-tab-strip-bottom{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); + border-top-color:#8db2e3; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#8db2e3; + background-color: #deecfd; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#15428b; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/default/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#8db2e3; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/default/tabs/scroll-left.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/default/tabs/scroll-right.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#99bbe8; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/toolbar.css b/src/webui/static/extjs/resources/css/visual/toolbar.css new file mode 100644 index 00000000..bfd0e5fe --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/toolbar.css @@ -0,0 +1,95 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-toolbar{ + border-color:#a9bfd3; + background-color:#d0def0; + background-image:url(../images/default/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-blue-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/default/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/default/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/refresh-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/tree.css b/src/webui/static/extjs/resources/css/visual/tree.css new file mode 100644 index 00000000..06237935 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/tree.css @@ -0,0 +1,152 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #d9e8fb; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/visual/window.css b/src/webui/static/extjs/resources/css/visual/window.css new file mode 100644 index 00000000..e556dcf8 --- /dev/null +++ b/src/webui/static/extjs/resources/css/visual/window.css @@ -0,0 +1,86 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.x-window-proxy { + background-color:#c7dffc; + border-color:#99bbe8; +} + +.x-window-tl .x-window-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-mc { + border-color:#99bbe8; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-window-ml { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#99bbe8; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#84a0c4; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #ccd9e8; + border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; +} + +.x-window-plain .x-window-body { + border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #ccd9e8; +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/xtheme-access.css b/src/webui/static/extjs/resources/css/xtheme-access.css new file mode 100644 index 00000000..44d0f95e --- /dev/null +++ b/src/webui/static/extjs/resources/css/xtheme-access.css @@ -0,0 +1,1820 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +body { + background-color:#16181a; + color:#fcfcfc; +} + +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#223; + background-color:#3f4757; + background-image:url(../images/access/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #232d38; + border-color:#556; + color:#fff; + font:normal 14px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#232d38; + background-image:url(../images/access/grid/loading.gif); +} + +.x-item-disabled { + color: #ddd; +} + +.x-item-disabled * { + color: #ddd !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 14px; + background-image: url(../images/access/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +}.x-tab-panel-header, .x-tab-panel-footer { + background-color:#e18325; + border-color:#8db2e3; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#222; +} + +ul.x-tab-strip-top{ + background-color:#343843; + background-image: url(../images/access/tabs/tab-strip-bg.gif); + border-bottom-color:#343d4e; +} + +ul.x-tab-strip-bottom{ + background-color:#343843; + background-image: url(../images/access/tabs/tab-strip-btm-bg.gif); + border-top-color:#343843; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#222; + background-color:#e18325; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 14px tahoma,arial,helvetica; + color:#fff; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#fff; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#fff; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/access/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/access/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/access/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/access/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/access/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/access/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/access/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#18181a; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/access/tabs/scroll-left.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/access/tabs/scroll-right.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#99bbe8; +} +.x-form-field { + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field{ + color: #ffffff; + background-color:#33373d; + background-image:url(../images/access/form/text-bg.gif); + border-color:#737b8c; + border-width:2px; +} + +.ext-webkit .x-form-text, .ext-webkit textarea.x-form-field{ + border-width:2px; +} + +.x-form-text, .ext-ie .x-form-file { + height:26px; +} + +.ext-strict .x-form-text { + height:20px; +} + +.x-form-select-one { + background-color:#fff; + border-color:#b5b8c8; +} + +.x-form-check-group-label { + border-bottom: 1px solid #99bbe8; + color: #fff; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger{ + background-image:url(../images/access/form/trigger.gif); + border-bottom-color:#737b8c; + border-bottom-width:2px; + height:24px; + width:20px; +} + +.x-form-field-wrap .x-form-trigger.x-form-trigger-over{ + border-bottom-color:#d97e27; +} + +.x-form-field-wrap .x-form-trigger.x-form-trigger-click{ + border-bottom-color:#c86e19; +} + +.x-small-editor .x-form-field-wrap .x-form-trigger { + height:24px; +} + +.x-form-field-wrap .x-form-trigger-over { + background-position:-20px 0; +} + +.x-form-field-wrap .x-form-trigger-click { + background-position:-40px 0; +} + +.x-trigger-wrap-focus .x-form-trigger { + background-position:-60px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-over { + background-position:-80px 0; +} + +.x-trigger-wrap-focus .x-form-trigger-click { + background-position:-100px 0; +} + +.x-form-field-wrap .x-form-date-trigger{ + background-image: url(../images/access/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger{ + background-image: url(../images/access/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger{ + background-image: url(../images/access/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom-color:#737b8c; +} + +.x-item-disabled .x-form-trigger-over{ + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click{ + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus{ + border-color:#ff9c33; +} + +.x-form-invalid, textarea.x-form-invalid, +.ext-webkit .x-form-invalid, .ext-webkit textarea.x-form-invalid{ + background-color:#15171a; + background-image:url(../images/access/grid/invalid_line.gif); + border-color:#c30; +} + +/* +.ext-safari .x-form-invalid{ + background-color:#fee; + border-color:#ff7870; +} +*/ + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background-color:#fff; + background-image:url(../images/access/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 14px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:#dadadd; +} + +.x-small-editor .x-form-text { + height: 26px; +} + +.x-small-editor .x-form-field { + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.ext-safari .x-small-editor .x-form-field { + font:normal 15px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/access/form/exclamation.gif); + height:25px; + width:19px; + background-position:center right; +} + +.x-fieldset { + border-color:#737B8C; +} + +.x-fieldset legend { + font:bold 14px tahoma, arial, helvetica, sans-serif; + color:#fff; +} +.x-btn { + font:normal 14px tahoma, verdana, helvetica; +} + +.x-btn button { + font:normal 14px arial,tahoma,verdana,helvetica; + color:#fffffa; + padding-left:6px !important; + padding-right:6px !important; +} + +.x-btn-over .x-btn button{ + color:#fff; +} + +.x-btn-noicon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-left .x-btn-text, +.x-btn-icon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-right .x-btn-text { + height:18px; +} + +.x-btn-icon .x-btn-small .x-btn-text { + width:18px; +} + +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { + padding-left:21px !important; +} + +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text { + padding-right:21px !important; +} + +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text { + padding-left:29px !important; +} + +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text { + padding-right:29px !important; +} + +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text { + padding-left:37px !important; +} + +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text { + padding-right:37px !important; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/access/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#fff; +} + +.x-btn-disabled *{ + color:#eee !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/access/button/arrow.gif); + padding-right:13px; +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow.gif); + padding-right:20px; +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/access/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #d2d2d2; +} + +.x-btn-group-tc { + background-image: url(../images/access/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/access/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/access/button/group-lr.gif); +} + +.x-btn-group-mr { + background-image: url(../images/access/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/access/button/group-tb.gif); +} +.x-toolbar{ + border-color:#18181a; + background-color:#393d4e; + background-image:url(../images/access/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 14px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/access/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/access/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/access/grid/grid-blue-split.gif); +} + +.x-toolbar .x-btn { + padding-left:3px; + padding-right:3px; +} + +.x-toolbar .x-btn-mc em.x-btn-arrow { + padding-right:10px; +} + +.x-toolbar .x-btn-text-icon .x-btn-icon-small-left .x-btn-text { + padding-left:18px !important; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + padding-right:14px; +} + +.x-tbar-page-first{ + background-image: url(../images/access/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/access/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/access/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/access/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/access/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/access/grid/loading.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/access/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/access/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/access/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/access/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/access/toolbar/more.gif) !important; +} + +.x-statusbar .x-status-busy { + background-image: url(../images/access/grid/loading.gif); +} + +.x-statusbar .x-status-text-panel { + border-color: #99bbe8 #fff #fff #99bbe8; +} +.x-resizable-handle { + background-color:#fff; + color: #000; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/access/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/access/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/access/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/access/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/access/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/access/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/access/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#1f2933; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#223; +} + +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + border-left-color:#556; + border-right-color:#223; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border:0 none; + border-bottom:1px solid #111; + border-right:1px solid #1a1a1c; +} + +.x-grid3-row-alt{ + background-color:#1b232b; +} + +.x-grid3-row-over { + background-color:#7e5530; +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#3b3f50; + background-image:url(../images/access/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#889; + border-right-color:#445; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#4e628a; + background-image:url(../images/access/grid/grid3-hrow-over.gif); +} + +.x-grid3-cell-inner, .x-grid3-hd-inner { + color:#fff; +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/access/grid/sort_asc.gif); + width:15px; + height:9px; + margin-left:5px; +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/access/grid/sort_desc.gif); + width:15px; + height:9px; + margin-left:5px; +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#fff; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#fff; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/access/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +.x-grid3-row-selected { + background-color: #e5872c !important; + background-image: none; + border-style: solid; +} + +.x-grid3-row-selected .x-grid3-cell { + color: #fff; +} + +.x-grid3-cell-selected { + background-color: #ffa340 !important; + color:#fff; +} + +.x-grid3-cell-selected span{ + color:#fff !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#fff; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#fff; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#fff !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/access/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/access/grid/grid3-special-col-bg.gif) !important; + color:#fff !important; +} +.x-props-grid .x-grid3-td-value { + color:#fff !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#263240 !important; + border-right-color:#223; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c2c9d0; + background-image:url(../images/access/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/access/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#fff; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/access/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#4e628a; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/access/grid/group-collapse.gif); + background-position:3px 6px; + color:#ffd; + font:bold 14px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/access/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 14px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 14px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +} +.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/access/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/access/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.ext-ie .x-tree-node-el input { + width:14px; + height:14px; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/access/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/access/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/access/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/access/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/access/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/access/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/access/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#fff; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#fff; +} + +.x-tree-node .x-tree-selected a, .x-dd-drag-ghost a{ + color:#fff; +} + +.x-tree-node .x-tree-selected a span, .x-dd-drag-ghost a span{ + color:#fff; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #7e5530; +} + +.x-tree-node .x-tree-selected { + background-color: #e5872c; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} +.x-date-picker { + border-color: #737b8c; + background-color:#21252e; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/access/shared/hd-sprite.gif); + color:#fff; + font:bold 14px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/access/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/access/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/access/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#363d4a; + background-image:url(../images/access/toolbar/bg.gif); + border-bottom-color:#535b5c; + font:normal 13px arial, helvetica,tahoma,sans-serif; + color:#fff; +} + +.x-date-inner td { + border-color:#112; +} + +.x-date-inner a { + font:normal 14px arial, helvetica,tahoma,sans-serif; + color:#fff; + padding:2px 7px 1px 3px; /* Structure to account for larger, bolder fonts in Access theme. */ +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-color:#e5872c; + background-image:none; + border-color:#864900; + padding:1px 6px 1px 2px; /* Structure to account for larger, bolder fonts in Access theme. */ +} + +.x-date-inner .x-date-today a{ + border-color:#99a; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#737b8c; + background-color:#464d5a; + background-image:url(../images/access/shared/glass-bg.gif); +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#fff; + background-color:#7e5530; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:13px; + color:#000; +} + +.x-date-mp { + background-color:#21252e; +} + +.x-date-mp td { + font:normal 14px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#083772; + color:#fff; + border-color: #3366cc #000055 #000055 #3366cc; + font:normal 14px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color: #dfecfb; + background-image: url(../images/access/shared/glass-bg.gif); +} + +.x-date-mp-btns td { + border-top-color: #c5d2df; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color:#fff; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#fff; + background-color: #7e5530; +} + +td.x-date-mp-sel a { + background-color: #e5872c; + background-image: none; + border-color:#864900; +} + +.x-date-mp-ybtn a { + background-image:url(../images/access/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#c5d2df; +} +.x-tip .x-tip-close{ + background-image: url(../images/access/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/access/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 14px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 14px tahoma,arial,helvetica,sans-serif; + color:#ffd; +} + +.x-tip .x-tip-body { + font: normal 14px tahoma,arial,helvetica,sans-serif; + color:#000; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/access/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/access/qtip/tip-anchor-sprite.gif); +} +.x-menu { + border-color:#222; + background-color:#414551; + background-image:url(../images/access/menu/menu.gif); +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 14px tahoma,arial, sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/access/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#223; + border-bottom-color:#666; +} + +a.x-menu-item { + color:#fffff6; +} + +.x-menu-item-active { + background-color: #f09134; + background-image: none; + border-color:#b36427; +} + +.x-menu-item-active a.x-menu-item { + border-color:#b36427; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/access/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 15px; +} + +.x-box-mc h3 { + font-size: 18px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +} +.x-combo-list { + border:2px solid #232732; + background-color:#555566; + font:normal 15px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#414551; +} + +.x-combo-list-hd { + font:bold 14px tahoma, arial, helvetica, sans-serif; + color:#fff; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#98c0f4; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#98c0f4; +} + +.x-combo-list-item { + border-color:#556; +} + +.x-combo-list .x-combo-selected { + border-color:#e5872c !important; + background-color:#e5872c; +} + +.x-combo-list .x-toolbar { + border-top-color:#98c0f4; +} + +.x-combo-list-small { + font:normal 14px tahoma, arial, helvetica, sans-serif; +} +.x-panel { + border-color: #18181a; + font-size: 14px; +} + +.x-panel-header { + color:#fff; + font-weight:bold; + font-size: 14px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#18181a; + background-image: url(../images/access/panel/white-top-bottom.gif); +} + +.x-panel-body { + color: #fffff6; + border-color:#18181a; + background-color:#232d38; +} + +.x-tab-panel .x-panel-body { + color: #fffff6; + border-color:#18181a; + background-color:#1f2730; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#223; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#223; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#223; +} + +.x-panel-tl .x-panel-header { + color:#fff; + font:bold 14px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/access/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/access/panel/corners-sprite.gif); + border-bottom-color:#222224; +} + +.x-panel-bc { + background-image: url(../images/access/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 14px tahoma,arial,helvetica,sans-serif; + background-color:#3f4757; +} + +.x-panel-ml { + background-image:url(../images/access/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/access/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/access/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#3f4757; +} + +.x-panel-ghost ul { + border-color:#18181a; +} + +.x-panel-dd-spacer { + border-color:#18181a; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 14px arial,tahoma, helvetica, sans-serif; +} +.x-window-proxy { + background-color:#1f2833; + border-color:#18181a; +} + +.x-window-tl .x-window-header { + color:#fff; + font:bold 14px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/access/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/access/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/access/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/access/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/access/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/access/window/right-corners.png); +} + +.x-window-mc { + border-color:#18181a; + font: normal 14px tahoma,arial,helvetica,sans-serif; + background-color:#1f2833; +} + +.x-window-ml { + background-image: url(../images/access/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/access/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#323945; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#323945; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#323945; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #464f61; + border-color: #636778; +} + +.x-window-plain .x-window-body { + color: #fffff6; + border-color: #464F61; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #464f61; +} +.x-html-editor-wrap { + border-color:#737B8C; + background-color:#fff; +} +.x-html-editor-wrap iframe { + background-color: #fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/access/editor/tb-sprite.gif); +}.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#343d4e; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#343d4e; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#343d4e; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#343d4e; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#343d4e; +} +.x-border-layout-ct { + background-color:#3f4757; +} + +.x-accordion-hd { + color:#fff; + font-weight:normal; + background-image: url(../images/access/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#323845; + border-color:#1a1a1c; +} + +.x-layout-collapsed-over{ + background-color:#2d3440; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-progress-wrap { + border-color:#18181a; +} + +.x-progress-inner { + background-color:#232d38; + background-image:none; +} + +.x-progress-bar { + background-color:#f39a00; + background-image:url(../images/access/progress/progress-bg.gif); + border-top-color:#a66900; + border-bottom-color:#a66900; + border-right-color:#ffb941; + height: 20px !important; /* structural override for Accessibility Theme */ +} + +.x-progress-text { + font-size:14px; + font-weight:bold; + color:#fff; + padding: 0 5px !important; /* structural override for Accessibility Theme */ +} + +.x-progress-text-back { + color:#aaa; + line-height: 19px; +} +.x-list-header{ + background-color:#393d4e; + background-image:url(../images/access/toolbar/bg.gif); + background-position:0 top; +} + +.x-list-header-inner div em { + border-left-color:#667; + font:normal 14px arial, tahoma, helvetica, sans-serif; + line-height: 14px; +} + +.x-list-body-inner { + background-color:#1B232B; +} + +.x-list-body dt em { + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#7E5530; +} + +.x-list-selected { + background-color:#E5872C; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/access/grid/sort-hd.gif); + border-color: #3e4e6c; +} +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/access/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/access/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/access/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/access/slider/slider-v-thumb.png); +} +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:15px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 15px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/access/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/access/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/access/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/access/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/access/window/icon-error.gif); +} diff --git a/src/webui/static/extjs/resources/css/xtheme-blue.css b/src/webui/static/extjs/resources/css/xtheme-blue.css new file mode 100644 index 00000000..a6d1502e --- /dev/null +++ b/src/webui/static/extjs/resources/css/xtheme-blue.css @@ -0,0 +1,1674 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#6593cf; + background-color:#c3daf9; + background-image:url(../images/default/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#a3bad9; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #deecfd; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} +.x-tab-panel-header, .x-tab-panel-footer { + background-color: #deecfd; + border-color:#8db2e3; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#8db2e3; +} + +ul.x-tab-strip-top{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-bg.gif); + border-bottom-color:#8db2e3; +} + +ul.x-tab-strip-bottom{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); + border-top-color:#8db2e3; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#8db2e3; + background-color: #deecfd; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#15428b; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/default/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#8db2e3; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/default/tabs/scroll-left.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/default/tabs/scroll-right.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#99bbe8; +}.x-form-field { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field { + background-color:#fff; + background-image:url(../images/default/form/text-bg.gif); + border-color:#b5b8c8; +} + +.x-form-select-one { + background-color:#fff; + border-color:#b5b8c8; +} + +.x-form-check-group-label { + border-bottom: 1px solid #99bbe8; + color: #15428b; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger { + background-image:url(../images/default/form/trigger.gif); + border-bottom-color:#b5b8c8; +} + +.x-form-field-wrap .x-form-date-trigger { + background-image: url(../images/default/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger { + background-image: url(../images/default/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger { + background-image: url(../images/default/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger { + border-bottom-color:#7eadd9; +} + +.x-item-disabled .x-form-trigger-over { + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click { + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus { + border-color:#7eadd9; +} + +.x-form-invalid, textarea.x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-invalid.x-form-composite { + border: none; + background-image: none; +} + +.x-form-invalid.x-form-composite .x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:gray; +} + +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.ext-webkit .x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-fieldset { + border-color:#b5b8c8; +} + +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; +} +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/default/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #3e6aaa; +} + +.x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/default/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/default/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +}.x-toolbar{ + border-color:#a9bfd3; + background-color:#d0def0; + background-image:url(../images/default/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-blue-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/default/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/default/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/refresh-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +}.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/default/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/default/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/default/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/default/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/default/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/default/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/default/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#99bbe8; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#aaccf6; + border-right-color:#aaccf6; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#15428b; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +td.grid-hd-group-cell { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; +} + +.x-grid3-row-selected { + background-color: #dfe8f6 !important; + background-image: none; + border-color:#a3bae9; +} + +.x-grid3-cell-selected{ + background-color: #b8cfee !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#15428b !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c3daf9; + background-image:url(../images/default/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/default/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#99bbe8; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-collapse.gif); + color:#3764a0; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +}.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +}.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #d9e8fb; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +}.x-date-picker { + border-color: #1b376c; + background-color:#fff; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/default/shared/hd-sprite.gif); + color:#fff; + font:bold 11px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/default/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/default/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-bottom-color:#a3bad9; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#233d6d; +} + +.x-date-inner td { + border-color:#fff; +} + +.x-date-inner a { + font:normal 11px arial, helvetica,tahoma,sans-serif; + color:#000; +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-inner .x-date-today a{ + border-color:darkred; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#a3bad9; + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#000; + background-color:#ddecfe; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:10px; + color:#000; +} + +.x-date-mp { + background-color:#fff; +} + +.x-date-mp td { + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#083772; + color:#fff; + border-color: #3366cc #000055 #000055 #3366cc; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); +} + +.x-date-mp-btns td { + border-top-color: #c5d2df; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color:#15428b; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#15428b; + background-color: #ddecfe; +} + +td.x-date-mp-sel a { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-mp-ybtn a { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#c5d2df; +}.x-tip .x-tip-close{ + background-image: url(../images/default/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/default/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/default/qtip/tip-anchor-sprite.gif); +}.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#718bb7; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/default/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/default/menu/item-over.gif); + background-color: #dbecf4; + border-color:#aaccf6; +} + +.x-menu-item-active a.x-menu-item { + border-color:#aaccf6; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/default/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#f0f0f0 !important; + background-image: none; +} + +.x-date-menu, .x-color-menu{ + background-color: #fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +}.x-combo-list { + border-color:#98c0f4; + background-color:#ddecfe; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#fff; +} + +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#98c0f4; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#98c0f4; +} + +.x-combo-list-item { + border-color:#fff; +} + +.x-combo-list .x-combo-selected{ + border-color:#a3bae9 !important; + background-color:#dfe8f6; +} + +.x-combo-list .x-toolbar { + border-top-color:#98c0f4; +} + +.x-combo-list-small { + font:normal 11px tahoma, arial, helvetica, sans-serif; +}.x-panel { + border-color: #99bbe8; +} + +.x-panel-header { + color:#15428b; + font-weight:bold; + font-size: 11px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#99bbe8; + background-image: url(../images/default/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#99bbe8; + background-color:#fff; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#99bbe8; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#99bbe8; +} + +.x-panel-tl .x-panel-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/default/panel/corners-sprite.gif); + border-bottom-color:#99bbe8; +} + +.x-panel-bc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-panel-ml { + background-color: #fff; + background-image:url(../images/default/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/default/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#cbddf3; +} + +.x-panel-ghost ul { + border-color:#99bbe8; +} + +.x-panel-dd-spacer { + border-color:#99bbe8; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} +.x-window-proxy { + background-color:#c7dffc; + border-color:#99bbe8; +} + +.x-window-tl .x-window-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-mc { + border-color:#99bbe8; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-window-ml { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#99bbe8; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#84a0c4; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #ccd9e8; + border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; +} + +.x-window-plain .x-window-body { + border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #ccd9e8; +}.x-html-editor-wrap { + border-color:#a9bfd3; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +}.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +}.x-border-layout-ct { + background-color:#dfe8f6; +} + +.x-accordion-hd { + color:#222; + font-weight:normal; + background-image: url(../images/default/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#d2e0f2; + border-color:#98c0f4; +} + +.x-layout-collapsed-over{ + background-color:#d9e8fb; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +}.x-progress-wrap { + border-color:#6593cf; +} + +.x-progress-inner { + background-color:#e0e8f3; + background-image:url(../images/default/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#9cbfee; + background-image:url(../images/default/progress/progress-bg.gif); + border-top-color:#d1e4fd; + border-bottom-color:#7fa9e4; + border-right-color:#7fa9e4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#396095; +}.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#dfe8f6; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/default/grid/sort-hd.gif); + border-color: #99bbe8; +}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/default/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/default/slider/slider-v-thumb.png); +}.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/default/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/default/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/default/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/default/window/icon-error.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/css/xtheme-gray.css b/src/webui/static/extjs/resources/css/xtheme-gray.css index 62549bd7..8dc9c2a5 100644 --- a/src/webui/static/extjs/resources/css/xtheme-gray.css +++ b/src/webui/static/extjs/resources/css/xtheme-gray.css @@ -1,415 +1,1682 @@ -/* - * Ext JS Library 2.2 - * Copyright(c) 2006-2008, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -.x-panel { - border-style: solid; - border-color: #d0d0d0; -} -.x-panel-header { - color:#333; - border:1px solid #d0d0d0; - background-image:url(../images/gray/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#d0d0d0; -} - -.x-panel-bbar .x-toolbar { - border-color:#d0d0d0; -} - -.x-panel-tbar .x-toolbar { - border-color:#d0d0d0; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-color:#d0d0d0; -} -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-color:#d0d0d0; -} -.x-panel-tl .x-panel-header { - color:#333; -} -.x-panel-tc { - background-image:url(../images/gray/panel/top-bottom.gif); -} -.x-panel-tl { - background-image:url(../images/gray/panel/corners-sprite.gif); - border-color:#d0d0d0; -} -.x-panel-tr { - background-image:url(../images/gray/panel/corners-sprite.gif); -} -.x-panel-bc { - background-image:url(../images/gray/panel/top-bottom.gif); -} -.x-panel-bl { - background-image:url(../images/gray/panel/corners-sprite.gif); -} -.x-panel-br { - background-image:url(../images/gray/panel/corners-sprite.gif); -} -.x-panel-mc { - background:#f1f1f1; -} -.x-panel-mc .x-panel-body { - background:transparent; - border: 0 none; -} -.x-panel-ml { - background-image:url(../images/gray/panel/left-right.gif); -} -.x-panel-mr { - background-image:url(../images/gray/panel/left-right.gif); -} - -/* Tools */ -.x-tool { - background-image:url(../images/gray/panel/tool-sprites.gif); -} - -/* Ghosting */ -.x-panel-ghost { - background:#e0e0e0; -} - -.x-panel-ghost ul { - border-color:#b0b0b0; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border:1px solid #d0d0d0; -} - -/* Buttons */ - -.x-btn-left{ - background-image:url(../images/gray/button/btn-sprite.gif); -} -.x-btn-right{ - background-image:url(../images/gray/button/btn-sprite.gif); -} -.x-btn-center{ - background-image:url(../images/gray/button/btn-sprite.gif); -} - -/* Layout classes */ - -.x-border-layout-ct { - background:#f0f0f0; -} - -.x-accordion-hd { - background-image:url(../images/gray/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#eee; - border-color:#e0e0e0; -} -.x-layout-collapsed-over{ - background-color:#fbfbfb; -} - - -/* qtips */ -.x-tip .x-tip-top { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-top-left { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-top-right { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-ft { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-ft-left { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-ft-right { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-bd-left { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} -.x-tip .x-tip-bd-right { - background-image:url(../images/gray/qtip/tip-sprite.gif); -} - -/* Toolbars */ - -.x-toolbar{ - border-color:#d0d0d0; - background:#f0f4f5 url(../images/gray/toolbar/bg.gif) repeat-x top left; -} -.x-toolbar button { - color:#444; -} -.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button { - background-image:url(../images/gray/toolbar/btn-arrow.gif); -} -.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button { - background-image:url(../images/gray/toolbar/btn-arrow.gif); -} -.x-toolbar .x-btn-over .x-btn-left{ - background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); -} -.x-toolbar .x-btn-over .x-btn-right{ - background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); -} -.x-toolbar .x-btn-over .x-btn-center{ - background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); -} -.x-toolbar .x-btn-over button { - color:#111; -} -.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{ - background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); -} -.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{ - background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); -} - -.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{ - background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); -} -.x-toolbar .ytb-sep { - background-image: url(../images/default/grid/grid-split.gif); -} - -/* Tabs */ - -.x-tab-panel-header, .x-tab-panel-footer { - background: #EAEAEA; - border-color:#d0d0d0; -} - - -.x-tab-panel-header { - border-color:#d0d0d0; -} - -.x-tab-panel-footer { - border-color:#d0d0d0; -} - -ul.x-tab-strip-top{ - background:#dbdbdb url(../images/gray/tabs/tab-strip-bg.gif) repeat-x left top; - border-color:#d0d0d0; - padding-top: 2px; -} - -ul.x-tab-strip-bottom{ - background-image:url(../images/gray/tabs/tab-strip-btm-bg.gif); - border-color:#d0d0d0; -} - -.x-tab-strip span.x-tab-strip-text { - color:#333; -} -.x-tab-strip-over span.x-tab-strip-text { - color:#111; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#333; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right { - background-image:url(../images/gray/tabs/tabs-sprite.gif); -} - -.x-tab-strip-top .x-tab-left { - background-image:url(../images/gray/tabs/tabs-sprite.gif); -} -.x-tab-strip-top .x-tab-strip-inner { - background-image:url(../images/gray/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image:url(../images/gray/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image:url(../images/gray/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image:url(../images/gray/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image:url(../images/gray/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/gray/tabs/tab-close.gif); -} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/gray/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#d0d0d0; - background:#fff; -} -.x-tab-panel-bbar .x-toolbar { - border-color: #d0d0d0; -} - -.x-tab-panel-tbar .x-toolbar { - border-color: #d0d0d0; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer { - border-color:#d0d0d0; - background: #eaeaea; -} - -.x-tab-scroller-left { - background-image: url(../images/gray/tabs/scroll-left.gif); - border-color:#aeaeae; -} -.x-tab-scroller-right { - background-image: url(../images/gray/tabs/scroll-right.gif); - border-color:#aeaeae; -} - -/* Window */ - -.x-window-proxy { - background:#e0e0e0; - border-color:#b0b0b0; -} - -.x-window-tl .x-window-header { - color:#555; -} -.x-window-tc { - background-image:url(../images/gray/window/top-bottom.png); -} -.x-window-tl { - background-image:url(../images/gray/window/left-corners.png); -} -.x-window-tr { - background-image:url(../images/gray/window/right-corners.png); -} -.x-window-bc { - background-image:url(../images/gray/window/top-bottom.png); -} -.x-window-bl { - background-image:url(../images/gray/window/left-corners.png); -} -.x-window-br { - background-image:url(../images/gray/window/right-corners.png); -} -.x-window-mc { - border:1px solid #d0d0d0; - background:#e8e8e8; -} - -.x-window-ml { - background-image:url(../images/gray/window/left-right.png); -} -.x-window-mr { - background-image:url(../images/gray/window/left-right.png); -} -.x-panel-ghost .x-window-tl { - border-color:#d0d0d0; -} -.x-panel-collapsed .x-window-tl { - border-color:#d0d0d0; -} - -.x-window-plain .x-window-mc { - background: #e8e8e8; - border-right:1px solid #eee; - border-bottom:1px solid #eee; - border-top:1px solid #d0d0d0; - border-left:1px solid #d0d0d0; -} - -.x-window-plain .x-window-body { - border-left:1px solid #eee; - border-top:1px solid #eee; - border-bottom:1px solid #d0d0d0; - border-right:1px solid #d0d0d0; - background:transparent !important; -} - -body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc { - background-color: #e4e4e4; -} - - -/* misc */ -.x-html-editor-wrap { - border-color:#d0d0d0; -} - -/* Borders go last for specificity */ -.x-panel-noborder .x-panel-body-noborder { - border-width:0; -} - -.x-panel-noborder .x-panel-header-noborder { - border-width:0; - border-bottom:1px solid #d0d0d0; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-width:0; - border-bottom:1px solid #d0d0d0; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-width:0; - border-top:1px solid #d0d0d0; -} - -.x-window-noborder .x-window-mc { - border-width:0; -} -.x-window-plain .x-window-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-header-noborder { - border-top-width:0; - border-left-width:0; - border-right-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-footer-noborder { - border-bottom-width:0; - border-left-width:0; - border-right-width:0; -} - - -.x-tab-panel-bbar-noborder .x-toolbar { - border-width:0; - border-top:1px solid #d0d0d0; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-width:0; - border-bottom:1px solid #d0d0d0; -} \ No newline at end of file +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#999; + background-color:#ddd; + background-image:url(../images/gray/panel/white-top-bottom.gif); + background-position: 0 -1px; +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#d0d0d0; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#CFCFCF; + background-color: #eaeaea; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #eaeaea; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +}.x-tab-panel-header, .x-tab-panel-footer { + background-color: #eaeaea; + border-color:#d0d0d0; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#d0d0d0; +} + +ul.x-tab-strip-top{ + background-color:#dbdbdb; + background-image: url(../images/gray/tabs/tab-strip-bg.gif); + border-bottom-color:#d0d0d0; +} + +ul.x-tab-strip-bottom{ + background-color:#dbdbdb; + background-image: url(../images/gray/tabs/tab-strip-btm-bg.gif); + border-top-color:#d0d0d0; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#d0d0d0; + background-color: #eaeaea; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#333; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#111; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#333; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/gray/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/gray/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/gray/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { + background-image: url(../images/gray/tabs/tab-btm-over-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { + background-image: url(../images/gray/tabs/tab-btm-over-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/gray/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/gray/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/gray/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/gray/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#d0d0d0; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/gray/tabs/scroll-left.gif); + border-bottom-color:#d0d0d0; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/gray/tabs/scroll-right.gif); + border-bottom-color:#d0d0d0; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#d0d0d0; +} +.x-form-field{ + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field{ + background-color:#fff; + background-image:url(../images/default/form/text-bg.gif); + border-color:#C1C1C1; +} + +.x-form-select-one { + background-color:#fff; + border-color:#C1C1C1; +} + +.x-form-check-group-label { + border-bottom: 1px solid #d0d0d0; + color: #333; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger{ + background-image:url(../images/gray/form/trigger.gif); + border-bottom-color:#b5b8c8; +} + +.x-form-field-wrap .x-form-date-trigger{ + background-image: url(../images/gray/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger{ + background-image: url(../images/gray/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger{ + background-image: url(../images/gray/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom-color: #777777; +} + +.x-item-disabled .x-form-trigger-over{ + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click{ + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus{ + border-color:#777777; +} + +.x-form-invalid, textarea.x-form-invalid{ + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.ext-webkit .x-form-invalid{ + background-color:#fee; + border-color:#ff7870; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:gray; +} + +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.ext-webkit .x-small-editor .x-form-field { + font:normal 12px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-fieldset { + border-color:#CCCCCC; +} + +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#777777; +}.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/gray/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/gray/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/gray/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #666; +} + +.x-btn-group-tc { + background-image: url(../images/gray/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/gray/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/gray/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/gray/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/gray/button/group-tb.gif); +} +.x-toolbar{ + border-color:#d0d0d0; + background-color:#f0f0f0; + background-image:url(../images/gray/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/gray/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/gray/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/gray/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/gray/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/gray/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/gray/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/gray/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/loading.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/gray/toolbar/more.gif) !important; +} +.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/gray/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/gray/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/gray/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/gray/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/gray/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/gray/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/gray/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#565656; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#d0d0d0; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow2.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#ACACAC; + border-right-color:#ACACAC; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow-over2.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/gray/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/gray/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#333; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow-over2.gif); + border-color:#ACACAC; +} + +.col-move-top{ + background-image:url(../images/gray/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/gray/grid/col-move-bottom.gif); +} + +.x-grid3-row-selected { + background-color:#CCCCCC !important; + background-image: none; + border-color:#ACACAC; +} + +.x-grid3-cell-selected{ + background-color: #CBCBCB !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#333 !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/gray/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/gray/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#d0d0d0; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/gray/grid/group-collapse.gif); + color:#5F5F5F; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/gray/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#B9B9B9; +} +.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/gray/grid/grid3-hrow2.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #D0D0D0; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#D6D6D6; + border-color:#888888; +}.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.ext-ie .x-tree-node-el input { + width:15px; + height:15px; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #ddd; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} +.x-date-picker { + border-color:#585858; + background-color:#fff; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/gray/shared/hd-sprite.gif); + color:#fff; + font:bold 11px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/gray/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/gray/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/gray/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#D8D8D8; + background-image: url(../images/gray/panel/white-top-bottom.gif); + border-bottom-color:#AFAFAF; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#595959; +} + +.x-date-inner td { + border-color:#fff; +} + +.x-date-inner a { + font:normal 11px arial, helvetica,tahoma,sans-serif; + color:#000; +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-image: none; + background-color:#D8D8D8; + border-color:#DCDCDC; +} + +.x-date-inner .x-date-today a{ + border-color:darkred; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#AFAFAF; + background-color:#D8D8D8; + background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#000; + background-color:#D8D8D8; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:10px; + color:#000; +} + +.x-date-mp { + background-color:#fff; +} + +.x-date-mp td { + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#4E565F; + color:#fff; + border-color:#C0C0C0 #434343 #434343 #C0C0C0; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color:#D8D8D8; + background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; +} + +.x-date-mp-btns td { + border-top-color:#AFAFAF; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color: #333; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#333; + background-color:#FDFDFD; +} + +td.x-date-mp-sel a { + background-color:#D8D8D8; + background:#D8D8D8 url(../images/gray/panel/white-top-bottom.gif) 0 -2px; + border-color:#DCDCDC; +} + +.x-date-mp-ybtn a { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#D7D7D7; +}.x-tip .x-tip-close{ + background-image: url(../images/gray/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/gray/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/gray/qtip/tip-anchor-sprite.gif); +}.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#7D7D7D; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/gray/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/gray/menu/item-over.gif); + background-color: #f1f1f1; + border-color:#ACACAC; +} + +.x-menu-item-active a.x-menu-item { + border-color:#ACACAC; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/gray/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#fff !important; +} + +.x-menu .x-date-picker{ + border-color:#AFAFAF; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#B9B9B9 !important; + background-color:#F1F1F1; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +}.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +} +.x-combo-list { + border-color:#ccc; + background-color:#ddd; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#fff; +} + +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#333; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#BCBCBC; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#BEBEBE; +} + +.x-combo-list-item { + border-color:#fff; +} + +.x-combo-list .x-combo-selected{ + border-color:#777 !important; + background-color:#f0f0f0; +} + +.x-combo-list .x-toolbar { + border-top-color:#BCBCBC; +} + +.x-combo-list-small { + font:normal 11px tahoma, arial, helvetica, sans-serif; +}.x-panel { + border-color: #d0d0d0; +} + +.x-panel-header { + color:#333; + font-weight:bold; + font-size: 11px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#d0d0d0; + background-image: url(../images/gray/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#d0d0d0; + background-color:#fff; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#d0d0d0; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#d0d0d0; +} + +.x-panel-tl .x-panel-header { + color:#333; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/gray/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/gray/panel/corners-sprite.gif); + border-bottom-color:#d0d0d0; +} + +.x-panel-bc { + background-image: url(../images/gray/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#f1f1f1; +} + +.x-panel-ml { + background-color: #fff; + background-image:url(../images/gray/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/gray/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#f2f2f2; +} + +.x-panel-ghost ul { + border-color:#d0d0d0; +} + +.x-panel-dd-spacer { + border-color:#d0d0d0; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} +.x-window-proxy { + background-color:#fcfcfc; + border-color:#d0d0d0; +} + +.x-window-tl .x-window-header { + color:#555; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/gray/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/gray/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/gray/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/gray/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/gray/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/gray/window/right-corners.png); +} + +.x-window-mc { + border-color:#d0d0d0; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#e8e8e8; +} + +.x-window-ml { + background-image: url(../images/gray/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/gray/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#d0d0d0; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#d0d0d0; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #E8E8E8; + border-color: #D0D0D0 #EEEEEE #EEEEEE #D0D0D0; +} + +.x-window-plain .x-window-body { + border-color: #EEEEEE #D0D0D0 #D0D0D0 #EEEEEE; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #E4E4E4; +} +.x-html-editor-wrap { + border-color:#BCBCBC; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +} +.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#d0d0d0; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#d0d0d0; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#d0d0d0; +} + +.x-border-layout-ct { + background-color:#f0f0f0; +} +.x-border-layout-ct { + background-color:#f0f0f0; +} + +.x-accordion-hd { + color:#222; + font-weight:normal; + background-image: url(../images/gray/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#dfdfdf; + border-color:#d0d0d0; +} + +.x-layout-collapsed-over{ + background-color:#e7e7e7; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-progress-wrap { + border-color:#8E8E8E; +} + +.x-progress-inner { + background-color:#E7E7E7; + background-image:url(../images/gray/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#BCBCBC; + background-image:url(../images/gray/progress/progress-bg.gif); + border-top-color:#E2E2E2; + border-bottom-color:#A4A4A4; + border-right-color:#A4A4A4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#5F5F5F; +} +.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow2.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#f0f0f0; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/gray/grid/sort-hd.gif); + border-color: #d0d0d0; +} +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/gray/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/gray/slider/slider-v-thumb.png); +} +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/gray/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/gray/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/gray/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/gray/window/icon-error.gif); +} diff --git a/src/webui/static/extjs/resources/css/yourtheme.css b/src/webui/static/extjs/resources/css/yourtheme.css new file mode 100644 index 00000000..ae791943 --- /dev/null +++ b/src/webui/static/extjs/resources/css/yourtheme.css @@ -0,0 +1,1652 @@ +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#6593cf; + background-color:#c3daf9; + background-image:url(../images/default/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#a3bad9; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #deecfd; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} +.x-tab-panel-header, .x-tab-panel-footer { + background-color: #deecfd; + border-color:#8db2e3; + overflow:hidden; + zoom:1; +} + +.x-tab-panel-header, .x-tab-panel-footer { + border-color:#8db2e3; +} + +ul.x-tab-strip-top{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-bg.gif); + border-bottom-color:#8db2e3; +} + +ul.x-tab-strip-bottom{ + background-color:#cedff5; + background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); + border-top-color:#8db2e3; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-color:#8db2e3; + background-color: #deecfd; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#15428b; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ + background-image: url(../images/default/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image: url(../images/default/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image: url(../images/default/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/default/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#8db2e3; + background-color:#fff; +} + +.x-tab-panel-body-top { + border-top: 0 none; +} + +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background-image:url(../images/default/tabs/scroll-left.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-scroller-left-over { + background-position: 0 0; +} + +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scroller-right { + background-image:url(../images/default/tabs/scroll-right.gif); + border-bottom-color:#8db2e3; +} + +.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { + border-color:#99bbe8; +}.x-form-field { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-text, textarea.x-form-field { + background-color:#fff; + background-image:url(../images/default/form/text-bg.gif); + border-color:#b5b8c8; +} + +.x-form-select-one { + background-color:#fff; + border-color:#b5b8c8; +} + +.x-form-check-group-label { + border-bottom: 1px solid #99bbe8; + color: #15428b; +} + +.x-editor .x-form-check-wrap { + background-color:#fff; +} + +.x-form-field-wrap .x-form-trigger { + background-image:url(../images/default/form/trigger.gif); + border-bottom-color:#b5b8c8; +} + +.x-form-field-wrap .x-form-date-trigger { + background-image: url(../images/default/form/date-trigger.gif); +} + +.x-form-field-wrap .x-form-clear-trigger { + background-image: url(../images/default/form/clear-trigger.gif); +} + +.x-form-field-wrap .x-form-search-trigger { + background-image: url(../images/default/form/search-trigger.gif); +} + +.x-trigger-wrap-focus .x-form-trigger { + border-bottom-color:#7eadd9; +} + +.x-item-disabled .x-form-trigger-over { + border-bottom-color:#b5b8c8; +} + +.x-item-disabled .x-form-trigger-click { + border-bottom-color:#b5b8c8; +} + +.x-form-focus, textarea.x-form-focus { + border-color:#7eadd9; +} + +.x-form-invalid, textarea.x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-invalid.x-form-composite { + border: none; + background-image: none; +} + +.x-form-invalid.x-form-composite .x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); +} + +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-form-invalid-msg { + color:#c0272b; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background-image:url(../images/default/shared/warning.gif); +} + +.x-form-empty-field { + color:gray; +} + +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.ext-webkit .x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-form-invalid-icon { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-fieldset { + border-color:#b5b8c8; +} + +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; +} +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/default/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #3e6aaa; +} + +.x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/default/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/default/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +}.x-toolbar{ + border-color:#a9bfd3; + background-color:#d0def0; + background-image:url(../images/default/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-blue-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/default/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/default/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/refresh-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +}.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/default/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/default/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/default/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/default/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/default/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/default/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/default/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#99bbe8; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#aaccf6; + border-right-color:#aaccf6; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#15428b; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +td.grid-hd-group-cell { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; +} + +.x-grid3-row-selected { + background-color: #dfe8f6 !important; + background-image: none; + border-color:#a3bae9; +} + +.x-grid3-cell-selected{ + background-color: #b8cfee !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#15428b !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c3daf9; + background-image:url(../images/default/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/default/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#99bbe8; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-collapse.gif); + color:#3764a0; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +}.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +}.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #d9e8fb; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +}.x-date-picker { + border-color: #1b376c; + background-color:#fff; +} + +.x-date-middle,.x-date-left,.x-date-right { + background-image: url(../images/default/shared/hd-sprite.gif); + color:#fff; + font:bold 11px "sans serif", tahoma, verdana, helvetica; +} + +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} + +.x-date-middle .x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/toolbar/btn-arrow-light.gif); +} + +.x-date-right a { + background-image: url(../images/default/shared/right-btn.gif); +} + +.x-date-left a{ + background-image: url(../images/default/shared/left-btn.gif); +} + +.x-date-inner th { + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-bottom-color:#a3bad9; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#233d6d; +} + +.x-date-inner td { + border-color:#fff; +} + +.x-date-inner a { + font:normal 11px arial, helvetica,tahoma,sans-serif; + color:#000; +} + +.x-date-inner .x-date-active{ + color:#000; +} + +.x-date-inner .x-date-selected a{ + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-inner .x-date-today a{ + border-color:darkred; +} + +.x-date-inner .x-date-selected span{ + font-weight:bold; +} + +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaa; +} + +.x-date-bottom { + border-top-color:#a3bad9; + background-color:#dfecfb; + background-image:url(../images/default/shared/glass-bg.gif); +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + color:#000; + background-color:#ddecfe; +} + +.x-date-inner .x-date-disabled a { + background-color:#eee; + color:#bbb; +} + +.x-date-mmenu{ + background-color:#eee !important; +} + +.x-date-mmenu .x-menu-item { + font-size:10px; + color:#000; +} + +.x-date-mp { + background-color:#fff; +} + +.x-date-mp td { + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns button { + background-color:#083772; + color:#fff; + border-color: #3366cc #000055 #000055 #3366cc; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} + +.x-date-mp-btns { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); +} + +.x-date-mp-btns td { + border-top-color: #c5d2df; +} + +td.x-date-mp-month a,td.x-date-mp-year a { + color:#15428b; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#15428b; + background-color: #ddecfe; +} + +td.x-date-mp-sel a { + background-color: #dfecfb; + background-image: url(../images/default/shared/glass-bg.gif); + border-color:#8db2e3; +} + +.x-date-mp-ybtn a { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +td.x-date-mp-sep { + border-right-color:#c5d2df; +}.x-tip .x-tip-close{ + background-image: url(../images/default/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/default/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/default/qtip/tip-anchor-sprite.gif); +}.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#718bb7; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/default/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/default/menu/item-over.gif); + background-color: #dbecf4; + border-color:#aaccf6; +} + +.x-menu-item-active a.x-menu-item { + border-color:#aaccf6; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/default/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#f0f0f0 !important; + background-image: none; +} + +.x-date-menu, .x-color-menu{ + background-color: #fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} +.x-box-tl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-tc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-tr { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-ml { + background-image: url(../images/default/box/l.gif); +} + +.x-box-mc { + background-color: #eee; + background-image: url(../images/default/box/tb.gif); + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; +} + +.x-box-mr { + background-image: url(../images/default/box/r.gif); +} + +.x-box-bl { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-bc { + background-image: url(../images/default/box/tb.gif); +} + +.x-box-br { + background-image: url(../images/default/box/corners.gif); +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +}.x-combo-list { + border-color:#98c0f4; + background-color:#ddecfe; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +.x-combo-list-inner { + background-color:#fff; +} + +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom-color:#98c0f4; +} + +.x-resizable-pinned .x-combo-list-inner { + border-bottom-color:#98c0f4; +} + +.x-combo-list-item { + border-color:#fff; +} + +.x-combo-list .x-combo-selected{ + border-color:#a3bae9 !important; + background-color:#dfe8f6; +} + +.x-combo-list .x-toolbar { + border-top-color:#98c0f4; +} + +.x-combo-list-small { + font:normal 11px tahoma, arial, helvetica, sans-serif; +}.x-panel { + border-color: #99bbe8; +} + +.x-panel-header { + color:#15428b; + font-weight:bold; + font-size: 11px; + font-family: tahoma,arial,verdana,sans-serif; + border-color:#99bbe8; + background-image: url(../images/default/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#99bbe8; + background-color:#fff; +} + +.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { + border-color:#99bbe8; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top-color:#99bbe8; +} + +.x-panel-tl .x-panel-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-panel-tc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ + background-image: url(../images/default/panel/corners-sprite.gif); + border-bottom-color:#99bbe8; +} + +.x-panel-bc { + background-image: url(../images/default/panel/top-bottom.gif); +} + +.x-panel-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-panel-ml { + background-color: #fff; + background-image:url(../images/default/panel/left-right.gif); +} + +.x-panel-mr { + background-image: url(../images/default/panel/left-right.gif); +} + +.x-tool { + background-image:url(../images/default/panel/tool-sprites.gif); +} + +.x-panel-ghost { + background-color:#cbddf3; +} + +.x-panel-ghost ul { + border-color:#99bbe8; +} + +.x-panel-dd-spacer { + border-color:#99bbe8; +} + +.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} +.x-window-proxy { + background-color:#c7dffc; + border-color:#99bbe8; +} + +.x-window-tl .x-window-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; +} + +.x-window-tc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-tl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-tr { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-bc { + background-image: url(../images/default/window/top-bottom.png); +} + +.x-window-bl { + background-image: url(../images/default/window/left-corners.png); +} + +.x-window-br { + background-image: url(../images/default/window/right-corners.png); +} + +.x-window-mc { + border-color:#99bbe8; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background-color:#dfe8f6; +} + +.x-window-ml { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-mr { + background-image: url(../images/default/window/left-right.png); +} + +.x-window-maximized .x-window-tc { + background-color:#fff; +} + +.x-window-bbar .x-toolbar { + border-top-color:#99bbe8; +} + +.x-panel-ghost .x-window-tl { + border-bottom-color:#99bbe8; +} + +.x-panel-collapsed .x-window-tl { + border-bottom-color:#84a0c4; +} + +.x-dlg-mask{ + background-color:#ccc; +} + +.x-window-plain .x-window-mc { + background-color: #ccd9e8; + border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; +} + +.x-window-plain .x-window-body { + border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background-color: #ccd9e8; +}.x-html-editor-wrap { + border-color:#a9bfd3; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +}.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +}.x-border-layout-ct { + background-color:#dfe8f6; +} + +.x-accordion-hd { + color:#222; + font-weight:normal; + background-image: url(../images/default/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#d2e0f2; + border-color:#98c0f4; +} + +.x-layout-collapsed-over{ + background-color:#d9e8fb; +} + +.x-layout-split-west .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-west .x-layout-mini { + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + background-image:url(../images/default/layout/mini-top.gif); +}.x-progress-wrap { + border-color:#6593cf; +} + +.x-progress-inner { + background-color:#e0e8f3; + background-image:url(../images/default/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#9cbfee; + background-image:url(../images/default/progress/progress-bg.gif); + border-top-color:#d1e4fd; + border-bottom-color:#7fa9e4; + border-right-color:#7fa9e4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#396095; +}.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#dfe8f6; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/default/grid/sort-hd.gif); + border-color: #99bbe8; +}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/default/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/default/slider/slider-v-thumb.png); +}.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/default/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/default/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/default/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/default/window/icon-error.gif); +} \ No newline at end of file diff --git a/src/webui/static/extjs/resources/images/access/box/corners-blue.gif b/src/webui/static/extjs/resources/images/access/box/corners-blue.gif new file mode 100644 index 00000000..fa419b50 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/corners-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/corners.gif b/src/webui/static/extjs/resources/images/access/box/corners.gif new file mode 100644 index 00000000..8aa8cae5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/corners.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/l-blue.gif b/src/webui/static/extjs/resources/images/access/box/l-blue.gif new file mode 100644 index 00000000..5ed7f004 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/l-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/l.gif b/src/webui/static/extjs/resources/images/access/box/l.gif new file mode 100644 index 00000000..0160f97f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/l.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/r-blue.gif b/src/webui/static/extjs/resources/images/access/box/r-blue.gif new file mode 100644 index 00000000..3ea5cae3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/r-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/r.gif b/src/webui/static/extjs/resources/images/access/box/r.gif new file mode 100644 index 00000000..34237f62 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/r.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/tb-blue.gif b/src/webui/static/extjs/resources/images/access/box/tb-blue.gif new file mode 100644 index 00000000..4b1382c3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/tb-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/access/box/tb.gif b/src/webui/static/extjs/resources/images/access/box/tb.gif new file mode 100644 index 00000000..435889bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/box/tb.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/arrow.gif b/src/webui/static/extjs/resources/images/access/button/arrow.gif new file mode 100644 index 00000000..087b450d Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/btn.gif b/src/webui/static/extjs/resources/images/access/button/btn.gif new file mode 100644 index 00000000..3e705baf Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/btn.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/group-cs.gif b/src/webui/static/extjs/resources/images/access/button/group-cs.gif new file mode 100644 index 00000000..aaf0d461 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/group-cs.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/group-lr.gif b/src/webui/static/extjs/resources/images/access/button/group-lr.gif new file mode 100644 index 00000000..374ea754 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/group-lr.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/group-tb.gif b/src/webui/static/extjs/resources/images/access/button/group-tb.gif new file mode 100644 index 00000000..50a99729 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/group-tb.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/s-arrow-b-noline.gif b/src/webui/static/extjs/resources/images/access/button/s-arrow-b-noline.gif new file mode 100644 index 00000000..644e9f3c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/s-arrow-b-noline.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/s-arrow-b.gif b/src/webui/static/extjs/resources/images/access/button/s-arrow-b.gif new file mode 100644 index 00000000..ba55d0a1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/s-arrow-b.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/s-arrow-bo.gif b/src/webui/static/extjs/resources/images/access/button/s-arrow-bo.gif new file mode 100644 index 00000000..c672b602 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/s-arrow-bo.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/s-arrow-noline.gif b/src/webui/static/extjs/resources/images/access/button/s-arrow-noline.gif new file mode 100644 index 00000000..f3cd351e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/s-arrow-noline.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/s-arrow-o.gif b/src/webui/static/extjs/resources/images/access/button/s-arrow-o.gif new file mode 100644 index 00000000..4bdafd04 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/s-arrow-o.gif differ diff --git a/src/webui/static/extjs/resources/images/access/button/s-arrow.gif b/src/webui/static/extjs/resources/images/access/button/s-arrow.gif new file mode 100644 index 00000000..a77be7fd Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/button/s-arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/access/editor/tb-sprite.gif b/src/webui/static/extjs/resources/images/access/editor/tb-sprite.gif new file mode 100644 index 00000000..bd4011d5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/editor/tb-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/checkbox.gif b/src/webui/static/extjs/resources/images/access/form/checkbox.gif new file mode 100644 index 00000000..835b346c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/checkbox.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/clear-trigger.gif b/src/webui/static/extjs/resources/images/access/form/clear-trigger.gif new file mode 100644 index 00000000..9bfd1843 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/clear-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/clear-trigger.psd b/src/webui/static/extjs/resources/images/access/form/clear-trigger.psd new file mode 100644 index 00000000..fcd79447 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/clear-trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/access/form/date-trigger.gif b/src/webui/static/extjs/resources/images/access/form/date-trigger.gif new file mode 100644 index 00000000..048506d7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/date-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/date-trigger.psd b/src/webui/static/extjs/resources/images/access/form/date-trigger.psd new file mode 100644 index 00000000..d9f9be1d Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/date-trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/access/form/error-tip-corners.gif b/src/webui/static/extjs/resources/images/access/form/error-tip-corners.gif new file mode 100644 index 00000000..6ea4c383 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/error-tip-corners.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/exclamation.gif b/src/webui/static/extjs/resources/images/access/form/exclamation.gif new file mode 100644 index 00000000..daa88b8b Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/exclamation.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/radio.gif b/src/webui/static/extjs/resources/images/access/form/radio.gif new file mode 100644 index 00000000..36bb91d0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/radio.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/search-trigger.gif b/src/webui/static/extjs/resources/images/access/form/search-trigger.gif new file mode 100644 index 00000000..ab8b3b49 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/search-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/search-trigger.psd b/src/webui/static/extjs/resources/images/access/form/search-trigger.psd new file mode 100644 index 00000000..4f92b725 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/search-trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/access/form/text-bg.gif b/src/webui/static/extjs/resources/images/access/form/text-bg.gif new file mode 100644 index 00000000..4ce90bb6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/text-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/trigger-tpl.gif b/src/webui/static/extjs/resources/images/access/form/trigger-tpl.gif new file mode 100644 index 00000000..2574eadc Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/trigger-tpl.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/trigger.gif b/src/webui/static/extjs/resources/images/access/form/trigger.gif new file mode 100644 index 00000000..bd255727 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/access/form/trigger.psd b/src/webui/static/extjs/resources/images/access/form/trigger.psd new file mode 100644 index 00000000..c078133e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/form/trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/access/grid/arrow-left-white.gif b/src/webui/static/extjs/resources/images/access/grid/arrow-left-white.gif new file mode 100644 index 00000000..63088f56 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/arrow-left-white.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/arrow-right-white.gif b/src/webui/static/extjs/resources/images/access/grid/arrow-right-white.gif new file mode 100644 index 00000000..e9e06789 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/arrow-right-white.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/col-move-bottom.gif b/src/webui/static/extjs/resources/images/access/grid/col-move-bottom.gif new file mode 100644 index 00000000..cc1e473e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/col-move-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/col-move-top.gif b/src/webui/static/extjs/resources/images/access/grid/col-move-top.gif new file mode 100644 index 00000000..58ff32cc Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/col-move-top.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/columns.gif b/src/webui/static/extjs/resources/images/access/grid/columns.gif new file mode 100644 index 00000000..2d3a8239 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/columns.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/dirty.gif b/src/webui/static/extjs/resources/images/access/grid/dirty.gif new file mode 100644 index 00000000..d524ee54 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/dirty.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/done.gif b/src/webui/static/extjs/resources/images/access/grid/done.gif new file mode 100644 index 00000000..a937cb22 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/done.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/drop-no.gif b/src/webui/static/extjs/resources/images/access/grid/drop-no.gif new file mode 100644 index 00000000..31a332bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/drop-no.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/drop-yes.gif b/src/webui/static/extjs/resources/images/access/grid/drop-yes.gif new file mode 100644 index 00000000..926010e1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/drop-yes.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/footer-bg.gif b/src/webui/static/extjs/resources/images/access/grid/footer-bg.gif new file mode 100644 index 00000000..126120f7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/footer-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid-blue-hd.gif b/src/webui/static/extjs/resources/images/access/grid/grid-blue-hd.gif new file mode 100644 index 00000000..862094e6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid-blue-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid-blue-split.gif b/src/webui/static/extjs/resources/images/access/grid/grid-blue-split.gif new file mode 100644 index 00000000..1b0bae3a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid-blue-split.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid-hrow.gif b/src/webui/static/extjs/resources/images/access/grid/grid-hrow.gif new file mode 100644 index 00000000..63741042 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid-hrow.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid-loading.gif b/src/webui/static/extjs/resources/images/access/grid/grid-loading.gif new file mode 100644 index 00000000..d112c540 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid-loading.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid-split.gif b/src/webui/static/extjs/resources/images/access/grid/grid-split.gif new file mode 100644 index 00000000..c76a16e9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid-split.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid-vista-hd.gif b/src/webui/static/extjs/resources/images/access/grid/grid-vista-hd.gif new file mode 100644 index 00000000..d0972638 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid-vista-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid3-hd-btn.gif b/src/webui/static/extjs/resources/images/access/grid/grid3-hd-btn.gif new file mode 100644 index 00000000..9ecd6506 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid3-hd-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid3-hrow-over.gif b/src/webui/static/extjs/resources/images/access/grid/grid3-hrow-over.gif new file mode 100644 index 00000000..0405f6c3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid3-hrow-over.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid3-hrow.gif b/src/webui/static/extjs/resources/images/access/grid/grid3-hrow.gif new file mode 100644 index 00000000..509737aa Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid3-hrow.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid3-special-col-bg.gif b/src/webui/static/extjs/resources/images/access/grid/grid3-special-col-bg.gif new file mode 100644 index 00000000..8ec57f57 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid3-special-col-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/grid3-special-col-sel-bg.gif b/src/webui/static/extjs/resources/images/access/grid/grid3-special-col-sel-bg.gif new file mode 100644 index 00000000..93a9ca6a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/grid3-special-col-sel-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/group-by.gif b/src/webui/static/extjs/resources/images/access/grid/group-by.gif new file mode 100644 index 00000000..d6075bba Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/group-by.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/group-collapse.gif b/src/webui/static/extjs/resources/images/access/grid/group-collapse.gif new file mode 100644 index 00000000..9bd255e7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/group-collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/group-expand-sprite.gif b/src/webui/static/extjs/resources/images/access/grid/group-expand-sprite.gif new file mode 100644 index 00000000..f230489a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/group-expand-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/group-expand.gif b/src/webui/static/extjs/resources/images/access/grid/group-expand.gif new file mode 100644 index 00000000..fd22e6bc Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/group-expand.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hd-pop.gif b/src/webui/static/extjs/resources/images/access/grid/hd-pop.gif new file mode 100644 index 00000000..eb8ba796 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hd-pop.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hmenu-asc.gif b/src/webui/static/extjs/resources/images/access/grid/hmenu-asc.gif new file mode 100644 index 00000000..8917e0ee Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hmenu-asc.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hmenu-desc.gif b/src/webui/static/extjs/resources/images/access/grid/hmenu-desc.gif new file mode 100644 index 00000000..f26b7c2f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hmenu-desc.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hmenu-lock.gif b/src/webui/static/extjs/resources/images/access/grid/hmenu-lock.gif new file mode 100644 index 00000000..15961261 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hmenu-lock.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hmenu-lock.png b/src/webui/static/extjs/resources/images/access/grid/hmenu-lock.png new file mode 100644 index 00000000..8b81e7ff Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hmenu-lock.png differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hmenu-unlock.gif b/src/webui/static/extjs/resources/images/access/grid/hmenu-unlock.gif new file mode 100644 index 00000000..af59cf92 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hmenu-unlock.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/hmenu-unlock.png b/src/webui/static/extjs/resources/images/access/grid/hmenu-unlock.png new file mode 100644 index 00000000..9dd5df34 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/hmenu-unlock.png differ diff --git a/src/webui/static/extjs/resources/images/access/grid/invalid_line.gif b/src/webui/static/extjs/resources/images/access/grid/invalid_line.gif new file mode 100644 index 00000000..025cffc7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/invalid_line.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/loading.gif b/src/webui/static/extjs/resources/images/access/grid/loading.gif new file mode 100644 index 00000000..e846e1d6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/loading.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/mso-hd.gif b/src/webui/static/extjs/resources/images/access/grid/mso-hd.gif new file mode 100644 index 00000000..669f3cf0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/mso-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/nowait.gif b/src/webui/static/extjs/resources/images/access/grid/nowait.gif new file mode 100644 index 00000000..4c5862cd Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/nowait.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-first-disabled.gif b/src/webui/static/extjs/resources/images/access/grid/page-first-disabled.gif new file mode 100644 index 00000000..e4df7a7e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-first-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-first.gif b/src/webui/static/extjs/resources/images/access/grid/page-first.gif new file mode 100644 index 00000000..aa0a822a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-first.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-last-disabled.gif b/src/webui/static/extjs/resources/images/access/grid/page-last-disabled.gif new file mode 100644 index 00000000..67fee759 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-last-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-last.gif b/src/webui/static/extjs/resources/images/access/grid/page-last.gif new file mode 100644 index 00000000..e0cf1117 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-last.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-next-disabled.gif b/src/webui/static/extjs/resources/images/access/grid/page-next-disabled.gif new file mode 100644 index 00000000..e3e8e873 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-next-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-next.gif b/src/webui/static/extjs/resources/images/access/grid/page-next.gif new file mode 100644 index 00000000..69899c00 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-next.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-prev-disabled.gif b/src/webui/static/extjs/resources/images/access/grid/page-prev-disabled.gif new file mode 100644 index 00000000..0f94bf7b Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-prev-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/page-prev.gif b/src/webui/static/extjs/resources/images/access/grid/page-prev.gif new file mode 100644 index 00000000..289b1261 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/page-prev.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/pick-button.gif b/src/webui/static/extjs/resources/images/access/grid/pick-button.gif new file mode 100644 index 00000000..6957924a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/pick-button.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/refresh.gif b/src/webui/static/extjs/resources/images/access/grid/refresh.gif new file mode 100644 index 00000000..8435d1e4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/refresh.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/row-check-sprite.gif b/src/webui/static/extjs/resources/images/access/grid/row-check-sprite.gif new file mode 100644 index 00000000..61011646 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/row-check-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/row-expand-sprite.gif b/src/webui/static/extjs/resources/images/access/grid/row-expand-sprite.gif new file mode 100644 index 00000000..6f4d874f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/row-expand-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/row-over.gif b/src/webui/static/extjs/resources/images/access/grid/row-over.gif new file mode 100644 index 00000000..b288e387 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/row-over.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/row-sel.gif b/src/webui/static/extjs/resources/images/access/grid/row-sel.gif new file mode 100644 index 00000000..98209e6e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/row-sel.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/sort-hd.gif b/src/webui/static/extjs/resources/images/access/grid/sort-hd.gif new file mode 100644 index 00000000..681628f3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/sort-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/sort_asc.gif b/src/webui/static/extjs/resources/images/access/grid/sort_asc.gif new file mode 100644 index 00000000..371f5e4c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/sort_asc.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/sort_desc.gif b/src/webui/static/extjs/resources/images/access/grid/sort_desc.gif new file mode 100644 index 00000000..000e363a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/sort_desc.gif differ diff --git a/src/webui/static/extjs/resources/images/access/grid/wait.gif b/src/webui/static/extjs/resources/images/access/grid/wait.gif new file mode 100644 index 00000000..471c1a4f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/grid/wait.gif differ diff --git a/src/webui/static/extjs/resources/images/access/menu/checked.gif b/src/webui/static/extjs/resources/images/access/menu/checked.gif new file mode 100644 index 00000000..fad58937 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/menu/checked.gif differ diff --git a/src/webui/static/extjs/resources/images/access/menu/group-checked.gif b/src/webui/static/extjs/resources/images/access/menu/group-checked.gif new file mode 100644 index 00000000..d8b08f53 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/menu/group-checked.gif differ diff --git a/src/webui/static/extjs/resources/images/access/menu/item-over.gif b/src/webui/static/extjs/resources/images/access/menu/item-over.gif new file mode 100644 index 00000000..01678393 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/menu/item-over.gif differ diff --git a/src/webui/static/extjs/resources/images/access/menu/menu-parent.gif b/src/webui/static/extjs/resources/images/access/menu/menu-parent.gif new file mode 100644 index 00000000..49286cdf Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/menu/menu-parent.gif differ diff --git a/src/webui/static/extjs/resources/images/access/menu/menu.gif b/src/webui/static/extjs/resources/images/access/menu/menu.gif new file mode 100644 index 00000000..9bb3960f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/menu/menu.gif differ diff --git a/src/webui/static/extjs/resources/images/access/menu/unchecked.gif b/src/webui/static/extjs/resources/images/access/menu/unchecked.gif new file mode 100644 index 00000000..43823e52 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/menu/unchecked.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/corners-sprite.gif b/src/webui/static/extjs/resources/images/access/panel/corners-sprite.gif new file mode 100644 index 00000000..43e28626 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/corners-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/left-right.gif b/src/webui/static/extjs/resources/images/access/panel/left-right.gif new file mode 100644 index 00000000..51850b79 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/left-right.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/light-hd.gif b/src/webui/static/extjs/resources/images/access/panel/light-hd.gif new file mode 100644 index 00000000..660bedb8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/light-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/tool-sprite-tpl.gif b/src/webui/static/extjs/resources/images/access/panel/tool-sprite-tpl.gif new file mode 100644 index 00000000..e6478670 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/tool-sprite-tpl.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/tool-sprites.gif b/src/webui/static/extjs/resources/images/access/panel/tool-sprites.gif new file mode 100644 index 00000000..a3ffe58b Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/tool-sprites.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/tools-sprites-trans.gif b/src/webui/static/extjs/resources/images/access/panel/tools-sprites-trans.gif new file mode 100644 index 00000000..ead931ef Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/tools-sprites-trans.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/top-bottom.gif b/src/webui/static/extjs/resources/images/access/panel/top-bottom.gif new file mode 100644 index 00000000..6b2649dd Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/top-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/white-corners-sprite.gif b/src/webui/static/extjs/resources/images/access/panel/white-corners-sprite.gif new file mode 100644 index 00000000..22d4bbab Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/white-corners-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/white-left-right.gif b/src/webui/static/extjs/resources/images/access/panel/white-left-right.gif new file mode 100644 index 00000000..51850b79 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/white-left-right.gif differ diff --git a/src/webui/static/extjs/resources/images/access/panel/white-top-bottom.gif b/src/webui/static/extjs/resources/images/access/panel/white-top-bottom.gif new file mode 100644 index 00000000..08f8fae1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/panel/white-top-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/access/progress/progress-bg.gif b/src/webui/static/extjs/resources/images/access/progress/progress-bg.gif new file mode 100644 index 00000000..55629b17 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/progress/progress-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/qtip/close.gif b/src/webui/static/extjs/resources/images/access/qtip/close.gif new file mode 100644 index 00000000..69ab915e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/qtip/close.gif differ diff --git a/src/webui/static/extjs/resources/images/access/qtip/tip-anchor-sprite.gif b/src/webui/static/extjs/resources/images/access/qtip/tip-anchor-sprite.gif new file mode 100644 index 00000000..f46d31d0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/qtip/tip-anchor-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/qtip/tip-sprite.gif b/src/webui/static/extjs/resources/images/access/qtip/tip-sprite.gif new file mode 100644 index 00000000..9f6a629d Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/qtip/tip-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/shared/glass-bg.gif b/src/webui/static/extjs/resources/images/access/shared/glass-bg.gif new file mode 100644 index 00000000..ed3c8863 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/shared/glass-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/shared/hd-sprite.gif b/src/webui/static/extjs/resources/images/access/shared/hd-sprite.gif new file mode 100644 index 00000000..446be925 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/shared/hd-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/shared/left-btn.gif b/src/webui/static/extjs/resources/images/access/shared/left-btn.gif new file mode 100644 index 00000000..06224394 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/shared/left-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/access/shared/right-btn.gif b/src/webui/static/extjs/resources/images/access/shared/right-btn.gif new file mode 100644 index 00000000..5e3215d5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/shared/right-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/e-handle-dark.gif b/src/webui/static/extjs/resources/images/access/sizer/e-handle-dark.gif new file mode 100644 index 00000000..70aad3fe Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/e-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/e-handle.gif b/src/webui/static/extjs/resources/images/access/sizer/e-handle.gif new file mode 100644 index 00000000..52c045e2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/e-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/ne-handle-dark.gif b/src/webui/static/extjs/resources/images/access/sizer/ne-handle-dark.gif new file mode 100644 index 00000000..3a30ca22 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/ne-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/ne-handle.gif b/src/webui/static/extjs/resources/images/access/sizer/ne-handle.gif new file mode 100644 index 00000000..e48f9f9c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/ne-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/nw-handle-dark.gif b/src/webui/static/extjs/resources/images/access/sizer/nw-handle-dark.gif new file mode 100644 index 00000000..5ea8b518 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/nw-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/nw-handle.gif b/src/webui/static/extjs/resources/images/access/sizer/nw-handle.gif new file mode 100644 index 00000000..65d5cc20 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/nw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/s-handle-dark.gif b/src/webui/static/extjs/resources/images/access/sizer/s-handle-dark.gif new file mode 100644 index 00000000..421b5348 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/s-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/s-handle.gif b/src/webui/static/extjs/resources/images/access/sizer/s-handle.gif new file mode 100644 index 00000000..2b635de0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/s-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/se-handle-dark.gif b/src/webui/static/extjs/resources/images/access/sizer/se-handle-dark.gif new file mode 100644 index 00000000..881a5c42 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/se-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/se-handle.gif b/src/webui/static/extjs/resources/images/access/sizer/se-handle.gif new file mode 100644 index 00000000..5f1e3b80 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/se-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/square.gif b/src/webui/static/extjs/resources/images/access/sizer/square.gif new file mode 100644 index 00000000..4dc5a2da Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/square.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/sw-handle-dark.gif b/src/webui/static/extjs/resources/images/access/sizer/sw-handle-dark.gif new file mode 100644 index 00000000..030d8f8d Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/sw-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/access/sizer/sw-handle.gif b/src/webui/static/extjs/resources/images/access/sizer/sw-handle.gif new file mode 100644 index 00000000..79bcb848 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/sizer/sw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/access/slider/slider-bg.png b/src/webui/static/extjs/resources/images/access/slider/slider-bg.png new file mode 100644 index 00000000..d2137547 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/slider/slider-bg.png differ diff --git a/src/webui/static/extjs/resources/images/access/slider/slider-thumb.png b/src/webui/static/extjs/resources/images/access/slider/slider-thumb.png new file mode 100644 index 00000000..4991a745 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/slider/slider-thumb.png differ diff --git a/src/webui/static/extjs/resources/images/access/slider/slider-v-bg.png b/src/webui/static/extjs/resources/images/access/slider/slider-v-bg.png new file mode 100644 index 00000000..f1221c45 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/slider/slider-v-bg.png differ diff --git a/src/webui/static/extjs/resources/images/access/slider/slider-v-thumb.png b/src/webui/static/extjs/resources/images/access/slider/slider-v-thumb.png new file mode 100644 index 00000000..e0c0e274 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/slider/slider-v-thumb.png differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/scroll-left.gif b/src/webui/static/extjs/resources/images/access/tabs/scroll-left.gif new file mode 100644 index 00000000..71a2e88c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/scroll-left.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/scroll-right.gif b/src/webui/static/extjs/resources/images/access/tabs/scroll-right.gif new file mode 100644 index 00000000..8f3d6598 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/scroll-right.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-btm-inactive-left-bg.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-inactive-left-bg.gif new file mode 100644 index 00000000..687af2b2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-inactive-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-btm-inactive-right-bg.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-inactive-right-bg.gif new file mode 100644 index 00000000..3c1b3ebf Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-inactive-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-btm-left-bg.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-left-bg.gif new file mode 100644 index 00000000..e5f827a3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-btm-right-bg.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-right-bg.gif new file mode 100644 index 00000000..2551f4c3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-btm-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-close.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-close.gif new file mode 100644 index 00000000..ef9a7c26 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-close.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-strip-bg.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-strip-bg.gif new file mode 100644 index 00000000..fc1fdcda Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-strip-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tab-strip-btm-bg.gif b/src/webui/static/extjs/resources/images/access/tabs/tab-strip-btm-bg.gif new file mode 100644 index 00000000..a151553e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tab-strip-btm-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tabs/tabs-sprite.gif b/src/webui/static/extjs/resources/images/access/tabs/tabs-sprite.gif new file mode 100644 index 00000000..8194001e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tabs/tabs-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/bg.gif b/src/webui/static/extjs/resources/images/access/toolbar/bg.gif new file mode 100644 index 00000000..b67a54e2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/btn-arrow-light.gif b/src/webui/static/extjs/resources/images/access/toolbar/btn-arrow-light.gif new file mode 100644 index 00000000..b0e24b55 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/btn-arrow-light.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/btn-arrow.gif b/src/webui/static/extjs/resources/images/access/toolbar/btn-arrow.gif new file mode 100644 index 00000000..8acb4608 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/btn-arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/btn-over-bg.gif b/src/webui/static/extjs/resources/images/access/toolbar/btn-over-bg.gif new file mode 100644 index 00000000..ee2dd986 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/btn-over-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/gray-bg.gif b/src/webui/static/extjs/resources/images/access/toolbar/gray-bg.gif new file mode 100644 index 00000000..bd49438f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/gray-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/more.gif b/src/webui/static/extjs/resources/images/access/toolbar/more.gif new file mode 100644 index 00000000..4f010201 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/more.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/s-arrow-bo.gif b/src/webui/static/extjs/resources/images/access/toolbar/s-arrow-bo.gif new file mode 100644 index 00000000..1505edda Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/s-arrow-bo.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/tb-btn-sprite.gif b/src/webui/static/extjs/resources/images/access/toolbar/tb-btn-sprite.gif new file mode 100644 index 00000000..19bbef3c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/tb-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/tb-xl-btn-sprite.gif b/src/webui/static/extjs/resources/images/access/toolbar/tb-xl-btn-sprite.gif new file mode 100644 index 00000000..1bc0420f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/tb-xl-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/access/toolbar/tb-xl-sep.gif b/src/webui/static/extjs/resources/images/access/toolbar/tb-xl-sep.gif new file mode 100644 index 00000000..30555eec Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/toolbar/tb-xl-sep.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/arrows.gif b/src/webui/static/extjs/resources/images/access/tree/arrows.gif new file mode 100644 index 00000000..2e635eba Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/arrows.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/drop-add.gif b/src/webui/static/extjs/resources/images/access/tree/drop-add.gif new file mode 100644 index 00000000..b22cd144 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/drop-add.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/drop-between.gif b/src/webui/static/extjs/resources/images/access/tree/drop-between.gif new file mode 100644 index 00000000..5c6c09d9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/drop-between.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/drop-no.gif b/src/webui/static/extjs/resources/images/access/tree/drop-no.gif new file mode 100644 index 00000000..9d9c6a9c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/drop-no.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/drop-over.gif b/src/webui/static/extjs/resources/images/access/tree/drop-over.gif new file mode 100644 index 00000000..30d1ca71 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/drop-over.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/drop-under.gif b/src/webui/static/extjs/resources/images/access/tree/drop-under.gif new file mode 100644 index 00000000..85f66b1e Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/drop-under.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/drop-yes.gif b/src/webui/static/extjs/resources/images/access/tree/drop-yes.gif new file mode 100644 index 00000000..8aacb307 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/drop-yes.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-end-minus-nl.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-end-minus-nl.gif new file mode 100644 index 00000000..b4ae5959 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-end-minus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-end-minus.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-end-minus.gif new file mode 100644 index 00000000..514cf3e0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-end-minus.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-end-plus-nl.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-end-plus-nl.gif new file mode 100644 index 00000000..6af2e291 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-end-plus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-end-plus.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-end-plus.gif new file mode 100644 index 00000000..96df6795 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-end-plus.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-end.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-end.gif new file mode 100644 index 00000000..f24ddee7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-end.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-line.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-line.gif new file mode 100644 index 00000000..75e6da4f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-line.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-minus-nl.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-minus-nl.gif new file mode 100644 index 00000000..b4ae5959 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-minus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-minus.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-minus.gif new file mode 100644 index 00000000..68ba298f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-minus.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-plus-nl.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-plus-nl.gif new file mode 100644 index 00000000..6af2e291 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-plus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow-plus.gif b/src/webui/static/extjs/resources/images/access/tree/elbow-plus.gif new file mode 100644 index 00000000..58ba9e47 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow-plus.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/elbow.gif b/src/webui/static/extjs/resources/images/access/tree/elbow.gif new file mode 100644 index 00000000..b8f42083 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/elbow.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/folder-open.gif b/src/webui/static/extjs/resources/images/access/tree/folder-open.gif new file mode 100644 index 00000000..7c52965a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/folder-open.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/folder.gif b/src/webui/static/extjs/resources/images/access/tree/folder.gif new file mode 100644 index 00000000..501e75c0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/folder.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/leaf.gif b/src/webui/static/extjs/resources/images/access/tree/leaf.gif new file mode 100644 index 00000000..445769d3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/leaf.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/loading.gif b/src/webui/static/extjs/resources/images/access/tree/loading.gif new file mode 100644 index 00000000..e846e1d6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/loading.gif differ diff --git a/src/webui/static/extjs/resources/images/access/tree/s.gif b/src/webui/static/extjs/resources/images/access/tree/s.gif new file mode 100644 index 00000000..1d11fa9a Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/tree/s.gif differ diff --git a/src/webui/static/extjs/resources/images/access/window/icon-error.gif b/src/webui/static/extjs/resources/images/access/window/icon-error.gif new file mode 100644 index 00000000..05c713c7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/icon-error.gif differ diff --git a/src/webui/static/extjs/resources/images/access/window/icon-info.gif b/src/webui/static/extjs/resources/images/access/window/icon-info.gif new file mode 100644 index 00000000..adc06132 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/icon-info.gif differ diff --git a/src/webui/static/extjs/resources/images/access/window/icon-question.gif b/src/webui/static/extjs/resources/images/access/window/icon-question.gif new file mode 100644 index 00000000..9b31a948 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/icon-question.gif differ diff --git a/src/webui/static/extjs/resources/images/access/window/icon-warning.gif b/src/webui/static/extjs/resources/images/access/window/icon-warning.gif new file mode 100644 index 00000000..0d89077c Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/icon-warning.gif differ diff --git a/src/webui/static/extjs/resources/images/access/window/left-corners.png b/src/webui/static/extjs/resources/images/access/window/left-corners.png new file mode 100644 index 00000000..ee271769 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/left-corners.png differ diff --git a/src/webui/static/extjs/resources/images/access/window/left-right.png b/src/webui/static/extjs/resources/images/access/window/left-right.png new file mode 100644 index 00000000..e4123001 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/left-right.png differ diff --git a/src/webui/static/extjs/resources/images/access/window/right-corners.png b/src/webui/static/extjs/resources/images/access/window/right-corners.png new file mode 100644 index 00000000..87a30d08 Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/right-corners.png differ diff --git a/src/webui/static/extjs/resources/images/access/window/top-bottom.png b/src/webui/static/extjs/resources/images/access/window/top-bottom.png new file mode 100644 index 00000000..72b4050f Binary files /dev/null and b/src/webui/static/extjs/resources/images/access/window/top-bottom.png differ diff --git a/src/webui/static/extjs/resources/images/default/button/arrow.gif b/src/webui/static/extjs/resources/images/default/button/arrow.gif new file mode 100644 index 00000000..3ab4f71a Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/btn-sprite.gif b/src/webui/static/extjs/resources/images/default/button/btn-sprite.gif deleted file mode 100644 index b52e0ce3..00000000 Binary files a/src/webui/static/extjs/resources/images/default/button/btn-sprite.gif and /dev/null differ diff --git a/src/webui/static/extjs/resources/images/default/button/btn.gif b/src/webui/static/extjs/resources/images/default/button/btn.gif new file mode 100644 index 00000000..06b404dd Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/btn.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/group-cs.gif b/src/webui/static/extjs/resources/images/default/button/group-cs.gif new file mode 100644 index 00000000..3d1dca8f Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/group-cs.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/group-lr.gif b/src/webui/static/extjs/resources/images/default/button/group-lr.gif new file mode 100644 index 00000000..7c549f96 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/group-lr.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/group-tb.gif b/src/webui/static/extjs/resources/images/default/button/group-tb.gif new file mode 100644 index 00000000..adeb0a4c Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/group-tb.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/s-arrow-b-noline.gif b/src/webui/static/extjs/resources/images/default/button/s-arrow-b-noline.gif new file mode 100644 index 00000000..a4220ee9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/s-arrow-b-noline.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/s-arrow-b.gif b/src/webui/static/extjs/resources/images/default/button/s-arrow-b.gif new file mode 100644 index 00000000..84b64703 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/s-arrow-b.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/s-arrow-bo.gif b/src/webui/static/extjs/resources/images/default/button/s-arrow-bo.gif new file mode 100644 index 00000000..548700bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/s-arrow-bo.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/s-arrow-noline.gif b/src/webui/static/extjs/resources/images/default/button/s-arrow-noline.gif new file mode 100644 index 00000000..0953eab5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/s-arrow-noline.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/s-arrow-o.gif b/src/webui/static/extjs/resources/images/default/button/s-arrow-o.gif new file mode 100644 index 00000000..89c70f36 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/s-arrow-o.gif differ diff --git a/src/webui/static/extjs/resources/images/default/button/s-arrow.gif b/src/webui/static/extjs/resources/images/default/button/s-arrow.gif new file mode 100644 index 00000000..89407747 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/button/s-arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/default/form/trigger-square.gif b/src/webui/static/extjs/resources/images/default/form/trigger-square.gif new file mode 100644 index 00000000..3004ec58 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/form/trigger-square.gif differ diff --git a/src/webui/static/extjs/resources/images/default/form/trigger-square.psd b/src/webui/static/extjs/resources/images/default/form/trigger-square.psd new file mode 100644 index 00000000..e922ee65 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/form/trigger-square.psd differ diff --git a/src/webui/static/extjs/resources/images/default/form/trigger.gif b/src/webui/static/extjs/resources/images/default/form/trigger.gif index b220bbed..f6cba375 100644 Binary files a/src/webui/static/extjs/resources/images/default/form/trigger.gif and b/src/webui/static/extjs/resources/images/default/form/trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/default/form/trigger.psd b/src/webui/static/extjs/resources/images/default/form/trigger.psd index 1f1ed646..344c7682 100644 Binary files a/src/webui/static/extjs/resources/images/default/form/trigger.psd and b/src/webui/static/extjs/resources/images/default/form/trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/default/grid/grid3-rowheader.gif b/src/webui/static/extjs/resources/images/default/grid/grid3-rowheader.gif new file mode 100644 index 00000000..2799b45c Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/grid/grid3-rowheader.gif differ diff --git a/src/webui/static/extjs/resources/images/default/grid/group-collapse.gif b/src/webui/static/extjs/resources/images/default/grid/group-collapse.gif new file mode 100644 index 00000000..495bb051 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/grid/group-collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/default/grid/group-expand.gif b/src/webui/static/extjs/resources/images/default/grid/group-expand.gif new file mode 100644 index 00000000..a33ac30b Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/grid/group-expand.gif differ diff --git a/src/webui/static/extjs/resources/images/default/grid/refresh-disabled.gif b/src/webui/static/extjs/resources/images/default/grid/refresh-disabled.gif new file mode 100644 index 00000000..607800b8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/grid/refresh-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/default/grid/sort-hd.gif b/src/webui/static/extjs/resources/images/default/grid/sort-hd.gif new file mode 100644 index 00000000..45e545f7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/grid/sort-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/default/panel/tool-sprites.gif b/src/webui/static/extjs/resources/images/default/panel/tool-sprites.gif index cca91e8b..2b6b8098 100644 Binary files a/src/webui/static/extjs/resources/images/default/panel/tool-sprites.gif and b/src/webui/static/extjs/resources/images/default/panel/tool-sprites.gif differ diff --git a/src/webui/static/extjs/resources/images/default/panel/tools-sprites-trans.gif b/src/webui/static/extjs/resources/images/default/panel/tools-sprites-trans.gif index e58bf20b..ead931ef 100644 Binary files a/src/webui/static/extjs/resources/images/default/panel/tools-sprites-trans.gif and b/src/webui/static/extjs/resources/images/default/panel/tools-sprites-trans.gif differ diff --git a/src/webui/static/extjs/resources/images/default/qtip/tip-anchor-sprite.gif b/src/webui/static/extjs/resources/images/default/qtip/tip-anchor-sprite.gif new file mode 100644 index 00000000..9cf48506 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/qtip/tip-anchor-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/default/tabs/tab-btm-left-bg.gif b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-left-bg.gif index e695186d..dde79687 100644 Binary files a/src/webui/static/extjs/resources/images/default/tabs/tab-btm-left-bg.gif and b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/default/tabs/tab-btm-over-left-bg.gif b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-over-left-bg.gif new file mode 100644 index 00000000..da49c100 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-over-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/default/tabs/tab-btm-over-right-bg.gif b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-over-right-bg.gif new file mode 100644 index 00000000..45346ab1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-over-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/default/tabs/tab-btm-right-bg.gif b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-right-bg.gif index dde79687..e695186d 100644 Binary files a/src/webui/static/extjs/resources/images/default/tabs/tab-btm-right-bg.gif and b/src/webui/static/extjs/resources/images/default/tabs/tab-btm-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/default/toolbar/more.gif b/src/webui/static/extjs/resources/images/default/toolbar/more.gif new file mode 100644 index 00000000..02c2509f Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/toolbar/more.gif differ diff --git a/src/webui/static/extjs/resources/images/default/toolbar/tb-xl-btn-sprite.gif b/src/webui/static/extjs/resources/images/default/toolbar/tb-xl-btn-sprite.gif new file mode 100644 index 00000000..1bc0420f Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/toolbar/tb-xl-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/default/toolbar/tb-xl-sep.gif b/src/webui/static/extjs/resources/images/default/toolbar/tb-xl-sep.gif new file mode 100644 index 00000000..30555eec Binary files /dev/null and b/src/webui/static/extjs/resources/images/default/toolbar/tb-xl-sep.gif differ diff --git a/src/webui/static/extjs/resources/images/default/tree/arrows.gif b/src/webui/static/extjs/resources/images/default/tree/arrows.gif index f8ff7b89..26834639 100644 Binary files a/src/webui/static/extjs/resources/images/default/tree/arrows.gif and b/src/webui/static/extjs/resources/images/default/tree/arrows.gif differ diff --git a/src/webui/static/extjs/resources/images/default/window/left-corners.png b/src/webui/static/extjs/resources/images/default/window/left-corners.png index 18e215de..1a518335 100644 Binary files a/src/webui/static/extjs/resources/images/default/window/left-corners.png and b/src/webui/static/extjs/resources/images/default/window/left-corners.png differ diff --git a/src/webui/static/extjs/resources/images/default/window/left-right.png b/src/webui/static/extjs/resources/images/default/window/left-right.png index 97d04f30..7586ff33 100644 Binary files a/src/webui/static/extjs/resources/images/default/window/left-right.png and b/src/webui/static/extjs/resources/images/default/window/left-right.png differ diff --git a/src/webui/static/extjs/resources/images/default/window/left-right.psd b/src/webui/static/extjs/resources/images/default/window/left-right.psd index f490c5e5..59a3960a 100644 Binary files a/src/webui/static/extjs/resources/images/default/window/left-right.psd and b/src/webui/static/extjs/resources/images/default/window/left-right.psd differ diff --git a/src/webui/static/extjs/resources/images/default/window/right-corners.png b/src/webui/static/extjs/resources/images/default/window/right-corners.png index 101118b2..e69a3ffc 100644 Binary files a/src/webui/static/extjs/resources/images/default/window/right-corners.png and b/src/webui/static/extjs/resources/images/default/window/right-corners.png differ diff --git a/src/webui/static/extjs/resources/images/default/window/top-bottom.png b/src/webui/static/extjs/resources/images/default/window/top-bottom.png index a7392343..33779e76 100644 Binary files a/src/webui/static/extjs/resources/images/default/window/top-bottom.png and b/src/webui/static/extjs/resources/images/default/window/top-bottom.png differ diff --git a/src/webui/static/extjs/resources/images/default/window/top-bottom.psd b/src/webui/static/extjs/resources/images/default/window/top-bottom.psd index d2b23029..48c5395e 100644 Binary files a/src/webui/static/extjs/resources/images/default/window/top-bottom.psd and b/src/webui/static/extjs/resources/images/default/window/top-bottom.psd differ diff --git a/src/webui/static/extjs/resources/images/default/button/btn-arrow.gif b/src/webui/static/extjs/resources/images/gray/button/btn-arrow.gif similarity index 100% rename from src/webui/static/extjs/resources/images/default/button/btn-arrow.gif rename to src/webui/static/extjs/resources/images/gray/button/btn-arrow.gif diff --git a/src/webui/static/extjs/resources/images/gray/button/btn-sprite.gif b/src/webui/static/extjs/resources/images/gray/button/btn-sprite.gif new file mode 100644 index 00000000..834ff978 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/button/btn.gif b/src/webui/static/extjs/resources/images/gray/button/btn.gif new file mode 100644 index 00000000..96ea61ab Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/btn.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/button/group-cs.gif b/src/webui/static/extjs/resources/images/gray/button/group-cs.gif new file mode 100644 index 00000000..7059e2b0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/group-cs.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/button/group-lr.gif b/src/webui/static/extjs/resources/images/gray/button/group-lr.gif new file mode 100644 index 00000000..3f41fbd8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/group-lr.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/button/group-tb.gif b/src/webui/static/extjs/resources/images/gray/button/group-tb.gif new file mode 100644 index 00000000..c5ea8cab Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/group-tb.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/button/s-arrow-bo.gif b/src/webui/static/extjs/resources/images/gray/button/s-arrow-bo.gif new file mode 100644 index 00000000..fa5b2f4e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/s-arrow-bo.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/button/s-arrow-o.gif b/src/webui/static/extjs/resources/images/gray/button/s-arrow-o.gif new file mode 100644 index 00000000..52a51413 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/button/s-arrow-o.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/form/clear-trigger.gif b/src/webui/static/extjs/resources/images/gray/form/clear-trigger.gif new file mode 100644 index 00000000..be3ff587 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/form/clear-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/form/date-trigger.gif b/src/webui/static/extjs/resources/images/gray/form/date-trigger.gif new file mode 100644 index 00000000..e0537cbc Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/form/date-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/form/search-trigger.gif b/src/webui/static/extjs/resources/images/gray/form/search-trigger.gif new file mode 100644 index 00000000..0cc4f596 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/form/search-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/form/trigger-square.gif b/src/webui/static/extjs/resources/images/gray/form/trigger-square.gif new file mode 100644 index 00000000..7a0f585c Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/form/trigger-square.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/form/trigger.gif b/src/webui/static/extjs/resources/images/gray/form/trigger.gif new file mode 100644 index 00000000..b563474b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/form/trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/gradient-bg.gif b/src/webui/static/extjs/resources/images/gray/gradient-bg.gif new file mode 100644 index 00000000..8134e499 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/gradient-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/col-move-bottom.gif b/src/webui/static/extjs/resources/images/gray/grid/col-move-bottom.gif new file mode 100644 index 00000000..c525f7eb Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/col-move-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/col-move-top.gif b/src/webui/static/extjs/resources/images/gray/grid/col-move-top.gif new file mode 100644 index 00000000..ccc92b6b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/col-move-top.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-hd-btn.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-hd-btn.gif new file mode 100644 index 00000000..daf1ef2b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-hd-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow-over.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow-over.gif new file mode 100644 index 00000000..d37252f7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow-over.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow-over2.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow-over2.gif new file mode 100644 index 00000000..353d9062 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow-over2.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow.gif new file mode 100644 index 00000000..8d459a30 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow2.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow2.gif new file mode 100644 index 00000000..423b507b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-hrow2.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-bg.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-bg.gif new file mode 100644 index 00000000..12d64d7c Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-bg2.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-bg2.gif new file mode 100644 index 00000000..f10e6ad1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-bg2.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-sel-bg.gif b/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-sel-bg.gif new file mode 100644 index 00000000..4fa6e107 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/grid3-special-col-sel-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/group-collapse.gif b/src/webui/static/extjs/resources/images/gray/grid/group-collapse.gif new file mode 100644 index 00000000..c9ad30dd Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/group-collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/group-expand-sprite.gif b/src/webui/static/extjs/resources/images/gray/grid/group-expand-sprite.gif new file mode 100644 index 00000000..d24891de Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/group-expand-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/group-expand.gif b/src/webui/static/extjs/resources/images/gray/grid/group-expand.gif new file mode 100644 index 00000000..663b5c84 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/group-expand.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/page-first.gif b/src/webui/static/extjs/resources/images/gray/grid/page-first.gif new file mode 100644 index 00000000..60be4bcd Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/page-first.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/page-last.gif b/src/webui/static/extjs/resources/images/gray/grid/page-last.gif new file mode 100644 index 00000000..beb4a830 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/page-last.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/page-next.gif b/src/webui/static/extjs/resources/images/gray/grid/page-next.gif new file mode 100644 index 00000000..97db1c22 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/page-next.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/page-prev.gif b/src/webui/static/extjs/resources/images/gray/grid/page-prev.gif new file mode 100644 index 00000000..d07e61c3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/page-prev.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/refresh.gif b/src/webui/static/extjs/resources/images/gray/grid/refresh.gif new file mode 100644 index 00000000..868b2dc5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/refresh.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/row-expand-sprite.gif b/src/webui/static/extjs/resources/images/gray/grid/row-expand-sprite.gif new file mode 100644 index 00000000..09c00a66 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/row-expand-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/sort-hd.gif b/src/webui/static/extjs/resources/images/gray/grid/sort-hd.gif new file mode 100644 index 00000000..4cf483d2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/sort-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/sort_asc.gif b/src/webui/static/extjs/resources/images/gray/grid/sort_asc.gif new file mode 100644 index 00000000..7e562e20 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/sort_asc.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/grid/sort_desc.gif b/src/webui/static/extjs/resources/images/gray/grid/sort_desc.gif new file mode 100644 index 00000000..9b7a871b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/grid/sort_desc.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/menu/group-checked.gif b/src/webui/static/extjs/resources/images/gray/menu/group-checked.gif new file mode 100644 index 00000000..c8824887 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/menu/group-checked.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/menu/item-over-disabled.gif b/src/webui/static/extjs/resources/images/gray/menu/item-over-disabled.gif new file mode 100644 index 00000000..97d5ffac Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/menu/item-over-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/menu/item-over.gif b/src/webui/static/extjs/resources/images/gray/menu/item-over.gif new file mode 100644 index 00000000..e0dc5f7c Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/menu/item-over.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/menu/menu-parent.gif b/src/webui/static/extjs/resources/images/gray/menu/menu-parent.gif new file mode 100644 index 00000000..5461a8bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/menu/menu-parent.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/corners-sprite.gif b/src/webui/static/extjs/resources/images/gray/panel/corners-sprite.gif new file mode 100644 index 00000000..fad0e6d2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/corners-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/left-right.gif b/src/webui/static/extjs/resources/images/gray/panel/left-right.gif new file mode 100644 index 00000000..c5f3dca5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/left-right.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/light-hd.gif b/src/webui/static/extjs/resources/images/gray/panel/light-hd.gif new file mode 100644 index 00000000..6eb28ba0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/light-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/tool-sprite-tpl.gif b/src/webui/static/extjs/resources/images/gray/panel/tool-sprite-tpl.gif new file mode 100644 index 00000000..18277a3d Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/tool-sprite-tpl.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/tool-sprites.gif b/src/webui/static/extjs/resources/images/gray/panel/tool-sprites.gif new file mode 100644 index 00000000..36b6b675 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/tool-sprites.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/tools-sprites-trans.gif b/src/webui/static/extjs/resources/images/gray/panel/tools-sprites-trans.gif new file mode 100644 index 00000000..b6d7ba36 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/tools-sprites-trans.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/top-bottom.gif b/src/webui/static/extjs/resources/images/gray/panel/top-bottom.gif new file mode 100644 index 00000000..24ceb30b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/top-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/top-bottom.png b/src/webui/static/extjs/resources/images/gray/panel/top-bottom.png new file mode 100644 index 00000000..578ffb60 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/top-bottom.png differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/white-corners-sprite.gif b/src/webui/static/extjs/resources/images/gray/panel/white-corners-sprite.gif new file mode 100644 index 00000000..d5b8adfd Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/white-corners-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/white-left-right.gif b/src/webui/static/extjs/resources/images/gray/panel/white-left-right.gif new file mode 100644 index 00000000..2c9e142b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/white-left-right.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/panel/white-top-bottom.gif b/src/webui/static/extjs/resources/images/gray/panel/white-top-bottom.gif new file mode 100644 index 00000000..025fbd51 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/panel/white-top-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/progress/progress-bg.gif b/src/webui/static/extjs/resources/images/gray/progress/progress-bg.gif new file mode 100644 index 00000000..5585d802 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/progress/progress-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/qtip/bg.gif b/src/webui/static/extjs/resources/images/gray/qtip/bg.gif new file mode 100644 index 00000000..a9055a5e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/qtip/bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/qtip/close.gif b/src/webui/static/extjs/resources/images/gray/qtip/close.gif new file mode 100644 index 00000000..69ab915e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/qtip/close.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/qtip/tip-anchor-sprite.gif b/src/webui/static/extjs/resources/images/gray/qtip/tip-anchor-sprite.gif new file mode 100644 index 00000000..0671586f Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/qtip/tip-anchor-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/qtip/tip-sprite.gif b/src/webui/static/extjs/resources/images/gray/qtip/tip-sprite.gif new file mode 100644 index 00000000..4ade664e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/qtip/tip-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/s.gif b/src/webui/static/extjs/resources/images/gray/s.gif new file mode 100644 index 00000000..1d11fa9a Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/s.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/shared/hd-sprite.gif b/src/webui/static/extjs/resources/images/gray/shared/hd-sprite.gif new file mode 100644 index 00000000..d943833e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/shared/hd-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/shared/left-btn.gif b/src/webui/static/extjs/resources/images/gray/shared/left-btn.gif new file mode 100644 index 00000000..3301054f Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/shared/left-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/shared/right-btn.gif b/src/webui/static/extjs/resources/images/gray/shared/right-btn.gif new file mode 100644 index 00000000..c529110f Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/shared/right-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/e-handle.gif b/src/webui/static/extjs/resources/images/gray/sizer/e-handle.gif new file mode 100644 index 00000000..a8ed0ede Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/e-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/ne-handle.gif b/src/webui/static/extjs/resources/images/gray/sizer/ne-handle.gif new file mode 100644 index 00000000..6f7b0c29 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/ne-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/nw-handle.gif b/src/webui/static/extjs/resources/images/gray/sizer/nw-handle.gif new file mode 100644 index 00000000..92ad82cf Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/nw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/s-handle.gif b/src/webui/static/extjs/resources/images/gray/sizer/s-handle.gif new file mode 100644 index 00000000..d7eeae27 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/s-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/se-handle.gif b/src/webui/static/extjs/resources/images/gray/sizer/se-handle.gif new file mode 100644 index 00000000..f011a3bb Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/se-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/square.gif b/src/webui/static/extjs/resources/images/gray/sizer/square.gif new file mode 100644 index 00000000..7751d5e1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/square.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/sizer/sw-handle.gif b/src/webui/static/extjs/resources/images/gray/sizer/sw-handle.gif new file mode 100644 index 00000000..aa903dd0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/sizer/sw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/slider/slider-thumb.png b/src/webui/static/extjs/resources/images/gray/slider/slider-thumb.png new file mode 100644 index 00000000..4bf01be8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/slider/slider-thumb.png differ diff --git a/src/webui/static/extjs/resources/images/gray/slider/slider-v-thumb.png b/src/webui/static/extjs/resources/images/gray/slider/slider-v-thumb.png new file mode 100644 index 00000000..6b3eeb70 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/slider/slider-v-thumb.png differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/scroll-left.gif b/src/webui/static/extjs/resources/images/gray/tabs/scroll-left.gif new file mode 100644 index 00000000..bbb3e3d9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/scroll-left.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/scroll-right.gif b/src/webui/static/extjs/resources/images/gray/tabs/scroll-right.gif new file mode 100644 index 00000000..feb6a76f Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/scroll-right.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/scroller-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/scroller-bg.gif new file mode 100644 index 00000000..f089c0ad Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/scroller-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif new file mode 100644 index 00000000..d718173f Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif new file mode 100644 index 00000000..bf354936 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif new file mode 100644 index 00000000..96d2e5eb Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-over-left-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-over-left-bg.gif new file mode 100644 index 00000000..164d1016 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-over-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-over-right-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-over-right-bg.gif new file mode 100644 index 00000000..f6f04953 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-over-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif new file mode 100644 index 00000000..c41cada7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-btm-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-close.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-close.gif new file mode 100644 index 00000000..98d5da95 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-close.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-bg.gif new file mode 100644 index 00000000..040b677a Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-bg.png b/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-bg.png new file mode 100644 index 00000000..fa8ab3f4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-bg.png differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-btm-bg.gif b/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-btm-bg.gif new file mode 100644 index 00000000..f35087f2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tab-strip-btm-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tabs/tabs-sprite.gif b/src/webui/static/extjs/resources/images/gray/tabs/tabs-sprite.gif new file mode 100644 index 00000000..1901b231 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tabs/tabs-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/bg.gif b/src/webui/static/extjs/resources/images/gray/toolbar/bg.gif new file mode 100644 index 00000000..9ab78a2e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/btn-arrow-light.gif b/src/webui/static/extjs/resources/images/gray/toolbar/btn-arrow-light.gif new file mode 100644 index 00000000..b0e24b55 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/btn-arrow-light.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/btn-arrow.gif b/src/webui/static/extjs/resources/images/gray/toolbar/btn-arrow.gif new file mode 100644 index 00000000..8acb4608 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/btn-arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/btn-over-bg.gif b/src/webui/static/extjs/resources/images/gray/toolbar/btn-over-bg.gif new file mode 100644 index 00000000..ee2dd986 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/btn-over-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/gray-bg.gif b/src/webui/static/extjs/resources/images/gray/toolbar/gray-bg.gif new file mode 100644 index 00000000..5464e21e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/gray-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/more.gif b/src/webui/static/extjs/resources/images/gray/toolbar/more.gif new file mode 100644 index 00000000..77f4f237 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/more.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/tb-bg.gif b/src/webui/static/extjs/resources/images/gray/toolbar/tb-bg.gif new file mode 100644 index 00000000..4969e4ef Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/tb-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif b/src/webui/static/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif new file mode 100644 index 00000000..894fef2e Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/toolbar/tb-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tree/arrows.gif b/src/webui/static/extjs/resources/images/gray/tree/arrows.gif new file mode 100644 index 00000000..a51a8e47 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tree/arrows.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tree/elbow-end-minus-nl.gif b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-minus-nl.gif new file mode 100644 index 00000000..8c5bc5d4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-minus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tree/elbow-end-minus.gif b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-minus.gif new file mode 100644 index 00000000..58505137 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-minus.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tree/elbow-end-plus-nl.gif b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-plus-nl.gif new file mode 100644 index 00000000..752b42a3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-plus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/tree/elbow-end-plus.gif b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-plus.gif new file mode 100644 index 00000000..ff126359 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/tree/elbow-end-plus.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/window/icon-error.gif b/src/webui/static/extjs/resources/images/gray/window/icon-error.gif new file mode 100644 index 00000000..397b655a Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/icon-error.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/window/icon-info.gif b/src/webui/static/extjs/resources/images/gray/window/icon-info.gif new file mode 100644 index 00000000..58281c30 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/icon-info.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/window/icon-question.gif b/src/webui/static/extjs/resources/images/gray/window/icon-question.gif new file mode 100644 index 00000000..08abd82a Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/icon-question.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/window/icon-warning.gif b/src/webui/static/extjs/resources/images/gray/window/icon-warning.gif new file mode 100644 index 00000000..27ff98b4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/icon-warning.gif differ diff --git a/src/webui/static/extjs/resources/images/gray/window/left-corners.png b/src/webui/static/extjs/resources/images/gray/window/left-corners.png new file mode 100644 index 00000000..b2da00db Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/left-corners.png differ diff --git a/src/webui/static/extjs/resources/images/gray/window/left-right.png b/src/webui/static/extjs/resources/images/gray/window/left-right.png new file mode 100644 index 00000000..4c81137b Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/left-right.png differ diff --git a/src/webui/static/extjs/resources/images/gray/window/right-corners.png b/src/webui/static/extjs/resources/images/gray/window/right-corners.png new file mode 100644 index 00000000..807eb474 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/right-corners.png differ diff --git a/src/webui/static/extjs/resources/images/gray/window/top-bottom.png b/src/webui/static/extjs/resources/images/gray/window/top-bottom.png new file mode 100644 index 00000000..f479fcf3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/gray/window/top-bottom.png differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-center.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-center.gif new file mode 100644 index 00000000..7bf4a4b4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-center.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-left.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-left.gif new file mode 100644 index 00000000..94b1dafc Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-left.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-right.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-right.gif new file mode 100644 index 00000000..6dadaf68 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/bg-right.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/close.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/close.gif new file mode 100644 index 00000000..4278db98 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/close.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/collapse.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/collapse.gif new file mode 100644 index 00000000..b07e297e Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/dlg-bg.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/dlg-bg.gif new file mode 100644 index 00000000..1a466633 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/dlg-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/e-handle.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/e-handle.gif new file mode 100644 index 00000000..48877e74 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/e-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/expand.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/expand.gif new file mode 100644 index 00000000..5b4b0d1e Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/expand.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/hd-sprite.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/hd-sprite.gif new file mode 100644 index 00000000..3c2dd632 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/hd-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/s-handle.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/s-handle.gif new file mode 100644 index 00000000..c13c9cdc Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/s-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/se-handle.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/se-handle.gif new file mode 100644 index 00000000..c4e38a2f Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/se-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/basic-dialog/w-handle.gif b/src/webui/static/extjs/resources/images/vista/basic-dialog/w-handle.gif new file mode 100644 index 00000000..d59eafc2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/basic-dialog/w-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/gradient-bg.gif b/src/webui/static/extjs/resources/images/vista/gradient-bg.gif new file mode 100644 index 00000000..8134e499 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/gradient-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/grid/grid-split.gif b/src/webui/static/extjs/resources/images/vista/grid/grid-split.gif new file mode 100644 index 00000000..c76a16e9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/grid/grid-split.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/grid/grid-vista-hd.gif b/src/webui/static/extjs/resources/images/vista/grid/grid-vista-hd.gif new file mode 100644 index 00000000..d0972638 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/grid/grid-vista-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/collapse.gif b/src/webui/static/extjs/resources/images/vista/layout/collapse.gif new file mode 100644 index 00000000..cbd6e081 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/expand.gif b/src/webui/static/extjs/resources/images/vista/layout/expand.gif new file mode 100644 index 00000000..8103c0dd Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/expand.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/gradient-bg.gif b/src/webui/static/extjs/resources/images/vista/layout/gradient-bg.gif new file mode 100644 index 00000000..d311e7de Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/gradient-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/ns-collapse.gif b/src/webui/static/extjs/resources/images/vista/layout/ns-collapse.gif new file mode 100644 index 00000000..f2ad235d Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/ns-collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/ns-expand.gif b/src/webui/static/extjs/resources/images/vista/layout/ns-expand.gif new file mode 100644 index 00000000..0817ec66 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/ns-expand.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/panel-close.gif b/src/webui/static/extjs/resources/images/vista/layout/panel-close.gif new file mode 100644 index 00000000..4e96481a Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/panel-close.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/panel-title-bg.gif b/src/webui/static/extjs/resources/images/vista/layout/panel-title-bg.gif new file mode 100644 index 00000000..681f517a Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/panel-title-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/panel-title-light-bg.gif b/src/webui/static/extjs/resources/images/vista/layout/panel-title-light-bg.gif new file mode 100644 index 00000000..23d8288b Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/panel-title-light-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/stick.gif b/src/webui/static/extjs/resources/images/vista/layout/stick.gif new file mode 100644 index 00000000..7db68eec Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/stick.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/tab-close-on.gif b/src/webui/static/extjs/resources/images/vista/layout/tab-close-on.gif new file mode 100644 index 00000000..556e905b Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/tab-close-on.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/layout/tab-close.gif b/src/webui/static/extjs/resources/images/vista/layout/tab-close.gif new file mode 100644 index 00000000..0a6f0198 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/layout/tab-close.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/qtip/bg.gif b/src/webui/static/extjs/resources/images/vista/qtip/bg.gif new file mode 100644 index 00000000..5c0e8c92 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/qtip/bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/qtip/tip-sprite.gif b/src/webui/static/extjs/resources/images/vista/qtip/tip-sprite.gif new file mode 100644 index 00000000..a1862865 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/qtip/tip-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/s.gif b/src/webui/static/extjs/resources/images/vista/s.gif new file mode 100644 index 00000000..1d11fa9a Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/s.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/e-handle-dark.gif b/src/webui/static/extjs/resources/images/vista/sizer/e-handle-dark.gif new file mode 100644 index 00000000..eac9662e Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/e-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/e-handle.gif b/src/webui/static/extjs/resources/images/vista/sizer/e-handle.gif new file mode 100644 index 00000000..f2c9f538 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/e-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/ne-handle-dark.gif b/src/webui/static/extjs/resources/images/vista/sizer/ne-handle-dark.gif new file mode 100644 index 00000000..c9c041c4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/ne-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/ne-handle.gif b/src/webui/static/extjs/resources/images/vista/sizer/ne-handle.gif new file mode 100644 index 00000000..942ae825 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/ne-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/nw-handle-dark.gif b/src/webui/static/extjs/resources/images/vista/sizer/nw-handle-dark.gif new file mode 100644 index 00000000..23fced98 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/nw-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/nw-handle.gif b/src/webui/static/extjs/resources/images/vista/sizer/nw-handle.gif new file mode 100644 index 00000000..d39b0c38 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/nw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/s-handle-dark.gif b/src/webui/static/extjs/resources/images/vista/sizer/s-handle-dark.gif new file mode 100644 index 00000000..ddc2e18c Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/s-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/s-handle.gif b/src/webui/static/extjs/resources/images/vista/sizer/s-handle.gif new file mode 100644 index 00000000..827c3330 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/s-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/se-handle-dark.gif b/src/webui/static/extjs/resources/images/vista/sizer/se-handle-dark.gif new file mode 100644 index 00000000..1a678e67 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/se-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/se-handle.gif b/src/webui/static/extjs/resources/images/vista/sizer/se-handle.gif new file mode 100644 index 00000000..69b5a9ed Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/se-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/sw-handle-dark.gif b/src/webui/static/extjs/resources/images/vista/sizer/sw-handle-dark.gif new file mode 100644 index 00000000..937102c6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/sw-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/sizer/sw-handle.gif b/src/webui/static/extjs/resources/images/vista/sizer/sw-handle.gif new file mode 100644 index 00000000..b9e2f563 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/sizer/sw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif new file mode 100644 index 00000000..667beeb3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif new file mode 100644 index 00000000..6c4e0a45 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif new file mode 100644 index 00000000..1d81e54e Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif new file mode 100644 index 00000000..47d00500 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/tabs/tab-btm-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/tabs/tab-sprite.gif b/src/webui/static/extjs/resources/images/vista/tabs/tab-sprite.gif new file mode 100644 index 00000000..a16eedb8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/tabs/tab-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/toolbar/gray-bg.gif b/src/webui/static/extjs/resources/images/vista/toolbar/gray-bg.gif new file mode 100644 index 00000000..9af15c26 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/toolbar/gray-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif b/src/webui/static/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif new file mode 100644 index 00000000..f21b0d61 Binary files /dev/null and b/src/webui/static/extjs/resources/images/vista/toolbar/tb-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/README.txt b/src/webui/static/extjs/resources/images/yourtheme/README.txt new file mode 100644 index 00000000..acc50873 --- /dev/null +++ b/src/webui/static/extjs/resources/images/yourtheme/README.txt @@ -0,0 +1,2 @@ +2010-03-16 jwr: +The image directory, "yourtheme", is an exact copy of the "default" image directory. Remember to update your file paths in "css/yourtheme.css" if you make changes or add your own custom images for your custom theme. \ No newline at end of file diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/corners-blue.gif b/src/webui/static/extjs/resources/images/yourtheme/box/corners-blue.gif new file mode 100644 index 00000000..fa419b50 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/corners-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/corners.gif b/src/webui/static/extjs/resources/images/yourtheme/box/corners.gif new file mode 100644 index 00000000..8aa8cae5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/corners.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/l-blue.gif b/src/webui/static/extjs/resources/images/yourtheme/box/l-blue.gif new file mode 100644 index 00000000..5ed7f004 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/l-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/l.gif b/src/webui/static/extjs/resources/images/yourtheme/box/l.gif new file mode 100644 index 00000000..0160f97f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/l.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/r-blue.gif b/src/webui/static/extjs/resources/images/yourtheme/box/r-blue.gif new file mode 100644 index 00000000..3ea5cae3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/r-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/r.gif b/src/webui/static/extjs/resources/images/yourtheme/box/r.gif new file mode 100644 index 00000000..34237f62 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/r.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/tb-blue.gif b/src/webui/static/extjs/resources/images/yourtheme/box/tb-blue.gif new file mode 100644 index 00000000..562fecca Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/tb-blue.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/box/tb.gif b/src/webui/static/extjs/resources/images/yourtheme/box/tb.gif new file mode 100644 index 00000000..435889bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/box/tb.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/arrow.gif b/src/webui/static/extjs/resources/images/yourtheme/button/arrow.gif new file mode 100644 index 00000000..3ab4f71a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/btn.gif b/src/webui/static/extjs/resources/images/yourtheme/button/btn.gif new file mode 100644 index 00000000..06b404dd Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/btn.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/group-cs.gif b/src/webui/static/extjs/resources/images/yourtheme/button/group-cs.gif new file mode 100644 index 00000000..3d1dca8f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/group-cs.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/group-lr.gif b/src/webui/static/extjs/resources/images/yourtheme/button/group-lr.gif new file mode 100644 index 00000000..7c549f96 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/group-lr.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/group-tb.gif b/src/webui/static/extjs/resources/images/yourtheme/button/group-tb.gif new file mode 100644 index 00000000..adeb0a4c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/group-tb.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-b-noline.gif b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-b-noline.gif new file mode 100644 index 00000000..a4220ee9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-b-noline.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-b.gif b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-b.gif new file mode 100644 index 00000000..84b64703 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-b.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-bo.gif b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-bo.gif new file mode 100644 index 00000000..548700bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-bo.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-noline.gif b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-noline.gif new file mode 100644 index 00000000..0953eab5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-noline.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-o.gif b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-o.gif new file mode 100644 index 00000000..89c70f36 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow-o.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow.gif b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow.gif new file mode 100644 index 00000000..89407747 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/button/s-arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/dd/drop-add.gif b/src/webui/static/extjs/resources/images/yourtheme/dd/drop-add.gif new file mode 100644 index 00000000..b22cd144 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/dd/drop-add.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/dd/drop-no.gif b/src/webui/static/extjs/resources/images/yourtheme/dd/drop-no.gif new file mode 100644 index 00000000..08d08335 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/dd/drop-no.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/dd/drop-yes.gif b/src/webui/static/extjs/resources/images/yourtheme/dd/drop-yes.gif new file mode 100644 index 00000000..8aacb307 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/dd/drop-yes.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/editor/tb-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/editor/tb-sprite.gif new file mode 100644 index 00000000..fb705776 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/editor/tb-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/checkbox.gif b/src/webui/static/extjs/resources/images/yourtheme/form/checkbox.gif new file mode 100644 index 00000000..835b346c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/checkbox.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/clear-trigger.gif b/src/webui/static/extjs/resources/images/yourtheme/form/clear-trigger.gif new file mode 100644 index 00000000..da78d45b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/clear-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/clear-trigger.psd b/src/webui/static/extjs/resources/images/yourtheme/form/clear-trigger.psd new file mode 100644 index 00000000..f637fa5d Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/clear-trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/date-trigger.gif b/src/webui/static/extjs/resources/images/yourtheme/form/date-trigger.gif new file mode 100644 index 00000000..25ef7b3a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/date-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/date-trigger.psd b/src/webui/static/extjs/resources/images/yourtheme/form/date-trigger.psd new file mode 100644 index 00000000..74883b21 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/date-trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/error-tip-corners.gif b/src/webui/static/extjs/resources/images/yourtheme/form/error-tip-corners.gif new file mode 100644 index 00000000..6ea4c383 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/error-tip-corners.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/exclamation.gif b/src/webui/static/extjs/resources/images/yourtheme/form/exclamation.gif new file mode 100644 index 00000000..ea31a306 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/exclamation.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/radio.gif b/src/webui/static/extjs/resources/images/yourtheme/form/radio.gif new file mode 100644 index 00000000..36bb91d0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/radio.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/search-trigger.gif b/src/webui/static/extjs/resources/images/yourtheme/form/search-trigger.gif new file mode 100644 index 00000000..db8802be Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/search-trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/search-trigger.psd b/src/webui/static/extjs/resources/images/yourtheme/form/search-trigger.psd new file mode 100644 index 00000000..b11f2730 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/search-trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/text-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/form/text-bg.gif new file mode 100644 index 00000000..4179607c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/text-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/trigger-square.gif b/src/webui/static/extjs/resources/images/yourtheme/form/trigger-square.gif new file mode 100644 index 00000000..3004ec58 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/trigger-square.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/trigger-square.psd b/src/webui/static/extjs/resources/images/yourtheme/form/trigger-square.psd new file mode 100644 index 00000000..e922ee65 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/trigger-square.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/trigger-tpl.gif b/src/webui/static/extjs/resources/images/yourtheme/form/trigger-tpl.gif new file mode 100644 index 00000000..e3701a38 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/trigger-tpl.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/trigger.gif b/src/webui/static/extjs/resources/images/yourtheme/form/trigger.gif new file mode 100644 index 00000000..f6cba375 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/trigger.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/form/trigger.psd b/src/webui/static/extjs/resources/images/yourtheme/form/trigger.psd new file mode 100644 index 00000000..344c7682 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/form/trigger.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/gradient-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/gradient-bg.gif new file mode 100644 index 00000000..8134e499 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/gradient-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/arrow-left-white.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/arrow-left-white.gif new file mode 100644 index 00000000..63088f56 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/arrow-left-white.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/arrow-right-white.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/arrow-right-white.gif new file mode 100644 index 00000000..e9e06789 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/arrow-right-white.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/col-move-bottom.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/col-move-bottom.gif new file mode 100644 index 00000000..cc1e473e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/col-move-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/col-move-top.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/col-move-top.gif new file mode 100644 index 00000000..58ff32cc Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/col-move-top.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/columns.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/columns.gif new file mode 100644 index 00000000..2d3a8239 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/columns.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/dirty.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/dirty.gif new file mode 100644 index 00000000..4f217a47 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/dirty.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/done.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/done.gif new file mode 100644 index 00000000..a937cb22 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/done.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/drop-no.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/drop-no.gif new file mode 100644 index 00000000..31a332bf Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/drop-no.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/drop-yes.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/drop-yes.gif new file mode 100644 index 00000000..926010e1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/drop-yes.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/footer-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/footer-bg.gif new file mode 100644 index 00000000..126120f7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/footer-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid-blue-hd.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-blue-hd.gif new file mode 100644 index 00000000..862094e6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-blue-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid-blue-split.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-blue-split.gif new file mode 100644 index 00000000..5286f58f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-blue-split.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid-hrow.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-hrow.gif new file mode 100644 index 00000000..63741042 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-hrow.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid-loading.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-loading.gif new file mode 100644 index 00000000..d112c540 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-loading.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid-split.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-split.gif new file mode 100644 index 00000000..c76a16e9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-split.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid-vista-hd.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-vista-hd.gif new file mode 100644 index 00000000..d0972638 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid-vista-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hd-btn.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hd-btn.gif new file mode 100644 index 00000000..21126075 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hd-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hrow-over.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hrow-over.gif new file mode 100644 index 00000000..f9c07af1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hrow-over.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hrow.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hrow.gif new file mode 100644 index 00000000..8d459a30 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-hrow.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-special-col-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-special-col-bg.gif new file mode 100644 index 00000000..0b4d6ca3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-special-col-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-special-col-sel-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-special-col-sel-bg.gif new file mode 100644 index 00000000..1dfe9a69 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/grid3-special-col-sel-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/group-by.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/group-by.gif new file mode 100644 index 00000000..d6075bba Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/group-by.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/group-collapse.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/group-collapse.gif new file mode 100644 index 00000000..495bb051 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/group-collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/group-expand-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/group-expand-sprite.gif new file mode 100644 index 00000000..9c1653b4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/group-expand-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/group-expand.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/group-expand.gif new file mode 100644 index 00000000..a33ac30b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/group-expand.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hd-pop.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/hd-pop.gif new file mode 100644 index 00000000..eb8ba796 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hd-pop.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-asc.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-asc.gif new file mode 100644 index 00000000..8917e0ee Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-asc.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-desc.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-desc.gif new file mode 100644 index 00000000..f26b7c2f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-desc.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-lock.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-lock.gif new file mode 100644 index 00000000..15961261 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-lock.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-lock.png b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-lock.png new file mode 100644 index 00000000..8b81e7ff Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-lock.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-unlock.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-unlock.gif new file mode 100644 index 00000000..af59cf92 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-unlock.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-unlock.png b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-unlock.png new file mode 100644 index 00000000..9dd5df34 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/hmenu-unlock.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/invalid_line.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/invalid_line.gif new file mode 100644 index 00000000..fb7e0f34 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/invalid_line.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/loading.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/loading.gif new file mode 100644 index 00000000..e846e1d6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/loading.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/mso-hd.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/mso-hd.gif new file mode 100644 index 00000000..669f3cf0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/mso-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/nowait.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/nowait.gif new file mode 100644 index 00000000..4c5862cd Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/nowait.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-first-disabled.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-first-disabled.gif new file mode 100644 index 00000000..1e02c419 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-first-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-first.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-first.gif new file mode 100644 index 00000000..d84f41a9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-first.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-last-disabled.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-last-disabled.gif new file mode 100644 index 00000000..86970677 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-last-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-last.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-last.gif new file mode 100644 index 00000000..3df5c2ba Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-last.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-next-disabled.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-next-disabled.gif new file mode 100644 index 00000000..90a7756f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-next-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-next.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-next.gif new file mode 100644 index 00000000..96016353 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-next.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-prev-disabled.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-prev-disabled.gif new file mode 100644 index 00000000..37154d62 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-prev-disabled.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/page-prev.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/page-prev.gif new file mode 100644 index 00000000..eb70cf8f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/page-prev.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/pick-button.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/pick-button.gif new file mode 100644 index 00000000..6957924a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/pick-button.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/refresh.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/refresh.gif new file mode 100644 index 00000000..110f6844 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/refresh.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/row-check-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/row-check-sprite.gif new file mode 100644 index 00000000..61011646 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/row-check-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/row-expand-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/row-expand-sprite.gif new file mode 100644 index 00000000..6f4d874f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/row-expand-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/row-over.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/row-over.gif new file mode 100644 index 00000000..b288e387 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/row-over.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/row-sel.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/row-sel.gif new file mode 100644 index 00000000..98209e6e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/row-sel.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/sort-hd.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/sort-hd.gif new file mode 100644 index 00000000..45e545f7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/sort-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/sort_asc.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/sort_asc.gif new file mode 100644 index 00000000..67a2a4c6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/sort_asc.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/sort_desc.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/sort_desc.gif new file mode 100644 index 00000000..34db47c3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/sort_desc.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/grid/wait.gif b/src/webui/static/extjs/resources/images/yourtheme/grid/wait.gif new file mode 100644 index 00000000..471c1a4f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/grid/wait.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/collapse.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/collapse.gif new file mode 100644 index 00000000..d87b0a9d Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/expand.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/expand.gif new file mode 100644 index 00000000..7b6e1c1e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/expand.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/gradient-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/gradient-bg.gif new file mode 100644 index 00000000..8134e499 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/gradient-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/mini-bottom.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-bottom.gif new file mode 100644 index 00000000..c18f9e34 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/mini-left.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-left.gif new file mode 100644 index 00000000..99f7993f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-left.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/mini-right.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-right.gif new file mode 100644 index 00000000..5b13c5a8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-right.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/mini-top.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-top.gif new file mode 100644 index 00000000..a4ca2bb2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/mini-top.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/ns-collapse.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/ns-collapse.gif new file mode 100644 index 00000000..df2a77e9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/ns-collapse.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/ns-expand.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/ns-expand.gif new file mode 100644 index 00000000..77ab9dad Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/ns-expand.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/panel-close.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/panel-close.gif new file mode 100644 index 00000000..2bdd6239 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/panel-close.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/panel-title-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/panel-title-bg.gif new file mode 100644 index 00000000..d1daef54 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/panel-title-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/panel-title-light-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/panel-title-light-bg.gif new file mode 100644 index 00000000..8c2c83d8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/panel-title-light-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/stick.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/stick.gif new file mode 100644 index 00000000..5a1e8ba1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/stick.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/stuck.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/stuck.gif new file mode 100644 index 00000000..0a8de4db Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/stuck.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/tab-close-on.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/tab-close-on.gif new file mode 100644 index 00000000..eacea39b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/tab-close-on.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/layout/tab-close.gif b/src/webui/static/extjs/resources/images/yourtheme/layout/tab-close.gif new file mode 100644 index 00000000..45db61e6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/layout/tab-close.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/menu/checked.gif b/src/webui/static/extjs/resources/images/yourtheme/menu/checked.gif new file mode 100644 index 00000000..fad58937 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/menu/checked.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/menu/group-checked.gif b/src/webui/static/extjs/resources/images/yourtheme/menu/group-checked.gif new file mode 100644 index 00000000..d30b3e5a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/menu/group-checked.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/menu/item-over.gif b/src/webui/static/extjs/resources/images/yourtheme/menu/item-over.gif new file mode 100644 index 00000000..01678393 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/menu/item-over.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/menu/menu-parent.gif b/src/webui/static/extjs/resources/images/yourtheme/menu/menu-parent.gif new file mode 100644 index 00000000..1e375622 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/menu/menu-parent.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/menu/menu.gif b/src/webui/static/extjs/resources/images/yourtheme/menu/menu.gif new file mode 100644 index 00000000..30a2c4b6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/menu/menu.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/menu/unchecked.gif b/src/webui/static/extjs/resources/images/yourtheme/menu/unchecked.gif new file mode 100644 index 00000000..43823e52 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/menu/unchecked.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/corners-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/corners-sprite.gif new file mode 100644 index 00000000..aa0d0ed8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/corners-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/left-right.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/left-right.gif new file mode 100644 index 00000000..9fae2d59 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/left-right.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/light-hd.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/light-hd.gif new file mode 100644 index 00000000..58d6747b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/light-hd.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/tool-sprite-tpl.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/tool-sprite-tpl.gif new file mode 100644 index 00000000..e6478670 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/tool-sprite-tpl.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/tool-sprites.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/tool-sprites.gif new file mode 100644 index 00000000..9a3c5b9a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/tool-sprites.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/tools-sprites-trans.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/tools-sprites-trans.gif new file mode 100644 index 00000000..ead931ef Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/tools-sprites-trans.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/top-bottom.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/top-bottom.gif new file mode 100644 index 00000000..be6c50e1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/top-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/top-bottom.png b/src/webui/static/extjs/resources/images/yourtheme/panel/top-bottom.png new file mode 100644 index 00000000..578ffb60 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/top-bottom.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/white-corners-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/white-corners-sprite.gif new file mode 100644 index 00000000..22d4bbab Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/white-corners-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/white-left-right.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/white-left-right.gif new file mode 100644 index 00000000..d82c3378 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/white-left-right.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/panel/white-top-bottom.gif b/src/webui/static/extjs/resources/images/yourtheme/panel/white-top-bottom.gif new file mode 100644 index 00000000..fe7dd1c1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/panel/white-top-bottom.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/progress/progress-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/progress/progress-bg.gif new file mode 100644 index 00000000..1c1abeb4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/progress/progress-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/qtip/bg.gif b/src/webui/static/extjs/resources/images/yourtheme/qtip/bg.gif new file mode 100644 index 00000000..43488afd Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/qtip/bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/qtip/close.gif b/src/webui/static/extjs/resources/images/yourtheme/qtip/close.gif new file mode 100644 index 00000000..69ab915e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/qtip/close.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/qtip/tip-anchor-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/qtip/tip-anchor-sprite.gif new file mode 100644 index 00000000..9cf48506 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/qtip/tip-anchor-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/qtip/tip-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/qtip/tip-sprite.gif new file mode 100644 index 00000000..9810acac Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/qtip/tip-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/s.gif b/src/webui/static/extjs/resources/images/yourtheme/s.gif new file mode 100644 index 00000000..1d11fa9a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/s.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shadow-c.png b/src/webui/static/extjs/resources/images/yourtheme/shadow-c.png new file mode 100644 index 00000000..d435f80a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shadow-c.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shadow-lr.png b/src/webui/static/extjs/resources/images/yourtheme/shadow-lr.png new file mode 100644 index 00000000..bb88b6f2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shadow-lr.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shadow.png b/src/webui/static/extjs/resources/images/yourtheme/shadow.png new file mode 100644 index 00000000..75c0eba3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shadow.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/blue-loading.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/blue-loading.gif new file mode 100644 index 00000000..3bbf639e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/blue-loading.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/calendar.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/calendar.gif new file mode 100644 index 00000000..133cf232 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/calendar.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/glass-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/glass-bg.gif new file mode 100644 index 00000000..26fbbae3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/glass-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/hd-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/hd-sprite.gif new file mode 100644 index 00000000..42da1ea1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/hd-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/large-loading.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/large-loading.gif new file mode 100644 index 00000000..b36b555b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/large-loading.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/left-btn.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/left-btn.gif new file mode 100644 index 00000000..a0ddd9ee Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/left-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/loading-balls.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/loading-balls.gif new file mode 100644 index 00000000..9ce214be Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/loading-balls.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/right-btn.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/right-btn.gif new file mode 100644 index 00000000..dee63e21 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/right-btn.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/shared/warning.gif b/src/webui/static/extjs/resources/images/yourtheme/shared/warning.gif new file mode 100644 index 00000000..806d4bc0 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/shared/warning.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/e-handle-dark.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/e-handle-dark.gif new file mode 100644 index 00000000..b5486c1a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/e-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/e-handle.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/e-handle.gif new file mode 100644 index 00000000..00ba8350 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/e-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/ne-handle-dark.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/ne-handle-dark.gif new file mode 100644 index 00000000..04e5ecf7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/ne-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/ne-handle.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/ne-handle.gif new file mode 100644 index 00000000..09405c7a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/ne-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/nw-handle-dark.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/nw-handle-dark.gif new file mode 100644 index 00000000..6e49d696 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/nw-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/nw-handle.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/nw-handle.gif new file mode 100644 index 00000000..2fcea8a9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/nw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/s-handle-dark.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/s-handle-dark.gif new file mode 100644 index 00000000..4eb5f0fc Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/s-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/s-handle.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/s-handle.gif new file mode 100644 index 00000000..bf069c24 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/s-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/se-handle-dark.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/se-handle-dark.gif new file mode 100644 index 00000000..c4c10878 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/se-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/se-handle.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/se-handle.gif new file mode 100644 index 00000000..972055e7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/se-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/square.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/square.gif new file mode 100644 index 00000000..14ce6f72 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/square.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/sw-handle-dark.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/sw-handle-dark.gif new file mode 100644 index 00000000..77224b0c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/sw-handle-dark.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/sizer/sw-handle.gif b/src/webui/static/extjs/resources/images/yourtheme/sizer/sw-handle.gif new file mode 100644 index 00000000..3ca0ed96 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/sizer/sw-handle.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/slider/slider-bg.png b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-bg.png new file mode 100644 index 00000000..99991942 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-bg.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/slider/slider-thumb.png b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-thumb.png new file mode 100644 index 00000000..cd654a4c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-thumb.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/slider/slider-v-bg.png b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-v-bg.png new file mode 100644 index 00000000..121450c2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-v-bg.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/slider/slider-v-thumb.png b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-v-thumb.png new file mode 100644 index 00000000..7b3d7258 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/slider/slider-v-thumb.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/scroll-left.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/scroll-left.gif new file mode 100644 index 00000000..9f2f6d1c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/scroll-left.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/scroll-right.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/scroll-right.gif new file mode 100644 index 00000000..4c5e7e39 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/scroll-right.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/scroller-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/scroller-bg.gif new file mode 100644 index 00000000..099b90d8 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/scroller-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif new file mode 100644 index 00000000..188bf940 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif new file mode 100644 index 00000000..e1f5e3c5 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-left-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-left-bg.gif new file mode 100644 index 00000000..dde79687 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-over-left-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-over-left-bg.gif new file mode 100644 index 00000000..da49c100 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-over-left-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-over-right-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-over-right-bg.gif new file mode 100644 index 00000000..45346ab1 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-over-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-right-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-right-bg.gif new file mode 100644 index 00000000..e695186d Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-btm-right-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-close.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-close.gif new file mode 100644 index 00000000..e6998784 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-close.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-bg.gif new file mode 100644 index 00000000..34f13334 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-bg.png b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-bg.png new file mode 100644 index 00000000..fa8ab3f4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-bg.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-btm-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-btm-bg.gif new file mode 100644 index 00000000..5eaba1ea Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tab-strip-btm-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tabs/tabs-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/tabs/tabs-sprite.gif new file mode 100644 index 00000000..e969fb0b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tabs/tabs-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/bg.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/bg.gif new file mode 100644 index 00000000..0b085bf2 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-arrow-light.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-arrow-light.gif new file mode 100644 index 00000000..b0e24b55 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-arrow-light.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-arrow.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-arrow.gif new file mode 100644 index 00000000..8acb4608 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-arrow.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-over-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-over-bg.gif new file mode 100644 index 00000000..ee2dd986 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/btn-over-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/gray-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/gray-bg.gif new file mode 100644 index 00000000..bd49438f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/gray-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/more.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/more.gif new file mode 100644 index 00000000..02c2509f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/more.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-bg.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-bg.gif new file mode 100644 index 00000000..4969e4ef Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-bg.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-btn-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-btn-sprite.gif new file mode 100644 index 00000000..19bbef3c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-xl-btn-sprite.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-xl-btn-sprite.gif new file mode 100644 index 00000000..1bc0420f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-xl-btn-sprite.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-xl-sep.gif b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-xl-sep.gif new file mode 100644 index 00000000..30555eec Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/toolbar/tb-xl-sep.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/arrows.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/arrows.gif new file mode 100644 index 00000000..26834639 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/arrows.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/drop-add.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-add.gif new file mode 100644 index 00000000..b22cd144 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-add.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/drop-between.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-between.gif new file mode 100644 index 00000000..5c6c09d9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-between.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/drop-no.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-no.gif new file mode 100644 index 00000000..9d9c6a9c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-no.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/drop-over.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-over.gif new file mode 100644 index 00000000..30d1ca71 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-over.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/drop-under.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-under.gif new file mode 100644 index 00000000..85f66b1e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-under.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/drop-yes.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-yes.gif new file mode 100644 index 00000000..8aacb307 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/drop-yes.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-minus-nl.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-minus-nl.gif new file mode 100644 index 00000000..928779e9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-minus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-minus.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-minus.gif new file mode 100644 index 00000000..9a8d727d Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-minus.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-plus-nl.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-plus-nl.gif new file mode 100644 index 00000000..9f7f6988 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-plus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-plus.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-plus.gif new file mode 100644 index 00000000..5943a01b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end-plus.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end.gif new file mode 100644 index 00000000..f24ddee7 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-end.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-line.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-line.gif new file mode 100644 index 00000000..75e6da4f Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-line.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-minus-nl.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-minus-nl.gif new file mode 100644 index 00000000..928779e9 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-minus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-minus.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-minus.gif new file mode 100644 index 00000000..97dcc711 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-minus.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-plus-nl.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-plus-nl.gif new file mode 100644 index 00000000..9f7f6988 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-plus-nl.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-plus.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-plus.gif new file mode 100644 index 00000000..698de479 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow-plus.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/elbow.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow.gif new file mode 100644 index 00000000..b8f42083 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/elbow.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/folder-open.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/folder-open.gif new file mode 100644 index 00000000..56ba737b Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/folder-open.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/folder.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/folder.gif new file mode 100644 index 00000000..20412f7c Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/folder.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/leaf.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/leaf.gif new file mode 100644 index 00000000..445769d3 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/leaf.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/loading.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/loading.gif new file mode 100644 index 00000000..e846e1d6 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/loading.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/tree/s.gif b/src/webui/static/extjs/resources/images/yourtheme/tree/s.gif new file mode 100644 index 00000000..1d11fa9a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/tree/s.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/icon-error.gif b/src/webui/static/extjs/resources/images/yourtheme/window/icon-error.gif new file mode 100644 index 00000000..397b655a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/icon-error.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/icon-info.gif b/src/webui/static/extjs/resources/images/yourtheme/window/icon-info.gif new file mode 100644 index 00000000..58281c30 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/icon-info.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/icon-question.gif b/src/webui/static/extjs/resources/images/yourtheme/window/icon-question.gif new file mode 100644 index 00000000..08abd82a Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/icon-question.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/icon-warning.gif b/src/webui/static/extjs/resources/images/yourtheme/window/icon-warning.gif new file mode 100644 index 00000000..27ff98b4 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/icon-warning.gif differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/left-corners.png b/src/webui/static/extjs/resources/images/yourtheme/window/left-corners.png new file mode 100644 index 00000000..1a518335 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/left-corners.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/left-corners.psd b/src/webui/static/extjs/resources/images/yourtheme/window/left-corners.psd new file mode 100644 index 00000000..3d7f0623 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/left-corners.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/left-right.png b/src/webui/static/extjs/resources/images/yourtheme/window/left-right.png new file mode 100644 index 00000000..7586ff33 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/left-right.png differ diff --git a/src/webui/static/extjs/resources/images/default/shadow-c.psd b/src/webui/static/extjs/resources/images/yourtheme/window/left-right.psd similarity index 82% rename from src/webui/static/extjs/resources/images/default/shadow-c.psd rename to src/webui/static/extjs/resources/images/yourtheme/window/left-right.psd index 28bbe694..59a3960a 100644 Binary files a/src/webui/static/extjs/resources/images/default/shadow-c.psd and b/src/webui/static/extjs/resources/images/yourtheme/window/left-right.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/right-corners.png b/src/webui/static/extjs/resources/images/yourtheme/window/right-corners.png new file mode 100644 index 00000000..e69a3ffc Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/right-corners.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/right-corners.psd b/src/webui/static/extjs/resources/images/yourtheme/window/right-corners.psd new file mode 100644 index 00000000..86d50953 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/right-corners.psd differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/top-bottom.png b/src/webui/static/extjs/resources/images/yourtheme/window/top-bottom.png new file mode 100644 index 00000000..33779e76 Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/top-bottom.png differ diff --git a/src/webui/static/extjs/resources/images/yourtheme/window/top-bottom.psd b/src/webui/static/extjs/resources/images/yourtheme/window/top-bottom.psd new file mode 100644 index 00000000..48c5395e Binary files /dev/null and b/src/webui/static/extjs/resources/images/yourtheme/window/top-bottom.psd differ diff --git a/src/webui/static/extjs/resources/resources.jsb b/src/webui/static/extjs/resources/resources.jsb deleted file mode 100644 index 5e8a75ed..00000000 --- a/src/webui/static/extjs/resources/resources.jsb +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/webui/static/img/bg-header.png b/src/webui/static/img/bg-header.png new file mode 100644 index 00000000..7db29012 Binary files /dev/null and b/src/webui/static/img/bg-header.png differ diff --git a/src/webui/static/img/logo.png b/src/webui/static/img/logo.png new file mode 100644 index 00000000..c266820d Binary files /dev/null and b/src/webui/static/img/logo.png differ diff --git a/src/webui/static/livegrid/livegrid-all.js b/src/webui/static/livegrid/livegrid-all.js index 7eaf1d9c..f6135d85 100644 --- a/src/webui/static/livegrid/livegrid-all.js +++ b/src/webui/static/livegrid/livegrid-all.js @@ -1 +1 @@ -Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.GridPanel=Ext.extend(Ext.grid.GridPanel,{onRender:function(B,A){Ext.ux.grid.livegrid.GridPanel.superclass.onRender.call(this,B,A);var C=this.getStore();if(C._autoLoad===true){delete C._autoLoad;C.load()}},walkCells:function(H,C,F,E,D){var G=this.store;var A=G.getCount;G.getCount=G.getTotalCount;var B=Ext.ux.grid.livegrid.GridPanel.superclass.walkCells.call(this,H,C,F,E,D);G.getCount=A;return B}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.GridView=function(A){this.addEvents({beforebuffer:true,buffer:true,bufferfailure:true,cursormove:true});this.horizontalScrollOffset=17;Ext.apply(this,A);this.templates={};this.templates.master=new Ext.Template('
      ','
      ','
      {header}
      ','
      {body}
      ',"
      ",'
       
      ','
       
      ',"
      ");this._gridViewSuperclass=Ext.ux.grid.livegrid.GridView.superclass;this._gridViewSuperclass.constructor.call(this)};Ext.extend(Ext.ux.grid.livegrid.GridView,Ext.grid.GridView,{_maskIndex:20001,hdHeight:0,rowClipped:0,liveScroller:null,liveScrollerInset:null,rowHeight:-1,visibleRows:1,lastIndex:-1,lastRowIndex:0,lastScrollPos:0,rowIndex:0,isBuffering:false,requestQueue:-1,loadMask:false,isPrebuffering:false,reset:function(C){if(C===false){this.ds.modified=[];this.rowIndex=0;this.lastScrollPos=0;this.lastRowIndex=0;this.lastIndex=0;this.adjustVisibleRows();this.adjustScrollerPos(-this.liveScroller.dom.scrollTop,true);this.showLoadMask(false);this.refresh(true);this.fireEvent("cursormove",this,0,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);return false}else{var B={};var A=this.ds.sortInfo;if(A){B={dir:A.direction,sort:A.field}}return this.ds.load({params:B})}},renderUI:function(){var A=this.grid;var B=A.enableDragDrop||A.enableDrag;A.enableDragDrop=false;A.enableDrag=false;this._gridViewSuperclass.renderUI.call(this);var A=this.grid;A.enableDragDrop=B;A.enableDrag=B;if(B){this.dragZone=new Ext.ux.grid.livegrid.DragZone(A,{ddGroup:A.ddGroup||"GridDD"})}if(this.loadMask){this.loadMask=new Ext.LoadMask(this.mainBody.dom.parentNode.parentNode,this.loadMask)}},init:function(A){this._gridViewSuperclass.init.call(this,A);A.on("expand",this._onExpand,this)},initData:function(B,A){if(this.ds){this.ds.un("bulkremove",this.onBulkRemove,this);this.ds.un("beforeload",this.onBeforeLoad,this)}if(B){B.on("bulkremove",this.onBulkRemove,this);B.on("beforeload",this.onBeforeLoad,this)}this._gridViewSuperclass.initData.call(this,B,A)},renderBody:function(){var A=this.renderRows(0,this.visibleRows-1);return this.templates.body.apply({rows:A})},doRender:function(C,B,E,A,D,F){return this._gridViewSuperclass.doRender.call(this,C,B,E,A+this.ds.bufferRange[0],D,F)},initElements:function(){var D=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new D(B);this.mainWrap=new D(A[1]);this.liveScroller=new D(A[0]);this.liveScrollerInset=this.liveScroller.dom.firstChild;this.liveScroller.on("scroll",this.onLiveScroll,this,{buffer:this.scrollDelay});var C=this.mainWrap.dom.firstChild;this.mainHd=new D(C);this.hdHeight=C.offsetHeight;this.innerHd=this.mainHd.dom.firstChild;this.scroller=new D(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new D(this.scroller.dom.firstChild);this.mainBody.on("mousewheel",this.handleWheel,this);this.focusEl=new D(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new D(A[2]);this.resizeProxy=new D(A[3])},layout:function(){if(!this.mainBody){return }var E=this.grid;var G=E.getGridEl(),I=this.cm,B=E.autoExpandColumn,A=this;var C=G.getSize(true);var H=C.width;if(H<20||C.height<20){return }if(E.autoHeight){this.scroller.dom.style.overflow="visible"}else{this.el.setSize(C.width,C.height);var F=this.mainHd.getHeight();var D=C.height-(F);this.scroller.setSize(H,D);if(this.innerHd){this.innerHd.style.width=(H)+"px"}}this.liveScroller.dom.style.top=this.hdHeight+"px";if(this.forceFit){if(this.lastViewWidth!=H){this.fitColumns(false,false);this.lastViewWidth=H}}else{this.autoExpand()}this.adjustVisibleRows();this.adjustBufferInset();this.onLayout(H,D)},removeRow:function(A){Ext.removeNode(this.getRow(A))},removeRows:function(C,A){var B=this.mainBody.dom;for(var D=C;D<=A;D++){Ext.removeNode(B.childNodes[C])}},_onExpand:function(A){this.adjustVisibleRows();this.adjustBufferInset();this.adjustScrollerPos(this.rowHeight*this.rowIndex,true)},onColumnMove:function(A,C,B){this.indexMap=null;this.replaceLiveRows(this.rowIndex,true);this.updateHeaders();this.updateHeaderSortState();this.afterMove(B)},onColumnWidthUpdated:function(C,A,B){this.adjustVisibleRows();this.adjustBufferInset()},onAllColumnWidthsUpdated:function(A,B){this.adjustVisibleRows();this.adjustBufferInset()},onRowSelect:function(A){if(Athis.rowIndex+this.visibleRows){return }this.addRowClass(A,"x-grid3-row-selected")},onRowDeselect:function(A){if(Athis.rowIndex+this.visibleRows){return }this.removeRowClass(A,"x-grid3-row-selected")},onClear:function(){this.reset(false)},onBulkRemove:function(L,M){var H=null;var J=0;var O=0;var K=M.length;var A=false;var I=false;var F=0;if(K==0){return }var C=this.rowIndex;var B=0;var E=0;var D=0;for(var G=0;G=this.rowIndex&&O<=this.rowIndex+(this.visibleRows-1)){D++}else{if(O>=this.rowIndex+this.visibleRows){E++}}}this.fireEvent("beforerowremoved",this,O,H);this.fireEvent("rowremoved",this,O,H)}var N=this.ds.totalLength;this.rowIndex=Math.max(0,Math.min(this.rowIndex-B,N-(this.visibleRows-1)));this.lastRowIndex=this.rowIndex;this.adjustScrollerPos(-(B*this.rowHeight),true);this.updateLiveRows(this.rowIndex,true);this.adjustBufferInset();this.processRows(0,undefined,false)},onRemove:function(C,A,B){this.onBulkRemove(C,[[A,B]])},onAdd:function(B,C,G){var F=C.length;if(G==Number.MAX_VALUE||G==Number.MIN_VALUE){this.fireEvent("beforerowsinserted",this,G,G);if(G==Number.MIN_VALUE){this.rowIndex=this.rowIndex+F;this.lastRowIndex=this.rowIndex;this.adjustBufferInset();this.adjustScrollerPos(this.rowHeight*F,true);this.fireEvent("rowsinserted",this,G,G,F);this.processRows(0,undefined,false);this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);return }this.adjustBufferInset();this.fireEvent("rowsinserted",this,G,G,F);return }var A=G+this.ds.bufferRange[0];var E=A+(F-1);var H=this.getRows().length;var D=0;var I=0;if(A>this.rowIndex+(this.visibleRows-1)){this.fireEvent("beforerowsinserted",this,A,E);this.fireEvent("rowsinserted",this,A,E,F);this.adjustVisibleRows();this.adjustBufferInset()}else{if(A>=this.rowIndex&&A<=this.rowIndex+(this.visibleRows-1)){D=G;I=G+(F-1);this.lastRowIndex=this.rowIndex;this.rowIndex=(A>this.rowIndex)?this.rowIndex:A;this.insertRows(B,D,I);if(this.lastRowIndex!=this.rowIndex){this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength)}this.adjustVisibleRows();this.adjustBufferInset()}else{if(A=0){var C=this.requestQueue;this.requestQueue=-1;this.updateLiveRows(C)}return }else{this.fireEvent("bufferfailure",this,this.ds,B)}this.requestQueue=-1;this.isBuffering=false;this.isPrebuffering=false;this.showLoadMask(false)},handleWheel:function(A){if(this.rowHeight==-1){A.stopEvent();return }var B=A.getWheelDelta();this.adjustScrollerPos(-(B*this.rowHeight));A.stopEvent()},onLiveScroll:function(){var A=this.liveScroller.dom.scrollTop;var B=Math.floor((A)/this.rowHeight);this.rowIndex=B;if(B==this.lastRowIndex){return }this.updateLiveRows(B);this.lastScrollPos=this.liveScroller.dom.scrollTop},refreshRow:function(A){var D=this.ds,C;if(typeof A=="number"){C=A;A=D.getAt(C)}else{C=D.indexOf(A)}var B=C+this.ds.bufferRange[0];if(B=this.rowIndex+this.visibleRows){this.fireEvent("rowupdated",this,B,A);return }this.insertRows(D,C,C,true);this.fireEvent("rowupdated",this,B,A)},processRows:function(I,H,E){H=H||!this.grid.stripeRows;I=0;var N=this.getRows();var K=" x-grid3-row-alt ";var J=this.rowIndex;var G=0;var A=this.grid.selModel.selections;var B=this.ds;var M=null;for(var D=I,F=N.length;D=this.visibleRows){this.removeRows((this.visibleRows-1)-(M-B),this.visibleRows-1)}else{if(L){this.removeRows(A-this.rowIndex,F-this.rowIndex)}}var G=(B==M)?M:Math.min(M,(this.rowIndex-this.ds.bufferRange[0])+(this.visibleRows-1));var D=this.renderRows(B,G);var I=this.getRow(A);if(I){Ext.DomHelper.insertHtml("beforeBegin",I,D)}else{Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,D)}if(L===true){var K=this.getRows();var J=this.rowIndex;for(var C=0,H=K.length;C=this.ds.totalLength){return }C=(C!==undefined?C:0);var H=K-this.rowIndex;if(this.rowClipped&&K==this.rowIndex+this.visibleRows-1){this.adjustScrollerPos(this.rowHeight)}else{if(K>=this.rowIndex+this.visibleRows){this.adjustScrollerPos(((K-(this.rowIndex+this.visibleRows))+1)*this.rowHeight)}else{if(K<=this.rowIndex){this.adjustScrollerPos((H)*this.rowHeight)}}}var G=this.getRow(K),D;if(!G){return }if(!(B===false&&C===0)){while(this.cm.isHidden(C)){C++}D=this.getCell(K,C)}var J=this.scroller.dom;if(B!==false){var I=parseInt(D.offsetLeft,10);var F=I+D.offsetWidth;var E=parseInt(J.scrollLeft,10);var A=E+J.clientWidth;if(IA){J.scrollLeft=F-J.clientWidth}}}return D?Ext.fly(D).getXY():[J.scrollLeft+this.el.getX(),Ext.fly(G).getY()]},isRecordRendered:function(A){var B=this.ds.indexOf(A);if(B>=this.rowIndex&&B=this.ds.bufferRange[0])&&(A<=this.ds.bufferRange[1])},getPredictedBufferIndex:function(A,B,C){if(!B){if(A+this.ds.bufferSize>=this.ds.totalLength){return this.ds.totalLength-this.ds.bufferSize}return Math.max(0,(A+this.visibleRows)-Math.round(this.ds.bufferSize/2))}if(!C){return Math.max(0,(A-this.ds.bufferSize)+this.visibleRows)}if(C){return Math.max(0,Math.min(A,this.ds.totalLength-this.ds.bufferSize))}},updateLiveRows:function(G,H,D){var J=this.isInRange(G);if(this.isBuffering){if(this.isPrebuffering){if(J){this.replaceLiveRows(G,H)}else{this.showLoadMask(true)}}this.fireEvent("cursormove",this,G,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);this.requestQueue=G;return }var E=this.lastIndex;this.lastIndex=G;var J=this.isInRange(G);var I=false;if(J&&D!==true){this.replaceLiveRows(G,H);this.fireEvent("cursormove",this,G,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);if(G>E){I=true;var K=this.ds.totalLength;if(G+this.visibleRows+this.nearLimit<=this.ds.bufferRange[1]){return }if(this.ds.bufferRange[1]+1>=K){return }}else{if(Gthis.ds.bufferRange[0]){return }}else{return }}this.isPrebuffering=true}this.isBuffering=true;var B=this.getPredictedBufferIndex(G,J,I);if(!J){this.showLoadMask(true)}this.ds.suspendEvents();var F=this.ds.sortInfo;var C={};if(this.ds.lastOptions){Ext.apply(C,this.ds.lastOptions.params)}C.start=B;C.limit=this.ds.bufferSize;if(F){C.dir=F.direction;C.sort=F.field}var A={forceRepaint:H,callback:this.liveBufferUpdate,scope:this,params:C,suspendLoadEvent:true};this.fireEvent("beforebuffer",this,this.ds,G,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength,A);this.ds.load(A);this.ds.resumeEvents()},showLoadMask:function(A){if(!this.loadMask){return}if(A){this.loadMask.show();this.liveScroller.setStyle("zIndex",this._maskIndex)}else{this.loadMask.hide();this.liveScroller.setStyle("zIndex",1)}},replaceLiveRows:function(H,G,C){var D=H-this.lastRowIndex;if(D==0&&G!==true){return }var A=D>0;D=Math.abs(D);var B=this.ds.bufferRange;var I=H-B[0];var E=Math.min(I+this.visibleRows-1,B[1]-B[0]);if(D>=this.visibleRows||D==0){this.mainBody.update(this.renderRows(I,E))}else{if(A){this.removeRows(0,D-1);if(I+this.visibleRows-D<=B[1]-B[0]){var F=this.renderRows(I+this.visibleRows-D,E);Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,F)}}else{this.removeRows(this.visibleRows-D,this.visibleRows-1);var F=this.renderRows(I,I+D-1);Ext.DomHelper.insertHtml("beforeBegin",this.mainBody.dom.firstChild,F)}}if(C!==false){this.processRows(0,undefined,true)}this.lastRowIndex=H},adjustBufferInset:function(){var B=this.liveScroller.dom;var D=this.grid,E=D.store;var H=D.getGridEl();var C=H.getSize().width;var F=(E.totalLength==this.visibleRows-this.rowClipped)?0:Math.max(0,E.totalLength-(this.visibleRows-this.rowClipped));if(F==0){this.scroller.setWidth(C);B.style.display="none";return }else{this.scroller.setWidth(C-this.scrollOffset);B.style.display=""}var G=this.cm.getTotalWidth()+this.scrollOffset>C;var A=B.parentNode.offsetHeight+((E.totalLength>0&&G)?-this.horizontalScrollOffset:0)-this.hdHeight;B.style.height=Math.max(A,this.horizontalScrollOffset*2)+"px";if(this.rowHeight==-1){return }this.liveScrollerInset.style.height=(F==0?0:A+(F*this.rowHeight))+"px"},adjustVisibleRows:function(){if(this.rowHeight==-1){if(this.getRows()[0]){this.rowHeight=this.getRows()[0].offsetHeight;if(this.rowHeight<=0){this.rowHeight=-1;return }}else{return }}var E=this.grid,C=E.store;var F=E.getGridEl();var H=this.cm;var J=F.getSize();var B=J.width;var D=J.height;var G=B-this.scrollOffset;if(H.getTotalWidth()>G){D-=this.horizontalScrollOffset}D-=this.mainHd.getHeight();var I=C.totalLength||0;var A=Math.max(1,Math.floor(D/this.rowHeight));this.rowClipped=0;if(I>A&&this.rowHeight/3<(D-(A*this.rowHeight))){A=Math.min(A+1,I);this.rowClipped=1}if(this.visibleRows==A){return }this.visibleRows=A;if(this.isBuffering&&!this.isPrebuffering){return }if(this.rowIndex+(A-this.rowClipped)>I){this.rowIndex=Math.max(0,I-(A-this.rowClipped));this.lastRowIndex=this.rowIndex}this.updateLiveRows(this.rowIndex,true)},adjustScrollerPos:function(D,A){if(D==0){return }var C=this.liveScroller;var B=C.dom;if(A===true){C.un("scroll",this.onLiveScroll,this)}this.lastScrollPos=B.scrollTop;B.scrollTop+=D;if(A===true){B.scrollTop=B.scrollTop;C.on("scroll",this.onLiveScroll,this,{buffer:this.scrollDelay})}}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.JsonReader=function(A,B){Ext.ux.grid.livegrid.JsonReader.superclass.constructor.call(this,A,B)};Ext.extend(Ext.ux.grid.livegrid.JsonReader,Ext.data.JsonReader,{readRecords:function(D){var B=this.meta;if(!this.ef&&B.versionProperty){this.getVersion=this.getJsonAccessor(B.versionProperty)}if(!this.__readRecords){this.__readRecords=Ext.ux.grid.livegrid.JsonReader.superclass.readRecords}var C=this.__readRecords.call(this,D);if(B.versionProperty){var A=this.getVersion(D);C.version=(A===undefined||A==="")?null:A}return C}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.RowSelectionModel=function(A){this.addEvents({selectiondirty:true});Ext.apply(this,A);this.pendingSelections={};Ext.ux.grid.livegrid.RowSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.ux.grid.livegrid.RowSelectionModel,Ext.grid.RowSelectionModel,{initEvents:function(){Ext.ux.grid.livegrid.RowSelectionModel.superclass.initEvents.call(this);this.grid.view.on("rowsinserted",this.onAdd,this);this.grid.store.on("selectionsload",this.onSelectionsLoad,this)},onRemove:function(B,D,G){var A=this.getPendingSelections();var C=A.length;var F=false;if(D==Number.MIN_VALUE||D==Number.MAX_VALUE){if(G){if(this.isIdSelected(G.id)&&D==Number.MIN_VALUE){this.shiftSelections(this.grid.store.bufferRange[1],-1)}this.selections.remove(G);F=true}if(D==Number.MIN_VALUE){this.clearPendingSelections(0,this.grid.store.bufferRange[0])}else{this.clearPendingSelections(this.grid.store.bufferRange[1])}if(C!=0){this.fireEvent("selectiondirty",this,D,1)}}else{F=this.isIdSelected(G.id);if(!F){return }this.selections.remove(G);if(C!=0){var H=A[0];var E=A[C-1];if(D<=E||D<=H){this.shiftSelections(D,-1);this.fireEvent("selectiondirty",this,D,1)}}}if(F){this.fireEvent("selectionchange",this)}},onAdd:function(G,E,D,B){var A=this.getPendingSelections();var H=A.length;if((E==Number.MIN_VALUE||E==Number.MAX_VALUE)){if(E==Number.MIN_VALUE){this.clearPendingSelections(0,this.grid.store.bufferRange[0]);this.shiftSelections(this.grid.store.bufferRange[1],B)}else{this.clearPendingSelections(this.grid.store.bufferRange[1])}if(H!=0){this.fireEvent("selectiondirty",this,E,r)}return }var F=A[0];var C=A[H-1];var I=E;if(I<=C||I<=F){this.fireEvent("selectiondirty",this,I,B);this.shiftSelections(I,B)}},shiftSelections:function(L,C){var H=0;var K=0;var B={};var D=this.grid.store;var I=L-D.bufferRange[0];var F=0;var M=this.grid.store.totalLength;var E=null;var A=this.getPendingSelections();var J=A.length;if(J==0){return }for(var G=0;G=M){break}E=D.getAt(F);if(E){this.selections.add(E)}else{B[K]=true}}this.pendingSelections=B},onSelectionsLoad:function(C,B,A){this.replaceSelections(B)},hasNext:function(){return this.last!==false&&(this.last+1)=this.grid.store.getTotalCount()){return }var C=this.grid.store.getAt(B);if(this.fireEvent("beforerowselect",this,B,D,C)!==false){if(!D||this.singleSelect){this.clearSelections()}if(C){this.selections.add(C);delete this.pendingSelections[B]}else{this.pendingSelections[B]=true}this.last=this.lastActive=B;if(!A){this.grid.getView().onRowSelect(B)}this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},clearPendingSelections:function(G,F){if(F==undefined){F=Number.MAX_VALUE}var B={};var A=this.getPendingSelections();var D=A.length;var C=0;for(var E=0;E=G){continue}B[C]=true}this.pendingSelections=B},replaceSelections:function(E){if(!E||E.length==0){return }var D=this.grid.store;var F=null;var I=[];var A=this.getPendingSelections();var J=A.length;var C=this.selections;var H=0;for(var G=0;GH){return 1}else{if(I=A;C--){this.selectRow(C,true)}}}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.Store=function(A){A=A||{};A.remoteSort=true;this._autoLoad=A.autoLoad?true:false;A.autoLoad=false;this.addEvents("bulkremove","versionchange","beforeselectionsload","selectionsload");Ext.ux.grid.livegrid.Store.superclass.constructor.call(this,A);this.totalLength=0;this.bufferRange=[-1,-1];this.on("clear",function(){this.bufferRange=[-1,-1]},this);if(this.url&&!this.selectionsProxy){this.selectionsProxy=new Ext.data.HttpProxy({url:this.url})}};Ext.extend(Ext.ux.grid.livegrid.Store,Ext.data.Store,{version:null,insert:function(D,C){C=[].concat(C);D=D>=this.bufferSize?Number.MAX_VALUE:D;if(D==Number.MIN_VALUE||D==Number.MAX_VALUE){var B=C.length;if(D==Number.MIN_VALUE){this.bufferRange[0]+=B;this.bufferRange[1]+=B}this.totalLength+=B;this.fireEvent("add",this,C,D);return }var F=false;var G=C;if(C.length+D>=this.bufferSize){F=true;G=C.splice(0,this.bufferSize-D)}this.totalLength+=G.length;if(this.bufferRange[0]<=-1){this.bufferRange[0]=0}if(this.bufferRange[1]<(this.bufferSize-1)){this.bufferRange[1]=Math.min(this.bufferRange[1]+G.length,this.bufferSize-1)}for(var E=0,A=G.length;Ethis.bufferSize){this.data.remove(this.data.last())}this.fireEvent("add",this,G,D);if(F==true){this.fireEvent("add",this,C,Number.MAX_VALUE)}},remove:function(B,A){var C=this._getIndex(B);if(C<0){this.totalLength-=1;if(this.pruneModifiedRecords){this.modified.remove(B)}this.bufferRange[0]=Math.max(-1,this.bufferRange[0]-1);this.bufferRange[1]=Math.max(-1,this.bufferRange[1]-1);if(A!==true){this.fireEvent("remove",this,B,C)}return C}this.bufferRange[1]=Math.max(-1,this.bufferRange[1]-1);this.data.removeAt(C);if(this.pruneModifiedRecords){this.modified.remove(B)}this.totalLength-=1;if(A!==true){this.fireEvent("remove",this,B,C)}return C},_getIndex:function(A){var B=this.indexOfId(A.id);if(B<0){B=this.findInsertIndex(A)}return B},bulkRemove:function(B){var G=null;var E=[];var D=0;var A=B.length;var F=[];for(var C=0;C0&&!this.selectionsProxy.activeRequest&&this.fireEvent("beforeselectionsload",this,B)!==false){var E=this.lastOptions.params;var F={};F.ranges=Ext.encode(B);if(E){if(E.sort){F.sort=E.sort}if(E.dir){F.dir=E.dir}}var C={};for(var D in this.lastOptions){C.i=this.lastOptions.i}C.ranges=F.ranges;this.selectionsProxy.load(F,this.reader,this.selectionsLoaded,this,C)}},loadSelections:function(A){if(A.length==0){return }this.loadRanges(A)},selectionsLoaded:function(F,B,E){if(this.checkVersionChange(F,B,E)!==false){var D=F.records;for(var C=0,A=D.length;C0&&B==0){return Number.MIN_VALUE}else{if(B>=this.bufferSize){return Number.MAX_VALUE}}}return B},sortData:function(C,D){D=D||"ASC";var A=this.fields.get(C).sortType;var B=function(F,E){var H=A(F.data[C]),G=A(E.data[C]);return H>G?1:(H
      ','
      ','
      {header}
      ','
      {body}
      ',"
      ",'
       
      ','
       
      ',"");this._gridViewSuperclass=Ext.ux.grid.livegrid.GridView.superclass;this._gridViewSuperclass.constructor.call(this)};Ext.extend(Ext.ux.grid.livegrid.GridView,Ext.grid.GridView,{hdHeight:0,rowClipped:0,liveScroller:null,liveScrollerInsets:null,rowHeight:-1,visibleRows:1,lastIndex:-1,lastRowIndex:0,lastScrollPos:0,rowIndex:0,isBuffering:false,requestQueue:-1,loadMask:false,loadMaskDisplayed:false,isPrebuffering:false,_loadMaskAnchor:null,reset:function(D){if(D===false){this.ds.modified=[];this.rowIndex=0;this.lastScrollPos=0;this.lastRowIndex=0;this.lastIndex=0;this.adjustVisibleRows();this.adjustScrollerPos(-this.liveScroller.dom.scrollTop,true);this.showLoadMask(false);var B=this.processRows;this.processRows=Ext.emptyFn;this.refresh(true);this.processRows=B;this.processRows(0);this.fireEvent("cursormove",this,0,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);return false}else{var C={};var A=this.ds.sortInfo;if(A){C={dir:A.direction,sort:A.field}}return this.ds.load({params:C})}},render:function(){if(this.autoFill){var A=this.grid.ownerCt;if(A&&A.getLayout()){A.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders();this.updateHeaderSortState()},this,{single:true})}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.grid.getGridEl().dom.innerHTML=this.renderUI();this.afterRenderUI()},renderUI:function(){var B=this.grid;var C=B.enableDragDrop||B.enableDrag;B.enableDragDrop=false;B.enableDrag=false;var A=this._gridViewSuperclass.renderUI.call(this);var B=this.grid;B.enableDragDrop=C;B.enableDrag=C;if(C){this.dragZone=new Ext.ux.grid.livegrid.DragZone(B,{ddGroup:B.ddGroup||"GridDD"})}return A},afterRenderUI:function(){this._gridViewSuperclass.afterRenderUI.call(this);if(this.loadMask){this._loadMaskAnchor=Ext.get(this.mainBody.dom.parentNode.parentNode);Ext.apply(this.loadMask,{msgCls:"x-mask-loading"});this._loadMaskAnchor.mask(this.loadMask.msg,this.loadMask.msgCls);var B=this._loadMaskAnchor.dom;var A=Ext.Element.data;A(B,"mask").addClass("ext-ux-livegrid");A(B,"mask").setDisplayed(false);A(B,"maskMsg").setDisplayed(false)}},init:function(A){this._gridViewSuperclass.init.call(this,A);A.on("expand",this._onExpand,this)},initData:function(B,A){if(this.ds){this.ds.un("bulkremove",this.onBulkRemove,this);this.ds.un("beforeload",this.onBeforeLoad,this)}if(B){B.on("bulkremove",this.onBulkRemove,this);B.on("beforeload",this.onBeforeLoad,this)}this._gridViewSuperclass.initData.call(this,B,A)},renderBody:function(){var A=this.renderRows(0,this.visibleRows-1);return this.templates.body.apply({rows:A})},doRender:function(C,B,E,A,D,F){return this._gridViewSuperclass.doRender.call(this,C,B,E,A+this.ds.bufferRange[0],D,F)},initElements:function(){var F=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new F(B);this.mainWrap=new F(A[1]);this.liveScroller=new F(A[0]);var D=this.liveScroller.dom.firstChild;this.liveScrollerInsets=[D,D.nextSibling,D.nextSibling.nextSibling];this.liveScroller.on("scroll",this.onLiveScroll,this,{buffer:this.scrollDelay});var C=this.mainWrap.dom.firstChild;this.mainHd=new F(C);this.hdHeight=C.offsetHeight;this.innerHd=this.mainHd.dom.firstChild;this.scroller=new F(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new F(this.scroller.dom.firstChild);this.mainBody.on("mousewheel",this.handleWheel,this);this.focusEl=new F(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new F(A[2]);this.resizeProxy=new F(A[3])},layout:function(){if(!this.mainBody){return }var E=this.grid;var G=E.getGridEl(),I=this.cm,B=E.autoExpandColumn,A=this;var C=G.getSize(true);var H=C.width;if(!E.hideHeaders&&H<20||C.height<20){return }if(E.autoHeight){this.scroller.dom.style.overflow="visible";if(Ext.isWebKit){this.scroller.dom.style.position="static"}}else{this.el.setSize(C.width,C.height);var F=this.mainHd.getHeight();var D=C.height-(F);this.scroller.setSize(H,D);if(this.innerHd){this.innerHd.style.width=(H)+"px"}}this.liveScroller.dom.style.top=this.hdHeight+"px";if(this.forceFit){if(this.lastViewWidth!=H){this.fitColumns(false,false);this.lastViewWidth=H}}else{this.autoExpand()}this.adjustVisibleRows();this.adjustBufferInset();this.onLayout(H,D)},removeRow:function(A){Ext.removeNode(this.getRow(A))},removeRows:function(C,A){var B=this.mainBody.dom;for(var D=C;D<=A;D++){Ext.removeNode(B.childNodes[C])}},_onExpand:function(A){this.adjustVisibleRows();this.adjustBufferInset();this.adjustScrollerPos(this.rowHeight*this.rowIndex,true)},onColumnMove:function(A,C,B){this.indexMap=null;this.replaceLiveRows(this.rowIndex,true);this.updateHeaders();this.updateHeaderSortState();this.afterMove(B);this.grid.fireEvent("columnmove",C,B)},onColumnWidthUpdated:function(C,A,B){this.adjustVisibleRows();this.adjustBufferInset()},onAllColumnWidthsUpdated:function(A,B){this.adjustVisibleRows();this.adjustBufferInset()},onRowSelect:function(A){if(Athis.rowIndex+this.visibleRows){return }this.addRowClass(A,this.selectedRowClass)},onRowDeselect:function(A){if(Athis.rowIndex+this.visibleRows){return }this.removeRowClass(A,this.selectedRowClass)},onClear:function(){this.reset(false)},onBulkRemove:function(L,M){var H=null;var J=0;var O=0;var K=M.length;var A=false;var I=false;var F=0;if(K==0){return }var C=this.rowIndex;var B=0;var E=0;var D=0;for(var G=0;G=this.rowIndex&&O<=this.rowIndex+(this.visibleRows-1)){D++}else{if(O>=this.rowIndex+this.visibleRows){E++}}}this.fireEvent("beforerowremoved",this,O,H);this.fireEvent("rowremoved",this,O,H)}var N=this.ds.totalLength;this.rowIndex=Math.max(0,Math.min(this.rowIndex-B,N-(this.visibleRows-1)));this.lastRowIndex=this.rowIndex;this.adjustScrollerPos(-(B*this.rowHeight),true);this.updateLiveRows(this.rowIndex,true);this.adjustBufferInset();this.processRows(0,undefined,false)},onRemove:function(C,A,B){this.onBulkRemove(C,[[A,B]])},onAdd:function(B,C,G){if(this._checkEmptyBody){if(this.mainBody.dom.innerHTML==" "){this.mainBody.dom.innerHTML=""}this._checkEmptyBody=false}var F=C.length;if(G==Number.MAX_VALUE||G==Number.MIN_VALUE){this.fireEvent("beforerowsinserted",this,G,G);if(G==Number.MIN_VALUE){this.rowIndex=this.rowIndex+F;this.lastRowIndex=this.rowIndex;this.adjustBufferInset();this.adjustScrollerPos(this.rowHeight*F,true);this.fireEvent("rowsinserted",this,G,G,F);this.processRows(0,undefined,false);this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);return }this.adjustBufferInset();this.fireEvent("rowsinserted",this,G,G,F);return }var A=G+this.ds.bufferRange[0];var E=A+(F-1);var H=this.getRows().length;var D=0;var I=0;if(A>this.rowIndex+(this.visibleRows-1)){this.fireEvent("beforerowsinserted",this,A,E);this.fireEvent("rowsinserted",this,A,E,F);this.adjustVisibleRows();this.adjustBufferInset()}else{if(A>=this.rowIndex&&A<=this.rowIndex+(this.visibleRows-1)){D=G;I=G+(F-1);this.lastRowIndex=this.rowIndex;this.rowIndex=(A>this.rowIndex)?this.rowIndex:A;this.insertRows(B,D,I);if(this.lastRowIndex!=this.rowIndex){this.fireEvent("cursormove",this,this.rowIndex,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength)}this.adjustVisibleRows();this.adjustBufferInset()}else{if(A=0){var C=this.requestQueue;this.requestQueue=-1;this.updateLiveRows(C);return }if(this.isInRange(this.rowIndex)){this.replaceLiveRows(this.rowIndex,B.forceRepaint)}else{this.updateLiveRows(this.rowIndex)}return }else{this.fireEvent("bufferfailure",this,this.ds,B)}this.requestQueue=-1;this.isBuffering=false;this.isPrebuffering=false;this.showLoadMask(false)},handleWheel:function(A){if(this.rowHeight==-1){A.stopEvent();return }var B=A.getWheelDelta();this.adjustScrollerPos(-(B*this.rowHeight));A.stopEvent()},onLiveScroll:function(){var A=this.liveScroller.dom.scrollTop;var B=Math.floor((A)/this.rowHeight);this.rowIndex=B;if(B==this.lastRowIndex){return }this.updateLiveRows(B);this.lastScrollPos=this.liveScroller.dom.scrollTop},refreshRow:function(A){var D=this.ds,C;if(typeof A=="number"){C=A;A=D.getAt(C)}else{C=D.indexOf(A)}var B=C+this.ds.bufferRange[0];if(B=this.rowIndex+this.visibleRows){this.fireEvent("rowupdated",this,B,A);return }this.insertRows(D,C,C,true);this.fireEvent("rowupdated",this,B,A)},processRows:function(F,D,A){if(!this.ds||this.ds.getCount()<1){return }D=D||!this.grid.stripeRows;var G=this.rowIndex;var I=this.getRows();var C=0;var H=null;for(var E=0,B=I.length;E=this.visibleRows){this.removeRows((this.visibleRows-1)-(M-B),this.visibleRows-1)}else{if(L){this.removeRows(A-this.rowIndex,F-this.rowIndex)}}var G=(B==M)?M:Math.min(M,(this.rowIndex-this.ds.bufferRange[0])+(this.visibleRows-1));var D=this.renderRows(B,G);var I=this.getRow(A);if(I){Ext.DomHelper.insertHtml("beforeBegin",I,D)}else{Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,D)}if(L===true){var K=this.getRows();var J=this.rowIndex;for(var C=0,H=K.length;C=this.ds.totalLength){return }C=(C!==undefined?C:0);var H=K-this.rowIndex;if(this.rowClipped&&K==this.rowIndex+this.visibleRows-1){this.adjustScrollerPos(this.rowHeight)}else{if(K>=this.rowIndex+this.visibleRows){this.adjustScrollerPos(((K-(this.rowIndex+this.visibleRows))+1)*this.rowHeight)}else{if(K<=this.rowIndex){this.adjustScrollerPos((H)*this.rowHeight)}}}var G=this.getRow(K),D;if(!G){return }if(!(B===false&&C===0)){while(this.cm.isHidden(C)){C++}D=this.getCell(K,C)}var J=this.scroller.dom;if(B!==false){var I=parseInt(D.offsetLeft,10);var F=I+D.offsetWidth;var E=parseInt(J.scrollLeft,10);var A=E+J.clientWidth;if(IA){J.scrollLeft=F-J.clientWidth}}}return D?Ext.fly(D).getXY():[J.scrollLeft+this.el.getX(),Ext.fly(G).getY()]},isRecordRendered:function(A){var B=this.ds.indexOf(A);if(B>=this.rowIndex&&B=this.ds.bufferRange[0])&&(A<=this.ds.bufferRange[1])},getPredictedBufferIndex:function(A,B,C){if(!B){if(A+this.ds.bufferSize>=this.ds.totalLength){return this.ds.totalLength-this.ds.bufferSize}return Math.max(0,(A+this.visibleRows)-Math.round(this.ds.bufferSize/2))}if(!C){return Math.max(0,(A-this.ds.bufferSize)+this.visibleRows)}if(C){return Math.max(0,Math.min(A,this.ds.totalLength-this.ds.bufferSize))}},updateLiveRows:function(G,H,D){var J=this.isInRange(G);if(this.isBuffering){if(this.isPrebuffering){if(J){this.replaceLiveRows(G,H)}else{this.showLoadMask(true)}}this.fireEvent("cursormove",this,G,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);this.requestQueue=G;return }var E=this.lastIndex;this.lastIndex=G;var J=this.isInRange(G);var I=false;if(J&&D!==true){this.replaceLiveRows(G,H);this.fireEvent("cursormove",this,G,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength);if(G>E){I=true;var K=this.ds.totalLength;if(G+this.visibleRows+this.nearLimit<=this.ds.bufferRange[1]){return }if(this.ds.bufferRange[1]+1>=K){return }}else{if(Gthis.ds.bufferRange[0]){return }}else{return }}this.isPrebuffering=true}this.isBuffering=true;var B=this.getPredictedBufferIndex(G,J,I);if(!J){this.showLoadMask(true)}this.ds.suspendEvents();var F=this.ds.sortInfo;var C={};if(this.ds.lastOptions){Ext.apply(C,this.ds.lastOptions.params)}C.start=B;C.limit=this.ds.bufferSize;if(F){C.dir=F.direction;C.sort=F.field}var A={forceRepaint:H,callback:this.liveBufferUpdate,scope:this,params:C,suspendLoadEvent:true};this.fireEvent("beforebuffer",this,this.ds,G,Math.min(this.ds.totalLength,this.visibleRows-this.rowClipped),this.ds.totalLength,A);this.ds.load(A);this.ds.resumeEvents()},showLoadMask:function(B){if(!this.loadMask||B==this.loadMaskDisplayed){return }var E=this._loadMaskAnchor.dom;var D=Ext.Element.data;var A=D(E,"mask");var C=D(E,"maskMsg");if(B){A.setDisplayed(true);C.setDisplayed(true);C.center(this._loadMaskAnchor);if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this._loadMaskAnchor.getStyle("height")=="auto"){A.setSize(undefined,this._loadMaskAnchor.getHeight())}}else{A.setDisplayed(false);C.setDisplayed(false)}this.loadMaskDisplayed=B},replaceLiveRows:function(H,G,C){var D=H-this.lastRowIndex;if(D==0&&G!==true){return }var A=D>0;D=Math.abs(D);var B=this.ds.bufferRange;var I=H-B[0];var E=Math.min(I+this.visibleRows-1,B[1]-B[0]);if(D>=this.visibleRows||D==0){this.mainBody.update(this.renderRows(I,E))}else{if(A){this.removeRows(0,D-1);if(I+this.visibleRows-D<=B[1]-B[0]){var F=this.renderRows(I+this.visibleRows-D,E);Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,F)}}else{this.removeRows(this.visibleRows-D,this.visibleRows-1);var F=this.renderRows(I,I+D-1);Ext.DomHelper.insertHtml("beforeBegin",this.mainBody.dom.firstChild,F)}}if(C!==false){this.processRows(0,undefined,true)}this.lastRowIndex=H},adjustBufferInset:function(){var H=this.liveScroller.dom;var E=this.grid,B=E.store;var G=E.getGridEl();var K=G.getSize().width;var A=(B.totalLength==this.visibleRows-this.rowClipped)?0:Math.max(0,B.totalLength-(this.visibleRows-this.rowClipped));if(A==0){this.scroller.setWidth(K);H.style.display="none";return }else{this.scroller.setWidth(K-this.getScrollOffset());H.style.display=""}var L=this.cm.getTotalWidth()+this.getScrollOffset()>K;var J=H.parentNode.offsetHeight+((B.totalLength>0&&L)?-this.horizontalScrollOffset:0)-this.hdHeight;H.style.height=Math.max(J,this.horizontalScrollOffset*2)+"px";if(this.rowHeight==-1){return }var D=(A==0?0:J+(A*this.rowHeight));var I=D;var F=this.liveScrollerInsets.length;if(D==0){D=0}else{D=Math.round(D/F)}for(var C=0;CG){D-=this.horizontalScrollOffset}D-=this.mainHd.getHeight();var I=C.totalLength||0;var A=Math.max(1,Math.floor(D/this.rowHeight));this.rowClipped=0;if(I>A&&this.rowHeight/3<(D-(A*this.rowHeight))){A=Math.min(A+1,I);this.rowClipped=1}if(this.visibleRows==A){return }this.visibleRows=A;if(this.isBuffering&&!this.isPrebuffering){return }if(this.rowIndex+(A-this.rowClipped)>I){this.rowIndex=Math.max(0,I-(A-this.rowClipped));this.lastRowIndex=this.rowIndex}this.updateLiveRows(this.rowIndex,true)},adjustScrollerPos:function(D,A){if(D==0){return }var C=this.liveScroller;var B=C.dom;if(A===true){C.un("scroll",this.onLiveScroll,this)}this.lastScrollPos=B.scrollTop;B.scrollTop+=D;if(A===true){B.scrollTop=B.scrollTop;C.on("scroll",this.onLiveScroll,this,{buffer:this.scrollDelay})}}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.JsonReader=function(A,B){Ext.ux.grid.livegrid.JsonReader.superclass.constructor.call(this,A,B)};Ext.extend(Ext.ux.grid.livegrid.JsonReader,Ext.data.JsonReader,{buildExtractors:function(){if(this.ef){return }var A=this.meta;if(A.versionProperty){this.getVersion=this.createAccessor(A.versionProperty)}Ext.ux.grid.livegrid.JsonReader.superclass.buildExtractors.call(this)},readRecords:function(C){if(!this.__readRecords){this.__readRecords=Ext.ux.grid.livegrid.JsonReader.superclass.readRecords}var B=this.__readRecords.call(this,C);if(this.meta.versionProperty){var A=this.getVersion(C);B.version=(A===undefined||A==="")?null:A}return B}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.RowSelectionModel=function(A){this.addEvents({selectiondirty:true});Ext.apply(this,A);this.pendingSelections={};Ext.ux.grid.livegrid.RowSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.ux.grid.livegrid.RowSelectionModel,Ext.grid.RowSelectionModel,{initEvents:function(){Ext.ux.grid.livegrid.RowSelectionModel.superclass.initEvents.call(this);this.grid.view.on("rowsinserted",this.onAdd,this);this.grid.store.on("selectionsload",this.onSelectionsLoad,this)},onRemove:function(B,D,G){var A=this.getPendingSelections();var C=A.length;var F=false;if(D==Number.MIN_VALUE||D==Number.MAX_VALUE){if(G){if(this.isIdSelected(G.id)&&D==Number.MIN_VALUE){this.shiftSelections(this.grid.store.bufferRange[1],-1)}this.selections.remove(G);F=true}if(D==Number.MIN_VALUE){this.clearPendingSelections(0,this.grid.store.bufferRange[0])}else{this.clearPendingSelections(this.grid.store.bufferRange[1])}if(C!=0){this.fireEvent("selectiondirty",this,D,1)}}else{F=this.isIdSelected(G.id);if(!F){return }this.selections.remove(G);if(C!=0){var H=A[0];var E=A[C-1];if(D<=E||D<=H){this.shiftSelections(D,-1);this.fireEvent("selectiondirty",this,D,1)}}}if(F){this.fireEvent("selectionchange",this)}},onAdd:function(G,E,D,B){var A=this.getPendingSelections();var H=A.length;if((E==Number.MIN_VALUE||E==Number.MAX_VALUE)){if(E==Number.MIN_VALUE){this.clearPendingSelections(0,this.grid.store.bufferRange[0]);this.shiftSelections(this.grid.store.bufferRange[1],B)}else{this.clearPendingSelections(this.grid.store.bufferRange[1])}if(H!=0){this.fireEvent("selectiondirty",this,E,r)}return }var F=A[0];var C=A[H-1];var I=E;if(I<=C||I<=F){this.fireEvent("selectiondirty",this,I,B);this.shiftSelections(I,B)}},shiftSelections:function(L,C){var H=0;var K=0;var B={};var D=this.grid.store;var I=L-D.bufferRange[0];var F=0;var M=this.grid.store.totalLength;var E=null;var A=this.getPendingSelections();var J=A.length;if(J==0){return }for(var G=0;G=M){break}E=D.getAt(F);if(E){this.selections.add(E)}else{B[K]=true}}this.pendingSelections=B},onSelectionsLoad:function(C,B,A){this.replaceSelections(B)},hasNext:function(){return this.last!==false&&(this.last+1)=this.grid.store.getTotalCount()){return }var C=this.grid.store.getAt(B);if(this.fireEvent("beforerowselect",this,B,D,C)!==false){if(!D||this.singleSelect){this.clearSelections()}if(C){this.selections.add(C);delete this.pendingSelections[B]}else{this.pendingSelections[B]=true}this.last=this.lastActive=B;if(!A){this.grid.getView().onRowSelect(B)}this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},clearPendingSelections:function(G,F){if(F==undefined){F=Number.MAX_VALUE}var B={};var A=this.getPendingSelections();var D=A.length;var C=0;for(var E=0;E=G){continue}B[C]=true}this.pendingSelections=B},replaceSelections:function(E){if(!E||E.length==0){return }var D=this.grid.store;var F=null;var I=[];var A=this.getPendingSelections();var J=A.length;var C=this.selections;var H=0;for(var G=0;GH){return 1}else{if(I=A;C--){this.selectRow(C,true)}}}});Ext.namespace("Ext.ux.grid.livegrid");Ext.ux.grid.livegrid.Store=function(A){A=A||{};A.remoteSort=true;this._autoLoad=A.autoLoad?true:false;A.autoLoad=false;this.addEvents("bulkremove","versionchange","beforeselectionsload","selectionsload");Ext.ux.grid.livegrid.Store.superclass.constructor.call(this,A);this.totalLength=0;this.bufferRange=[-1,-1];this.on("clear",function(){this.bufferRange=[-1,-1]},this);if(this.url&&!this.selectionsProxy){this.selectionsProxy=new Ext.data.HttpProxy({url:this.url})}};Ext.extend(Ext.ux.grid.livegrid.Store,Ext.data.Store,{version:null,insert:function(D,C){C=[].concat(C);D=D>=this.bufferSize?Number.MAX_VALUE:D;if(D==Number.MIN_VALUE||D==Number.MAX_VALUE){var B=C.length;if(D==Number.MIN_VALUE){this.bufferRange[0]+=B;this.bufferRange[1]+=B}this.totalLength+=B;this.fireEvent("add",this,C,D);return }var F=false;var G=C;if(C.length+D>=this.bufferSize){F=true;G=C.splice(0,this.bufferSize-D)}this.totalLength+=G.length;if(this.bufferRange[0]<=-1){this.bufferRange[0]=0}if(this.bufferRange[1]<(this.bufferSize-1)){this.bufferRange[1]=Math.min(this.bufferRange[1]+G.length,this.bufferSize-1)}for(var E=0,A=G.length;Ethis.bufferSize){this.data.remove(this.data.last())}this.fireEvent("add",this,G,D);if(F==true){this.fireEvent("add",this,C,Number.MAX_VALUE)}},remove:function(B,A){var C=this._getIndex(B);if(C<0){this.totalLength-=1;if(this.pruneModifiedRecords){this.modified.remove(B)}this.bufferRange[0]=Math.max(-1,this.bufferRange[0]-1);this.bufferRange[1]=Math.max(-1,this.bufferRange[1]-1);if(A!==true){this.fireEvent("remove",this,B,C)}return C}this.bufferRange[1]=Math.max(-1,this.bufferRange[1]-1);this.data.removeAt(C);if(this.pruneModifiedRecords){this.modified.remove(B)}this.totalLength-=1;if(A!==true){this.fireEvent("remove",this,B,C)}return C},_getIndex:function(A){var B=this.indexOfId(A.id);if(B<0){B=this.findInsertIndex(A)}return B},bulkRemove:function(B){var G=null;var E=[];var D=0;var A=B.length;var F=[];for(var C=0;C0&&!this.selectionsProxy.activeRequest[Ext.data.Api.actions.read]&&this.fireEvent("beforeselectionsload",this,B)!==false){var E=this.lastOptions.params;var F={};F.ranges=Ext.encode(B);if(E){if(E.sort){F.sort=E.sort}if(E.dir){F.dir=E.dir}}var C={};for(var D in this.lastOptions){C.i=this.lastOptions.i}C.ranges=F.ranges;this.selectionsProxy.doRequest(Ext.data.Api.actions.read,null,C,this.reader,this.selectionsLoaded,this,C)}},loadSelections:function(A){if(A.length==0){return }this.loadRanges(A)},selectionsLoaded:function(F,B,E){if(this.checkVersionChange(F,B,E)!==false){var D=F.records;for(var C=0,A=D.length;C0&&B==0){return Number.MIN_VALUE}else{if(B>=this.bufferSize){return Number.MAX_VALUE}}}return B},sortData:function(C,D){D=D||"ASC";var A=this.fields.get(C).sortType;var B=function(F,E){var H=A(F.data[C]),G=A(E.data[C]);return H>G?1:(H