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('App.controller.MainController', { | |
extend: Ext.app.Controller, | |
routes: { | |
'home': { | |
before: function(action) { | |
Ext.Ajax.request({ | |
url: Config.endpoints.user, | |
method: 'GET', | |
scope: this, | |
failure: function(data, operation) { |
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() { | |
// No mouse version | |
Ext.Component.prototype.fireEvent = | |
Ext.Function.createInterceptor(Ext.Component.prototype.fireEvent, function() { | |
if (arguments && arguments[0].indexOf("mouse") === -1 && arguments[0] != "uievent") { | |
console.log(this.$className, arguments, this); | |
} | |
return true; | |
});})(); |
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('Example.util.Remote',{ | |
singleton: true, | |
requires: [ | |
'Ext.ux.ajax.JsonSimlet', | |
'Ext.ux.ajax.SimManager' | |
], | |
constructor: function () { | |
Ext.ux.ajax.SimManager.init({ |
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('Empty.common.Poller', { | |
singleton: true, | |
alternateClassName: ['Poller'], | |
/** | |
* Utility to poll an endpoint provided with the required parameters | |
* Mandatory parameters are : params.pollInterval, params.pollTimeout, params.success | |
* @params {Object} params | |
* |
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.application({ | |
. | |
. | |
. | |
// init method | |
init: function() { | |
// initialize state provider for saving component states | |
Ext.state.Manager.setProvider(Ext.create('Ext.state.LocalStorageProvider')); | |
} |
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
package com.practice.test; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Objects; | |
import java.util.Optional; | |
import java.util.function.Predicate; | |
import java.util.stream.Stream; |
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
onMenuPanelRenderer : function() { | |
var hasWebRole = User.hasRole(Config.role.web); | |
var hasAdminRole = User.hasRole(Config.role.admin); | |
if (hasWebRole) { | |
// set mentu item visible true based on role | |
} | |
if (hasAdminRole) { | |
// set mentu item visible true based on role |
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
addGmap: function (googlemapcontainer, viewModel) { | |
var mapcontainer = googlemapcontainer.down('#mapcontainer'); | |
googlemapcontainer.setHidden(true); | |
// remove old map | |
if(mapcontainer) { | |
mapcontainer.destroy(); | |
} | |
// create new map |
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
if(Ext.fly('initialLoader')){ | |
Ext.fly('initialLoader').destroy(); | |
} |
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
/* | |
* Utility method to format an xml string | |
* text : xml String | |
* step : no of spaces for indentation | |
*/ | |
formatXml : function(text,step) { | |
function createShiftArr(step) { | |
var space = ' '; | |
if ( isNaN(parseInt(step)) ) { // argument is string |