diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dijit/ProgressBar.js | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dijit/ProgressBar.js')
-rw-r--r-- | includes/js/dijit/ProgressBar.js | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/includes/js/dijit/ProgressBar.js b/includes/js/dijit/ProgressBar.js deleted file mode 100644 index 740700a..0000000 --- a/includes/js/dijit/ProgressBar.js +++ /dev/null @@ -1,95 +0,0 @@ -if(!dojo._hasResource["dijit.ProgressBar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dijit.ProgressBar"] = true; -dojo.provide("dijit.ProgressBar"); - -dojo.require("dojo.fx"); -dojo.require("dojo.number"); - -dojo.require("dijit._Widget"); -dojo.require("dijit._Templated"); - -dojo.declare("dijit.ProgressBar", [dijit._Widget, dijit._Templated], { - // summary: A progress indication widget - // - // example: - // | <div dojoType="ProgressBar" - // | places="0" - // | progress="..." maximum="..."> - // | </div> - // - // progress: String (Percentage or Number) - // initial progress value. - // with "%": percentage value, 0% <= progress <= 100% - // or without "%": absolute value, 0 <= progress <= maximum - progress: "0", - - // maximum: Float - // max sample number - maximum: 100, - - // places: Number - // number of places to show in values; 0 by default - places: 0, - - // indeterminate: Boolean - // If false: show progress. - // If true: show that a process is underway but that the progress is unknown - indeterminate: false, - - templateString:"<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" tabindex=\"0\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\"> </span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\"> </div\n\t><img dojoAttachPoint=\"inteterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\"\n\t></img\n></div>\n", - - _indeterminateHighContrastImagePath: - dojo.moduleUrl("dijit", "themes/a11y/indeterminate_progress.gif"), - - // public functions - postCreate: function(){ - this.inherited("postCreate",arguments); - this.inteterminateHighContrastImage.setAttribute("src", - this._indeterminateHighContrastImagePath); - this.update(); - }, - - update: function(/*Object?*/attributes){ - // summary: update progress information - // - // attributes: may provide progress and/or maximum properties on this parameter, - // see attribute specs for details. - dojo.mixin(this, attributes||{}); - var percent = 1, classFunc; - if(this.indeterminate){ - classFunc = "addClass"; - dijit.removeWaiState(this.internalProgress, "valuenow"); - dijit.removeWaiState(this.internalProgress, "valuemin"); - dijit.removeWaiState(this.internalProgress, "valuemax"); - }else{ - classFunc = "removeClass"; - if(String(this.progress).indexOf("%") != -1){ - percent = Math.min(parseFloat(this.progress)/100, 1); - this.progress = percent * this.maximum; - }else{ - this.progress = Math.min(this.progress, this.maximum); - percent = this.progress / this.maximum; - } - var text = this.report(percent); - this.label.firstChild.nodeValue = text; - dijit.setWaiState(this.internalProgress, "describedby", this.label.id); - dijit.setWaiState(this.internalProgress, "valuenow", this.progress); - dijit.setWaiState(this.internalProgress, "valuemin", 0); - dijit.setWaiState(this.internalProgress, "valuemax", this.maximum); - } - dojo[classFunc](this.domNode, "dijitProgressBarIndeterminate"); - this.internalProgress.style.width = (percent * 100) + "%"; - this.onChange(); - }, - - report: function(/*float*/percent){ - // Generates message to show; may be overridden by user - return dojo.number.format(percent, {type: "percent", places: this.places, locale: this.lang}); - }, - - onChange: function(){ - // summary: User definable function fired when progress updates. - } -}); - -} |