desktopAPI update.

This commit is contained in:
Harry Bomrah 2012-11-08 19:42:22 +08:00
parent b1d808cb86
commit 5fb32f3867
2 changed files with 16 additions and 32 deletions

View File

@ -93,14 +93,18 @@ var orbitDesktop = function(dom){
var cache = false; var cache = false;
if(!o.desktopData[o.currentface]){ if(!o.desktopData[o.currentface]){
$(o.contentHolder).empty().load(url,function(){ $(o.contentHolder).empty().load(url,function(){
if(typeof o.data_method != "undefined" || o.data_method != "") if(typeof o.data_method != "undefined"){
window.o[o.data_method](target,url,cache); if(o.data_method != "")
window.o[o.data_method](target,url,cache);
}
}); });
}else{ }else{
$(o.contentHolder).html(o.desktopData[o.currentface]); $(o.contentHolder).html(o.desktopData[o.currentface]);
cache = true; cache = true;
if(typeof o.data_method != "undefined" || o.data_method != "") if(typeof o.data_method != "undefined"){
if(o.data_method != "")
window.o[o.data_method](target,url,cache); window.o[o.data_method](target,url,cache);
}
} }
}); });
} }
@ -118,7 +122,15 @@ var orbitDesktop = function(dom){
// main: '.tinycanvas', // main: '.tinycanvas',
// fill: '.s_grid_con' // fill: '.s_grid_con'
// }) // })
window.o[o.data_method][sub_data_method](); if(typeof o.data_method != "undefined"){
if(o.data_method != ""){
if(typeof sub_data_method != "undefined"){
if(sub_data_method != ""){
window.o[o.data_method][sub_data_method]();
}
}
}
}
}) })
} }
$('.s_menu a').removeClass('thmc1 thmtxt active'); $('.s_menu a').removeClass('thmc1 thmtxt active');
@ -1373,16 +1385,3 @@ var uselessfunction = function(){
$.post("/desktop/temp_func",{sectionid:"4f83e7bbbd98eb041600001d"}); $.post("/desktop/temp_func",{sectionid:"4f83e7bbbd98eb041600001d"});
} }
orbitDesktop.prototype.initCourses = function(){
o.notify("Hi there","","");
}
orbitDesktop.prototype.something = function(){
o.notify("something","","");
}

View File

@ -85,18 +85,3 @@
</div> </div>
</div> </div>
</div> </div>
Panel::PersonalJournal::Plugin::WritingJournals
<script type="text/javascript">
orbitDesktop.prototype.bindItems = function(){
var bindHandlers = function(){
}
$(".remote_url").click(function(){
$(".overview").load($(this).attr("href"),function(){
bindHandlers();
})
return false;
})
}
o.bindItems();
</script>