some needed changes in api for desktop

This commit is contained in:
Harry Bomrah 2013-09-30 16:43:16 +08:00 committed by saurabhbhatia
parent 74ca99a581
commit 0a9fd6a4b5
2 changed files with 21 additions and 18 deletions

View File

@ -226,7 +226,8 @@ var orbitDesktop = function(dom){
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
$(".docklist a").click(function(){
o.menu_item($(this));
if( !$( this ).hasClass( 'disable' ) )
o.menu_item($(this));
return false;
});
@ -274,10 +275,11 @@ var orbitDesktop = function(dom){
});
$("body").on("click","*[ajax-remote]",function(){
var $e = $(this);
var t = $e.attr("ajax-remote");
var classes_to_toggle = $e.attr("toggle-onclick");
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
var $e = $(this),
t = $e.attr("ajax-remote"),
classes_to_toggle = $e.attr("toggle-onclick"),
responsetype = $e.attr('response-type') ? $e.attr('response-type') : "html",
exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
if(classes_to_toggle){
$e.toggleClass(classes_to_toggle);
}
@ -289,9 +291,9 @@ var orbitDesktop = function(dom){
}
var ca = $e.attr("content-holder");
var a = function(){
$.ajax({
type : t,
dataType : responsetype,
url : $e.attr("href"),
success : function(data){
if(typeof data == "string"){
@ -302,6 +304,7 @@ var orbitDesktop = function(dom){
// $("div[container=true]").html(data);
}
}
if(exe)
window.o[o.data_method][exe](data,$e);
if(t == "delete"){

View File

@ -32,32 +32,32 @@
<li class="dock_item"><a callback-method='initializePersonalExperience' href="<%= panel_personal_experience_desktop_experience_window_path %>" class="widget_fn wh2 hh2" id='d_working' onclick="return false;"><span class="widget_icon"><img src="" alt="Working" id="working_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializePersonalDiploma' href="<%= panel_personal_diploma_desktop_diploma_window_path %>" class="widget_fn wh2 hh2" id='d_education' onclick="return false;"><span class="widget_icon"><img src="" alt="Education" id="education_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializePersonalHonor' href="<%= panel_personal_honor_desktop_honor_window_path %>" class="widget_fn wh2 hh2" id='d_honors' onclick="return false;"><span class="widget_icon"><img src="" alt="Honors" id="honors_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon disable"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_landt' onclick="return false;"><span class="widget_icon"><img src="" alt="Learning & Teaching" id="landt_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 180px;">
<li class="dock_item"><a callback-method='' href="courses" class="widget_fn wh2 hh2" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="homework" class="widget_fn wh2 hh2" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="certification" class="widget_fn wh2 hh2" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="courses" class="widget_fn wh2 hh2" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="homework" class="widget_fn wh2 hh2" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="certification" class="widget_fn wh2 hh2" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_personal' onclick="return false;"><span class="widget_icon"><img src="" alt="Personal" id="personal_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 300px;">
<li class="dock_item"><a callback-method='' href="mypage" class="widget_fn wh2 hh2" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="blog" class="widget_fn wh2 hh2" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="album" class="widget_fn wh2 hh2" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="calendar" class="widget_fn wh2 hh2" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="files" class="widget_fn wh2 hh2" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="mypage" class="widget_fn wh2 hh2" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="blog" class="widget_fn wh2 hh2" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="album" class="widget_fn wh2 hh2" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="calendar" class="widget_fn wh2 hh2" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="files" class="widget_fn wh2 hh2" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='initializeOrbitTimeline' href="<%= desktop_orbit_orbit_path %>" class="widget_fn wh2 hh2" id='d_orbit' onclick="return false;"><span class="widget_icon"><img src="" alt="Orbit" id="orbit_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 60px;">
<li class="dock_item"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh2 hh2" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
<li class="d_cate disable"><a callback-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh2 hh2" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
</ul>
<div class="fn_des hh2 admbg admtxt"></div>
</div>