desktopAPI update.

This commit is contained in:
Harry Bomrah 2012-11-08 19:42:22 +08:00 committed by chris
parent a56d80698f
commit e498be9753
2 changed files with 16 additions and 32 deletions

View File

@ -93,15 +93,19 @@ 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"){
if(o.data_method != "")
window.o[o.data_method](target,url,cache); 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);
} }
}
}); });
} }
return false; return false;
@ -118,7 +122,15 @@ var orbitDesktop = function(dom){
// main: '.tinycanvas', // main: '.tinycanvas',
// fill: '.s_grid_con' // fill: '.s_grid_con'
// }) // })
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](); 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>