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
/** | |
* When I first used the "Ext.grid.plugin.PagingToolbar" plugin with ExtJS6.2 modern I thought it could interact and load prev/next pages using the grid's store. | |
* The fact is that the pagingtoolbar does not interact with the store, it splits "pages" of data within the current grid data, but this is not what I was looking for. | |
* Therefore here's my attempt to extend the PagingToolbar and create a paging plugin that actually loads store pages according to the slider. | |
*/ | |
Ext.define('MyApp.util.GridPagingToolbar', { | |
extend: 'Ext.grid.plugin.PagingToolbar', | |
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
Nav flow is: A => B => C => A with results from C | |
If you're using fragments please note that "onActivityResult" will be called according to where "startActivityForResult" is called (method "startActivityForResult" is available in both, activity and fragment) | |
ActivityA | |
startActivityForResult(intentB, 22); | |
ActivityB | |
intentC.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); | |
startActivity(intentC); | |
finish(); |
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
Ext.define('MyApp.override.data.Model', { | |
override : 'Ext.data.Model', | |
/** | |
* @override | |
* we want to pass the model (not only config and value) | |
*/ | |
validate : function() { | |
var errors = Ext.create('Ext.data.Errors'), | |
validations = this.getValidations().items, |
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
Ext.define('Ext.ux.TimestampIdentifier', { | |
alias : 'data.identifier.timestamp', | |
config : { | |
negative : false, | |
string : true | |
}, | |
constructor : function(config) { | |
this.initConfig(config); |
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
//jshint camelcase:false | |
Ext.define('Ext.ux.Base64', { | |
singleton : true, | |
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
encode : function(e) { | |
var t = ""; | |
var n, | |
r, | |
i, |
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
(function() { | |
var drawImage = function() { | |
var imageData = this.getImgData(); | |
var maxWidth = this.getWidth(); | |
var maxHeight = this.getHeight(); | |
if (imageData && maxHeight && maxWidth) { | |
var img = document.createElement("img"); | |
img.src = imageData; |