Enhancement with view.js handling

community
Steve L. Nyemba 8 years ago
parent e9ca506a2b
commit 96572603d0

@ -66,7 +66,10 @@ def get_summary(id):
# r = gReader.view('summary/app_resources',key=p['uid']) # r = gReader.view('summary/app_resources',key=p['uid'])
#else: #else:
# r = gReader.view('summary/folder_size',key=p['uid']) # r = gReader.view('summary/folder_size',key=p['uid'])
r = r = gReader.view('summary/'+id.strip(),key=p['uid']) id='summary/'+id.strip()
print p
print id
r = r = gReader.view(id,key=p['uid'])
except Exception,e: except Exception,e:
print (e) print (e)

@ -256,10 +256,12 @@ g.summary.factory = function (url,pointer) {
var object = {} var object = {}
object.url = url object.url = url
var observer = null var observer = null
var TIME_ELLAPSED = 2000 ;
object.callback = function (r) { object.callback = function (r) {
r = JSON.parse(r.responseText) r = JSON.parse(r.responseText)
pointer(r) pointer(r)
console.log(r)
//observer.notify() //observer.notify()
} }
@ -267,10 +269,13 @@ g.summary.factory = function (url,pointer) {
observer = observer observer = observer
var httpclient = HttpClient.instance() var httpclient = HttpClient.instance()
httpclient.setAsync(false) //httpclient.setAsync(false)
httpclient.get(this.url, this.callback) httpclient.get(this.url, this.callback)
setTimeout(function(){
observer.notify()
},TIME_ELLAPSED) ;
observer.notify() //observer.notify()
} }
return object return object

Loading…
Cancel
Save