Skip to content

Commit

Permalink
Tidying up the icons, moved expand button to a drag-handle button
Browse files Browse the repository at this point in the history
Using some nice CC licensed icons from http://www.fatcow.com/free-icons/
Not sure where to attribute these icons properly, hopefully the commit
will do for now :)
  • Loading branch information
ciaranj committed Oct 8, 2009
1 parent c559b71 commit e5ed325
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 20 deletions.
28 changes: 20 additions & 8 deletions css/WireIt.css
Expand Up @@ -80,7 +80,7 @@ div.WireIt-Container-ddhandle {
font-size: 10pt;
float : none;
padding-left : 2px;
padding-right : 2px;

}
div.WireIt-Container-ddhandle span {
/*margin-right: 32px;*/
Expand All @@ -106,27 +106,39 @@ div.WireIt-Container-resizehandle {
}

div.WireIt-Container-closebutton {
background-image: url(../images/close.png);
width: 25px;
height: 15px;/*
background-image: url(../images/cancel.png);
width: 16px;
height: 16px;/*
position: absolute;
top: 4px;
right: 4px;*/
float : right;
cursor: pointer;
margin-right: 4px;
}

div.WireIt-Container-groupbutton {
background-image: url(../images/group.png);
width: 25px;
height: 15px;/*
background-image: url(../images/brick_add.png);
width: 16px;
height: 16px;/*
position: absolute;
top: 4px;
right: 4px;*/
float : right;
cursor: pointer;
margin-right: 4px;
}
div.WireIt-Container-ungroupbutton {
background-image: url(../images/brick_edit.png);
width: 16px;
height: 16px;/*
position: absolute;
top: 4px;
right: 4px;*/
float : right;
cursor: pointer;
margin-right: 4px;
}

div.WireIt-Container-toolbar {

}
Expand Down
Binary file added images/brick_add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/brick_delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/brick_edit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bricks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cancel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions js/Container.js
Expand Up @@ -207,12 +207,6 @@ WireIt.Container.prototype = {
this.el.appendChild(this.ddResizeHandle);
}

if(this.options.groupable && this.options.ddHandle) {
this.groupButton = WireIt.cn('div', {className: 'WireIt-Container-groupbutton'} );
this.ddHandle.appendChild(this.groupButton)
Event.addListener(this.groupButton, "click", this.onGroupButton, this, true);
}

if(this.options.close) {
// Close button
this.closeButton = WireIt.cn('div', {className: this.options.closeButtonClassName} );
Expand All @@ -222,7 +216,12 @@ WireIt.Container.prototype = {
this.el.appendChild(this.closeButton);
Event.addListener(this.closeButton, "click", this.onCloseButton, this, true);
}


if(this.options.groupable && this.options.ddHandle) {
this.groupButton = WireIt.cn('div', {className: 'WireIt-Container-groupbutton'} );
this.ddHandle.appendChild(this.groupButton)
Event.addListener(this.groupButton, "click", this.onGroupButton, this, true);
}
// Append to the layer element
this.layer.el.appendChild(this.el);

Expand Down
9 changes: 4 additions & 5 deletions js/GroupFormContainer.js
Expand Up @@ -130,11 +130,10 @@ YAHOO.lang.extend(WireIt.GroupFormContainer, WireIt.FormContainer, {
},

renderExpand: function() {
buttonEl = inputEx.cn('button');
buttonEl.appendChild(document.createTextNode("Expand"));
Event.addListener(buttonEl, "click", this.expand, this, true);

this.bodyEl.insertBefore(buttonEl, this.bodyEl.childNodes[0]);
this.unGroupButton = WireIt.cn('div', {className: 'WireIt-Container-ungroupbutton'} );
Event.addListener(this.unGroupButton, "click", this.expand, this, true);

this.ddHandle.appendChild(this.unGroupButton)
},

expand: function()
Expand Down

0 comments on commit e5ed325

Please sign in to comment.