Recent Changes - Search:

Foundations

Members works

Result

Communication

Outside

RSS

Updates

edit SideBar

PIM /

ShiftSpacingScript



/*******This should be extended to a proper Space later on*******

var ReversedWikiSpace = ShiftSpace.Space.extend({
    attributes: {
        name: 'ReversedWiki',
        icon: 'ReversedWiki.png'
    }
});

*****************************************************************/

var ReversedWikiTestShift = ShiftSpace.Shift.extend({
    setup: function(json) {
        this.messageValue = json.message || "check http://www.ourp.im/PIM/ShiftSpacing";
        this.build(json);
        this.save();
        this.manageElement(this.element);
    },

    build: function(json) {
        this.element = new ShiftSpace.Element('div');
        this.element.appendText(this.messageValue);
        this.element.setStyles({
            'font': '12px verdana, sans-serif',
            'position': 'absolute',
            'padding':  '5px 10px 5px 10px',
            'color': '#FFF',
            'background-color': '#F63B02',
            'left': json.position.x,
            'top': json.position.y
        });
        this.element.injectInside(document.body);
        this.element.makeDraggable({
            'onComplete': function() {
                this.save();
            }.bind(this)
        });
        this.element.addEvent('dblclick', this.changeMessage.bind(this));
    },

    changeMessage: function() {
        var msg = prompt("Please enter a new message:", this.messageValue);
        this.messageValue = msg;
        this.element.setHTML(msg);
        this.save();
    },

    encode: function() {
        var pos = this.element.getPosition();
        return {
            summary: this.messageValue,
            message: this.messageValue,
            position: pos
        };
    }
});

var ReversedWikiTest = new ShiftSpace.Space.SourceShift(ReversedWikiTestShift);

Export as JS with the source

Edit - History - Print - Recent Changes - Search
Page last modified on September 25, 2009, at 01:06 AM