1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2025-10-29 10:27:35 +01:00

Updated version of /gamma

Tons of changes, included a new draft of the mobile version (still VERY rough)
This commit is contained in:
Clipperz
2013-01-08 16:21:04 +01:00
parent 267603e3aa
commit 816fc35420
181 changed files with 7764 additions and 2149 deletions

View File

@@ -406,6 +406,10 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Compo
return result;
},
'getAnchor': function (aValue) {
return '#' + this.getId(aValue);
},
//-------------------------------------------------------------------------
'getElement': function(aValue) {

View File

@@ -62,7 +62,8 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Com
//-------------------------------------------------------------------------
'renderSelf': function () {
this.append(this.element(), {tag:'div', id:this.getId('wrapper'), cls:'button_wrapper', children:[
/*
this.append(this.element(), {tag:'div', id:this.getId('button'), cls:'button_wrapper', children:[
{tag:'div', id:this.getId('bodyWrapper'), cls:'button_bodyWrapper', children:[
{tag:'div', id:this.getId('body'), cls:'button_body', children:[
{tag:'span', html:this.text()}
@@ -70,36 +71,43 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Com
{tag:'div', id:this.getId('footer'), cls:'button_footer'}
]}
]});
*/
/*
this.append(this.element(), {tag:'div', id:this.getId('button'), cls:'button', children:[
{tag:'span', html:this.text()}
]});
*/
this.append(this.element(), {tag:'a', id:this.getId('button'), cls:'button', html:this.text()});
if (this.isDefault()) {
MochiKit.DOM.addElementClass(this.getId('wrapper'), 'default');
MochiKit.DOM.addElementClass(this.getId('button'), 'default');
}
MochiKit.Signal.connect(this.getId('wrapper'), 'onmouseenter', this, 'handleOnMouseEnter');
MochiKit.Signal.connect(this.getId('wrapper'), 'onmouseleave', this, 'handleOnMouseLeave');
MochiKit.Signal.connect(this.getId('wrapper'), 'onmousedown', this, 'handleOnMouseDown');
MochiKit.Signal.connect(this.getId('wrapper'), 'onclick', this, 'handleOnClick');
// MochiKit.Signal.connect(this.getId('button'), 'onmouseenter', this, 'handleOnMouseEnter');
// MochiKit.Signal.connect(this.getId('button'), 'onmouseleave', this, 'handleOnMouseLeave');
// MochiKit.Signal.connect(this.getId('button'), 'onmousedown', this, 'handleOnMouseDown');
MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'handleOnClick');
},
//-------------------------------------------------------------------------
/*
'handleOnMouseEnter': function (anEvent) {
MochiKit.DOM.addElementClass(this.getId('wrapper'), 'hover');
MochiKit.DOM.addElementClass(this.getId('button'), 'hover');
},
'handleOnMouseLeave': function (anEvent) {
MochiKit.DOM.removeElementClass(this.getId('wrapper'), 'hover');
MochiKit.DOM.removeElementClass(this.getId('wrapper'), 'clicked');
MochiKit.DOM.removeElementClass(this.getId('button'), 'hover');
MochiKit.DOM.removeElementClass(this.getId('button'), 'clicked');
},
'handleOnMouseDown': function (anEvent) {
MochiKit.DOM.addElementClass(this.getId('wrapper'), 'clicked');
MochiKit.DOM.addElementClass(this.getId('button'), 'clicked');
},
*/
'handleOnClick': function (anEvent) {
MochiKit.Signal.signal(this, 'onclick', anEvent);
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});

View File

@@ -98,14 +98,29 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe
},
'setType': function (aValue) {
if (this.getElement('icon') != null) {
MochiKit.DOM.removeElementClass(this.getId('icon'), this._type);
MochiKit.DOM.addElementClass(this.getId('icon'), aValue);
}
// if (this.getElement('icon') != null) {
// MochiKit.DOM.removeElementClass(this.getId('icon'), this._type);
// MochiKit.DOM.addElementClass(this.getId('icon'), aValue);
// }
this._type = aValue;
},
'icon': function () {
var type = this.type();
var result;
if (type == 'ALERT') {
result = '!';
} else if (type == 'INFO') {
result = 'i';
} else if (type == 'ERROR') {
result = '!';
}
return result;
},
//-------------------------------------------------------------------------
'buttons': function () {
@@ -132,17 +147,20 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe
'renderSelf': function() {
this.append(this.element(), {tag:'div', cls:'SimpleMessagePanel', id:this.getId('panel'), children: [
{tag:'div', cls:'header', children:[]},
// {tag:'div', cls:'header', children:[]},
{tag:'div', cls:'body', children:[
{tag:'div', id:this.getId('icon'), cls:'img ' + this.type(), children:[{tag:'div'}]},
// {tag:'div', id:this.getId('icon'), cls:'img ' + this.type(), children:[{tag:'div'}]},
{tag:'div', /*id:this.getId('icon'),*/ cls:'img ' + this.type(), children:[{tag:'canvas', id:this.getId('icon')}]},
{tag:'h3', id:this.getId('title'), html:this.title()},
{tag:'p', id:this.getId('text'), html:this.text()},
{tag:'div', id:this.getId('container')},
{tag:'div', id:this.getId('buttonArea'), cls:'buttonArea', children:[]}
]},
{tag:'div', cls:'footer', children:[]}
]}
// {tag:'div', cls:'footer', children:[]}
]});
Clipperz.PM.UI.Canvas.marks[this.icon()](this.getElement('icon'), "#ffffff");
MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'keyDownHandler');
this.renderButtons();