-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improed Sencha Architect integreation
- Loading branch information
1 parent
4a0f023
commit 79268bd
Showing
10 changed files
with
198 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/*! | ||
* | ||
* Bancha : Seamlessly integrates CakePHP with Ext JS and Sencha Touch (http://bancha.io) | ||
* Copyright 2011-2014 codeQ e.U. | ||
* | ||
* @package Bancha | ||
* @copyright Copyright 2011-2014 codeQ e.U. | ||
* @link http://bancha.io Bancha | ||
* @since Bancha v 2.4.0 | ||
* @author Roland Schuetz <mail@rolandschuetz.at> | ||
* @version Bancha v PRECOMPILER_ADD_RELEASE_VERSION | ||
* | ||
* For more information go to http://bancha.io | ||
*/ | ||
|
||
/** | ||
* Sencha CMD is looking for a Ext.data.validations class since | ||
* it is required in a a class which Ext JS 5 would actually never | ||
* touch. | ||
* | ||
* To fake this class for Ext JS 5 and make Sencha CMD happy this | ||
* is the useless Ext JS 5 Ext.data.validations class. | ||
*/ | ||
Ext.define('Ext.data.validator.Validator', {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*! | ||
* | ||
* Bancha : Seamlessly integrates CakePHP with Ext JS and Sencha Touch (http://bancha.io) | ||
* Copyright 2011-2014 codeQ e.U. | ||
* | ||
* @package Bancha | ||
* @copyright Copyright 2011-2014 codeQ e.U. | ||
* @link http://bancha.io Bancha | ||
* @since Bancha v 2.4.0 | ||
* @author Roland Schuetz <mail@rolandschuetz.at> | ||
* @version Bancha v PRECOMPILER_ADD_RELEASE_VERSION | ||
* | ||
* For more information go to http://bancha.io | ||
*/ | ||
|
||
/** | ||
* @private | ||
* @class Bancha.data.validator.override.Bound | ||
* | ||
* Fixes issues with the current Range validator | ||
* | ||
* See http://www.sencha.com/forum/showthread.php?288168 | ||
* | ||
* @author Roland Schuetz <mail@rolandschuetz.at> | ||
* @docauthor Roland Schuetz <mail@rolandschuetz.at> | ||
*/ | ||
Ext.define('Bancha.data.validator.override.Bound', { | ||
override: 'Ext.data.validator.Bound', | ||
/** | ||
* @class Ext.data.validator.Bound | ||
* | ||
* To normalize the CakePHP, Ext JS 4 and Ext JS 5 validation | ||
* handling Bancha adds an additional check to the Ext JS 5 | ||
* Bound validation rules. | ||
* | ||
* The effect is that non-numeric values are invalid using | ||
* the Range validation rule. For the error message an | ||
* additional config is introduced. | ||
*/ | ||
config: { | ||
/** | ||
* @cfg {String} nanMessage | ||
* The error message to return when the value is not a number. | ||
*/ | ||
nanMessage: 'Must be a number' | ||
}, | ||
validate: function(value) { | ||
if(isNaN(this.getValue(value))) { | ||
return this._nanMessage; | ||
} | ||
return this.callParent(arguments); | ||
}, | ||
getValue: function(value) { | ||
return parseFloat(value); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/*! | ||
* | ||
* Bancha : Seamlessly integrates CakePHP with Ext JS and Sencha Touch (http://bancha.io) | ||
* Copyright 2011-2014 codeQ e.U. | ||
* | ||
* @package Bancha | ||
* @copyright Copyright 2011-2014 codeQ e.U. | ||
* @link http://bancha.io Bancha | ||
* @since Bancha v 2.4.0 | ||
* @author Roland Schuetz <mail@rolandschuetz.at> | ||
* @version Bancha v PRECOMPILER_ADD_RELEASE_VERSION | ||
* | ||
* For more information go to http://bancha.io | ||
*/ | ||
|
||
/** | ||
* @private | ||
* @class Bancha.data.validator.override.Range | ||
* | ||
* Fixes issues with the current Range validator | ||
* | ||
* See http://www.sencha.com/forum/showthread.php?288168 | ||
* | ||
* @author Roland Schuetz <mail@rolandschuetz.at> | ||
* @docauthor Roland Schuetz <mail@rolandschuetz.at> | ||
*/ | ||
Ext.define('Bancha.data.validator.override.Range', { | ||
override: 'Ext.data.validator.Range', | ||
requires: [ | ||
'Bancha.data.validator.override.Bound' | ||
] | ||
// all the logic can be found in Bancha.data.validator.override.Bound | ||
}, function() { | ||
// for some reason setting via config doesn't work | ||
this.prototype.setNanMessage('Must be a number'); | ||
}); |