<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>share/images/button/button_default.gif</filename>
    </added>
    <added>
      <filename>share/images/button/button_medium.gif</filename>
    </added>
    <added>
      <filename>share/images/button/button_small.gif</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -147,9 +147,9 @@ share/icons/resize.gif
 share/icons/save.gif
 share/icons/text_x_generic.gif
 share/icons/upload.gif
-share/images/button/button_static.gif
-share/images/button/button_horizontal.gif
-share/images/button/button_vertical.gif
+share/images/button/button_default.gif
+share/images/button/button_medium.gif
+share/images/button/button_small.gif
 share/images/contentbox/arrow_left.gif
 share/images/contentbox/arrow_right.gif
 share/images/contentbox/bg_ft_alt0.gif</diff>
      <filename>MANIFEST</filename>
    </modified>
    <modified>
      <diff>@@ -7,10 +7,10 @@ use strict;
 
 use base 'IWL::Widget';
 
-use IWL::Input;
 use IWL::Anchor;
 use IWL::Image;
 use IWL::Container;
+use IWL::Label;
 use IWL::String qw(randomize escape);
 use IWL::JSON qw(toJSON);
 
@@ -107,7 +107,7 @@ Parameters: B&lt;TEXT&gt; - the text for the label
 sub setLabel {
     my ($self, $text) = @_;
 
-    $self-&gt;{__anchor}-&gt;appendChild(IWL::Text-&gt;new($self-&gt;{_options}{label} = $text || ''));
+    $self-&gt;{_options}{label} = $text || '';
     return $self;
 }
 
@@ -125,7 +125,7 @@ sub getLabel {
 
 Sets the given url as the source of the image
 
-Parameters: B&lt;SRC&gt; - the url for the image. If the B&lt;SRC&gt; begins with I&lt;IWL_STOCK_&gt;, the B&lt;SRC&gt; is treaded as a stock id, B&lt;ALT&gt; - the alternative text for the image, optional.
+Parameters: B&lt;SRC&gt; - the url for the image. If the B&lt;SRC&gt; begins with I&lt;IWL_STOCK_&gt;, the B&lt;SRC&gt; is treated as a stock id, B&lt;ALT&gt; - the alternative text for the image, optional.
 
 =cut
 
@@ -202,7 +202,7 @@ sub setSubmit {
 
 =item B&lt;setHref&gt; (B&lt;URL&gt;) 
 
-Sets the href of the anchor. Due to one of the many bugs in Internet Explorer involving buttons, it also has to set an onclick handler to &quot;document.location.href = $url&quot;
+Sets the href of the anchor
 
 Parameters: B&lt;URL&gt; - the url of the href
 
@@ -211,14 +211,8 @@ Parameters: B&lt;URL&gt; - the url of the href
 sub setHref {
     my ($self, $url) = @_;
 
-    $self-&gt;{__anchor}-&gt;setHref($url);
-    if ($url =~ /javascript/i) {
-        $self-&gt;signalConnect(click =&gt; $url);
-    } else {
-        $self-&gt;signalConnect(click =&gt; &quot;document.location.href = '$url'&quot;);
-    }
-    $self-&gt;signalConnect(mouseover =&gt; &quot;window.status = unescape('&quot; . escape($url) . &quot;')&quot;);
-    return $self-&gt;signalConnect(mouseout =&gt; &quot;window.status = ''&quot;);
+    $self-&gt;{anchor}-&gt;setHref($url);
+    return $self;
 }
 
 =item B&lt;setDisabled&gt; (B&lt;BOOL&gt;)
@@ -248,17 +242,6 @@ sub isDisabled {
 
 # Overrides
 #
-sub setId {
-    my ($self, $id) = @_;
-    $self-&gt;SUPER::setId($id);
-    $self-&gt;{image}-&gt;setId($id . '_image');
-    my $index = 0;
-    foreach (qw(tl top tr l content r bl bottom br)) {
-        $self-&gt;{__parts}[$index++]-&gt;setId($id . '_' . $_);
-    }
-    return $self;
-}
-
 sub setAlt {
     my ($self, $alt) = @_;
 
@@ -282,7 +265,7 @@ sub getSrc {
 }
 
 sub getHref {
-    return shift-&gt;{__anchor}-&gt;getHref;
+    return shift-&gt;{anchor}-&gt;getHref;
 }
 
 # Protected
@@ -290,30 +273,23 @@ sub getHref {
 sub _realize {
     my $self       = shift;
     my $id         = $self-&gt;getId;
-    my $visibility = $self-&gt;getStyle('visibility');
+    my $required   = $self-&gt;isRequired(js =&gt; 'button.js');
     my $options    = {};
 
     $self-&gt;SUPER::_realize;
+    $self-&gt;__buildParts;
 
-    $self-&gt;{__anchor}-&gt;prependChild($self-&gt;{image}-&gt;clone)
-        unless $self-&gt;getLabel;
-
-    $self-&gt;{_options}{visibility} = $visibility if $visibility;
-    $self-&gt;setStyle(visibility =&gt; 'hidden');
-    $options = toJSON($self-&gt;{_options});
-    $self-&gt;_appendInitScript(&quot;IWL.Button.create('$id', $options);&quot;);
+    if ($required) {
+        $options = toJSON($self-&gt;{_options});
+        $self-&gt;_appendInitScript(&quot;IWL.Button.create('$id', $options);&quot;);
+    }
 }
 
 sub _setupDefaultClass {
     my $self = shift;
     $self-&gt;SUPER::prependClass($self-&gt;{_defaultClass} . '_' . $self-&gt;{_options}{size});
     $self-&gt;SUPER::prependClass($self-&gt;{_defaultClass});
-    $self-&gt;{image}-&gt;prependClass($self-&gt;{_defaultClass} . '_image');
-    my $index = 0;
-    foreach (qw(tl top tr l content r bl bottom br)) {
-        $self-&gt;{__parts}[$index++]-&gt;prependClass(
-            $self-&gt;{_defaultClass} . '_' . $_);
-    }
+    $self-&gt;{anchor}-&gt;prependClass($self-&gt;{_defaultClass} . '_content');
     return $self;
 }
 
@@ -323,21 +299,14 @@ sub _init {
     my $image  = IWL::Image-&gt;new;
     my $id     = $args{id};
 
-    $self-&gt;{_defaultClass}   = 'button';
-    $image-&gt;{_ignore}        = 1;
-
-    $self-&gt;{image}           = $image;
-    $self-&gt;{__anchor}        = $anchor;
-    $self-&gt;{__parts}         = [IWL::Widget-&gt;newMultiple(9)];
+    $self-&gt;{image}         = $image;
+    $self-&gt;{anchor}        = $anchor;
+    $self-&gt;{_defaultClass} = 'button';
+    $image-&gt;{_ignore}      = 1;
 
     $id = randomize($self-&gt;{_defaultClass}) unless $id;
-    $self-&gt;{_tag} = 'div';
-    foreach (@{$self-&gt;{__parts}}) {
-        $_-&gt;{_tag} = 'div';
-        $self-&gt;appendChild($_);
-    }
-    $self-&gt;{__parts}[4]-&gt;appendChild($image);
-    $self-&gt;appendChild(IWL::Container-&gt;new(tag =&gt; 'noscript')-&gt;appendChild($anchor));
+    $self-&gt;{_tag} = 'table';
+    $self-&gt;setAttributes(cellspacing =&gt; 0, cellpadding =&gt; 0);
     $self-&gt;setId($id);
 
     $self-&gt;{_options}{size} = $args{size} || 'default';
@@ -358,6 +327,31 @@ sub _init {
     return $self;
 }
 
+# Internal
+#
+sub __buildParts {
+    my $self = shift;
+    my $body = IWL::Container-&gt;new(tag =&gt; 'tbody');
+    my $row = IWL::Container-&gt;new(tag =&gt; 'tr');
+    $self-&gt;appendChild($body);
+    $body-&gt;appendChild($row);
+    for (0 .. 2) {
+        my $cell = IWL::Container-&gt;new(tag =&gt; 'td');
+        $row-&gt;appendChild($cell);
+        if ($_ == 0) {
+            $cell-&gt;setClass($self-&gt;{_defaultClass} . '_left')-&gt;appendChild(IWL::Container-&gt;new);
+        } elsif ($_ == 1) {
+            $cell-&gt;setClass($self-&gt;{_defaultClass} . '_center');
+            $cell-&gt;appendChild($self-&gt;{anchor});
+            $self-&gt;{anchor}-&gt;appendChild($self-&gt;{image}-&gt;setId($self-&gt;getId . '_image')-&gt;setClass($self-&gt;{_defaultClass} . '_image'));
+            $self-&gt;{anchor}-&gt;appendChild(IWL::Label-&gt;new(id =&gt; $self-&gt;getId . '_label', class =&gt; $self-&gt;{_defaultClass} . '_label')
+                -&gt;setText($self-&gt;{_options}{label} || ($self-&gt;{image}{_ignore} ? '&amp;nbsp;' : '')));
+        } elsif ($_ == 2) {
+            $cell-&gt;setClass($self-&gt;{_defaultClass} . '_right')-&gt;appendChild(IWL::Container-&gt;new);
+        }
+    }
+}
+
 1;
 
 =head1 LICENCE AND COPYRIGHT</diff>
      <filename>lib/IWL/Button.pm</filename>
    </modified>
    <modified>
      <diff>@@ -1063,7 +1063,7 @@ sub require {
 
 =item B&lt;unrequire&gt; (B&lt;RESOURCES&gt;)
 
-Un-requires the given resources for sharing
+Un-requires the given resources for sharing. In case the resource is a javascript file or files, the later required files are also removed as requirements
 
 Parameters: B&lt;RESOURCES&gt; - See L&lt;IWL::Object::require|IWL::Object/require&gt; for parameter definition
 
@@ -1073,18 +1073,13 @@ sub unrequire {
     my ($self, %resources) = @_;
     if (my $js = $resources{js}) {
         my @js = 'ARRAY' eq ref $js ? @$js : ($js);
-        if (grep {$_ eq 'base.js'} @js) {
-            push @js, (
-		'dist/prototype.js',
-		'prototype_extensions.js',
-		'dist/effects.js',
-		'scriptaculous_extensions.js'
-            );
-        }
+        my @required = @{$self-&gt;{_required}{js}};
         foreach my $url (@js) {
+            $url = 'dist/prototype.js' if $url eq 'base.js';
             $url = $IWLConfig{JS_DIR} . '/' . $url
                 unless $url =~ m{^(?:(?:https?|ftp|file)://|/)};
-            $self-&gt;{_required}{js} = [grep { $_ ne $url } @{$self-&gt;{_required}{js}}];
+            my ($index) = grep {$required[$_] eq $url} 0 .. $#required;
+            splice @{$self-&gt;{_required}{js}}, $index;
         }
     }
     if (my $css = $resources{css}) {
@@ -1097,6 +1092,33 @@ sub unrequire {
     return $self;
 }
 
+=item B&lt;isRequired&gt; (B&lt;TYPE&gt;, B&lt;URL&gt;)
+
+Returns true if the given resource are required by the object, or its parents
+
+Parameters: B&lt;TYPE&gt; - the type of resource. See L&lt;IWL::Object::require|IWL::Object/require&gt; for resource types, B&lt;URL&gt; - the B&lt;URL&gt; to check
+
+=cut
+
+sub isRequired {
+    my ($self, $type, $url) = @_;
+    my $top = $self-&gt;up(options =&gt; {last =&gt; 1}) || $self;
+    if ($type eq 'js') {
+        $url = $IWLConfig{JS_DIR} . '/' . $url
+            unless $url =~ m{^(?:(?:https?|ftp|file)://|/)};
+    } elsif ($type eq 'css') {
+        $url = $IWLConfig{SKIN_DIR} . '/' . $url
+            unless $url =~ m{^(?:(?:https?|ftp|file)://|/)};
+    }
+
+    return 1 if $top-&gt;{_shared}{$type}{$url};
+    foreach (@{$self-&gt;{_required}{$type} || []}) {
+        return 1 if $_ eq $url;
+    }
+
+    return;
+}
+
 =item B&lt;cleanStateful&gt;
 
 Class method that initializes all state data of the library.  Stateful</diff>
      <filename>lib/IWL/Object.pm</filename>
    </modified>
    <modified>
      <diff>@@ -4,58 +4,6 @@
  * @extends IWL.Widget
  * */
 IWL.Button = Object.extend(Object.extend({}, IWL.Widget), (function () {
-    function createElements() {
-        var id = this.id;
-        var className = $A(this.classNames()).first();
-
-        this.buttonParts = this.childElements();
-        this.buttonContent = $(id + '_content');
-
-        var classNames = className + '_label ' + className + '_label_' + this.options.size;
-        this.buttonContent.insert(
-            '&lt;span id=&quot;' + id + '_label&quot; class=&quot;' + classNames + '&quot;&gt;' +
-                unescape(this.options.label) + '&lt;/span&gt;'
-        );
-        this.buttonImage = $(id + '_image');
-        this.buttonLabel = $(id + '_label');
-    }
-
-    function checkComplete(loaded) {
-        if (!this.buttonImage || this.buttonImage.complete || loaded) {
-            if (this.buttonLabel.getText()
-                    &amp;&amp; !this.buttonContent.clientWidth)
-                checkComplete.bind(this).delay(0.1);
-            else
-                adjust.call(this);
-        } else {
-            this.buttonImage.signalConnect('load', checkComplete.bind(this, true));
-        }
-    }
-
-    function visibilityToggle(state) {
-        if (!state) {
-            var visible = this.visible();
-            if (Prototype.Browser.Gecko &amp;&amp; !visible) {
-                var els = this.style;
-                var originalVisibility = els.visibility;
-                var originalPosition = els.position;
-                var originalDisplay = els.display;
-                els.visibility = 'hidden';
-                els.position = 'absolute';
-                els.display = 'block';
-                return {visibility: originalVisibility, position: originalPosition, display: originalDisplay};
-            }
-        } else {
-            if (Prototype.Browser.Gecko) {
-                var els = this.style;
-                els.display = state.display;
-                els.position = state.position;
-                els.visibility = state.visibility;
-                return false;
-            }
-        }
-    }
-
     function createDisabledLayer() {
         if (!this.parentNode)
             return;
@@ -117,130 +65,6 @@ IWL.Button = Object.extend(Object.extend({}, IWL.Widget), (function () {
         if (this.hidden)
             this.form.appendChild(this.hidden);
         this.form.submit();
-        if (this.hidden)
-            this.hidden.remove();
-    }
-
-    function adjust() {
-        var square = 6;
-        var corner_size = 6;
-        var image = this.buttonImage;
-        var label = this.buttonLabel;
-        var topleft = this.buttonParts[0];
-        var top = this.buttonParts[1];
-        var topright = this.buttonParts[2];
-        var left = this.buttonParts[3];
-        var content = this.buttonParts[4];
-        var right = this.buttonParts[5];
-        var bottomleft = this.buttonParts[6];
-        var bottom = this.buttonParts[7];
-        var bottomright = this.buttonParts[8];
-        var state = visibilityToggle.call(this);
-
-        if (!content) return;
-        if (!label.getText()) {
-            var text;
-            if (image) {
-                var ml = parseFloat(image.getStyle('margin-left')) || 0;
-                var mr = parseFloat(image.getStyle('margin-right')) || 0;
-                var ih = parseFloat(image.getStyle('height')) || image.height;
-                if (this.options.size == 'small' &amp;&amp; ih &gt; 10) ih = 10;
-                if (ml != mr)
-                    image.setStyle({marginLeft: ml + 'px', marginRight: ml + 'px'});
-            }
-            label.appendChild(text = 'M'.createTextNode());
-            var height = content.getHeight();
-            label.removeChild(text);
-            if (height)
-                content.style.height = height + 'px';
-            if (image)
-                image.style.marginTop = (height - ih)/2 + 'px';
-        }
-
-        if (this.options.size == 'medium') {
-            square = 3;
-        } else if (this.options.size == 'small') {
-            square = 1;
-            corner_size = 4;
-            if (topleft) {
-                topleft.style.width = corner_size + &quot;px&quot;;
-                topleft.style.height = corner_size + &quot;px&quot;;
-            }
-            if (topright) {
-                topright.style.width = corner_size + &quot;px&quot;;
-                topright.style.height = corner_size + &quot;px&quot;;
-            }
-            if (bottomleft) {
-                bottomleft.style.width = corner_size + &quot;px&quot;;
-                bottomleft.style.height = corner_size + &quot;px&quot;;
-            }
-            if (bottomright) {
-                bottomright.style.width = corner_size + &quot;px&quot;;
-                bottomright.style.height = corner_size + &quot;px&quot;;
-            }
-            if (image &amp;&amp; image.width &amp;&amp; image.height) {
-                var aspect = image.width / image.height;
-                if (image.height &gt; 10) {
-                    image.style.width = 10 * aspect + 'px';
-                    image.style.height = '10px';
-                }
-            }
-        }
-
-        var dims = content.getDimensions();
-        var width = dims.width;
-        height = height || dims.height;
-
-        if (state) visibilityToggle.call(this, state);
-        if (!width || !height) {
-            adjust.bind(this).delay(0.5);
-            return;
-        }
-
-        if (top) {
-            top.style.left = corner_size + 'px';
-            top.style.width = width + 'px';
-            top.style.height = square + 'px';
-        }
-        if (topright) {
-            topright.style.left = corner_size + width + 'px';
-        }
-        if (left) {
-            left.style.top = corner_size + 'px';
-            left.style.width = corner_size + 'px';
-            left.style.height = 2 * square + height - (2 * corner_size) + 'px';
-        }
-        content.style.top = square + 'px';
-        content.style.left = corner_size + 'px';
-        if (right) {
-            right.style.top = corner_size + 'px';
-            right.style.left = corner_size + width + 'px';
-            right.style.width = corner_size + 'px';
-            right.style.height = 2 * square + height - (2 * corner_size) + 'px';
-        }
-        if (bottomleft) {
-            bottomleft.style.top = 2 * square + height - corner_size + 'px';
-        }
-        if (bottom) {
-            bottom.style.left = corner_size + 'px';
-            bottom.style.top = square + height + 'px';
-            bottom.style.width = width + 'px';
-            bottom.style.height = square + 'px';
-        }
-        if (bottomright) {
-            bottomright.style.left = corner_size + width + 'px';
-            bottomright.style.top = 2 * square + height - corner_size + 'px';
-        }
-        this.style.width = 2 * corner_size + width + 'px';
-        this.style.height = 2 * square + height + 'px';
-
-        if (!this.loaded) {
-            this.style.visibility = this.options.visibility || '';
-            this.loaded = true;
-            this.emitSignal('iwl:load');
-        }
-
-        return this.emitSignal('iwl:adjust');
     }
 
     function mouseOverCallback() {
@@ -282,7 +106,9 @@ IWL.Button = Object.extend(Object.extend({}, IWL.Widget), (function () {
          * */
         setLabel: function(text) {
             this.buttonLabel.update(text &amp;&amp; text.toString ? text.toString() : '');
-            return adjust.call(this);
+            if (this._disabled)
+                disableButton.call(this);
+            return this;
         },
         /**
          * Gets the image of the button
@@ -298,23 +124,30 @@ IWL.Button = Object.extend(Object.extend({}, IWL.Widget), (function () {
          * */
         setImage: function(source) {
             if (source) {
-                if (!this.buttonImage)
-                    this.buttonImage = this.buttonContent.insertBefore(
-                        new Element('img', {
-                                src: source,
-                                id: this.id + '_image',
-                                className: 'image ' + $A(this.classNames()).first() + '_image'
-                            }),
-                        this.buttonLabel
+                if (!this.buttonImage) {
+                    var content = this.down('.button_content');
+                    this.buttonImage = content.insertBefore(
+                        Object.isElement(source)
+                            ? source
+                            : new Element('img', {
+                                    src: source,
+                                    id: this.id + '_image',
+                                    className: 'image ' + $A(this.classNames()).first() + '_image'
+                                }),
+                        content.firstChild
                     );
-                else
+                } else
                     this.buttonImage.src = source;
-                this.buttonImage.observe('load', adjust.bind(this));
+                this.buttonImage.complete
+                    ? disableButton.call(this)
+                    : this.buttonImage.observe('load', disableButton.bind(this));
             } else {
                 this.buttonImage.remove();
                 this.buttonImage = undefined;
+                if (this._disabled)
+                    disableButton.call(this);
             }
-            return adjust.call(this);
+            return this;
         },
         /**
          * Sets the button as a form submit button
@@ -350,15 +183,13 @@ IWL.Button = Object.extend(Object.extend({}, IWL.Widget), (function () {
                 this._disabled = true;
                 this.addClassName(className + '_disabled ' + className + '_' + this.options.size + '_disabled');
                 createDisabledLayer.call(this);
-                this._disabledCallback = disableButton.bind(this);
-                this.signalConnect('iwl:adjust', this._disabledCallback);
-                return adjust.call(this);
+                disableButton.call(this);
+                return this;
             } else {
                 this._disabled = false;
                 this.removeClassName(className + '_disabled ' + className + '_' + this.options.size + '_disabled');
                 removeDisabledLayer.call(this);
-                this.signalDisconnect('iwl:adjust', this._disabledCallback);
-                return adjust.call(this);
+                return this;
             }
         },
         /**
@@ -372,29 +203,28 @@ IWL.Button = Object.extend(Object.extend({}, IWL.Widget), (function () {
         },
 
         _init: function() {
-            this.buttonParts = new Array;
             this.buttonImage = null;
             this.buttonLabel = null;
-            this.buttonContent = null;
             this.options = Object.extend({
                 size: 'default',
                 disabled: false,
                 submit: false,
                 label: ''
             }, arguments[0] || {});
-            this.loaded = false;
-            this.cleanWhitespace();
-            createElements.call(this);
-            checkComplete.call(this);
+            this.buttonImage = $(this.id + '_image');
+            this.buttonLabel = $(this.id + '_label');
+
             this.observe('mouseover', mouseOverCallback.bind(this));
             this.observe('mouseout', mouseOutCallback.bind(this));
             this.observe('mousedown', mouseDownCallback.bind(this));
             this.observe('mouseup', mouseUpCallback.bind(this));
-            if (this.options.disabled)
-                this.setDisabled(true);
             if (this.options.submit)
                 this.setSubmit.apply(this, Object.isArray(this.options.submit) ? this.options.submit : []);
-            }
+            this.loaded = true;
+            this.emitSignal('iwl:load');
+            if (this.options.disabled)
+                this.setDisabled(true);
+        }
     }
 })());
 </diff>
      <filename>share/jscript/button.js</filename>
    </modified>
    <modified>
      <diff>@@ -5,16 +5,12 @@
  * */
 IWL.Upload = Object.extend(Object.extend({}, IWL.Widget), (function () {
     function adjust() {
-        var button_width = parseInt(this.button.style.width);
-        var file_width = Element.getDimensions(this.file).width;
-        if (!button_width || !file_width) {
-            adjust.bind(this).delay(0.5);
-            return;
-        }
-
-        if (!Prototype.Browser.WebKit)
-            Element.setStyle(this.file, {left: -1 * (file_width - button_width) + 'px'});
-        this.file.setStyle({opacity: 0.001, visibility: 'visible'});
+        var file_width = Element.getWidth(this.file);
+        Element.setStyle(this.file, {
+                marginLeft: -1 * file_width + 'px',
+                opacity: 0.001,
+                visibility: 'visible'
+            });
         this.file.onchange = uploadFile.bindAsEventListener(this);
         this.file.onkeypress = function() {return false;};
         this.file.onpaste = function() {return false;};
@@ -77,7 +73,7 @@ IWL.Upload = Object.extend(Object.extend({}, IWL.Widget), (function () {
                 showTooltip: true
             }, arguments[1] || {});
             this.messages = Object.extend({}, arguments[2]);
-            button.createHtmlElement(form);
+            button.parentNode.createHtmlElement(form);
             this.file = $(this.id + '_file');
             this.button = button;
             this.frame = $(this.id + '_frame');</diff>
      <filename>share/jscript/upload.js</filename>
    </modified>
    <modified>
      <diff>@@ -78,16 +78,6 @@ ul.completion {
     z-index: 50;
 }
 
-.button_small .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -10px;
-}
-.button_small_press .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -22px;
-}
-.button_small_disabled .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -34px;
-}
-
 li.menu_radio_item {
     background: url(/iwl/skin/default/images/menu/menu_radio.gif) no-repeat 2px center;
 }</diff>
      <filename>share/skin/ie6.css</filename>
    </modified>
    <modified>
      <diff>@@ -296,7 +296,7 @@ iframe.upload_frame {
     border: 0;
     display: none;
 }
-form.upload div.button {
+form.upload .button {
      position: relative;
 }
 
@@ -322,84 +322,29 @@ a:hover {
 /* Button */
 
 .button {
-    position: relative;
-    float: left;
     margin: 3px;
     cursor: pointer;
+    float: left;
 }
 .button_disabled {
     cursor: default;
 }
-.button_tl {
-    position: absolute;
-    top: 0px;
-    left: 0px;
-    width: 6px;
-    height: 6px;
-    font-size: 2px;
-}
-.button_top {
-    position: absolute;
-    top: 0px;
-    left: 6px;
-    height: 6px;
-    font-size: 2px;
-}
-.button_tr {
-    position: absolute;
-    top: 0px;
-    width: 6px;
-    height: 6px;
-    font-size: 2px;
-}
-.button_l {
-    position: absolute;
-    top: 6px;
-    left: 0px;
-    width: 6px;
-    height: 15px;
-    font-size: 2px;
-}
 .button_content {
-    position: absolute;
-    top: 6px;
-    left: 6px;
+    background: none;
+    border: none;
+    padding: 0;
+    margin: 0;
     white-space: nowrap;
-    background: #f0ebe6;
-    font-size: 2px;
-    padding: 0 2px;
 }
-.button_disabled .button_content {
-    background: #cccccc;
-}
-.button_r {
-    position: absolute;
-    top: 6px;
-    width: 6px;
-    height: 15px;
-    font-size: 2px;
-}
-.button_bl {
-    position: absolute;
-    left: 0px;
-    width: 6px;
-    height: 6px;
-    font-size: 2px;
-}
-.button_bottom {
-    position: absolute;
-    left: 6px;
-    height: 6px;
-    font-size: 2px;
+.button_content:hover {
+    text-decoration: none;
 }
-.button_br {
-    position: absolute;
-    width: 6px;
-    height: 6px;
-    font-size: 2px;
+.button_press .button_content {
+    padding-left: 2px;
+    padding-right: 0px;
 }
 .button_image {
-    margin: 0px 5px 0px 0px;
+    margin: 0px 2px;
     padding: 0px;
     border: 0px;
     vertical-align: middle;
@@ -419,244 +364,161 @@ a:hover {
     font-size: 12px;
     text-align: center;
 }
+.button_left, .button_center, .button_right {
+    padding: 0 !important;
+}
+
+.button_hover .button_label {
+    text-decoration: underline;
+}
 
 .button_disabled .button_label {
     color: #999;
     font-weight: normal;
 }
 
+.button_default .button_content {
+    height: 28px;
+    padding: 6px 2px;
+}
+.button_medium .button_content {
+    height: 20px;
+    padding: 2px 1px;
+}
+.button_small .button_content {
+    height: 16px;
+}
+
 .button_medium .button_label {
-    font-size: 10px;
+    font-size: 12px;
 }
+
 .button_small .button_label {
     font-size: 8px;
     font-weight: normal;
     color: black;
 }
 
-.button_default .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat 0px 0px;
-}
-.button_default .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -6px 0px;
+.button_medium .button_image {
+    max-height: 18px;
 }
-.button_default .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat 0px -6px;
-}
-.button_default .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -6px -6px;
-}
-.button_default .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y 0px 0px;
-}
-.button_default .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -6px 0px;
-}
-.button_default .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px 0px;
-}
-.button_default .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -6px;
+.button_small .button_image {
+    max-height: 14px;
 }
 
-.button_default_press .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -12px 0px;
-}
-.button_default_press .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -18px 0px;
-}
-.button_default_press .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -12px -6px;
-}
-.button_default_press .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -18px -6px;
-}
-.button_default_press .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -12px 0px;
-}
-.button_default_press .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -18px 0px;
-}
-.button_default_press .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -12px;
-}
-.button_default_press .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -18px;
+.button_default .button_left div, .button_default .button_right div {
+    width: 6px;
+    height: 28px;
+    line-height: 1px;
+    font-size: 1px;
 }
 
-.button_default_disabled .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -24px 0px;
-}
-.button_default_disabled .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -30px 0px;
-}
-.button_default_disabled .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -24px -6px;
-}
-.button_default_disabled .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -30px -6px;
+.button_default .button_left {
+    background: url(/iwl/skin/default/images/button/button_default.gif) no-repeat 0px 0px;
 }
-.button_default_disabled .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -24px 0px;
+.button_default .button_center {
+    background: url(/iwl/skin/default/images/button/button_default.gif) repeat-x 0px -28px;
 }
-.button_default_disabled .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -29px 0px;
-}
-.button_default_disabled .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -24px;
-}
-.button_default_disabled .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -30px;
+.button_default .button_right {
+    background: url(/iwl/skin/default/images/button/button_default.gif) no-repeat 0px -56px;
 }
 
-.button_medium .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat 0px 0px;
-}
-.button_medium .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -6px 0px;
+.button_default_press .button_left {
+    background-position: 0px -84px;
 }
-.button_medium .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat 0px -6px;
+.button_default_press .button_center {
+    background-position: 0px -112px;
 }
-.button_medium .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -6px -6px;
-}
-.button_medium .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y 0px -0px;
-}
-.button_medium .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -6px -0px;
-}
-.button_medium .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x -0px 0px;
-}
-.button_medium .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x -0px -9px;
+.button_default_press .button_right {
+    background-position: 0px -140px;
 }
 
-.button_medium_press .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -12px 0px;
-}
-.button_medium_press .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -18px 0px;
-}
-.button_medium_press .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -12px -6px;
-}
-.button_medium_press .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -18px -6px;
+.button_default_disabled .button_left {
+    background-position: 0px -168px;
 }
-.button_medium_press .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -12px 0px;
+.button_default_disabled .button_center {
+    background-position: 0px -196px;
 }
-.button_medium_press .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -18px 0px;
-}
-.button_medium_press .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -12px;
-}
-.button_medium_press .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -21px;
+.button_default_disabled .button_right {
+    background-position: 0px -224px;
 }
 
-.button_medium_disabled .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -24px 0px;
-}
-.button_medium_disabled .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -30px 0px;
-}
-.button_medium_disabled .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -24px -6px;
-}
-.button_medium_disabled .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -30px -6px;
-}
-.button_medium_disabled .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -24px 0px;
-}
-.button_medium_disabled .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -29px 0px;
-}
-.button_medium_disabled .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -24px;
-}
-.button_medium_disabled .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -33px;
+.button_medium .button_left div, .button_medium .button_right div {
+    width: 6px;
+    height: 20px;
+    line-height: 1px;
+    font-size: 1px;
 }
 
-.button_small .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -1px -1px;
-}
-.button_small .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -6px 0px;
+.button_medium .button_left {
+    background: url(/iwl/skin/default/images/button/button_medium.gif) no-repeat 0px 0px;
 }
-.button_small .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat 0px -6px;
+.button_medium .button_center {
+    background: url(/iwl/skin/default/images/button/button_medium.gif) repeat-x 0px -20px;
 }
-.button_small .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -7px -7px;
+.button_medium .button_right {
+    background: url(/iwl/skin/default/images/button/button_medium.gif) no-repeat 0px -40px;
 }
-.button_small .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y 0px 0px;
-}
-.button_small .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -8px 0px;
+
+.button_medium_press .button_left {
+    background-position: 0px -60px;
 }
-.button_small .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px 0px;
+.button_medium_press .button_center {
+    background-position: 0px -80px;
 }
-.button_small .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -11px;
+.button_medium_press .button_right {
+    background-position: 0px -100px;
 }
 
-.button_small_press .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -13px -1px;
+.button_medium_disabled .button_left {
+    background-position: 0px -120px;
 }
-.button_small_press .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -18px 0px;
+.button_medium_disabled .button_center {
+    background-position: 0px -140px;
 }
-.button_small_press .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -12px -6px;
+.button_medium_disabled .button_right {
+    background-position: 0px -160px;
 }
-.button_small_press .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -19px -7px;
-}
-.button_small_press .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -12px 0px;
+
+.button_small .button_left div, .button_small .button_right div {
+    width: 4px;
+    height: 16px;
+    line-height: 1px;
+    font-size: 1px;
 }
-.button_small_press .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -20px 0px;
+
+.button_small .button_left {
+    width: 4px;
+    height: 16px;
+    background: url(/iwl/skin/default/images/button/button_small.gif) no-repeat 0px 0px;
 }
-.button_small_press .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -12px;
+.button_small .button_center {
+    background: url(/iwl/skin/default/images/button/button_small.gif) repeat-x 0px -16px;
 }
-.button_small_press .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -23px;
+.button_small .button_right {
+    width: 4px;
+    height: 16px;
+    background: url(/iwl/skin/default/images/button/button_small.gif) no-repeat 0px -32px;
 }
 
-.button_small_disabled .button_tl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -25px -1px;
+.button_small_press .button_left {
+    background-position: 0px -48px;
 }
-.button_small_disabled .button_tr {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -30px 0px;
+.button_small_press .button_center {
+    background-position: 0px -64px;
 }
-.button_small_disabled .button_bl {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -24px -6px;
+.button_small_press .button_right {
+    background-position: 0px -80px;
 }
-.button_small_disabled .button_br {
-    background: url(/iwl/skin/default/images/button/button_static.gif) no-repeat -31px -7px;
-}
-.button_small_disabled .button_l {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -24px 0px;
-}
-.button_small_disabled .button_r {
-    background: url(/iwl/skin/default/images/button/button_vertical.gif) repeat-y -31px 0px;
+
+.button_small_disabled .button_left {
+    background-position: 0px -96px;
 }
-.button_small_disabled .button_top {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -24px;
+.button_small_disabled .button_center {
+    background-position: 0px -112px;
 }
-.button_small_disabled .button_bottom {
-    background: url(/iwl/skin/default/images/button/button_horizontal.gif) repeat-x 0px -35px;
+.button_small_disabled .button_right {
+    background-position: 0px -128px;
 }
 
 /* ContentBox */</diff>
      <filename>share/skin/main.css</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-use Test::More tests =&gt; 130;
+use Test::More tests =&gt; 135;
 
 use IWL::Object;
 use IWL::Config '%IWLConfig';
@@ -146,10 +146,15 @@ my $output;
 
     $o = $o-&gt;new;
     $o-&gt;require(css =&gt; 'foo.css', js =&gt; [qw(base.js foo.js)]);
+    ok($o-&gt;isRequired(css =&gt; 'foo.css'));
+    ok($o-&gt;isRequired(js =&gt; 'base.js'));
+    ok($o-&gt;isRequired(js =&gt; 'foo.js'));
+    ok(!$o-&gt;isRequired(foo =&gt; 'bar'));
     $o-&gt;unrequire(js =&gt; 'base.js');
+    ok(!$o-&gt;isRequired(js =&gt; 'base.js'));
+    ok(!$o-&gt;isRequired(js =&gt; 'foo.js'));
     $data = $o-&gt;getObject;
     is($data-&gt;{children}[0]{children}[0]{text}, qq(\@import &quot;/my/skin/darkness/foo.css&quot;;\n));
-    is($data-&gt;{children}[1]{attributes}{src}, '/jscript/foo.js');
 
     $o = $o-&gt;new;
     $o2 = IWL::Test::Object2-&gt;new;</diff>
      <filename>t/10object.t</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-use Test::More tests =&gt; 15;
+use Test::More tests =&gt; 17;
 
 use IWL::Button;
 
@@ -27,3 +27,21 @@ use Locale::TextDomain qw(org.bloka.iwl);
     is($button-&gt;setDisabled(1), $button);
     ok($button-&gt;isDisabled);
 }
+
+{
+    my $button = IWL::Button-&gt;new;
+    my $obj = $button-&gt;getObject;
+    my $exists = 0;
+    foreach (@{$obj-&gt;{children}}) {
+        $exists = 1 if exists $_-&gt;{attributes}{'iwl:initScript'};
+    }
+    ok($exists);
+
+    $exists = 0;
+    $button = IWL::Button-&gt;new-&gt;unrequire(js =&gt; 'base.js');
+    $obj = $button-&gt;getObject;
+    foreach (@{$obj-&gt;{children}}) {
+        $exists = 1 if exists $_-&gt;{attributes}{'iwl:initScript'};
+    }
+    ok(!$exists);
+}</diff>
      <filename>t/31button.t</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>share/images/button/button_horizontal.gif</filename>
    </removed>
    <removed>
      <filename>share/images/button/button_static.gif</filename>
    </removed>
    <removed>
      <filename>share/images/button/button_vertical.gif</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>ee5f61b92ea566e33bd9f6a3e82e2b51e6d83a7c</id>
    </parent>
    <parent>
      <id>00b672d4c1631ef2ba26e531aed52586f00c0b37</id>
    </parent>
  </parents>
  <author>
    <name>urandom</name>
    <email>vkojouharov@gmail.com</email>
  </author>
  <url>http://github.com/urandom/iwl/commit/08ad70c305df981bd2023d870ab1ca05455a6a55</url>
  <id>08ad70c305df981bd2023d870ab1ca05455a6a55</id>
  <committed-date>2009-01-27T04:12:01-08:00</committed-date>
  <authored-date>2009-01-27T04:12:01-08:00</authored-date>
  <message>Merge branch 'new_button'

Getting ready for release 0.61</message>
  <tree>96d68b3567ab896428cea8f42c941fbbe2b86c93</tree>
  <committer>
    <name>urandom</name>
    <email>vkojouharov@gmail.com</email>
  </committer>
</commit>
