Skip to content

Refactor namespace and version setup #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/GeoExt/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
Ext.define('GeoExt.Action', {
extend: 'Ext.Action',
alias : 'widget.gx_action',
requires: [
'GeoExt.Version'
],

/**
* The OpenLayers control wrapped in this action.
Expand Down
3 changes: 3 additions & 0 deletions src/GeoExt/FeatureRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
Ext.define('GeoExt.FeatureRenderer', {
extend: 'Ext.Component',
alias: 'widget.gx_renderer',
requires: [
'GeoExt.Version'
],

/**
* Optional vector to be drawn. If not provided, and if `symbolizers`
Expand Down
4 changes: 4 additions & 0 deletions src/GeoExt/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
};

Ext.define('GeoExt.Form', {
requires: [
'GeoExt.Version'
],

singleton: true,

/**
Expand Down
16 changes: 0 additions & 16 deletions src/GeoExt/GeoExt.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/GeoExt/Lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
Ext.define('GeoExt.Lang', {
extend: 'Ext.util.Observable',
singleton: true,
requires: [
'GeoExt.Version'
],

/**
* The current language tag. Use `#set` to set the locale. Defaults
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/LegendImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
Ext.define('GeoExt.LegendImage', {
extend : 'Ext.Component',
alias : 'widget.gx_legendimage',

requires: [
'GeoExt.Version'
],
/**
* The url of the image to load.
*
Expand Down
64 changes: 64 additions & 0 deletions src/GeoExt/Version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright (c) 2008-2013 The Open Source Geospatial Foundation
*
* Published under the BSD license.
* See https://github.com/geoext/geoext2/blob/master/license.txt for the full
* text of the license.
*/
(function() {
var major = 2,
minor = 0,
patch = 1,
label = 'dev',
environment = [],
v = '';

// Concatenate GeoExt version.
v = 'v' + major + '.' + minor + '.' + patch + (label ? '.' + label : '');

// Grab versions of libraries in the environment
if ( Ext.versions.extjs.version ) {
environment.push('ExtJS: ' + Ext.versions.extjs.version);
}
if ( OpenLayers ) {
environment.push('OpenLayers: ' + OpenLayers.VERSION_NUMBER);
}
environment.push('GeoExt: ' + v);

/**
* A singleton class holding the properties #version with the current
* GeoExt version and #environment with a string about the surrounding
* libraries ExtJS and OpenLayers.
*/
Ext.define('GeoExt.Version', {
singleton: true,

/**
* The version number of GeoExt.
*
* @property {String} version
*/
version: v,

/**
* Lists the versions of the currently loaded libraries and contains the
* versions of `ExtJS`, `OpenLayers` and `GeoExt`.
*
* @property {String} environment
*/
environment: (environment.join(', '))
}, function() {
/**
* The GeoExt root object.
*
* @class GeoExt
* @singleton
*/
/**
* @inheritdoc GeoExt.Version#version
* @member GeoExt
* @property version
*/
GeoExt.version = GeoExt.Version.version;
});
})();
5 changes: 4 additions & 1 deletion src/GeoExt/container/LayerLegend.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
*/
Ext.define('GeoExt.container.LayerLegend', {
extend : 'Ext.container.Container',
requires: ['Ext.form.Label'],
requires: [
'GeoExt.Version',
'Ext.form.Label'
],
alias : 'widget.gx_layerlegend',
alternateClassName : 'GeoExt.LayerLegend',

Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/data/FeatureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
*/
Ext.define('GeoExt.data.FeatureStore', {
extend: 'Ext.data.Store',
requires: ['GeoExt.data.reader.Feature'],
requires: [
'GeoExt.data.reader.Feature'
],

statics: {
/**
Expand Down
6 changes: 5 additions & 1 deletion src/GeoExt/data/LayerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
Ext.define('GeoExt.data.LayerModel',{
alternateClassName: 'GeoExt.data.LayerRecord',
extend: 'Ext.data.Model',
requires: ['Ext.data.proxy.Memory', 'Ext.data.reader.Json'],
requires: [
'Ext.data.proxy.Memory',
'Ext.data.reader.Json',
'GeoExt.Version'
],
alias: 'model.gx_layer',
statics: {
/**
Expand Down
3 changes: 2 additions & 1 deletion src/GeoExt/data/LayerTreeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Ext.define('GeoExt.data.LayerTreeModel',{
extend: 'Ext.data.Model',
requires: [
'Ext.data.proxy.Memory',
'Ext.data.reader.Json'
'Ext.data.reader.Json',
'GeoExt.Version'
],
alias: 'model.gx_layertree',
fields: [
Expand Down
5 changes: 4 additions & 1 deletion src/GeoExt/data/MapfishPrintProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
*/
Ext.define('GeoExt.data.MapfishPrintProvider', {
extend: 'Ext.util.Observable',
requires: ['Ext.data.JsonStore'],
requires: [
'Ext.data.JsonStore',
'GeoExt.Version'
],

/**
* Base url of the print service. Will always have a trailing "/".
Expand Down
3 changes: 3 additions & 0 deletions src/GeoExt/data/OwsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
*/
Ext.define('GeoExt.data.OwsStore', {
extend: 'Ext.data.Store',
requires: [
'GeoExt.Version'
],
alternateClassName: ['GeoExt.data.OWSStore'],

config: {
Expand Down
5 changes: 4 additions & 1 deletion src/GeoExt/data/RasterStyleModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
*/
Ext.define('GeoExt.data.RasterStyleModel',{
extend: 'Ext.data.Model',
requires : ['Ext.data.JsonReader'],
requires : [
'Ext.data.JsonReader',
'GeoExt.Version'
],
idProperty: "filter",
fields: [
{name: "symbolizers", mapping: function(v) {
Expand Down
3 changes: 2 additions & 1 deletion src/GeoExt/data/ScaleModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Ext.define('GeoExt.data.ScaleModel', {
extend: 'Ext.data.Model',
requires: [
'Ext.data.proxy.Memory',
'Ext.data.reader.Json'
'Ext.data.reader.Json',
'GeoExt.Version'
],
alias: 'model.gx_scale',
fields: [
Expand Down
5 changes: 4 additions & 1 deletion src/GeoExt/data/VectorStyleModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
*/
Ext.define('GeoExt.data.VectorStyleModel', {
extend : 'Ext.data.Model',
requires : ['Ext.data.JsonReader'],
requires : [
'Ext.data.JsonReader',
'GeoExt.Version'
],
fields : [{
name : "elseFilter",
defaultValue : null
Expand Down
3 changes: 3 additions & 0 deletions src/GeoExt/data/proxy/Protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
*/
Ext.define('GeoExt.data.proxy.Protocol', {
extend: 'Ext.data.proxy.Server',
requires: [
'GeoExt.Version'
],
alias: 'proxy.gx_protocol',

/**
Expand Down
5 changes: 4 additions & 1 deletion src/GeoExt/data/reader/Attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
*/
Ext.define('GeoExt.data.reader.Attribute', {
extend: 'Ext.data.reader.Json',
requires: ['Ext.data.Field'],
requires: [
'GeoExt.Version',
'Ext.data.Field'
],
alternateClassName: 'GeoExt.data.AttributeReader',
alias: 'reader.gx_attribute',

Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/data/reader/CswRecords.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ Ext.define('GeoExt.data.reader.CswRecords', {
alternateClassName: ['GeoExt.data.CSWRecordsReader'],
extend: 'Ext.data.reader.Json',
alias: 'reader.gx_cswrecords',

requires: [
'GeoExt.Version'
],
/**
* Creates new Reader.
*
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/data/reader/Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
Ext.define('GeoExt.data.reader.Feature', {
extend: 'Ext.data.reader.Json',
alias : 'reader.feature',

requires: [
'GeoExt.Version'
],
/**
* Force to have our convertRecordData.
*
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/data/reader/WfsCapabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Ext.define('GeoExt.data.reader.WfsCapabilities', {
],
extend: 'Ext.data.reader.Json',
alias: 'reader.gx_wfscapabilities',

requires: [
'GeoExt.Version'
],
/**
* Creates new Reader.
*
Expand Down
3 changes: 3 additions & 0 deletions src/GeoExt/data/reader/Wmc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Ext.define('GeoExt.data.reader.Wmc', {
alternateClassName: ['GeoExt.data.WMCReader'],
extend: 'Ext.data.reader.Json',
alias: 'reader.gx_wmc',
requires: [
'GeoExt.Version'
],

/**
* Creates new Reader.
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/data/reader/WmsCapabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Ext.define('GeoExt.data.reader.WmsCapabilities', {
],
extend: 'Ext.data.reader.Json',
alias: 'reader.gx_wmscapabilities',

requires: [
'GeoExt.Version'
],
/**
* Creates new Reader.
*
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/data/reader/WmsDescribeLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Ext.define('GeoExt.data.reader.WmsDescribeLayer', {
alternateClassName: ['GeoExt.data.reader.WMSDescribeLayer', 'GeoExt.data.WMSCapabilitiesReader'],
extend: 'Ext.data.reader.Json',
alias: 'reader.gx_wmsdescribelayer',

requires: [
'GeoExt.Version'
],
/**
* Creates new Reader.
*
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/panel/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
*/
Ext.define('GeoExt.panel.Map', {
extend: 'Ext.panel.Panel',
requires: ['GeoExt.data.LayerStore'],
requires: [
'GeoExt.data.LayerStore'
],
alias: 'widget.gx_mappanel',
alternateClassName: 'GeoExt.MapPanel',

Expand Down
3 changes: 3 additions & 0 deletions src/GeoExt/selection/FeatureModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
Ext.define('GeoExt.selection.FeatureModel', {
extend: 'Ext.selection.RowModel',
alias: 'selection.featuremodel',
requires: [
'GeoExt.Version'
],

/**
* If true the select feature control is activated and deactivated when
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/slider/Tip.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
Ext.define('GeoExt.slider.Tip', {
extend : 'Ext.slider.Tip',
alternateClassName : 'GeoExt.SliderTip',

requires: [
'GeoExt.Version'
],
/**
* Display the tip when hovering over the thumb. If `false`, tip will
* only be displayed while dragging. Default is `true`.
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/state/PermalinkProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
*/
Ext.define('GeoExt.state.PermalinkProvider', {
extend : 'Ext.state.Provider',
requires : [],
requires : [
'GeoExt.Version'
],
alias : 'widget.gx_permalinkprovider',

/**
Expand Down
3 changes: 3 additions & 0 deletions src/GeoExt/tree/Column.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
Ext.define('GeoExt.tree.Column', {
extend: 'Ext.tree.Column',
requires: [
'GeoExt.Version'
],
alias: 'widget.gx_treecolumn',

initComponent: function() {
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/tree/LayerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
Ext.define('GeoExt.tree.LayerNode', {
extend: 'Ext.AbstractPlugin',
alias: 'plugin.gx_layer',

requires: [
'GeoExt.Version'
],
/**
* The init method is invoked after initComponent method has been run for
* the client Component. It performs plugin initialization.
Expand Down
4 changes: 3 additions & 1 deletion src/GeoExt/tree/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
Ext.define('GeoExt.tree.View', {
extend: 'Ext.tree.View',
alias: 'widget.gx_treeview',

requires: [
'GeoExt.Version'
],
initComponent : function() {
var me = this;

Expand Down
Loading