client/js/ldtjson-bin.js
changeset 42 48d825187d67
parent 37 db991a757015
child 44 869410bab434
--- a/client/js/ldtjson-bin.js	Fri Sep 14 10:21:00 2012 +0900
+++ b/client/js/ldtjson-bin.js	Tue Nov 13 11:46:27 2012 +0100
@@ -16,6 +16,10 @@
     this.proj_id = _opts.project_id;
     this.ldt_platform = _opts.ldt_platform || "http://ldt.iri.centrepompidou.fr/";
     this.title_$.html(_opts.title);
+    this.refresh();
+}
+
+Rkns.Ldt.ProjectBin.prototype.refresh = function() {
     var _this = this;
     function convertTC(_ms) {
         function pad(_n) {
@@ -36,9 +40,10 @@
         _res += pad(_minutes) + ':' + pad(_seconds);
         return _res;
     }
-    Rkns.$.getJSON(
-        this.ldt_platform + 'ldtplatform/ldt/cljson/id/' + this.proj_id + '?callback=?',
-        function(_data) {
+    Rkns.$.ajax({
+        url: this.ldt_platform + 'ldtplatform/ldt/cljson/id/' + this.proj_id,
+        dataType: "jsonp",
+        success: function(_data) {
             var _html = '<li><h3>Tags</h3></li>',
                 _projtitle = _data.meta["dc:title"];
             _this.title_$.html('LDT Project: "' + _projtitle + '"');
@@ -76,5 +81,5 @@
             _this.main_$.html(_html);
             _renkan.resizeBins();
         }
-    );
+    });
 }
\ No newline at end of file