summaryrefslogtreecommitdiff
path: root/lib/dijit/form/HorizontalRule.js.uncompressed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-14 18:59:10 +0400
committerAndrew Dolgov <[email protected]>2012-08-14 18:59:18 +0400
commit1354d17270961fff662d40f90521223f8fd0d73b (patch)
treee9266be71587e47c800303446e968a6d3565e2cf /lib/dijit/form/HorizontalRule.js.uncompressed.js
parentd04f8c826f5283765f52cf6b98b42a1ed8f2d6bc (diff)
update dojo to 1.7.3
Diffstat (limited to 'lib/dijit/form/HorizontalRule.js.uncompressed.js')
-rw-r--r--lib/dijit/form/HorizontalRule.js.uncompressed.js76
1 files changed, 76 insertions, 0 deletions
diff --git a/lib/dijit/form/HorizontalRule.js.uncompressed.js b/lib/dijit/form/HorizontalRule.js.uncompressed.js
new file mode 100644
index 000000000..a05509e69
--- /dev/null
+++ b/lib/dijit/form/HorizontalRule.js.uncompressed.js
@@ -0,0 +1,76 @@
+define("dijit/form/HorizontalRule", [
+ "dojo/_base/declare", // declare
+ "../_Widget",
+ "../_TemplatedMixin"
+], function(declare, _Widget, _TemplatedMixin){
+
+/*=====
+ var _Widget = dijit._Widget;
+ var _TemplatedMixin = dijit._TemplatedMixin;
+=====*/
+
+// module:
+// dijit/form/HorizontalRule
+// summary:
+// Hash marks for `dijit.form.HorizontalSlider`
+
+
+return declare("dijit.form.HorizontalRule", [_Widget, _TemplatedMixin], {
+ // summary:
+ // Hash marks for `dijit.form.HorizontalSlider`
+
+ templateString: '<div class="dijitRuleContainer dijitRuleContainerH"></div>',
+
+ // count: Integer
+ // Number of hash marks to generate
+ count: 3,
+
+ // container: String
+ // For HorizontalSlider, this is either "topDecoration" or "bottomDecoration",
+ // and indicates whether this rule goes above or below the slider.
+ container: "containerNode",
+
+ // ruleStyle: String
+ // CSS style to apply to individual hash marks
+ ruleStyle: "",
+
+ _positionPrefix: '<div class="dijitRuleMark dijitRuleMarkH" style="left:',
+ _positionSuffix: '%;',
+ _suffix: '"></div>',
+
+ _genHTML: function(pos){
+ return this._positionPrefix + pos + this._positionSuffix + this.ruleStyle + this._suffix;
+ },
+
+ // _isHorizontal: [protected extension] Boolean
+ // VerticalRule will override this...
+ _isHorizontal: true,
+
+ buildRendering: function(){
+ this.inherited(arguments);
+
+ var innerHTML;
+ if(this.count == 1){
+ innerHTML = this._genHTML(50, 0);
+ }else{
+ var i;
+ var interval = 100 / (this.count-1);
+ if(!this._isHorizontal || this.isLeftToRight()){
+ innerHTML = this._genHTML(0, 0);
+ for(i=1; i < this.count-1; i++){
+ innerHTML += this._genHTML(interval*i, i);
+ }
+ innerHTML += this._genHTML(100, this.count-1);
+ }else{
+ innerHTML = this._genHTML(100, 0);
+ for(i=1; i < this.count-1; i++){
+ innerHTML += this._genHTML(100-interval*i, i);
+ }
+ innerHTML += this._genHTML(0, this.count-1);
+ }
+ }
+ this.domNode.innerHTML = innerHTML;
+ }
+});
+
+});