Sha256: e7e24741a2f8e46fd9c44636f08c63f29cf393dd9cfd35bcd5b9641fc9ea8a65

Contents?: true

Size: 938 Bytes

Versions: 6

Compression:

Stored size: 938 Bytes

Contents

Ext.define('FastUI.Ctx', {
    constructor:function(){
        this._data_ = {};
    },
    set:function(key,value){
        this._data_[key] = value;
    },
    get:function(key){
        return this._data_[key];
    },
    setWinCtx:function(winNo,key,value){
        this.set(winNo + '|' + key, value);
    },
    getWinCtx:function(winNo,key){
        return this.get(winNo + '|' + key);
    },
    setTabCtx:function(winNo,tabNo,key,value){
        this.set(winNo + '|' +  tabNo + '|' + key, value);
    },
    getTabCtx:function(winNo,tabNo,key){
        return this.get(winNo + '|' +  tabNo + '|' + key);
    },
    parseCtx:function(WinNo, value){
        var patten = /\${([\s\S]*?)}/ig ;
        var me = this;
        return value.replace(patten, function(m){
            m = m.replace('${','');
            m = m.replace('}','');
            return me.getWinCtx(WinNo,m);
        });
    }

});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fastui-0.1.8 app/assets/javascripts/fastui/app/Ctx.js
fastui-0.1.7 app/assets/javascripts/fastui/app/Ctx.js
fastui-0.1.6 app/assets/javascripts/fastui/app/Ctx.js
fastui-0.1.4 app/assets/javascripts/fastui/app/Ctx.js
fastui-0.1.3 app/assets/javascripts/fastui/app/Ctx.js
fastui-0.1.2 app/assets/javascripts/fastui/app/Ctx.js