Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add XUL toolbarspacer and toolbarspring elements.

Closes issue #94.
  • Loading branch information...
commit c6f15ac444dcd532ecd74a7c5aa465b439e38b19 1 parent 4f1ee51
@h6w authored
View
4 ample/languages/xul/.files
@@ -79,6 +79,8 @@ elements/tabpanels.js
elements/toolbar.js
elements/toolbarbutton.js
elements/toolbarseparator.js
+elements/toolbarspacer.js
+elements/toolbarspring.js
elements/toolbargrippy.js
elements/toolbox.js
# listbox
@@ -116,4 +118,4 @@ elements/datepicker-pane.js
elements/colorpicker-pane.js
elements/tooltip-pane.js
# custom
-elements/sidebar.js
+elements/sidebar.js
View
28 ample/languages/xul/elements/toolbarspacer.js
@@ -0,0 +1,28 @@
+/*
+ * Ample SDK - JavaScript GUI Framework
+ *
+ * Copyright (c) 2009 Sergey Ilinsky
+ * Dual licensed under the MIT and GPL licenses.
+ * See: http://www.amplesdk.com/about/licensing/
+ *
+ */
+
+var cXULElement_toolbarspacer = function(){};
+cXULElement_toolbarspacer.prototype = new cXULElement("toolbarspacer");
+
+// Class Events Handlers
+cXULElement_toolbarspacer.handlers = {
+ "DOMAttrModified": function(oEvent) {
+ if (oEvent.target == this) {
+ this.$mapAttribute(oEvent.attrName, oEvent.newValue);
+ }
+ }
+};
+
+// Element Render: open
+cXULElement_toolbarspacer.prototype.$getTagOpen = function() {
+ return '<div class="xul-toolbarspacer' + (this.attributes["class"] ? " " + this.attributes["class"] : "") + '"><br /></div>';
+};
+
+// Register Element
+ample.extend(cXULElement_toolbarspacer);
View
32 ample/languages/xul/elements/toolbarspring.js
@@ -0,0 +1,32 @@
+/*
+ * Ample SDK - JavaScript GUI Framework
+ *
+ * Copyright (c) 2009 Sergey Ilinsky
+ * Dual licensed under the MIT and GPL licenses.
+ * See: http://www.amplesdk.com/about/licensing/
+ *
+ */
+
+var cXULElement_toolbarspring = function(){};
+cXULElement_toolbarspring.prototype = new cXULElement("toolbarspring");
+
+// Attributes Defaults
+cXULElement_toolbarspring.attributes = {};
+cXULElement_toolbarspring.attributes.flex = "1";
+
+// Class Events Handlers
+cXULElement_toolbarspring.handlers = {
+ "DOMAttrModified": function(oEvent) {
+ if (oEvent.target == this) {
+ this.$mapAttribute(oEvent.attrName, oEvent.newValue);
+ }
+ }
+};
+
+// Element Render: open
+cXULElement_toolbarspring.prototype.$getTagOpen = function() {
+ return '<div class="xul-toolbarspring' + (this.attributes["class"] ? " " + this.attributes["class"] : "") + '"><br /></div>';
+};
+
+// Register Element
+ample.extend(cXULElement_toolbarspring);
View
8 ample/languages/xul/themes/default/toolbox.css
@@ -19,6 +19,12 @@ xul|toolbarseparator {
background: url(media/toolbarseparator.gif) repeat-y;
}
+xul|toolbarspacer {
+}
+
+xul|toolbarspring {
+}
+
xul|toolbargrippy {
width: 3px;
margin: 3px;
@@ -109,4 +115,4 @@ xul|toolbarbutton:disabled xul|toolbarbutton-top,
xul|toolbarbutton:disabled xul|toolbarbutton-left,
xul|toolbarbutton:disabled xul|toolbarbutton-bottom {
background: none;
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.