Esempio n. 1
0
    onSuccessCaptchaRPCSolve : function(result) {
        var update = clone(this.state);
        update.solved = 1;

        this.emit(update);
        WindowsActions.windowCloseByType('captcha');
    },
Esempio n. 2
0
    onSuccessCaptchaRPCFetch : function(result) {
        var update = clone(this.state);
        update.guid = result.guid;
        update.url  = result.url;

        this.emit(update);
    },
    onHideTopWindow : function() {
        var topWindow = _.chain(clone(this.state))
            .values()
            .sortBy('layer')
            .reverse()
            .first()
            .value();

        if (topWindow) {
            this.onHideWindow(topWindow.id);
        }
    },
    onBringWindowToTop : function(id) {
        if (this.isOnTop(id, this.state)) {
            return;
        }

        var windows = clone(this.state);

        if (windows[id]) {
            windows[id].layer = this.getNextLayerNumber(windows);
        }

        this.emit(windows);
    },
    onAddWindow : function(type, options) {
        var id = 'window_' + type;
        var windows = clone(this.state);

        windows[id] = {
            id      : id,
            type    : type,
            options : options,
            layer   : this.getNextLayerNumber(windows)
        };

        this.emit(windows);
    },
 onHideWindow : function(id) {
     var windows = clone(this.state);
     delete windows[id];
     this.emit(windows);
 },
Esempio n. 7
0
 onCaptchaWindowShow : function(window) {
     var update = clone(this.state);
     update.window = window;
     this.emit(update);
 },