Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Load urls from url

  • Loading branch information...
commit 50cdc9fa01c221b8b28735c6d8ab54e2d5ea0899 1 parent 58d2471
@rickardholmberg rickardholmberg authored
Showing with 34 additions and 0 deletions.
  1. +4 −0 index.html
  2. +30 −0 js/app.js
View
4 index.html
@@ -31,6 +31,10 @@
var app = new DcmApp('c1');
+ function load_urllist_from_url(url) {
+ app.load_urllist_from_url(url);
+ }
+
function testscroll(i, len) {
if(i > len-1)
return;
View
30 js/app.js
@@ -54,6 +54,36 @@ DcmApp.prototype.load_files = function(files)
});
}
+DcmApp.prototype.load_urllist_from_url = function(url)
+{
+ var app = this;
+ this.curr_file_idx = 0;
+ this.files_loaded = 0;
+
+ $.ajax({
+ async: false,
+ dataType: "json",
+ url: urls,
+ success: function(r){
+ files = r;
+ }
+ });
+
+ for(var i=0;i<files.length;++i) {
+ this.load_url(files[i].href, i, files.length);
+ }
+
+ $("#slider").slider({
+ value: 0,
+ max: files.length-1,
+ slide: function(ui, event) {
+ app.curr_file_idx = event.value; //$(this).slider('value');
+ app.curr_tool.set_file(app.files[app.curr_file_idx]);
+ app.draw_image();
+ }
+ });
+}
+
DcmApp.prototype.load_arraybuffer = function(abuf, index, file_count) {
var app = this;
var buffer = new Uint8Array(abuf);
Please sign in to comment.
Something went wrong with that request. Please try again.