gridster, url code fixed, views removed.
This commit is contained in:
1 parent
3572856486
commit
9f362d9ae6
9 files changed
+3629
-282
No files matched your search
+145
-145
@@ -18,37 +18,37 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
fill: '.list_t'
|
||||
})
|
||||
|
||||
$("#journal_selection_options a").click(function(){
|
||||
switch($(this).attr("href")){
|
||||
case "all":
|
||||
$(".list_item_action > .icon-check-empty").switchClass("icon-check-empty","icon-check",0);
|
||||
break;
|
||||
case "none":
|
||||
$(".list_item_action > .icon-check").switchClass("icon-check","icon-check-empty",0);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
$("#journal_view_selection a").click(function(){
|
||||
switch($(this).attr("href")){
|
||||
case "journal":
|
||||
journalview();
|
||||
break;
|
||||
case "keywords":
|
||||
keywordsview();
|
||||
break;
|
||||
case "title":
|
||||
titleview();
|
||||
break;
|
||||
case "abstract":
|
||||
abstractview();
|
||||
break;
|
||||
case "file":
|
||||
fileview();
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
// $("#journal_selection_options a").click(function(){
|
||||
// switch($(this).attr("href")){
|
||||
// case "all":
|
||||
// $(".list_item_action > .icon-check-empty").switchClass("icon-check-empty","icon-check",0);
|
||||
// break;
|
||||
// case "none":
|
||||
// $(".list_item_action > .icon-check").switchClass("icon-check","icon-check-empty",0);
|
||||
// break;
|
||||
// }
|
||||
// return false;
|
||||
// })
|
||||
// $("#journal_view_selection a").click(function(){
|
||||
// switch($(this).attr("href")){
|
||||
// case "journal":
|
||||
// journalview();
|
||||
// break;
|
||||
// case "keywords":
|
||||
// keywordsview();
|
||||
// break;
|
||||
// case "title":
|
||||
// titleview();
|
||||
// break;
|
||||
// case "abstract":
|
||||
// abstractview();
|
||||
// break;
|
||||
// case "file":
|
||||
// fileview();
|
||||
// break;
|
||||
// }
|
||||
// return false;
|
||||
// })
|
||||
}
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
@@ -67,123 +67,123 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
}
|
||||
|
||||
|
||||
var journalview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+journal.title+'</div><div class="list_t_des">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
var fileview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
li = null;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = null;
|
||||
li = $('<li class="list_t_item file_view"></li>');
|
||||
li.append('<div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+journal.title+'</div><div class="list_t_des"></div>');
|
||||
var file_list = li.find('.list_t_des');
|
||||
$.each(paper.files,function(k,file){
|
||||
var thistitle = file.title;
|
||||
if(!thistitle)
|
||||
thistitle = "";
|
||||
thistitle = ( thistitle.length > 8 )? thistitle.substring(0,8)+'...' : thistitle;
|
||||
if(!file.title){
|
||||
thistitle = "Untitled File";
|
||||
}
|
||||
var img = $('<a class="file" href="'+file.url+'" target="_blank" ><img src="'+file.icon+'" /><span class="filetitle">'+thistitle+'</span></a>');
|
||||
file_list.append(img);
|
||||
})
|
||||
li.append('<div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%3==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
var keywordsview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.keywords+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
// var journalview = function(){
|
||||
// $("#journal_p div#paper_list div.overview").empty();
|
||||
// var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
// counter = 1,
|
||||
// li;
|
||||
// $.each(journalData,function(i,journal){
|
||||
// $.each(journal.papers,function(j,paper){
|
||||
// li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+journal.title+'</div><div class="list_t_des">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
// column.find("ul").append(li);
|
||||
// if(counter%5==0){
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
// }
|
||||
// counter++;
|
||||
// })
|
||||
// })
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// bindSecondaryHandlers();
|
||||
// }
|
||||
// var fileview = function(){
|
||||
// $("#journal_p div#paper_list div.overview").empty();
|
||||
// var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
// counter = 1,
|
||||
// li = null;
|
||||
// $.each(journalData,function(i,journal){
|
||||
// $.each(journal.papers,function(j,paper){
|
||||
// li = null;
|
||||
// li = $('<li class="list_t_item file_view"></li>');
|
||||
// li.append('<div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+journal.title+'</div><div class="list_t_des"></div>');
|
||||
// var file_list = li.find('.list_t_des');
|
||||
// $.each(paper.files,function(k,file){
|
||||
// var thistitle = file.title;
|
||||
// if(!thistitle)
|
||||
// thistitle = "";
|
||||
// thistitle = ( thistitle.length > 8 )? thistitle.substring(0,8)+'...' : thistitle;
|
||||
// if(!file.title){
|
||||
// thistitle = "Untitled File";
|
||||
// }
|
||||
// var img = $('<a class="file" href="'+file.url+'" target="_blank" ><img src="'+file.icon+'" /><span class="filetitle">'+thistitle+'</span></a>');
|
||||
// file_list.append(img);
|
||||
// })
|
||||
// li.append('<div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div>');
|
||||
// column.find("ul").append(li);
|
||||
// if(counter%3==0){
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
// }
|
||||
// counter++;
|
||||
// })
|
||||
// })
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// bindSecondaryHandlers();
|
||||
// }
|
||||
// var keywordsview = function(){
|
||||
// $("#journal_p div#paper_list div.overview").empty();
|
||||
// var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
// counter = 1,
|
||||
// li;
|
||||
// $.each(journalData,function(i,journal){
|
||||
// $.each(journal.papers,function(j,paper){
|
||||
// li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.keywords+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
// column.find("ul").append(li);
|
||||
// if(counter%5==0){
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
// }
|
||||
// counter++;
|
||||
// })
|
||||
// })
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// bindSecondaryHandlers();
|
||||
// }
|
||||
|
||||
var titleview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
// var titleview = function(){
|
||||
// $("#journal_p div#paper_list div.overview").empty();
|
||||
// var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
// counter = 1,
|
||||
// li;
|
||||
// $.each(journalData,function(i,journal){
|
||||
// $.each(journal.papers,function(j,paper){
|
||||
// li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
// column.find("ul").append(li);
|
||||
// if(counter%5==0){
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
// }
|
||||
// counter++;
|
||||
// })
|
||||
// })
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// bindSecondaryHandlers();
|
||||
// }
|
||||
|
||||
var abstractview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item" style="height:auto;"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.abstract+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
// var abstractview = function(){
|
||||
// $("#journal_p div#paper_list div.overview").empty();
|
||||
// var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
// li;
|
||||
// $.each(journalData,function(i,journal){
|
||||
// $.each(journal.papers,function(j,paper){
|
||||
// li = $('<li class="list_t_item" style="height:auto;"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.abstract+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
// column.find("ul").append(li);
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
// })
|
||||
// })
|
||||
// $("#journal_p div#paper_list div.overview").append(column);
|
||||
// bindSecondaryHandlers();
|
||||
// }
|
||||
|
||||
var getData = function(){
|
||||
$.getJSON("/panel/personal_journal/desktop/get_journals_json",function(journals){
|
||||
journalData = eval(journals);
|
||||
journalview();
|
||||
bindHandlers();
|
||||
})
|
||||
}
|
||||
getData();
|
||||
// var getData = function(){
|
||||
// $.getJSON("/panel/personal_journal/desktop/get_journals_json",function(journals){
|
||||
// journalData = eval(journals);
|
||||
// journalview();
|
||||
// bindHandlers();
|
||||
// })
|
||||
// }
|
||||
// getData();
|
||||
}
|
||||
this.initializeJournalPapers.paperDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
|
||||
Reference in new issue
Block a user