Merge remote-tracking branch 'remotes/origin/publication' into desktop
* remotes/origin/publication: new desktop framework updates
This commit is contained in:
commit
35e0011111
12 files changed
+180
-256
No files matched your search
@@ -14,4 +14,6 @@
|
||||
//= require orbitdesktopAPI
|
||||
//= require orbitTimeline
|
||||
//= require orbitdesktop
|
||||
//= require desktop/journal_pages
|
||||
//= require desktop/journal_pages
|
||||
//= require desktop/seminar_pages
|
||||
//= require desktop/books_pages
|
||||
@@ -0,0 +1,33 @@
|
||||
orbitDesktop.prototype.initializeBooks = function(target,url,cache){
|
||||
this.initializeBooks.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeBooks.addbook = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeBooks.list();
|
||||
|
||||
}
|
||||
@@ -49,55 +49,8 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
$("div[container=true]").unbind(".edit").on("click.edit",".journal_paper_edit",function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
$("div[container=true]").html(prev_data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".delete").on("click.delete",".journal_paper_delete",function(){
|
||||
var delurl = $(this).attr("href");
|
||||
var parent = $(this).parent();
|
||||
o.confirm({
|
||||
buttons : ["Yes","No"],
|
||||
highlighted : 2,
|
||||
message : "Are you sure, you want to delete this paper?"
|
||||
},function(value){
|
||||
if(value){
|
||||
$.ajax({
|
||||
url : delurl,
|
||||
type : "DELETE",
|
||||
success : function(data){
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
@@ -113,6 +66,7 @@ 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>'),
|
||||
@@ -120,7 +74,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
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+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
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);
|
||||
@@ -154,7 +108,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
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+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div>');
|
||||
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);
|
||||
@@ -173,7 +127,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
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+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
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);
|
||||
@@ -193,7 +147,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
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+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
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);
|
||||
@@ -212,7 +166,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
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+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
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>');
|
||||
@@ -231,7 +185,13 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
}
|
||||
getData();
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.paperDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
o.simple_drop_down();
|
||||
@@ -271,110 +231,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
$("div[container=true]").unbind(".editcoauthor").on("click.editcoauthor", "a.bt-edit", function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
$("div[container=true]").html(prev_data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".editype").on("click.edittype", "a.bt-edit-type", function(){
|
||||
var parent = $(this).parent().parent();
|
||||
parent.find('.list_item_function').hide();
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = parent.find(".form_space").html();
|
||||
parent.find(".form_space").html(data);
|
||||
$(".bt-cancel-type").click(function(){
|
||||
parent.find(".form_space").html(prev_data);
|
||||
parent.find('.list_item_function').show();
|
||||
});
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".delete").on("click.delete","a.bt-delete",function(){
|
||||
|
||||
var delurl = $(this).attr("href");
|
||||
var parent = $(this).parent().parent();
|
||||
o.confirm({
|
||||
buttons : ["Yes","No"],
|
||||
highlighted : 2,
|
||||
message : "Are you sure, you want to delete this author?"
|
||||
},function(value){
|
||||
if(value){
|
||||
$.ajax({
|
||||
url : delurl,
|
||||
type : "DELETE",
|
||||
success : function(data){
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".new_type").on("click.new_type","a.bt-new-type",function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
o.sub_menu_item($("div[content-type=menu] a[custom-load=coauthor]"));
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".bt-co-author").on("click.bt-co-author","a.bt-co-author",function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
$("div[container=true]").html(prev_data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
orbitDesktop.prototype.initializeSeminar = function(target,url,cache){
|
||||
|
||||
this.initializeSeminar.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.tinyscrollbar_ext({
|
||||
main : ".tinycanvas",
|
||||
fill : ".list_t"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeSeminar.addseminar = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeSeminar.seminar = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeSeminar.rues = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeSeminar.list();
|
||||
|
||||
}
|
||||
@@ -7,6 +7,9 @@
|
||||
//load = true is used to load the list element by default
|
||||
//response-type = "json"|"script"|"xml|html" default is json
|
||||
//autocomplete-list = "listname" an array from which autocomplete will be attached to its respective input or textarea
|
||||
//ajax-remote="get/delete/post" this will automatically bind the <a> with remote ajax call. By default if the resposne is html, it ll be inserted in container=true
|
||||
// content-holder = "jquery dom", the returned html of server will be put inside the dom mentioned in content-holder of a tag. this can be used in a tags as attributes
|
||||
//confirm-message ="Some message", this will prompt user with a confirm box and show the message before ajax call is made.
|
||||
|
||||
|
||||
$.extend($.expr[':'], {
|
||||
@@ -147,6 +150,42 @@ var orbitDesktop = function(dom){
|
||||
return false;
|
||||
})
|
||||
|
||||
$("body").on("click","*[ajax-remote]",function(){
|
||||
var $e = $(this);
|
||||
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
|
||||
var ca = $e.attr("content-holder");
|
||||
var a = function(){
|
||||
$.ajax({
|
||||
type : $e.attr("ajax-remote"),
|
||||
url : $e.attr("href"),
|
||||
success : function(data){
|
||||
if(typeof data == "string"){
|
||||
if(ca)
|
||||
$(ca).html(data);
|
||||
else
|
||||
$("div[container=true]").html(data);
|
||||
}
|
||||
if(exe)
|
||||
window.o[o.data_method][exe](data,$e);
|
||||
}
|
||||
});
|
||||
}
|
||||
if($e.attr("confirm-message")){
|
||||
o.confirm({
|
||||
buttons : ["Yes","No"],
|
||||
highlighted : 2,
|
||||
message : $e.attr("confirm-message")
|
||||
},function(value){
|
||||
if(value){
|
||||
a();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
a();
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
$(window).resize(function(){
|
||||
var ww = $(window).width();
|
||||
$("img#thmbackground").attr({"width":ww});
|
||||
@@ -177,6 +216,7 @@ var orbitDesktop = function(dom){
|
||||
var extractLast = function( term ) {
|
||||
return split( term ).pop();
|
||||
}
|
||||
|
||||
var autocompleteListName = null;
|
||||
$("body").on("keydown","*[autocomplete-list]", function( event ) {
|
||||
autocompleteListName = $(this).attr("autocomplete-list");
|
||||
@@ -1064,73 +1104,8 @@ var orbitDesktop = function(dom){
|
||||
this.initializeAppstore.onlinestore();
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializeBooks = function(target,url,cache){
|
||||
|
||||
|
||||
this.initializeBooks.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeBooks.addbook = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeBooks.list();
|
||||
|
||||
}
|
||||
this.initializeSeminar = function(target,url,cache){
|
||||
|
||||
|
||||
this.initializeSeminar.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.tinyscrollbar_ext({
|
||||
main : ".tinycanvas",
|
||||
fill : ".list_t"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeSeminar.addseminar = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeSeminar.list();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializeResearchDomain = function(target,url,cache){
|
||||
|
||||
this.initializeResearchDomain.list = function(){
|
||||
|
||||
Reference in new issue
Block a user