Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Optional loading indicator #15

Merged
merged 1 commit into from

2 participants

@sc0ttman

I've noticed on slower network traffic, or large language files, it can
take a few seconds to actually change, and it's a bit weird when
nothing happens right when you select a new language.

NOTE: you will also have to add the key/string to the language files.

@sc0ttman sc0ttman Optional loading indicator when loading new language
I've noticed on slower network traffic, or large language files, it can
take a few seconds to actually change, and it's a bit weird when
nothing happens right when you select a new language.

NOTE: you will also have to add the key/string to the language files.
f9b9c65
@mitchellsimoens mitchellsimoens merged commit e4fa3e2 into from
@mitchellsimoens

There was a JS error that me wasn't defined, Saw it after I merged so I pushed a fix for this up, also added default text in the get call and added it to the JSON files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 18, 2012
  1. @sc0ttman

    Optional loading indicator when loading new language

    sc0ttman authored
    I've noticed on slower network traffic, or large language files, it can
    take a few seconds to actually change, and it's a bit weird when
    nothing happens right when you select a new language.
    
    NOTE: you will also have to add the key/string to the language files.
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 1 deletion.
  1. +14 −1 Ux/locale/Manager.js
View
15 Ux/locale/Manager.js
@@ -14,6 +14,7 @@ Ext.define('Ux.locale.Manager', {
_beforeLoad : Ext.emptyFn,
_language : 'en',
_loaded : true,
+ _loadingInd : true,
_locale : {},
_locales : [
{ abbr : 'en', text : 'English' },
@@ -158,7 +159,19 @@ Ext.define('Ux.locale.Manager', {
updateLocale : function(locale) {
this._language = locale;
- this.init();
+ if(me._loadingInd){
+ Ext.Viewport.setMasked({
+ xtype : 'loadmask',
+ indicator : true,
+ message : this.get('misc.loadingLocaleMsg')
+ });
+ }
+
+ this.init(function(mngr){
+ if(me._loadingInd){
+ Ext.Viewport.setMasked(false);
+ }
+ });
},
getLanguage : function() {
Something went wrong with that request. Please try again.