toolkit/content/widgets/splitter.xml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/content/widgets/splitter.xml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     1.8 +
     1.9 +
    1.10 +<bindings id="splitterBindings"
    1.11 +   xmlns="http://www.mozilla.org/xbl"
    1.12 +   xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.13 +
    1.14 +  <binding id="splitter" extends="xul:splitter">
    1.15 +    <resources>
    1.16 +      <stylesheet src="chrome://global/skin/splitter.css"/>
    1.17 +    </resources>
    1.18 +  </binding>
    1.19 +
    1.20 +  <binding id="grippy" extends="xul:button">
    1.21 +    <resources>
    1.22 +      <stylesheet src="chrome://global/skin/splitter.css"/>
    1.23 +    </resources>
    1.24 +    <handlers>
    1.25 +      <handler event="command">
    1.26 +        <![CDATA[
    1.27 +          var splitter = this.parentNode;
    1.28 +          if (splitter) {
    1.29 +            var state = splitter.getAttribute("state");
    1.30 +            if (state == "collapsed")
    1.31 +              splitter.setAttribute("state", "open");
    1.32 +            else
    1.33 +              splitter.setAttribute("state", "collapsed");
    1.34 +          }
    1.35 +        ]]>
    1.36 +      </handler>
    1.37 +    </handlers>
    1.38 +  </binding>
    1.39 +
    1.40 +</bindings>

mercurial