Merge branch 'master' of https://github.com/Rulingcom/orbit
* 'master' of https://github.com/Rulingcom/orbit: desktopAPI update. desktop api update.. calendar "edit calendar" update change host with host_with_port get_album_json function can get readable json make json readable make json readable fixed get_bulletins_json of gprs bug desktopAPI update. desktop api update.. fixed language of announcement filter add get_bulletins_json function refine the location module done Refine the location module, but it have some bugs about path ... all of user can get json of gprs from outside all of user can get json of gallery from outside calendar "edit calendar" update
This commit is contained in:
commit
1ecb8a0c8b
|
@ -59,7 +59,7 @@ var orbitTimeline = function(dom){
|
||||||
this.constructTimeScale = function(callbackFn){
|
this.constructTimeScale = function(callbackFn){
|
||||||
var mon ="",year="",formname;
|
var mon ="",year="",formname;
|
||||||
var scale = $("<div id='scale_wrapper'></div>");
|
var scale = $("<div id='scale_wrapper'></div>");
|
||||||
$.getJSON("desktop_orbit/gettimelinespan",{"get":"papers"},function(years){
|
$.getJSON("/desktop_orbit/gettimelinespan",{"get":"papers"},function(years){
|
||||||
var $ul = $("<ul></ul>");
|
var $ul = $("<ul></ul>");
|
||||||
var startyear = years.startyear, endyear = years.endyear,year = years.startyear;
|
var startyear = years.startyear, endyear = years.endyear,year = years.startyear;
|
||||||
$ul.append('<li><a href="'+startyear+'" class="wh3 hh3 admbg active" onclick="return false;">'+startyear+'</a></li>');
|
$ul.append('<li><a href="'+startyear+'" class="wh3 hh3 admbg active" onclick="return false;">'+startyear+'</a></li>');
|
||||||
|
@ -69,7 +69,7 @@ var orbitTimeline = function(dom){
|
||||||
}
|
}
|
||||||
$("div#orbit div#year_navigation").html($ul);
|
$("div#orbit div#year_navigation").html($ul);
|
||||||
})
|
})
|
||||||
$.getJSON("desktop_orbit/eventajaxload",{"event":"papers","from":t.fromdate},function(papersArray){
|
$.getJSON("/desktop_orbit/eventajaxload",{"event":"papers","from":t.fromdate},function(papersArray){
|
||||||
$.each(papersArray,function(i,pa){
|
$.each(papersArray,function(i,pa){
|
||||||
$.each(pa.papers,function(i,paper){
|
$.each(pa.papers,function(i,paper){
|
||||||
var dt = new Date(paper.created_at);
|
var dt = new Date(paper.created_at);
|
||||||
|
@ -150,7 +150,7 @@ var orbitTimeline = function(dom){
|
||||||
var scale = $("#scale_wrapper");
|
var scale = $("#scale_wrapper");
|
||||||
|
|
||||||
t.ajaxload = false;
|
t.ajaxload = false;
|
||||||
$.getJSON("desktop_orbit/eventajaxload",{"from":t.fromdate},function(papersArray){
|
$.getJSON("/desktop_orbit/eventajaxload",{"from":t.fromdate},function(papersArray){
|
||||||
$.each(papersArray,function(i,pa){
|
$.each(papersArray,function(i,pa){
|
||||||
$.each(pa.papers,function(i,paper){
|
$.each(pa.papers,function(i,paper){
|
||||||
var dt = new Date(paper.created_at);
|
var dt = new Date(paper.created_at);
|
||||||
|
@ -235,7 +235,7 @@ var orbitTimeline = function(dom){
|
||||||
this.ajaxEventPull = function(){
|
this.ajaxEventPull = function(){
|
||||||
if(!t.update){
|
if(!t.update){
|
||||||
t.update = true;
|
t.update = true;
|
||||||
$.getJSON("desktop_orbit/ajaxeventpull",{"from":t.fromdate},function(){
|
$.getJSON("/desktop_orbit/ajaxeventpull",{"from":t.fromdate},function(){
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// JavaScript Document
|
// JavaScript Document
|
||||||
//harry
|
//harry
|
||||||
//Inititialize function will initialize desktop
|
//Inititialize function will initialize desktop
|
||||||
|
|
||||||
|
|
||||||
$.extend($.expr[':'], {
|
$.extend($.expr[':'], {
|
||||||
'containsi': function (elem, i, match, array) {
|
'containsi': function (elem, i, match, array) {
|
||||||
return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
|
return (elem.textContent || elem.innerText || '').toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
|
||||||
|
@ -17,19 +19,22 @@ var sortDescending = function(a, b) {
|
||||||
};
|
};
|
||||||
var orbitDesktop = function(dom){
|
var orbitDesktop = function(dom){
|
||||||
orbitDesktopAPI.apply(this);
|
orbitDesktopAPI.apply(this);
|
||||||
o = this;
|
// o = this;
|
||||||
this.contentHolder = dom;
|
this.contentHolder = dom;
|
||||||
this.themesettings = "";
|
this.themesettings = "";
|
||||||
this.theme = "4f8d3f493b67fcd05f086359";
|
this.theme = "4f8d3f493b67fcd05f086359";
|
||||||
this.transitionTime = 500;
|
this.transitionTime = 500;
|
||||||
this.currenthtml = "desktop.html";
|
this.currenthtml = "desktop.html";
|
||||||
this.currentface = "home";
|
this.currentface = "home";
|
||||||
this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":"","appstore":"","orbit":"","books":"","seminar_p":"","research_d":"","research_p":""};
|
this.desktopData = {};
|
||||||
this.tp = "";
|
this.tp = "";
|
||||||
this.sectionList;
|
this.sectionList;
|
||||||
|
this.data_method;
|
||||||
this.initialize = function(){
|
this.initialize = function(){
|
||||||
|
|
||||||
var theme = o.theme;
|
var theme = o.theme;
|
||||||
var custom = false;
|
var custom = false;
|
||||||
|
|
||||||
$.getJSON("/desktop/get_desktop_settings",{"get":"desktop","desktopid":o.desktopId},function(desktopSettings){
|
$.getJSON("/desktop/get_desktop_settings",{"get":"desktop","desktopid":o.desktopId},function(desktopSettings){
|
||||||
if(desktopSettings){
|
if(desktopSettings){
|
||||||
if(desktopSettings.theme!="custom"){
|
if(desktopSettings.theme!="custom"){
|
||||||
|
@ -50,7 +55,16 @@ var orbitDesktop = function(dom){
|
||||||
$("head").find("#dyn_css").remove();
|
$("head").find("#dyn_css").remove();
|
||||||
$("head").append(customtheme);
|
$("head").append(customtheme);
|
||||||
}
|
}
|
||||||
$(document).ready(function(){o.loadWallpaper(customwallpaper);o.bindDesktopEvents();o.loadIconCache();o.initializeDesktop();});
|
$(document).ready(function(){
|
||||||
|
o.loadWallpaper(customwallpaper);
|
||||||
|
o.bindDesktopEvents();
|
||||||
|
o.loadIconCache();
|
||||||
|
|
||||||
|
$(o.contentHolder).empty().load("desktop",function(){
|
||||||
|
o.desktopData["d_desktop"] = "";
|
||||||
|
o.initializeDesktop("d_desktop","",false);
|
||||||
|
})
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,105 +79,75 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
|
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
|
||||||
$("a#d_app_manager").click(function(){
|
$(".docklist a").click(function(){
|
||||||
var target = $(this).attr("href");
|
var target = $(this).attr("id");
|
||||||
|
var url = $(this).attr("href");
|
||||||
|
o.data_method = $(this).attr("data-method");
|
||||||
if(o.currenthtml!=target){
|
if(o.currenthtml!=target){
|
||||||
|
if(o.desktopData[o.currentface] == "undefined")
|
||||||
|
o.desktopData[o.currentface] = "";
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
$("#content").hide("drop",o.transitionTime,function(){
|
||||||
o.initializeAppSearch(target);
|
o.currenthtml = target;
|
||||||
|
o.currentface = target;
|
||||||
|
var cache = false;
|
||||||
|
if(!o.desktopData[o.currentface]){
|
||||||
|
$(o.contentHolder).empty().load(url,function(){
|
||||||
|
if(typeof o.data_method != "undefined"){
|
||||||
|
if(o.data_method != "")
|
||||||
|
window.o[o.data_method](target,url,cache);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
||||||
|
cache = true;
|
||||||
|
if(typeof o.data_method != "undefined"){
|
||||||
|
if(o.data_method != "")
|
||||||
|
window.o[o.data_method](target,url,cache);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
return false;
|
||||||
$("a#d_desktop").click(function(){
|
})
|
||||||
var target = $(this).attr("href");
|
$('body').on({
|
||||||
if(o.currenthtml!=target){
|
click: function(){
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
if(!$(this).hasClass('active')){
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
var sub_data_method = $(this).attr('data-method');
|
||||||
o.initializeDesktop(target);
|
if(sub_data_method){
|
||||||
});
|
$("#panel_r").load($(this).attr("href"),function(){
|
||||||
|
// o.simple_drop_down();
|
||||||
|
|
||||||
|
// o.tinyscrollbar_ext({
|
||||||
|
// main: '.tinycanvas',
|
||||||
|
// 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]();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
||||||
|
$(this).addClass('thmc1 thmtxt active');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
mouseenter: function(){
|
||||||
|
if(!$(this).hasClass('active')){
|
||||||
|
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mouseleave: function(){
|
||||||
|
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
||||||
|
$(this).switchClass(t,'admtxt',0);
|
||||||
}
|
}
|
||||||
});
|
},'.s_menu a');
|
||||||
$("a#d_sections").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeSectionsManager(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#d_journal_p").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeJournalPapers(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_settings").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeSettings(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_appstore").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeAppstore(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_orbit").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeOrbitTimeline(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_books").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeBooks(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_seminar_p").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeSeminar(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_research_d").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeResearchDomain(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("a#d_research_p").click(function(){
|
|
||||||
var target = $(this).attr("href");
|
|
||||||
if(o.currenthtml!=target){
|
|
||||||
o.desktopData[o.currentface] = $(o.contentHolder).html();
|
|
||||||
$("#content").hide("drop",o.transitionTime,function(){
|
|
||||||
o.initializeResearchProject(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(window).resize(function(){
|
$(window).resize(function(){
|
||||||
var ww = $(window).width();
|
var ww = $(window).width();
|
||||||
$("img#thmbackground").attr({"width":ww});
|
$("img#thmbackground").attr({"width":ww});
|
||||||
|
@ -188,11 +172,8 @@ var orbitDesktop = function(dom){
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.initializeDesktop = function(target){ //this is for initializing main desktops that are sections and tiles
|
this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles
|
||||||
if(!target)target = "desktop";
|
if(!target)target = "desktop";
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "home";
|
|
||||||
|
|
||||||
var bindHandlers = function(){ // this function will bind all the handlers in the desktop
|
var bindHandlers = function(){ // this function will bind all the handlers in the desktop
|
||||||
var groupWrapperWidth = 0;
|
var groupWrapperWidth = 0;
|
||||||
$("div#desktop .group").each(function(){groupWrapperWidth+=$(this).outerWidth(true);});
|
$("div#desktop .group").each(function(){groupWrapperWidth+=$(this).outerWidth(true);});
|
||||||
|
@ -339,7 +320,7 @@ var orbitDesktop = function(dom){
|
||||||
$group.find('.col'+colindex).append($li);
|
$group.find('.col'+colindex).append($li);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("div#desktop div#group_wrapper").append($group);
|
$("div#desktop div#group_wrapper").append($group);
|
||||||
})
|
})
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
o.initializeWidgets();
|
o.initializeWidgets();
|
||||||
|
@ -368,27 +349,23 @@ var orbitDesktop = function(dom){
|
||||||
loadTiles(o.sectionId);
|
loadTiles(o.sectionId);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if(cache){
|
||||||
if(!o.desktopData[o.currentface]){
|
bindHandlers();
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
o.initializeWidgets();
|
||||||
loadTiles(o.sectionId);
|
bindSecondaryHandlers();
|
||||||
loadSectionList();
|
$("div#desktop ul#section_list").empty();
|
||||||
});
|
$.each(o.sectionList,function(i,section){
|
||||||
|
var tempstyle="";
|
||||||
|
if(section._id==o.sectionId){
|
||||||
|
tempstyle = "style='display:none;'";
|
||||||
|
$("div#desktop span#section_heading").text(section.name);
|
||||||
|
}
|
||||||
|
$("div#desktop ul#section_list").append($('<li class="section_name" '+tempstyle+'><a class="admtxt hp w2 hh2" onclick="return false;" href="'+section._id+'" >'+section.name+'</a></li>'));
|
||||||
|
})
|
||||||
|
bindSecondaryHandlers();
|
||||||
}else{
|
}else{
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
loadTiles(o.sectionId);
|
||||||
bindHandlers();
|
loadSectionList();
|
||||||
o.initializeWidgets();
|
|
||||||
bindSecondaryHandlers();
|
|
||||||
$("div#desktop ul#section_list").empty();
|
|
||||||
$.each(o.sectionList,function(i,section){
|
|
||||||
var tempstyle="";
|
|
||||||
if(section._id==o.sectionId){
|
|
||||||
tempstyle = "style='display:none;'";
|
|
||||||
$("div#desktop span#section_heading").text(section.name);
|
|
||||||
}
|
|
||||||
$("div#desktop ul#section_list").append($('<li class="section_name" '+tempstyle+'><a class="admtxt hp w2 hh2" onclick="return false;" href="'+section._id+'" >'+section.name+'</a></li>'));
|
|
||||||
})
|
|
||||||
bindSecondaryHandlers();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -396,9 +373,8 @@ var orbitDesktop = function(dom){
|
||||||
$.post("desktop/twitter",function(){});
|
$.post("desktop/twitter",function(){});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.initializeAppSearch = function(target){ //this is application search ie is app manager initialization
|
this.initializeAppSearch = function(target,url,cache){ //this is application search ie is app manager initialization
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "apps_manager";
|
|
||||||
var searchArray,allApps;
|
var searchArray,allApps;
|
||||||
var bindHandlers = function(){ // bind handler for app manager page
|
var bindHandlers = function(){ // bind handler for app manager page
|
||||||
var gn = $('.g_col').length,
|
var gn = $('.g_col').length,
|
||||||
|
@ -474,18 +450,13 @@ var orbitDesktop = function(dom){
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(!o.desktopData[o.currentface]){
|
if(cache)
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
bindHandlers();
|
||||||
loadApps();
|
else
|
||||||
});
|
loadApps();
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
bindHandlers();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
this.initializeSectionsManager = function(target){ // this is init function for section manager
|
this.initializeSectionsManager = function(target,url,cache){ // this is init function for section manager
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "sections";
|
|
||||||
var elementParent,element,slabel;
|
var elementParent,element,slabel;
|
||||||
var bindHandlers = function(){ // this is bind handler for section manager page
|
var bindHandlers = function(){ // this is bind handler for section manager page
|
||||||
var groupWrapperWidth = 0;
|
var groupWrapperWidth = 0;
|
||||||
|
@ -572,50 +543,15 @@ var orbitDesktop = function(dom){
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(!o.desktopData[o.currentface]){
|
if(cache)
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
loadApps();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
}
|
else
|
||||||
|
loadApps();
|
||||||
|
|
||||||
};
|
};
|
||||||
this.initializeSettings = function(target){ //this is to initialize setting page
|
this.initializeSettings = function(target,url,cache){ //this is to initialize setting page
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "settings";
|
|
||||||
var bindHandlers = function(){ // this is the bind handler function for setting page
|
|
||||||
$("div#settings ul#setting_left_nav li a").on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).data("clicked")){
|
|
||||||
var tfunc = $(this).attr("href");
|
|
||||||
switch(tfunc){
|
|
||||||
case "themes":
|
|
||||||
themes();
|
|
||||||
break;
|
|
||||||
case "sections":
|
|
||||||
sections();
|
|
||||||
break;
|
|
||||||
case "connection":
|
|
||||||
connection();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$("div#settings ul#setting_left_nav li a").removeClass('thmc1 thmtxt').data('clicked',null);
|
|
||||||
$(this).addClass('thmc1 thmtxt').data('clicked',true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
$(this).removeClass('admtxt').addClass('thmc1 thmtxt');
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).data('clicked') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).removeClass(t).addClass('admtxt');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
this.initializeSettings.sections = function(){ // this load section page in setting page
|
||||||
var sections = function(){ // this load section page in setting page
|
|
||||||
var bindHandlers = function(){ // binding handlers in section page
|
var bindHandlers = function(){ // binding handlers in section page
|
||||||
$('.tinycanvas').each(function(){
|
$('.tinycanvas').each(function(){
|
||||||
var h = $(this).parent().height(),
|
var h = $(this).parent().height(),
|
||||||
|
@ -644,17 +580,17 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
$("div#settings div#panel_r").load("/desktop/settingsections",function(){
|
|
||||||
$.getJSON("/desktop/get_desktop_settings",{"get":"sectionnames","desktopid":o.desktopId},function(sectionnames){
|
$.getJSON("/desktop/get_desktop_settings",{"get":"sectionnames","desktopid":o.desktopId},function(sectionnames){
|
||||||
$("#desktop_names input").each(function(i){
|
$("#desktop_names input").each(function(i){
|
||||||
$(this).val(sectionnames[i]);
|
$(this).val(sectionnames[i]);
|
||||||
})
|
})
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
var themes = function(){ // this opens themes page in setting page
|
this.initializeSettings.themes = function(){ // this opens themes page in setting page
|
||||||
var bindHandlers = function(){ // binding handlers in themes page
|
var bindHandlers = function(){ // binding handlers in themes page
|
||||||
// live change theme
|
// live change theme
|
||||||
$(".theme_list > .ssl_item").click(function(){
|
$(".theme_list > .ssl_item").click(function(){
|
||||||
|
@ -760,7 +696,7 @@ var orbitDesktop = function(dom){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#settings div#panel_r").load("/desktop/settingthemes",function(){
|
|
||||||
$.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){
|
$.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){
|
||||||
$('#st1 .theme_list [id='+theme+']')
|
$('#st1 .theme_list [id='+theme+']')
|
||||||
.addClass("thmc1 active", 300)
|
.addClass("thmc1 active", 300)
|
||||||
|
@ -770,10 +706,11 @@ var orbitDesktop = function(dom){
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
loadthmc();
|
loadthmc();
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var connection = function(){
|
this.initializeSettings.connection = function(){
|
||||||
|
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
$("#connection_setting ul a").click(function(){
|
$("#connection_setting ul a").click(function(){
|
||||||
var what = $(this).attr("for"),
|
var what = $(this).attr("for"),
|
||||||
|
@ -846,8 +783,8 @@ var orbitDesktop = function(dom){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
$("div#settings div#panel_r").load("/desktop/settingconnection",function(){
|
|
||||||
$.getJSON("desktop/getaccounts",function(accounts){
|
$.getJSON("/otheraccounts/getaccounts",function(accounts){
|
||||||
$.each(accounts,function(i,account){
|
$.each(accounts,function(i,account){
|
||||||
$ul = $("#"+account.type+"_connection");
|
$ul = $("#"+account.type+"_connection");
|
||||||
$ul.find("input[type=text]").replaceWith("<div class='c_info usrnm'>"+account.email+"</div>")
|
$ul.find("input[type=text]").replaceWith("<div class='c_info usrnm'>"+account.email+"</div>")
|
||||||
|
@ -859,64 +796,18 @@ var orbitDesktop = function(dom){
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
bindHandlers();
|
|
||||||
themes();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
this.initializeOrbitTimeline = function(target){
|
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "orbit";
|
|
||||||
var bindHandlers = function(){
|
|
||||||
var timeline = new orbitTimeline("#timeline");
|
|
||||||
timeline.initialize();
|
|
||||||
}
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop_orbit/"+target,function(){
|
|
||||||
bindHandlers();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
bindHandlers();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
this.initializeJournalPapers = function(target){ // this init journal papers
|
this.initializeOrbitTimeline = function(target,url,cache){
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "journal_p";
|
|
||||||
var bindHandlers = function(){ // bind handler for journal paper
|
|
||||||
$('.s_menu a').on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
var tfunc = $(this).attr('href');
|
|
||||||
switch(tfunc){
|
|
||||||
case 'list':
|
|
||||||
list();
|
|
||||||
break;
|
|
||||||
case 'addpaper':
|
|
||||||
addpaper();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
|
||||||
$(this).addClass('thmc1 thmtxt active');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).switchClass(t,'admtxt',0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var list = function(){ // to open list part in journal papers page
|
var timeline = new orbitTimeline("#timeline");
|
||||||
|
timeline.initialize();
|
||||||
|
|
||||||
|
};
|
||||||
|
this.initializeJournalPapers = function(target,url,cache){ // this init journal papers
|
||||||
|
|
||||||
|
this.initializeJournalPapers.list = function(){ // to open list part in journal papers page
|
||||||
var journalData;
|
var journalData;
|
||||||
var bindHandlers = function(){ // to bind handlers for list page
|
var bindHandlers = function(){ // to bind handlers for list page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
@ -961,7 +852,7 @@ var orbitDesktop = function(dom){
|
||||||
$("#journal_p div#paper_list a").click(function(){
|
$("#journal_p div#paper_list a").click(function(){
|
||||||
if($(this).hasClass("icon-check-empty")){
|
if($(this).hasClass("icon-check-empty")){
|
||||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||||
} else if($(this).hasClass("icon-check")) {
|
} else if($(this) .hasClass("icon-check")) {
|
||||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||||
} else if($(this).hasClass("icon-star")){
|
} else if($(this).hasClass("icon-star")){
|
||||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||||
|
@ -1048,16 +939,14 @@ var orbitDesktop = function(dom){
|
||||||
bindSecondaryHandlers();
|
bindSecondaryHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#journal_p div#panel_r").load("/desktop/journal_p_list",function(){
|
$.getJSON("/desktop_publications/getjournals",function(journals){
|
||||||
$.getJSON("/desktop_publications/getjournals",function(journals){
|
journalData = eval(journals);
|
||||||
journalData = eval(journals);
|
journalview();
|
||||||
journalview();
|
bindHandlers();
|
||||||
bindHandlers();
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var addpaper = function(){ // to open add pages in journal papers page
|
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
||||||
var bindHandlers = function(){ // to bind handlers for add page
|
var bindHandlers = function(){ // to bind handlers for add page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
|
@ -1066,54 +955,15 @@ var orbitDesktop = function(dom){
|
||||||
fill: '.s_grid_con'
|
fill: '.s_grid_con'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
$("div#journal_p div#panel_r").load("/desktop/journal_p_add",function(){
|
bindHandlers();
|
||||||
bindHandlers();
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
bindHandlers();
|
|
||||||
list();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
bindHandlers();
|
|
||||||
list();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
this.initializeAppstore = function(target){
|
this.initializeAppstore = function(target,url,cache){
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "appstore";
|
|
||||||
var bindHandlers = function(){
|
this.initializeAppstore.widgets = function(){
|
||||||
$('.s_menu a').on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
var tfunc = $(this).attr('href');
|
|
||||||
switch(tfunc){
|
|
||||||
case 'widgets':
|
|
||||||
widgets();
|
|
||||||
break;
|
|
||||||
case 'onlinestore':
|
|
||||||
onlinestore();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
|
||||||
$(this).addClass('thmc1 thmtxt active');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).switchClass(t,'admtxt',0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var widgets = function(){
|
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
$("#widget_list a").click(function(){
|
$("#widget_list a").click(function(){
|
||||||
var sectionid = $(this).attr("for");
|
var sectionid = $(this).attr("for");
|
||||||
|
@ -1180,7 +1030,7 @@ var orbitDesktop = function(dom){
|
||||||
fill: '.list_t'
|
fill: '.list_t'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
$("div#apps_store div#panel_r").load("/desktop_appstore/widgets",function(){
|
|
||||||
|
|
||||||
$.getJSON("/desktop_appstore/getuserwidgets",function(userwidgets){
|
$.getJSON("/desktop_appstore/getuserwidgets",function(userwidgets){
|
||||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||||
|
@ -1230,62 +1080,25 @@ var orbitDesktop = function(dom){
|
||||||
counter++;
|
counter++;
|
||||||
})
|
})
|
||||||
$("#apps_store div#widget_list").append(column);
|
$("#apps_store div#widget_list").append(column);
|
||||||
bindHandlers();
|
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
var onlinestore = function(){
|
this.initializeAppstore.onlinestore = function(){
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
$("div#apps_store div#panel_r").load("/desktop_appstore/onlinestore",function(){
|
|
||||||
bindHandlers();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop_appstore/"+target,function(){
|
|
||||||
onlinestore();
|
|
||||||
bindHandlers();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
onlinestore();
|
|
||||||
bindHandlers();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.initializeBooks = function(target){
|
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "books";
|
|
||||||
var bindHandlers = function(){
|
|
||||||
$('.s_menu a').on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
var tfunc = $(this).attr('href');
|
|
||||||
switch(tfunc){
|
|
||||||
case 'list':
|
|
||||||
list();
|
|
||||||
break;
|
|
||||||
case 'addbook':
|
|
||||||
addbook();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
|
||||||
$(this).addClass('thmc1 thmtxt active');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).switchClass(t,'admtxt',0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var list = function(){
|
bindHandlers();
|
||||||
|
|
||||||
|
}
|
||||||
|
this.initializeAppstore.onlinestore();
|
||||||
|
bindHandlers();
|
||||||
|
}
|
||||||
|
this.initializeBooks = function(target,url,cache){
|
||||||
|
|
||||||
|
|
||||||
|
this.initializeBooks.list = function(){
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
|
@ -1295,12 +1108,12 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#books div#panel_r").load("/desktop/books_list",function(){
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var addbook = function(){
|
this.initializeBooks.addbook = function(){
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
|
@ -1311,54 +1124,16 @@ var orbitDesktop = function(dom){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#books div#panel_r").load("/desktop/books_add",function(){
|
|
||||||
bindHandlers();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
}
|
|
||||||
}
|
|
||||||
this.initializeSeminar = function(target){
|
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "seminar_p";
|
|
||||||
var bindHandlers = function(){
|
|
||||||
$('.s_menu a').on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
var tfunc = $(this).attr('href');
|
|
||||||
switch(tfunc){
|
|
||||||
case 'list':
|
|
||||||
list();
|
|
||||||
break;
|
|
||||||
case 'addseminar':
|
|
||||||
addseminar();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
|
||||||
$(this).addClass('thmc1 thmtxt active');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).switchClass(t,'admtxt',0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var list = function(){
|
}
|
||||||
|
this.initializeBooks.list();
|
||||||
|
|
||||||
|
}
|
||||||
|
this.initializeSeminar = function(target,url,cache){
|
||||||
|
|
||||||
|
|
||||||
|
this.initializeSeminar.list = function(){
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.tinyscrollbar_ext({
|
o.tinyscrollbar_ext({
|
||||||
main : ".tinycanvas",
|
main : ".tinycanvas",
|
||||||
|
@ -1366,12 +1141,12 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#seminar_p div#panel_r").load("/desktop/seminar_p_list",function(){
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var addseminar = function(){
|
this.initializeSeminar.addseminar = function(){
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
|
@ -1381,53 +1156,15 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#seminar_p div#panel_r").load("/desktop/seminar_p_add",function(){
|
|
||||||
bindHandlers();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.initializeSeminar.list();
|
||||||
|
|
||||||
}
|
}
|
||||||
this.initializeResearchDomain = function(target){
|
this.initializeResearchDomain = function(target,url,cache){
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "research_d";
|
this.initializeResearchDomain.list = function(){
|
||||||
var bindHandlers = function(){
|
|
||||||
$('.s_menu a').on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
var tfunc = $(this).attr('href');
|
|
||||||
switch(tfunc){
|
|
||||||
case 'list':
|
|
||||||
list();
|
|
||||||
break;
|
|
||||||
case 'add':
|
|
||||||
add_this();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
|
||||||
$(this).addClass('thmc1 thmtxt active');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).switchClass(t,'admtxt',0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var list = function(){
|
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.tinyscrollbar_ext({
|
o.tinyscrollbar_ext({
|
||||||
main : ".tinycanvas",
|
main : ".tinycanvas",
|
||||||
|
@ -1435,67 +1172,25 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#research_d div#panel_r").load("/desktop/research_d_list",function(){
|
|
||||||
bindHandlers();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
var add_this = function(){
|
|
||||||
var bindHandlers = function(){
|
|
||||||
o.simple_drop_down();
|
|
||||||
|
|
||||||
o.tinyscrollbar_ext({
|
bindHandlers();
|
||||||
main: '.tinycanvas',
|
|
||||||
fill: '.s_grid_con'
|
}
|
||||||
})
|
this.initializeResearchDomain.add_this = function(){
|
||||||
|
var bindHandlers = function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#research_d div#panel_r").load("/desktop/research_d_add",function(){
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
|
||||||
}
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
|
||||||
}
|
}
|
||||||
|
this.initializeResearchDomain.list();
|
||||||
|
|
||||||
}
|
}
|
||||||
this.initializeResearchProject = function(target){
|
this.initializeResearchProject = function(target,url,cache){
|
||||||
o.currenthtml = target;
|
|
||||||
o.currentface = "research_p";
|
this.initializeResearchProject.list = function(){
|
||||||
var bindHandlers = function(){
|
|
||||||
$('.s_menu a').on({
|
|
||||||
click: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
var tfunc = $(this).attr('href');
|
|
||||||
switch(tfunc){
|
|
||||||
case 'list':
|
|
||||||
list();
|
|
||||||
break;
|
|
||||||
case 'add':
|
|
||||||
add_this();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('.s_menu a').removeClass('thmc1 thmtxt active');
|
|
||||||
$(this).addClass('thmc1 thmtxt active');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseenter: function(){
|
|
||||||
if(!$(this).hasClass('active')){
|
|
||||||
$(this).switchClass('admtxt','thmc1 thmtxt',0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseleave: function(){
|
|
||||||
var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt';
|
|
||||||
$(this).switchClass(t,'admtxt',0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var list = function(){
|
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.tinyscrollbar_ext({
|
o.tinyscrollbar_ext({
|
||||||
main : ".tinycanvas",
|
main : ".tinycanvas",
|
||||||
|
@ -1503,11 +1198,11 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#research_p div#panel_r").load("/desktop/research_p_list",function(){
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
|
||||||
}
|
}
|
||||||
var add_this = function(){
|
this.initializeResearchProject.add_this = function(){
|
||||||
var bindHandlers = function(){
|
var bindHandlers = function(){
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
|
||||||
|
@ -1517,20 +1212,12 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#research_p div#panel_r").load("/desktop/research_p_add",function(){
|
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
})
|
|
||||||
}
|
|
||||||
if(!o.desktopData[o.currentface]){
|
|
||||||
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
|
||||||
list();
|
|
||||||
bindHandlers();
|
|
||||||
}
|
}
|
||||||
|
this.initializeResearchProject.list();
|
||||||
|
|
||||||
}
|
}
|
||||||
this.loadWallpaper = function(wallpaper){ // this is to load new wallpaper
|
this.loadWallpaper = function(wallpaper){ // this is to load new wallpaper
|
||||||
if(!wallpaper)wallpapernm = o.themesettings.background;else wallpapernm = wallpaper
|
if(!wallpaper)wallpapernm = o.themesettings.background;else wallpapernm = wallpaper
|
||||||
|
@ -1566,7 +1253,7 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
this.saveWallpaper = function(wallpaper){ // this function saves wallpaper in db
|
this.saveWallpaper = function(wallpaper){ // this function saves wallpaper in db
|
||||||
$.post("desktop/save_desktop_settings",{"save":"wallpaper","wallpapernm":wallpaper,"desktopid":o.desktopId},function(result){
|
$.post("/desktop/save_desktop_settings",{"save":"wallpaper","wallpapernm":wallpaper,"desktopid":o.desktopId},function(result){
|
||||||
if(result[0].success=="true")
|
if(result[0].success=="true")
|
||||||
o.notify("Wallpaper saved!!","success",2);
|
o.notify("Wallpaper saved!!","success",2);
|
||||||
else
|
else
|
||||||
|
|
|
@ -27,17 +27,17 @@ class DesktopController< ApplicationController
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
def settingthemes
|
def themes
|
||||||
@themes = DesktopTheme.all
|
@themes = DesktopTheme.all
|
||||||
# raise @themes.inspect
|
# raise @themes.inspect
|
||||||
render "desktop/settings/themes", :layout => false
|
render "desktop/settings/themes", :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
def settingsections
|
def sections
|
||||||
render "desktop/settings/sections", :layout => false
|
render "desktop/settings/sections", :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
def settingconnection
|
def connections
|
||||||
render "desktop/settings/connections", :layout => false
|
render "desktop/settings/connections", :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class DesktopController< ApplicationController
|
||||||
if tile.data_category == "widget"
|
if tile.data_category == "widget"
|
||||||
widge = DesktopWidget.find(tile.desktop_widget_id.to_s)
|
widge = DesktopWidget.find(tile.desktop_widget_id.to_s)
|
||||||
# data_content = widge.widget_layout.file
|
# data_content = widge.widget_layout.file
|
||||||
data_content = "desktop/widget_layout?id="+tile.desktop_widget_id.to_s
|
data_content = "/desktop/widget_layout?id="+tile.desktop_widget_id.to_s
|
||||||
jsfile = widge.javascripts.collect{|js| js.file}
|
jsfile = widge.javascripts.collect{|js| js.file}
|
||||||
cssfile = widge.css_default.file
|
cssfile = widge.css_default.file
|
||||||
shape = widge.shape
|
shape = widge.shape
|
||||||
|
|
|
@ -8,7 +8,6 @@ class DesktopPublicationsController< ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def journal_p_add
|
def journal_p_add
|
||||||
debugger
|
|
||||||
render "desktop/journal_pages/add", :layout => false
|
render "desktop/journal_pages/add", :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
<div id="panel_l" class="ph">
|
<div id="panel_l" class="ph">
|
||||||
<div class="s_menu sm_v">
|
<div class="s_menu sm_v">
|
||||||
<ul id='setting_left_nav'>
|
<ul id='setting_left_nav'>
|
||||||
<li><a href="onlinestore" class="admtxt hh2 w2 hp" onclick='return false;'>Online Store</a></li>
|
<li><a href="<%= desktop_appstore_onlinestore_path %>" data-method="onlinestore" class="admtxt hh2 w2 hp" onclick='return false;'>Online Store</a></li>
|
||||||
<li><a href="widgets" class="admtxt hh2 w2 hp" onclick='return false;'>Widgets</a></li>
|
<li><a href="<%= desktop_appstore_widgets_path %>" data-method="widgets" class="admtxt hh2 w2 hp" onclick='return false;'>Widgets</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Apps</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Apps</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Registeration</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Registeration</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<div id="panel_l" class="ph">
|
<div id="panel_l" class="ph">
|
||||||
<div class="s_menu sm_v">
|
<div class="s_menu sm_v">
|
||||||
<ul id='setting_left_nav'>
|
<ul id='setting_left_nav'>
|
||||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
<li><a href="<%= desktop_publications_books_list_path %>" data-method="harry"class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||||
<li><a href="addbook" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
<li><a href="<%= desktop_publications_books_add_path %>" data-method="addbook"class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Books</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Books</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||||
|
|
|
@ -1,59 +1,64 @@
|
||||||
<div id="side">
|
<div id="side">
|
||||||
<div id="rwidget" class="wh3 thmc4">
|
<div id="rwidget" class="wh3 thmc4">
|
||||||
<ul class="docklist">
|
<ul class="docklist">
|
||||||
<li class="d_cate"><a href="desktop" class="widget_fn wh3 hh3" id='d_desktop' onclick="return false;"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='initializeDesktop' href="desktop/" class="widget_fn wh3 hh3" id='d_desktop' onclick="return false;"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
|
||||||
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||||
<li class="dock_item"><a href="app_manager" class="widget_fn wh3 hh3" id="d_app_manager" onclick="return false;"><span class="widget_icon"><img src="" alt="App Manager" id="app_manager_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='initializeAppSearch' href="<%= desktop_app_manager_path %>" class="widget_fn wh3 hh3" id="d_app_manager" onclick="return false;"><span class="widget_icon"><img src="" alt="App Manager" id="app_manager_icon" width="30" height="30"/></span></a></li>
|
||||||
<li class="dock_item"><a href="sections" class="widget_fn wh3 hh3" id="d_sections" onclick="return false;"><span class="widget_icon"><img src="" alt="All Sections" id="sections_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='initializeSectionsManager' href="<%= desktop_sections_path %>" class="widget_fn wh3 hh3" id="d_sections" onclick="return false;"><span class="widget_icon"><img src="" alt="All Sections" id="sections_icon" width="30" height="30"/></span></a></li>
|
||||||
<li class="dock_item"><a href="settings" class="widget_fn wh3 hh3" id="d_settings" onclick="return false;"><span class="widget_icon"><img src="" alt="Settings" id="settings_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='initializeSettings' href="<%= desktop_settings_path %>" class="widget_fn wh3 hh3" id="d_settings" onclick="return false;"><span class="widget_icon"><img src="" alt="Settings" id="settings_icon" width="30" height="30"/></span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='' href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a>
|
||||||
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||||
<li class="dock_item"><a href="journal_p" class="widget_fn wh3 hh3" id='d_journal_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
|
||||||
<li class="dock_item"><a href="seminar_p" class="widget_fn wh3 hh3" id='d_seminar_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='initializeJournalPapers' href="<%= desktop_publications_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
||||||
<li class="dock_item"><a href="books" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
|
||||||
|
<li class="dock_item"><a data-method='initializeSeminar' href="<%= desktop_publications_seminar_p_path %>" class="widget_fn wh3 hh3" id='d_seminar_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
|
<li class="dock_item"><a data-method='initializeContact' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
|
<li class="dock_item"><a data-method='initializeContact' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_contacts' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_research' onclick="return false;"><span class="widget_icon"><img src="" alt="Research" id="research_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='' href="" class="widget_fn wh3 hh3" id='d_research' onclick="return false;"><span class="widget_icon"><img src="" alt="Research" id="research_icon" width="30" height="30"/></span></a>
|
||||||
<ul class="dock_child hh3 thmc4" style="width: 240px;">
|
<ul class="dock_child hh3 thmc4" style="width: 240px;">
|
||||||
<li class="dock_item"><a href="research_d" class="widget_fn wh3 hh3" id='d_research_d' onclick="return false;"><span class="widget_icon"><img src="" alt="Research Domain" id="research_d_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='initializeResearchDomain' href="<%= desktop_research_research_d_path %>" class="widget_fn wh3 hh3" id='d_research_d' onclick="return false;"><span class="widget_icon"><img src="" alt="Research Domain" id="research_d_icon" width="30" height="30"/></span></a></li>
|
||||||
<li class="dock_item"><a href="research_p" class="widget_fn wh3 hh3" id='d_research_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Research Project" id="research_p_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='initializeResearchProject' href="<%= desktop_research_research_p_path %>" class="widget_fn wh3 hh3" id='d_research_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Research Project" id="research_p_icon" width="30" height="30"/></span></a></li>
|
||||||
<li class="dock_item"><a href="patents" class="widget_fn wh3 hh3" id='d_patents' onclick="return false;"><span class="widget_icon"><img src="" alt="Patents" id="patents_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='' href="" class="widget_fn wh3 hh3" id='d_patents' onclick="return false;"><span class="widget_icon"><img src="" alt="Patents" id="patents_icon" width="30" height="30"/></span></a></li>
|
||||||
<li class="dock_item"><a href="labs" class="widget_fn wh3 hh3" id='d_labs' onclick="return false;"><span class="widget_icon"><img src="" alt="Labs" id="labs_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a data-method='' href="labs" class="widget_fn wh3 hh3" id='d_labs' onclick="return false;"><span class="widget_icon"><img src="" alt="Labs" id="labs_icon" width="30" height="30"/></span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_experience' onclick="return false;"><span class="widget_icon"><img src="" alt="Experience" id="experience_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='' href="" class="widget_fn wh3 hh3" id='d_experience' onclick="return false;"><span class="widget_icon"><img src="" alt="Experience" id="experience_icon" width="30" height="30"/></span></a>
|
||||||
<ul class="dock_child hh3 thmc4" style="width: 300px;">
|
<ul class="dock_child hh3 thmc4" style="width: 300px;">
|
||||||
<li class="dock_item"><a href="working" class="widget_fn wh3 hh3" 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 data-method='' href="working" class="widget_fn wh3 hh3" 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 href="education" class="widget_fn wh3 hh3" 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 data-method='' href="education" class="widget_fn wh3 hh3" 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 href="honors" class="widget_fn wh3 hh3" 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 data-method='' href="honors" class="widget_fn wh3 hh3" 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 href="activities" class="widget_fn wh3 hh3" 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 data-method='' href="activities" class="widget_fn wh3 hh3" 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 href="clubs" class="widget_fn wh3 hh3" 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"><a data-method='' href="clubs" class="widget_fn wh3 hh3" 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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_landt' onclick="return false;"><span class="widget_icon"><img src="" alt="Learning & Teaching" id="landt_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='' href="" class="widget_fn wh3 hh3" 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 hh3 thmc4" style="width: 180px;">
|
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||||
<li class="dock_item"><a href="courses" class="widget_fn wh3 hh3" 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 data-method='' href="courses" class="widget_fn wh3 hh3" 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 href="homework" class="widget_fn wh3 hh3" 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 data-method='' href="homework" class="widget_fn wh3 hh3" 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 href="certification" class="widget_fn wh3 hh3" 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"><a data-method='' href="certification" class="widget_fn wh3 hh3" 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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_personal' onclick="return false;"><span class="widget_icon"><img src="" alt="Personal" id="personal_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='' href="" class="widget_fn wh3 hh3" 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 hh3 thmc4" style="width: 300px;">
|
<ul class="dock_child hh3 thmc4" style="width: 300px;">
|
||||||
<li class="dock_item"><a href="mypage" class="widget_fn wh3 hh3" 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 data-method='' href="mypage" class="widget_fn wh3 hh3" 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 href="blog" class="widget_fn wh3 hh3" 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 data-method='' href="blog" class="widget_fn wh3 hh3" 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 href="album" class="widget_fn wh3 hh3" 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 data-method='' href="album" class="widget_fn wh3 hh3" 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 href="calendar" class="widget_fn wh3 hh3" 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 data-method='' href="calendar" class="widget_fn wh3 hh3" 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 href="files" class="widget_fn wh3 hh3" 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"><a data-method='' href="files" class="widget_fn wh3 hh3" 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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="orbit" class="widget_fn wh3 hh3" id='d_orbit' onclick="return false;"><span class="widget_icon"><img src="" alt="Orbit" id="orbit_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a data-method='initializeOrbitTimeline' href="<%= desktop_orbit_orbit_path %>" class="widget_fn wh3 hh3" 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 hh3 thmc4" style="width: 60px;">
|
<ul class="dock_child hh3 thmc4" style="width: 60px;">
|
||||||
<li class="dock_item"><a href="connection" class="widget_fn wh3 hh3" 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"><a data-method='' href="" class="widget_fn wh3 hh3" 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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="d_cate"><a href="appstore" class="widget_fn wh3 hh3" 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"><a data-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh3 hh3" 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>
|
</ul>
|
||||||
<div class="fn_des hh3 admbg admtxt"></div>
|
<div class="fn_des hh3 admbg admtxt"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<div id="panel_l" class="ph">
|
<div id="panel_l" class="ph">
|
||||||
<div class="s_menu sm_v">
|
<div class="s_menu sm_v">
|
||||||
<ul id='setting_left_nav'>
|
<ul id='setting_left_nav'>
|
||||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
<li><a href="<%= desktop_publications_journal_p_list_path %>" data-method="list" class="hh2 w2 hp active thmc1 thmtxt xx" onclick='return false;'>List</a></li>
|
||||||
<li><a href="addpaper" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
<li><a href="<%= desktop_publications_journal_p_add_path %>" data-method="addpaper" class="admtxt hh2 w2 hp xx" onclick='return false;'>Add/Edit</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||||
|
|
|
@ -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>
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<div id="panel_l" class="ph">
|
<div id="panel_l" class="ph">
|
||||||
<div class="s_menu sm_v">
|
<div class="s_menu sm_v">
|
||||||
<ul id='setting_left_nav'>
|
<ul id='setting_left_nav'>
|
||||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
<li><a href="<%= desktop_research_research_d_list_path %>" data-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||||
<li><a href="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
<li><a href="<%= desktop_research_research_d_add_path %>" data-method="add_this" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Domains</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Domains</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<div id="panel_l" class="ph">
|
<div id="panel_l" class="ph">
|
||||||
<div class="s_menu sm_v">
|
<div class="s_menu sm_v">
|
||||||
<ul id='setting_left_nav'>
|
<ul id='setting_left_nav'>
|
||||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
<li><a href="<%= desktop_publications_research_p_list_path %>" data-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||||
<li><a href="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
<li><a href="<%= desktop_publications_research_p_add_path %>" data-method="add_this" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Projects</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Projects</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<div id="panel_l" class="ph">
|
<div id="panel_l" class="ph">
|
||||||
<div class="s_menu sm_v">
|
<div class="s_menu sm_v">
|
||||||
<ul id='setting_left_nav'>
|
<ul id='setting_left_nav'>
|
||||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
<li><a href="<%= desktop_publications_seminar_p_list_path %>" data-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||||
<li><a href="addseminar" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
<li><a href="<%= desktop_publications_seminar_p_add_path %>" data-method="addseminar" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Seminar</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Seminar</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||||
|
|
|
@ -6,22 +6,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="holder">
|
<div id="holder">
|
||||||
|
<div id="panel_l" class="ph">
|
||||||
|
<div class="s_menu sm_v">
|
||||||
|
<ul id='setting_left_nav'>
|
||||||
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Overview</a></li>
|
||||||
|
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Account</a></li>
|
||||||
|
<li><a href="<%= desktop_sections_path %>" data-method="sections" class="admtxt hh2 w2 hp" onclick='return false;'>Sections</a></li>
|
||||||
|
<li><a href="<%= desktop_themes_path %>" data-method="themes" class="admtxt hh2 w2 hp" onclick='return false;'>Theme</a></li>
|
||||||
|
<li><a href="<%= desktop_connections_path %>" data-method="connection" class="admtxt hh2 w2 hp" onclick='return false;'>Connection</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="panel_r" class="ph pw admbg hp">
|
||||||
|
|
||||||
<div id="panel_l" class="ph">
|
</div>
|
||||||
<div class="s_menu sm_v">
|
<div class="clear"></div>
|
||||||
<ul id='setting_left_nav'>
|
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Overview</a></li>
|
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Account</a></li>
|
|
||||||
<li><a href="sections" class="admtxt hh2 w2 hp" onclick='return false;'>Sections</a></li>
|
|
||||||
<li><a href="themes" class="admtxt hh2 w2 hp" onclick='return false;'>Theme</a></li>
|
|
||||||
<li><a href="connection" class="admtxt hh2 w2 hp" onclick='return false;'>Connection</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="panel_r" class="ph pw admbg hp">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -4,7 +4,7 @@
|
||||||
<div id="connection_setting" class="overview vp">
|
<div id="connection_setting" class="overview vp">
|
||||||
<ul class="s_form w2 hp" id="facebook_connection">
|
<ul class="s_form w2 hp" id="facebook_connection">
|
||||||
<li><span class="c_status">No Connection</span></li>
|
<li><span class="c_status">No Connection</span></li>
|
||||||
<li><img src="assets/connection/facebook.png" alt="" class="c_icon"><h1 class="c_name">Facebook</h1></li>
|
<li><img src="/assets/connection/facebook.png" alt="" class="c_icon"><h1 class="c_name">Facebook</h1></li>
|
||||||
<li><label for="">Account</label><input type="text"></li>
|
<li><label for="">Account</label><input type="text"></li>
|
||||||
<li><label for="">Password</label><input type="password"></li>
|
<li><label for="">Password</label><input type="password"></li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="s_form w2 hp" id="twitter_connection">
|
<ul class="s_form w2 hp" id="twitter_connection">
|
||||||
<li><span class="c_status">No Connection</span></li>
|
<li><span class="c_status">No Connection</span></li>
|
||||||
<li><img src="assets/connection/twitter.png" alt="" class="c_icon"><h1 class="c_name">Twitter</h1></li>
|
<li><img src="/assets/connection/twitter.png" alt="" class="c_icon"><h1 class="c_name">Twitter</h1></li>
|
||||||
<li><label for="">Account</label><input type="text"></li>
|
<li><label for="">Account</label><input type="text"></li>
|
||||||
<li><label for="">Password</label><input type="password"></li>
|
<li><label for="">Password</label><input type="password"></li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="s_form w2 hp" id="gmail_connection">
|
<ul class="s_form w2 hp" id="gmail_connection">
|
||||||
<li><span class="c_status">No Connection</span></li>
|
<li><span class="c_status">No Connection</span></li>
|
||||||
<li><img src="assets/connection/gmail.png" alt="" class="c_icon"><h1 class="c_name">Gmail</h1></li>
|
<li><img src="/assets/connection/gmail.png" alt="" class="c_icon"><h1 class="c_name">Gmail</h1></li>
|
||||||
<li><label for="">Account</label><input type="text"></li>
|
<li><label for="">Account</label><input type="text"></li>
|
||||||
<li><label for="">Password</label><input type="password"></li>
|
<li><label for="">Password</label><input type="password"></li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div id="st1" class="st_c">
|
<div id="st1" class="st_c">
|
||||||
<div class="theme_list ssl">
|
<div class="theme_list ssl">
|
||||||
<% @themes.each do |theme| %>
|
<% @themes.each do |theme| %>
|
||||||
<div id="<%= theme.id %>" class="ssl_item"><div class="theme_thumb"><img src="assets/sample_theme.jpg" alt="" width="120" height="96"></div><span class="theme_name ssl_des"><%= theme.name %></span></div>
|
<div id="<%= theme.id %>" class="ssl_item"><div class="theme_thumb"><img src="/assets/sample_theme.jpg" alt="" width="120" height="96"></div><span class="theme_name ssl_des"><%= theme.name %></span></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,18 +63,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="st3" class="st_c">
|
<div id="st3" class="st_c">
|
||||||
<div class="stock_wallpaper ssl">
|
<div class="stock_wallpaper ssl">
|
||||||
<div class="sb1 ssl_item"><img src="assets/stockBackground/thumb/1.jpg" alt="1.jpg"></div>
|
<div class="sb1 ssl_item"><img src="/assets/stockBackground/thumb/1.jpg" alt="1.jpg"></div>
|
||||||
<div class="sb2 ssl_item"><img src="assets/stockBackground/thumb/2.jpg" alt="2.jpg"></div>
|
<div class="sb2 ssl_item"><img src="/assets/stockBackground/thumb/2.jpg" alt="2.jpg"></div>
|
||||||
<div class="sb3 ssl_item"><img src="assets/stockBackground/thumb/3.jpg" alt="3.jpg"></div>
|
<div class="sb3 ssl_item"><img src="/assets/stockBackground/thumb/3.jpg" alt="3.jpg"></div>
|
||||||
<div class="sb4 ssl_item"><img src="assets/stockBackground/thumb/4.jpg" alt="4.jpg"></div>
|
<div class="sb4 ssl_item"><img src="/assets/stockBackground/thumb/4.jpg" alt="4.jpg"></div>
|
||||||
<div class="sb5 ssl_item"><img src="assets/stockBackground/thumb/5.jpg" alt="5.jpg"></div>
|
<div class="sb5 ssl_item"><img src="/assets/stockBackground/thumb/5.jpg" alt="5.jpg"></div>
|
||||||
<div class="sb6 ssl_item"><img src="assets/stockBackground/thumb/6.jpg" alt="6.jpg"></div>
|
<div class="sb6 ssl_item"><img src="/assets/stockBackground/thumb/6.jpg" alt="6.jpg"></div>
|
||||||
<div class="sb7 ssl_item"><img src="assets/stockBackground/thumb/7.jpg" alt="7.jpg"></div>
|
<div class="sb7 ssl_item"><img src="/assets/stockBackground/thumb/7.jpg" alt="7.jpg"></div>
|
||||||
<div class="sb8 ssl_item"><img src="assets/stockBackground/thumb/8.jpg" alt="8.jpg"></div>
|
<div class="sb8 ssl_item"><img src="/assets/stockBackground/thumb/8.jpg" alt="8.jpg"></div>
|
||||||
<div class="sb9 ssl_item"><img src="assets/stockBackground/thumb/9.jpg" alt="9.jpg"></div>
|
<div class="sb9 ssl_item"><img src="/assets/stockBackground/thumb/9.jpg" alt="9.jpg"></div>
|
||||||
<div class="sb10 ssl_item"><img src="assets/stockBackground/thumb/10.jpg" alt="10.jpg"></div>
|
<div class="sb10 ssl_item"><img src="/assets/stockBackground/thumb/10.jpg" alt="10.jpg"></div>
|
||||||
<div class="sb11 ssl_item"><img src="assets/stockBackground/thumb/11.jpg" alt="11.jpg"></div>
|
<div class="sb11 ssl_item"><img src="/assets/stockBackground/thumb/11.jpg" alt="11.jpg"></div>
|
||||||
<div class="sb12 ssl_item"><img src="assets/stockBackground/thumb/12.jpg" alt="12.jpg"></div>
|
<div class="sb12 ssl_item"><img src="/assets/stockBackground/thumb/12.jpg" alt="12.jpg"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="s_action">
|
<!-- <div class="s_action">
|
||||||
<div href="" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick="o.tempFunc();return false;">Confirm</a>
|
<div href="" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick="o.tempFunc();return false;">Confirm</a>
|
||||||
|
|
|
@ -194,44 +194,47 @@ namespace :desktop do
|
||||||
match '/save_desktop_settings/'=>'desktop#save_desktop_settings'
|
match '/save_desktop_settings/'=>'desktop#save_desktop_settings'
|
||||||
match '/getgroups/'=>'desktop#getgroups'
|
match '/getgroups/'=>'desktop#getgroups'
|
||||||
match '/getsectionlist/'=>'desktop#getsectionlist'
|
match '/getsectionlist/'=>'desktop#getsectionlist'
|
||||||
match '/settingthemes/'=>'desktop#settingthemes'
|
match '/themes/'=>'desktop#themes'
|
||||||
match '/settingsections/'=>'desktop#settingsections'
|
match '/sections/'=>'desktop#sections'
|
||||||
match '/getapplist/'=>'desktop#getapplist'
|
match '/getapplist/'=>'desktop#getapplist'
|
||||||
match '/newpositions/'=>'desktop#newpositions'
|
match '/newpositions/'=>'desktop#newpositions'
|
||||||
match '/settingconnection/'=>'desktop#settingconnection'
|
match '/connections/'=>'desktop#connections'
|
||||||
match '/widget_layout' => 'desktop#widget_layout'
|
match '/widget_layout' => 'desktop#widget_layout'
|
||||||
|
|
||||||
|
|
||||||
match '/journal_p/'=>'desktop_publications#journal_p'
|
|
||||||
match '/journal_p_list/'=>'desktop_publications#journal_p_list'
|
|
||||||
match '/journal_p_add/'=>'desktop_publications#journal_p_add'
|
|
||||||
match '/books' => 'desktop_publications#books'
|
|
||||||
match '/books_list/'=>'desktop_publications#books_list'
|
|
||||||
match '/books_add/'=>'desktop_publications#books_add'
|
|
||||||
|
|
||||||
match '/seminar_p' => 'desktop_publications#seminar_p'
|
|
||||||
match '/seminar_p_list/'=>'desktop_publications#seminar_p_list'
|
|
||||||
match '/seminar_p_add/'=>'desktop_publications#seminar_p_add'
|
|
||||||
|
|
||||||
match '/research_d' => 'desktop_research#research_d'
|
|
||||||
match '/research_d_list/' => 'desktop_research#research_d_list'
|
|
||||||
match '/research_d_add' => 'desktop_research#research_d_add'
|
|
||||||
|
|
||||||
match '/research_p' => 'desktop_research#research_p'
|
|
||||||
match '/research_p_list/' => 'desktop_research#research_p_list'
|
|
||||||
match '/research_p_add' => 'desktop_research#research_p_add'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
match '/temp_func/'=>'desktop#temp_func'
|
match '/temp_func/'=>'desktop#temp_func'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# namespace :desktop_publications do
|
||||||
|
match 'desktop_publications/journal_p'=>'desktop_publications#journal_p'
|
||||||
|
match 'desktop_publications/journal_p_list'=>'desktop_publications#journal_p_list'
|
||||||
|
match 'desktop_publications/journal_p_add'=>'desktop_publications#journal_p_add'
|
||||||
|
match 'desktop_publications/books' => 'desktop_publications#books'
|
||||||
|
match 'desktop_publications/books_list'=>'desktop_publications#books_list'
|
||||||
|
match 'desktop_publications/books_add'=>'desktop_publications#books_add'
|
||||||
|
|
||||||
|
match 'desktop_publications/seminar_p' => 'desktop_publications#seminar_p'
|
||||||
|
match 'desktop_publications/seminar_p_list/'=>'desktop_publications#seminar_p_list'
|
||||||
|
match 'desktop_publications/seminar_p_add/'=>'desktop_publications#seminar_p_add'
|
||||||
|
match 'desktop_publications/getjournals' => 'desktop_publications#getjournals'
|
||||||
|
# end
|
||||||
|
|
||||||
|
# namespace :desktop_research do
|
||||||
|
match 'desktop_research/research_d' => 'desktop_research#research_d'
|
||||||
|
match 'desktop_research/research_d_list/' => 'desktop_research#research_d_list'
|
||||||
|
match 'desktop_research/research_d_add' => 'desktop_research#research_d_add'
|
||||||
|
|
||||||
|
match 'desktop_research/research_p' => 'desktop_research#research_p'
|
||||||
|
match 'desktop_research/research_p_list/' => 'desktop_research#research_p_list'
|
||||||
|
match 'desktop_research/research_p_add' => 'desktop_research#research_p_add'
|
||||||
|
# end
|
||||||
|
|
||||||
match '/twitter/'=>'otheraccounts#twitter'
|
match '/twitter/'=>'otheraccounts#twitter'
|
||||||
match '/forgmail/'=>'otheraccounts#gmail'
|
match '/forgmail/'=>'otheraccounts#gmail'
|
||||||
match '/getaccounts'=>'otheraccounts#getaccounts'
|
match '/otheraccounts/getaccounts'=>'otheraccounts#getaccounts'
|
||||||
match '/save_account_info/'=>'otheraccounts#saveaccountinfo'
|
match '/save_account_info/'=>'otheraccounts#saveaccountinfo'
|
||||||
|
|
||||||
match '/desktop_appstore/appstore'=>'desktop_appstore#appstore'
|
match '/desktop_appstore/appstore'=>'desktop_appstore#appstore'
|
||||||
|
match '/desktop_appstore/onlinestore'=>'desktop_appstore#onlinestore'
|
||||||
match '/desktop_appstore/widgets'=>'desktop_appstore#widgets'
|
match '/desktop_appstore/widgets'=>'desktop_appstore#widgets'
|
||||||
match '/desktop_appstore/getuserwidgets'=>'desktop_appstore#getuserwidgets'
|
match '/desktop_appstore/getuserwidgets'=>'desktop_appstore#getuserwidgets'
|
||||||
match '/desktop_appstore/widgets_settings'=>'desktop_appstore#widgets_settings'
|
match '/desktop_appstore/widgets_settings'=>'desktop_appstore#widgets_settings'
|
||||||
|
@ -240,7 +243,7 @@ end
|
||||||
|
|
||||||
match '/desktop_orbit/eventajaxload'=> 'desktop_orbit#eventajaxload'
|
match '/desktop_orbit/eventajaxload'=> 'desktop_orbit#eventajaxload'
|
||||||
match '/desktop_orbit/gettimelinespan' => 'desktop_orbit#gettimelinespan'
|
match '/desktop_orbit/gettimelinespan' => 'desktop_orbit#gettimelinespan'
|
||||||
match '/desktop_publications/getjournals' => 'desktop_publications#getjournals'
|
|
||||||
|
|
||||||
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal'
|
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal'
|
||||||
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
|
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
|
||||||
|
|
|
@ -4,11 +4,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
|
|
||||||
before_filter :clean_values, :only => [:create, :update]
|
before_filter :clean_values, :only => [:create, :update]
|
||||||
|
|
||||||
# before_filter :for_admin_only,:only => [:]
|
# before_filter :for_admin_only,:only => [:]
|
||||||
# before_filter :for_app_manager,:only => [:index,:show,]
|
# before_filter :for_app_manager,:only => [:index,:show,]
|
||||||
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_bulletins]
|
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_bulletins]
|
||||||
before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_bulletins]
|
before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_bulletins,:get_bulletins_json]
|
||||||
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins]
|
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins,:get_bulletins_json]
|
||||||
|
|
||||||
before_filter :only => [ :new,:create,:edit,:update,:create] do |controller|
|
before_filter :only => [ :new,:create,:edit,:update,:create] do |controller|
|
||||||
controller.get_categorys('BulletinCategory')
|
controller.get_categorys('BulletinCategory')
|
||||||
|
@ -22,6 +22,39 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
render '/shared/preview/preview.html.erb',:layout=>false
|
render '/shared/preview/preview.html.erb',:layout=>false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_bulletins_json
|
||||||
|
@bulletins = Bulletin.all
|
||||||
|
@data = Hash.new
|
||||||
|
@data[I18n.t("category")] = Hash.new
|
||||||
|
|
||||||
|
@bulletins.each do |b|
|
||||||
|
deadline = b.deadline
|
||||||
|
|
||||||
|
if not deadline.nil?
|
||||||
|
deadline = display_date_time(deadline)
|
||||||
|
else
|
||||||
|
deadline = I18n.t("no_deadline")
|
||||||
|
end
|
||||||
|
if @data[I18n.t("category")][b.bulletin_category.title].nil?
|
||||||
|
@data[I18n.t("category")][b.bulletin_category.title] = Array.new
|
||||||
|
@data[I18n.t("category")][b.bulletin_category.title] << { title: b.title,
|
||||||
|
postdate: display_date_time(b.postdate),
|
||||||
|
deadline: deadline,
|
||||||
|
tag: b.sorted_tags.to_a,
|
||||||
|
}
|
||||||
|
else
|
||||||
|
@data[I18n.t("category")][b.bulletin_category.title] << { title: b.title,
|
||||||
|
postdate: display_date_time(b.postdate),
|
||||||
|
deadline: deadline,
|
||||||
|
tag: b.sorted_tags.to_a,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
#render :json => @data.to_json
|
||||||
|
#to print readable json
|
||||||
|
render :json => JSON.pretty_generate(@data)
|
||||||
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
# @bulletins = Bulletin.all
|
# @bulletins = Bulletin.all
|
||||||
# @bulletins = Bulletin.desc("postdate desc")
|
# @bulletins = Bulletin.desc("postdate desc")
|
||||||
|
@ -88,9 +121,9 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
@link_url = panel_announcement_back_end_bulletins_path
|
@link_url = panel_announcement_back_end_bulletins_path
|
||||||
get_tags
|
get_tags
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.xml { render :xml => @bulletin }
|
format.xml { render :xml => @bulletin }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /bulletins/1/edit
|
# GET /bulletins/1/edit
|
||||||
|
@ -101,73 +134,71 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
else
|
else
|
||||||
# @summary_variable = @bulletin.summary_variable
|
# @summary_variable = @bulletin.summary_variable
|
||||||
|
|
||||||
@link_url = panel_announcement_back_end_bulletin_path(@bulletin)
|
@link_url = panel_announcement_back_end_bulletin_path(@bulletin)
|
||||||
|
|
||||||
get_tags
|
get_tags
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /bulletins
|
# POST /bulletins
|
||||||
# POST /bulletins.xml
|
# POST /bulletins.xml
|
||||||
def create
|
def create
|
||||||
get_tags
|
get_tags
|
||||||
if params[:bulletin_link]
|
if params[:bulletin_link]
|
||||||
|
|
||||||
@bulletin_link = BulletinLink.new(params[:bulletin_link])
|
@bulletin_link = BulletinLink.new(params[:bulletin_link])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @bulletin_link.save
|
if @bulletin_link.save
|
||||||
format.js { render 'create_bulletin_link' }
|
format.js { render 'create_bulletin_link' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif params[:bulletin_file]
|
elsif params[:bulletin_file]
|
||||||
|
|
||||||
@bulletin_file = BulletinFile.new(params[:bulletin_file])
|
@bulletin_file = BulletinFile.new(params[:bulletin_file])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @bulletin_file.save
|
if @bulletin_file.save
|
||||||
format.js { render 'create_bulletin_file' }
|
format.js { render 'create_bulletin_file' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@bulletin = Bulletin.new(params[:bulletin])
|
@bulletin = Bulletin.new(params[:bulletin])
|
||||||
@bulletin.deadline = nil if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
@bulletin.deadline = nil if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
||||||
|
|
||||||
@bulletin.create_user_id = current_user.id
|
@bulletin.create_user_id = current_user.id
|
||||||
@bulletin.update_user_id = current_user.id
|
@bulletin.update_user_id = current_user.id
|
||||||
if(is_manager? || is_admin?)
|
if(is_manager? || is_admin?)
|
||||||
@bulletin.is_checked = true
|
@bulletin.is_checked = true
|
||||||
@bulletin.is_rejected = false
|
@bulletin.is_rejected = false
|
||||||
@bulletin.de_pending
|
@bulletin.de_pending
|
||||||
end
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @bulletin.save
|
if @bulletin.save
|
||||||
|
|
||||||
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) }
|
|
||||||
format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin }
|
|
||||||
# format.js
|
|
||||||
format.js {
|
|
||||||
@info = {"success"=>"true","redirect_url"=>panel_announcement_back_end_bulletins_url}
|
|
||||||
flash[:notice] = t('bulletin.create_bulletin_success')
|
|
||||||
render "/shared/preview/after_create.js.erb"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
format.html { render :action => "new" }
|
|
||||||
format.xml { render :xml => @bulletin.errors, :status => :unprocessable_entity }
|
|
||||||
format.js {
|
|
||||||
@info = {"success"=>"false","redirect_url"=>new_panel_announcement_back_end_bulletin_url(:bulletin => @bulletin)}
|
|
||||||
session[:in_validate_object] = @bulletin
|
|
||||||
render "/shared/preview/after_create.js.erb"
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) }
|
||||||
|
format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin }
|
||||||
|
# format.js
|
||||||
|
format.js {
|
||||||
|
@info = {"success"=>"true","redirect_url"=>panel_announcement_back_end_bulletins_url}
|
||||||
|
flash[:notice] = t('bulletin.create_bulletin_success')
|
||||||
|
render "/shared/preview/after_create.js.erb"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
format.html { render :action => "new" }
|
||||||
|
format.xml { render :xml => @bulletin.errors, :status => :unprocessable_entity }
|
||||||
|
format.js {
|
||||||
|
@info = {"success"=>"false","redirect_url"=>new_panel_announcement_back_end_bulletin_url(:bulletin => @bulletin)}
|
||||||
|
session[:in_validate_object] = @bulletin
|
||||||
|
render "/shared/preview/after_create.js.erb"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_quick_add
|
def link_quick_add
|
||||||
|
@ -178,7 +209,6 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_quick_edit
|
def link_quick_edit
|
||||||
|
@ -196,7 +226,6 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def file_quick_edit
|
def file_quick_edit
|
||||||
|
@ -211,74 +240,70 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
# PUT /bulletins/1.xml
|
# PUT /bulletins/1.xml
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if params[:bulletin_link]
|
if params[:bulletin_link]
|
||||||
|
|
||||||
@bulletin_link = BulletinLink.find(params[:id])
|
@bulletin_link = BulletinLink.find(params[:id])
|
||||||
|
@link_url = panel_announcement_back_end_bulletin_path(@bulletin_link)
|
||||||
|
|
||||||
@link_url = panel_announcement_back_end_bulletin_path(@bulletin_link)
|
respond_to do |format|
|
||||||
|
if @bulletin_link.update_attributes(params[:bulletin_link])
|
||||||
|
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
||||||
|
format.js { render 'update_bulletin_link' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
elsif params[:bulletin_file]
|
||||||
|
|
||||||
if @bulletin_link.update_attributes(params[:bulletin_link])
|
@bulletin_file = BulletinFile.find(params[:id])
|
||||||
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
@file_url = panel_announcement_back_end_bulletin_path(@bulletin_file)
|
||||||
format.js { render 'update_bulletin_link' }
|
respond_to do |format|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
elsif params[:bulletin_file]
|
if @bulletin_file.update_attributes(params[:bulletin_file])
|
||||||
|
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
||||||
|
format.js { render 'update_bulletin_file' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
@bulletin_file = BulletinFile.find(params[:id])
|
else
|
||||||
|
|
||||||
@file_url = panel_announcement_back_end_bulletin_path(@bulletin_file)
|
@bulletin = Bulletin.find(params[:id])
|
||||||
|
|
||||||
respond_to do |format|
|
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
||||||
|
# if params[:bulletin][:image_del] == '1'
|
||||||
if @bulletin_file.update_attributes(params[:bulletin_file])
|
# @bulletin.remove_image!
|
||||||
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
# @bulletin.image_del = nil
|
||||||
format.js { render 'update_bulletin_file' }
|
# params[:bulletin][:image_del] = nil
|
||||||
end
|
# end
|
||||||
end
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
@bulletin = Bulletin.find(params[:id])
|
|
||||||
|
|
||||||
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
|
||||||
# if params[:bulletin][:image_del] == '1'
|
|
||||||
# @bulletin.remove_image!
|
|
||||||
# @bulletin.image_del = nil
|
|
||||||
# params[:bulletin][:image_del] = nil
|
|
||||||
# end
|
|
||||||
|
|
||||||
|
|
||||||
delete_out_invalid_date_from_params
|
delete_out_invalid_date_from_params
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
||||||
if @bulletin.update_attributes(params[:bulletin])
|
if @bulletin.update_attributes(params[:bulletin])
|
||||||
if(is_manager? || is_admin?)
|
if(is_manager? || is_admin?)
|
||||||
@bulletin.is_checked = true
|
@bulletin.is_checked = true
|
||||||
@bulletin.is_rejected = false
|
@bulletin.is_rejected = false
|
||||||
@bulletin.de_pending!
|
@bulletin.de_pending!
|
||||||
end
|
end
|
||||||
# if (params[:bulletin][:is_checked] == "false")
|
# if (params[:bulletin][:is_checked] == "false")
|
||||||
# @bulletin.is_rejected = true
|
# @bulletin.is_rejected = true
|
||||||
# @bulletin.save!
|
# @bulletin.save!
|
||||||
# end
|
# end
|
||||||
# if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
# if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
||||||
# @bulletin.deadline = nil
|
# @bulletin.deadline = nil
|
||||||
# @bulletin.update_user_id = current_user.id
|
# @bulletin.update_user_id = current_user.id
|
||||||
# @bulletin.save!
|
# @bulletin.save!
|
||||||
# end
|
# end
|
||||||
# format.html { redirect_to(panel_announcement_back_end_bulletin_url(@bulletin), :notice => t('bulletin.update_bulletin_success')) }
|
# format.html { redirect_to(panel_announcement_back_end_bulletin_url(@bulletin), :notice => t('bulletin.update_bulletin_success')) }
|
||||||
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('bulletin.update_bulletin_success')) }
|
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('bulletin.update_bulletin_success')) }
|
||||||
format.js { render 'toggle_enable' }
|
format.js { render 'toggle_enable' }
|
||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
else
|
else
|
||||||
get_tags
|
get_tags
|
||||||
format.html { render :action => "edit" }
|
format.html { render :action => "edit" }
|
||||||
format.xml { render :xml => @bulletin.errors, :status => :unprocessable_entity }
|
format.xml { render :xml => @bulletin.errors, :status => :unprocessable_entity }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -300,11 +325,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
|
|
||||||
# def top_edit
|
# def top_edit
|
||||||
|
|
||||||
# Bulletin.where(id: params[:id]).update_all( is_top: true )
|
# Bulletin.where(id: params[:id]).update_all( is_top: true )
|
||||||
# respond_to do |format|
|
# respond_to do |format|
|
||||||
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
||||||
# format.xml { head :ok }
|
# format.xml { head :ok }
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
@ -313,7 +338,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
@bulletin = Bulletin.find(params[:id])
|
@bulletin = Bulletin.find(params[:id])
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@bulletin_categories = BulletinCategory.all
|
@bulletin_categories = BulletinCategory.all
|
||||||
#TODO 需要做 manager ,admin 才可以 all. 其他 available就好
|
#TODO 需要做 manager ,admin 才可以 all. 其他 available就好
|
||||||
|
|
||||||
get_tags
|
get_tags
|
||||||
end
|
end
|
||||||
|
@ -363,8 +388,8 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
# end
|
# end
|
||||||
|
|
||||||
def get_tags
|
def get_tags
|
||||||
module_app = ModuleApp.first(:conditions => {:key => 'announcement'})
|
module_app = ModuleApp.first(:conditions => {:key => 'announcement'})
|
||||||
@tags = Tag.all(:conditions => {:module_app_id => module_app.id}).order_by(I18n.locale, :asc) rescue []
|
@tags = Tag.all(:conditions => {:module_app_id => module_app.id}).order_by(I18n.locale, :asc) rescue []
|
||||||
end
|
end
|
||||||
|
|
||||||
def clean_values
|
def clean_values
|
||||||
|
@ -377,5 +402,4 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
end rescue nil
|
end rescue nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
<table class="table main-list">
|
<table class="table main-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="span1"><%= t('bulletin.category') %></th>
|
<th class="span1"><%= t('category') %></th>
|
||||||
<th class="span3"><%= t('bulletin.title') %></th>
|
<th class="span3"><%= t('title') %></th>
|
||||||
<th class="span1"><%= t('bulletin.start_date') %></th>
|
<th class="span1"><%= t('start_date') %></th>
|
||||||
<th class="span1"><%= t('bulletin.end_date') %></th>
|
<th class="span1"><%= t('end_date') %></th>
|
||||||
<th class="span1"><%= t('bulletin.tags') %></th>
|
<th class="span1"><%= t('tags') %></th>
|
||||||
<% if not @user%>
|
<% if not @user%>
|
||||||
<th class="span1"><%= t('bulletin.last_modified') %></th>
|
<th class="span1"><%= t('last_modified') %></th>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<% if not bulletin.deadline.nil?%>
|
<% if not bulletin.deadline.nil?%>
|
||||||
<td><%= display_date_time(bulletin.deadline) %></td>
|
<td><%= display_date_time(bulletin.deadline) %></td>
|
||||||
<%else%>
|
<%else%>
|
||||||
<td><%= t('bulletin.no_deadline') %></td>
|
<td><%= t('no_deadline') %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td>
|
<td>
|
||||||
<div class="label-group">
|
<div class="label-group">
|
||||||
|
|
|
@ -6,6 +6,7 @@ Rails.application.routes.draw do
|
||||||
match 'approval_setting' => "approvals#setting" ,:as => :approval_setting,:via => :get
|
match 'approval_setting' => "approvals#setting" ,:as => :approval_setting,:via => :get
|
||||||
match 'approval_setting' => "approvals#update_setting" ,:as => :approval_setting,:via => :post
|
match 'approval_setting' => "approvals#update_setting" ,:as => :approval_setting,:via => :post
|
||||||
match 'approval_setting' => "approvals#user_list" ,:as => :approval_user_list,:via => :put
|
match 'approval_setting' => "approvals#user_list" ,:as => :approval_user_list,:via => :put
|
||||||
|
#match 'get_bulletins_json' => "bulletins#get_bulletins_json" ,:as => :bulletins_json_list,:via => :get
|
||||||
resources :bulletins do
|
resources :bulletins do
|
||||||
match "approve/:bulletin_id" => "approvals#preview_and_approve",:as => :approval_preview,:via => :put
|
match "approve/:bulletin_id" => "approvals#preview_and_approve",:as => :approval_preview,:via => :put
|
||||||
match "approve/:bulletin_id" => "approvals#approve",:as => :approve,:via => :post
|
match "approve/:bulletin_id" => "approvals#approve",:as => :approve,:via => :post
|
||||||
|
@ -18,6 +19,7 @@ Rails.application.routes.draw do
|
||||||
post "preview"
|
post "preview"
|
||||||
put "preview"
|
put "preview"
|
||||||
get 'delete'
|
get 'delete'
|
||||||
|
get 'get_bulletins_json'
|
||||||
end
|
end
|
||||||
match "file_quick_add/:bulletin_id" => "bulletins#file_quick_add" ,:as => :file_quick_add
|
match "file_quick_add/:bulletin_id" => "bulletins#file_quick_add" ,:as => :file_quick_add
|
||||||
match "file_quick_edit/:bulletin_id" => "bulletins#file_quick_edit" ,:as => :file_quick_edit
|
match "file_quick_edit/:bulletin_id" => "bulletins#file_quick_edit" ,:as => :file_quick_edit
|
||||||
|
@ -25,11 +27,11 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
resources :bulletin_categorys
|
resources :bulletin_categorys
|
||||||
|
|
||||||
resources :bulletin_links, :controller => 'bulletin_links' do
|
resources :bulletin_links, :controller => 'bulletin_links' do
|
||||||
match "link_quick_edit/:bulletin_link_id" => "bulletin_links#link_quick_edit" ,:as => :link_quick_edit
|
match "link_quick_edit/:bulletin_link_id" => "bulletin_links#link_quick_edit" ,:as => :link_quick_edit
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :bulletin_files, :controller => 'bulletin_files' do
|
resources :bulletin_files, :controller => 'bulletin_files' do
|
||||||
match "file_quick_edit/:bulletin_file_id" => "bulletin_files#file_quick_edit" ,:as => :file_quick_edit
|
match "file_quick_edit/:bulletin_file_id" => "bulletin_files#file_quick_edit" ,:as => :file_quick_edit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -338,6 +338,21 @@
|
||||||
margin: 4px 0 0 0;
|
margin: 4px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* category edit */
|
||||||
|
.edit_cal {
|
||||||
|
margin: -8px;
|
||||||
|
background-color: whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit_cal .table td, .edit_cal .table {
|
||||||
|
border: 0 !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
.main-list td {
|
||||||
|
border-top: solid 1px #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
/* create / edit event panel */
|
/* create / edit event panel */
|
||||||
#tags_panel {
|
#tags_panel {
|
||||||
top: auto;
|
top: auto;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<tr class="with_action" for="<%= calendar.id.to_s %>">
|
<tr class="with_action" for="<%= calendar.id.to_s %>">
|
||||||
<td>
|
<td>
|
||||||
<span class="calendars_color_tag" style="background-color: <%= calendar.color %>"></span>
|
<span class="calendars_color_tag" style="background-color: <%= calendar.color %>"></span>
|
||||||
<div id="edit_area_<%= calendar.id %>" style="display:hidden;"></div>
|
|
||||||
|
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills hide">
|
<ul class="nav nav-pills hide">
|
||||||
<li><%= link_to t("calendar.edit"), edit_panel_calendar_back_end_cal_path(calendar), :remote => true, :class=>"btn-edit-a", :for => calendar.id %></li>
|
<li><%= link_to t("calendar.edit"), edit_panel_calendar_back_end_cal_path(calendar), :remote => true, :class=>"btn-edit-a", :for => calendar.id %></li>
|
||||||
|
@ -16,3 +14,6 @@
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="with_action">
|
||||||
|
<td colspan="3" id="edit_area_<%= calendar.id %>" style="display:none;"></td>
|
||||||
|
</tr>
|
|
@ -1,26 +1,23 @@
|
||||||
<%= form_for @calendar, :url => panel_calendar_back_end_cal_path(@calendar), :remote => true do |f| %>
|
<%= form_for @calendar, :url => panel_calendar_back_end_cal_path(@calendar), :remote => true do |f| %>
|
||||||
<h4>Edit</h4>
|
<table class="table" style="table-layout: fixed;">
|
||||||
<div class="row-fluid">
|
<tr>
|
||||||
<div class="span2">
|
<td>
|
||||||
<%= label_tag("color", t("calendar.color")) %>
|
<!--<%= label_tag("color", t("calendar.color")) %>-->
|
||||||
<%= f.text_field :color, :class => "color-picker miniColors", :size => "5", :maxlength => "5", :autocomplete=>"off",:value=>@calendar.color %>
|
<%= f.text_field :color, :class => "color-picker miniColors input-small", :maxlength => "5", :autocomplete=>"off",:value=>@calendar.color %>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<%= f.fields_for :name_translations do |name| %>
|
||||||
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<div>
|
<td class="form-inline">
|
||||||
<%= f.fields_for :name_translations do |name| %>
|
<%= name.text_field locale, :class => "input-large", :value=>@calendar.name_translations[locale] %>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
</td>
|
||||||
<div class="control-group">
|
<% end %>
|
||||||
<%= label_tag(locale, t("calendar.name")+"-"+I18nVariable.from_locale(locale)) %>
|
|
||||||
<div class="controls">
|
|
||||||
<%= name.text_field locale, :class => "input-xxlarge", :size=>"30", :value=>@calendar.name_translations[locale] %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
<div class="">
|
<td colspan="3">
|
||||||
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
|
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
|
||||||
<button class="btn btn-primary bt-cancel" for="<%= @calendar.id %>">Cancel</button>
|
<button class="btn btn-primary bt-cancel" for="<%= @calendar.id %>">Cancel</button>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,5 +1,6 @@
|
||||||
<%= stylesheet_link_tag "jquery.miniColors" %>
|
<%= stylesheet_link_tag "jquery.miniColors" %>
|
||||||
<%= stylesheet_link_tag "calendar" %>
|
<%= stylesheet_link_tag "calendar" %>
|
||||||
|
<%= stylesheet_link_tag "bootstrap-responsive" %>
|
||||||
<%= javascript_include_tag "jquery.miniColors.min" %>
|
<%= javascript_include_tag "jquery.miniColors.min" %>
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
<%= javascript_include_tag "calendarAPI" %>
|
<%= javascript_include_tag "calendarAPI" %>
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions pagination-right">
|
<div class="form-actions form-fixed pagination-right">
|
||||||
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
|
<%= f.submit t("calendar.save"), :class=>"btn btn-primary" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,190 +1,232 @@
|
||||||
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||||
include AdminHelper
|
include AdminHelper
|
||||||
|
|
||||||
# before_filter :force_order_for_visitor,:only=>[:index]
|
before_filter :force_order_for_user, :except => [:index,:get_album_json]
|
||||||
before_filter :force_order_for_user#,:except => [:index]
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
@authenticated = true #turn this value to false for view only
|
@authenticated = true #turn this value to false for view only
|
||||||
else
|
else
|
||||||
@authenticated = false
|
@authenticated = false
|
||||||
end
|
end
|
||||||
@categorylist = GalleryCategory.all
|
@categorylist = GalleryCategory.all
|
||||||
@cid = params['cat']
|
@cid = params['cat']
|
||||||
@tags = GalleryTag.all
|
@tags = GalleryTag.all
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
@authenticated = true #turn this value to false for view only
|
@authenticated = true #turn this value to false for view only
|
||||||
else
|
else
|
||||||
@authenticated = false
|
@authenticated = false
|
||||||
end
|
end
|
||||||
@album = GalleryAlbum.find(params[:id])
|
@album = GalleryAlbum.find(params[:id])
|
||||||
@tags = GalleryTag.all
|
@tags = GalleryTag.all
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
if is_manager? || is_admin?
|
if is_manager? || is_admin?
|
||||||
@categorylist = GalleryCategory.all
|
@categorylist = GalleryCategory.all
|
||||||
elsif is_sub_manager?
|
elsif is_sub_manager?
|
||||||
@categorylist = GalleryCategory.authed_for_user(current_user,"new_album")
|
@categorylist = GalleryCategory.authed_for_user(current_user,"new_album")
|
||||||
end
|
end
|
||||||
@album = GalleryAlbum.new
|
@album = GalleryAlbum.new
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
album = GalleryAlbum.new(params[:gallery_album])
|
album = GalleryAlbum.new(params[:gallery_album])
|
||||||
album.save!
|
album.save!
|
||||||
respond_to do |h|
|
respond_to do |h|
|
||||||
h.js
|
h.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_albums
|
def get_albums
|
||||||
@categoryids = params["cid"]
|
@categoryids = params["cid"]
|
||||||
@tags = params["tid"]
|
@tags = params["tid"]
|
||||||
@albums = Array.new
|
@albums = Array.new
|
||||||
if @categoryids == "all"
|
if @categoryids == "all"
|
||||||
if @tags
|
if @tags
|
||||||
if @tags.kind_of?(Array)
|
if @tags.kind_of?(Array)
|
||||||
@tags.each do |tag|
|
@tags.each do |tag|
|
||||||
@albums << GalleryAlbum.where(tag_ids: tag)
|
@albums << GalleryAlbum.where(tag_ids: tag)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@albums << GalleryAlbum.where(tag_ids: @tags)
|
@albums << GalleryAlbum.where(tag_ids: @tags)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@albums << GalleryAlbum.all
|
@albums << GalleryAlbum.all
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@categoryids.each do |id|
|
@categoryids.each do |id|
|
||||||
category = GalleryCategory.find(id)
|
category = GalleryCategory.find(id)
|
||||||
if @tags
|
if @tags
|
||||||
if @tags.kind_of?(Array)
|
if @tags.kind_of?(Array)
|
||||||
@tags.each do |tag|
|
@tags.each do |tag|
|
||||||
@albums << category.gallery_albums.where(tag_ids: tag)
|
@albums << category.gallery_albums.where(tag_ids: tag)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@albums << category.gallery_albums.where(tag_ids: @tags)
|
@albums << category.gallery_albums.where(tag_ids: @tags)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@albums << category.gallery_albums.all
|
@albums << category.gallery_albums.all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@output = Array.new
|
@output = Array.new
|
||||||
@albums.each do |album|
|
@albums.each do |album|
|
||||||
@albs = Array.new
|
@albs = Array.new
|
||||||
album.each do |values|
|
album.each do |values|
|
||||||
tags = Array.new
|
tags = Array.new
|
||||||
values.tag_ids.each do |tag|
|
values.tag_ids.each do |tag|
|
||||||
tags << GalleryTag.find(tag)[I18n.locale]
|
tags << GalleryTag.find(tag)[I18n.locale]
|
||||||
end
|
end
|
||||||
category = GalleryCategory.find(values.gallery_category_id).name
|
category = GalleryCategory.find(values.gallery_category_id).name
|
||||||
@albs << {"_id"=>values.id,"show_path"=>panel_gallery_back_end_album_path(values),"cover"=>values.cover,"cover_path"=>values.cover_path,"description"=>values.description,"category_name"=>category,"gallery_category_id" => values.gallery_category_id,"name"=>values.name,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
|
@albs << {"_id"=>values.id,"show_path"=>panel_gallery_back_end_album_path(values),"cover"=>values.cover,"cover_path"=>values.cover_path,"description"=>values.description,"category_name"=>category,"gallery_category_id" => values.gallery_category_id,"name"=>values.name,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
|
||||||
end
|
end
|
||||||
@output << @albs
|
@output << @albs
|
||||||
end
|
end
|
||||||
render :json=>@output.to_json
|
render :json=>@output.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
album = GalleryAlbum.find(params[:id])
|
album = GalleryAlbum.find(params[:id])
|
||||||
album.delete
|
album.delete
|
||||||
render :json =>{"success"=>true}.to_json
|
render :json =>{"success"=>true}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
@album = GalleryAlbum.find(params[:id])
|
@album = GalleryAlbum.find(params[:id])
|
||||||
@images = @album.gallery_images.all
|
@images = @album.gallery_images.all
|
||||||
@album_name = @album.name_translations
|
@album_name = @album.name_translations
|
||||||
@cover = @album.cover
|
@cover = @album.cover
|
||||||
@tags = GalleryTag.all
|
@tags = GalleryTag.all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cover
|
def set_cover
|
||||||
album = GalleryAlbum.find(params[:album_id])
|
album = GalleryAlbum.find(params[:album_id])
|
||||||
image = GalleryImage.find(params[:imageid])
|
image = GalleryImage.find(params[:imageid])
|
||||||
album.update_attributes({:cover_path => image.file.thumb.url, :cover=>params[:imageid]})
|
album.update_attributes({:cover_path => image.file.thumb.url, :cover=>params[:imageid]})
|
||||||
render :json =>{"success"=>true}.to_json
|
render :json =>{"success"=>true}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def imgs
|
def get_album_json
|
||||||
@album = GalleryAlbum.find(params[:album_id])
|
albums = GalleryAlbum.all
|
||||||
@tag_names = Array.new
|
output = Array.new
|
||||||
@images = @album.gallery_images.all
|
|
||||||
@output = Array.new
|
|
||||||
@images.each do |values|
|
|
||||||
tags = Array.new
|
|
||||||
values.tag_ids.each do |tag|
|
|
||||||
tags << GalleryTag.find(tag)[I18n.locale]
|
|
||||||
end
|
|
||||||
@output << {"_id"=>values.id,"theater_link"=>panel_gallery_back_end_album_image_path(values),"description"=>values.description,"title"=>values.title,"file"=>values.file,"gallery_album_id"=>values.gallery_album_id,"tag_ids"=>values.tag_ids,"tag_names"=>tags}
|
|
||||||
end
|
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
|
||||||
@authenticated = true #turn this value to false for view only
|
|
||||||
else
|
|
||||||
@authenticated = false
|
|
||||||
end
|
|
||||||
if @authenticated
|
|
||||||
render :json=>{"images" => @output, "tags" => @album.tag_ids}.to_json
|
|
||||||
else
|
|
||||||
@album.tag_ids.each do |tag|
|
|
||||||
@tag_names << GalleryTag.find(tag)[I18n.locale]
|
|
||||||
end
|
|
||||||
render :json=>{"images" => @output, "tags" => @album.tag_ids, "tag_names" => @tag_names}.to_json
|
|
||||||
end
|
|
||||||
end
|
|
||||||
def upload_panel
|
|
||||||
@album = GalleryAlbum.find(params[:album_id])
|
|
||||||
render :layout => false
|
|
||||||
end
|
|
||||||
def upload_image
|
|
||||||
@album = GalleryAlbum.find(params[:album_id])
|
|
||||||
@files = params['files']
|
|
||||||
a = Array.new
|
|
||||||
@files.each do |file|
|
|
||||||
@image = @album.gallery_images.new
|
|
||||||
@image.file = file
|
|
||||||
@image.save!
|
|
||||||
a << {"thumbnail_url"=>@image.file.thumb.url}
|
|
||||||
end
|
|
||||||
render :json=>a.to_json
|
|
||||||
end
|
|
||||||
def images_tags
|
|
||||||
album = GalleryAlbum.find(params[:album_id])
|
|
||||||
tags = Array.new
|
|
||||||
images = album.gallery_images.all
|
|
||||||
images.each do |image|
|
|
||||||
tags << {"id"=>image.id, "tags" => image.tag_ids}
|
|
||||||
end
|
|
||||||
render :json=>tags.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
albums.each do |album|
|
||||||
@album = GalleryAlbum.find(params[:id])
|
tag_names = Array.new
|
||||||
@album.update_attributes(params[:gallery_album])
|
all_image = Array.new
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
|
||||||
@authenticated = true #turn this value to false for view only
|
|
||||||
else
|
|
||||||
@authenticated = false
|
|
||||||
end
|
|
||||||
if params['delete_cover'] == "true"
|
|
||||||
@album.update_attributes(:cover=>"default")
|
|
||||||
end
|
|
||||||
@tags = GalleryTag.all
|
|
||||||
render :action => :show
|
|
||||||
end
|
|
||||||
|
|
||||||
|
images = album.gallery_images.all
|
||||||
|
images.each do |image|
|
||||||
|
tags = Array.new
|
||||||
|
|
||||||
|
image.tag_ids.each do |tag|
|
||||||
|
tags << GalleryTag.find(tag)[I18n.locale]
|
||||||
|
end
|
||||||
|
|
||||||
|
all_image << {
|
||||||
|
image_title: image.title,
|
||||||
|
image_description: image.description,
|
||||||
|
image_file: { url: "http://#{request.host_with_port+image.file.url}",
|
||||||
|
thumb: "http://#{request.host_with_port+image.file.thumb.to_s}"},
|
||||||
|
image_tag_names: tags}
|
||||||
|
end
|
||||||
|
|
||||||
|
album.tag_ids.each do |tag|
|
||||||
|
tag_names << GalleryTag.find(tag)[I18n.locale]
|
||||||
|
end
|
||||||
|
|
||||||
|
output << {
|
||||||
|
album_cover_file: "http://#{request.host_with_port+album.cover_path}",
|
||||||
|
album_name: album.name,
|
||||||
|
album_tag_names: tag_names,
|
||||||
|
images: all_image
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
#render :json=>{:images => @output,
|
||||||
|
# :tag_names => @tag_names}.to_json
|
||||||
|
render :json=>JSON.pretty_generate(output)
|
||||||
|
end
|
||||||
|
|
||||||
|
def imgs
|
||||||
|
@album = GalleryAlbum.find(params[:album_id])
|
||||||
|
@tag_names = Array.new
|
||||||
|
@images = @album.gallery_images.all
|
||||||
|
@output = Array.new
|
||||||
|
@images.each do |values|
|
||||||
|
tags = Array.new
|
||||||
|
values.tag_ids.each do |tag|
|
||||||
|
tags << GalleryTag.find(tag)[I18n.locale]
|
||||||
|
end
|
||||||
|
@output << { _id: values.id,
|
||||||
|
theater_link: panel_gallery_back_end_album_image_path(values),
|
||||||
|
description: values.description,
|
||||||
|
title: values.title,
|
||||||
|
file: values.file,
|
||||||
|
gallery_album_id: values.gallery_album_id,
|
||||||
|
tag_ids: values.tag_ids,
|
||||||
|
tag_names: tags}
|
||||||
|
end
|
||||||
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
|
@authenticated = true #turn this value to false for view only
|
||||||
|
else
|
||||||
|
@authenticated = false
|
||||||
|
end
|
||||||
|
if @authenticated
|
||||||
|
render :json=>{"images" => @output, "tags" => @album.tag_ids}.to_json
|
||||||
|
else
|
||||||
|
@album.tag_ids.each do |tag|
|
||||||
|
@tag_names << GalleryTag.find(tag)[I18n.locale]
|
||||||
|
end
|
||||||
|
render :json=>{"images" => @output, "tags" => @album.tag_ids, "tag_names" => @tag_names}.to_json
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def upload_panel
|
||||||
|
@album = GalleryAlbum.find(params[:album_id])
|
||||||
|
render :layout => false
|
||||||
|
end
|
||||||
|
|
||||||
|
def upload_image
|
||||||
|
@album = GalleryAlbum.find(params[:album_id])
|
||||||
|
@files = params['files']
|
||||||
|
a = Array.new
|
||||||
|
@files.each do |file|
|
||||||
|
@image = @album.gallery_images.new
|
||||||
|
@image.file = file
|
||||||
|
@image.save!
|
||||||
|
a << {"thumbnail_url"=>@image.file.thumb.url}
|
||||||
|
end
|
||||||
|
render :json=>a.to_json
|
||||||
|
end
|
||||||
|
def images_tags
|
||||||
|
album = GalleryAlbum.find(params[:album_id])
|
||||||
|
tags = Array.new
|
||||||
|
images = album.gallery_images.all
|
||||||
|
images.each do |image|
|
||||||
|
tags << {"id"=>image.id, "tags" => image.tag_ids}
|
||||||
|
end
|
||||||
|
render :json=>tags.to_json
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@album = GalleryAlbum.find(params[:id])
|
||||||
|
@album.update_attributes(params[:gallery_album])
|
||||||
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
|
@authenticated = true #turn this value to false for view only
|
||||||
|
else
|
||||||
|
@authenticated = false
|
||||||
|
end
|
||||||
|
if params['delete_cover'] == "true"
|
||||||
|
@album.update_attributes(:cover=>"default")
|
||||||
|
end
|
||||||
|
@tags = GalleryTag.all
|
||||||
|
render :action => :show
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,54 +1,55 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
namespace :panel do
|
namespace :panel do
|
||||||
namespace :gallery do
|
namespace :gallery do
|
||||||
namespace :back_end do
|
namespace :back_end do
|
||||||
match "get_albums" => "albums#get_albums"
|
match "get_albums" => "albums#get_albums"
|
||||||
match "upload_image" => "albums#upload_image"
|
match "upload_image" => "albums#upload_image"
|
||||||
match "save_tags" => "tags#save_tags"
|
match "save_tags" => "tags#save_tags"
|
||||||
match "albums/save_tags" => "tags#save_tags"
|
match "albums/save_tags" => "tags#save_tags"
|
||||||
resources :albums do
|
resources :albums do
|
||||||
match "set_cover" => "albums#set_cover"
|
match "set_cover" => "albums#set_cover"
|
||||||
match "imgs" => "albums#imgs"
|
match "imgs" => "albums#imgs"
|
||||||
match "upload_panel" => "albums#upload_panel"
|
match "upload_panel" => "albums#upload_panel"
|
||||||
match "images_tags" => "albums#images_tags"
|
match "images_tags" => "albums#images_tags"
|
||||||
end
|
collection do
|
||||||
|
get "get_album_json"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
match "album_images/#!/:id" => "album_images#show"
|
match "album_images/#!/:id" => "album_images#show"
|
||||||
|
|
||||||
resources :album_images
|
resources :album_images
|
||||||
|
resources :gallery_categories
|
||||||
|
resources :tags
|
||||||
|
|
||||||
|
end
|
||||||
resources :gallery_categories
|
namespace :front_end do
|
||||||
resources :tags
|
match "get_albums" => "albums#get_albums"
|
||||||
|
# match "orbit_galleries" => "orbit_galleries#index"
|
||||||
end
|
# match "gallery_category_save" => "orbit_galleries#new_category"
|
||||||
namespace :front_end do
|
# match "categorylist" => "orbit_galleries#categorylist"
|
||||||
match "get_albums" => "albums#get_albums"
|
# match "gallery_category_delete" => "orbit_galleries#gallery_category_delete"
|
||||||
# match "orbit_galleries" => "orbit_galleries#index"
|
# match "add_album" => "orbit_galleries#add_album"
|
||||||
# match "gallery_category_save" => "orbit_galleries#new_category"
|
# match "create_album" => "orbit_galleries#create_album"
|
||||||
# match "categorylist" => "orbit_galleries#categorylist"
|
# match "get_albums" => "orbit_galleries#get_albums"
|
||||||
# match "gallery_category_delete" => "orbit_galleries#gallery_category_delete"
|
# match "upload_image" => "orbit_galleries#upload_image"
|
||||||
# match "add_album" => "orbit_galleries#add_album"
|
# match "upload_panel" => "orbit_galleries#upload_panel"
|
||||||
# match "create_album" => "orbit_galleries#create_album"
|
# match "get_images" => "orbit_galleries#get_images"
|
||||||
# match "get_albums" => "orbit_galleries#get_albums"
|
# match "theater" => "orbit_galleries#theater"
|
||||||
# match "upload_image" => "orbit_galleries#upload_image"
|
# match "delete_album" => "orbit_galleries#delete_album"
|
||||||
# match "upload_panel" => "orbit_galleries#upload_panel"
|
# match "edit_album" => "orbit_galleries#edit_album"
|
||||||
# match "get_images" => "orbit_galleries#get_images"
|
# match "set_cover" => "orbit_galleries#set_cover"
|
||||||
# match "theater" => "orbit_galleries#theater"
|
# match "delete_images" => "orbit_galleries#delete_images"
|
||||||
# match "delete_album" => "orbit_galleries#delete_album"
|
# match "update_album" => "orbit_galleries#update_album"
|
||||||
# match "edit_album" => "orbit_galleries#edit_album"
|
# match "save_tags" => "orbit_galleries#save_tags"
|
||||||
# match "set_cover" => "orbit_galleries#set_cover"
|
resources :albums do
|
||||||
# match "delete_images" => "orbit_galleries#delete_images"
|
member do
|
||||||
# match "update_album" => "orbit_galleries#update_album"
|
get "imgs"
|
||||||
# match "save_tags" => "orbit_galleries#save_tags"
|
get "theater"
|
||||||
resources :albums do
|
end
|
||||||
member do
|
end
|
||||||
get "imgs"
|
resources :album_images
|
||||||
get "theater"
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :album_images
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
2
vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js
vendored
Normal file
2
vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
// Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
// All this logic will automatically be available in application.js.
|
4
vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css
vendored
Normal file
4
vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/*
|
||||||
|
Place all the styles related to the matching controller here.
|
||||||
|
They will automatically be included in application.css.
|
||||||
|
*/
|
|
@ -1,29 +1,77 @@
|
||||||
class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||||
|
|
||||||
def index
|
#before_filter :clean_values, :only => [:create, :update]
|
||||||
@newlocation = Location.new
|
|
||||||
end
|
|
||||||
|
|
||||||
def create
|
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete]
|
||||||
debugger
|
before_filter :force_order_for_user,:except => :get_locations
|
||||||
@newlocation = Location.new(params[:location])
|
#before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations]
|
||||||
@newlocation.save!
|
|
||||||
render :action => "index"
|
|
||||||
end
|
|
||||||
|
|
||||||
def get_locations
|
def index
|
||||||
locations = Location.all
|
@locations = Location.all
|
||||||
@data = Array.new
|
respond_to do |format|
|
||||||
|
format.html # new.html.erb
|
||||||
|
format.json { render json: @locations }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
locations.each do |location|
|
def new
|
||||||
picurl = "http://"+request.host + location.file.url
|
@location = Location.new
|
||||||
thumburl = "http://"+request.host + location.file.thumb.url
|
|
||||||
@data << {"name"=>location.name,"pic_url"=>picurl,"thumb_url"=>thumburl,"description"=>location.description}
|
|
||||||
end
|
|
||||||
render :json => @data.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html # new.html.erb
|
||||||
|
format.json { render json: @location }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
@location = Location.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@location = Location.find(params[:id])
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.json { render json: @location }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
@location = Location.new(params[:location])
|
||||||
|
@location.save!
|
||||||
|
redirect_to panel_gprs_back_end_locations_url
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@location = Location.find(params[:id])
|
||||||
|
@location.update_attributes(params[:location])
|
||||||
|
redirect_to panel_gprs_back_end_locations_url
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@location = Location.find(params[:id])
|
||||||
|
@location.destroy
|
||||||
|
redirect_to panel_gprs_back_end_locations_url
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_locations
|
||||||
|
locations = Location.all
|
||||||
|
@data = Array.new
|
||||||
|
|
||||||
|
locations.each do |location|
|
||||||
|
picurl = "http://#{request.host_with_port + location.file.url}",
|
||||||
|
thumburl = "http://#{request.host_with_port + location.file.thumb.url}"
|
||||||
|
@data << { name: location.name,
|
||||||
|
pic_url: picurl,
|
||||||
|
thumb_url: thumburl,
|
||||||
|
longitude: location.longitude,
|
||||||
|
latitude: location.latitude,
|
||||||
|
description: location.description }
|
||||||
|
end
|
||||||
|
|
||||||
|
#print readable json
|
||||||
|
render :json => JSON.pretty_generate({location: @data})
|
||||||
|
|
||||||
|
#render :json => {location: @data}.to_json
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
2
vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb
vendored
Normal file
2
vendor/built_in_modules/gprs/app/helpers/panel/gprs/back_end/locations_helper.rb
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
module Panel::Gprs::BackEnd::LocationsHelper
|
||||||
|
end
|
|
@ -1,12 +1,11 @@
|
||||||
class Location
|
class Location
|
||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
include Mongoid::Timestamps
|
include Mongoid::Timestamps
|
||||||
|
|
||||||
mount_uploader :file, GprsUploader
|
mount_uploader :file, GprsUploader
|
||||||
|
|
||||||
field :name
|
|
||||||
field :description
|
|
||||||
field :longitude, type: Float
|
|
||||||
field :latitude, type: Float
|
|
||||||
|
|
||||||
|
field :name
|
||||||
|
field :description
|
||||||
|
field :longitude, type: Float
|
||||||
|
field :latitude, type: Float
|
||||||
end
|
end
|
30
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb
vendored
Normal file
30
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/_form.html.erb
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="">Name</label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.text_field :name, :class=>"span4", :placeholder => "Area" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="">Picture</label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.file_field :file %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="">Coordinates</label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
||||||
|
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="">Description</label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.submit "Save", :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
4
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb
vendored
Normal file
4
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/edit.html.erb
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %>
|
||||||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,42 +1,28 @@
|
||||||
|
<table class="table main-list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="span1"><%= t('location.picture') %></th>
|
||||||
|
<th class="span1"><%= t('location.name') %></th>
|
||||||
|
<th class="span1"><%= t('location.longitude') %></th>
|
||||||
|
<th class="span1"><%= t('location.latitude') %></th>
|
||||||
|
<th class="span3"><%= t('location.description') %></th>
|
||||||
|
<th class="span1"><%= t('location.edit') %></th>
|
||||||
|
<th class="span1"><%= t('location.delete') %></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody_locations" class="sort-holder">
|
||||||
|
<% @locations.each do |location| %>
|
||||||
|
<tr class="with_action">
|
||||||
|
<td><%= image_tag(location.file, alt: location.file, size: "50x50" )%></td>
|
||||||
|
<td><%= location.name%></td>
|
||||||
|
<td><%= location.longitude%></td>
|
||||||
|
<td><%= location.latitude%></td>
|
||||||
|
<td><%= location.description%></td>
|
||||||
|
<td><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %></td>
|
||||||
|
<td><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<!-- <form class="form-horizontal"> -->
|
<td><%= link_to 'New', new_panel_gprs_back_end_location_path %></td>
|
||||||
<%= form_for @newlocation, :url=>{:action => "create"}, :remote => true, :class=>"form-horizontal" do |f| %>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Name</label>
|
|
||||||
<div class="controls">
|
|
||||||
<!-- <input type="text" id="" class="span4" placeholder="Taipei 101"> -->
|
|
||||||
<%= f.text_field :name, :class=>"span4", :placeholder => "Area" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Picture</label>
|
|
||||||
<div class="controls">
|
|
||||||
<!-- <input type="file" id=""> -->
|
|
||||||
<%= f.file_field :file %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Coordinates</label>
|
|
||||||
<div class="controls">
|
|
||||||
<!-- <input type="text" id="" class="span2" placeholder="long"> -->
|
|
||||||
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
|
||||||
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
|
||||||
|
|
||||||
<!-- <input type="text" id="" class="span2" placeholder="lat"> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Description</label>
|
|
||||||
<div class="controls">
|
|
||||||
<!-- <textarea name="" id="" class="span4" cols="30" rows="5"></textarea> -->
|
|
||||||
<%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<div class="controls">
|
|
||||||
<!-- <textarea name="" id="" class="span4" cols="30" rows="5"></textarea> -->
|
|
||||||
<%= f.submit "Save", :class=>"btn" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<!-- </form> -->
|
|
||||||
|
|
3
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb
vendored
Normal file
3
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/new.html.erb
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %>
|
||||||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
|
<% end %>
|
0
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb
vendored
Normal file
0
vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/show.html.erb
vendored
Normal file
|
@ -1,14 +1,12 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
namespace :panel do
|
namespace :panel do
|
||||||
namespace :gprs do
|
namespace :gprs do
|
||||||
namespace :back_end do
|
namespace :back_end do
|
||||||
|
|
||||||
match "locations/get_locations" => "locations#get_locations"
|
match "locations/get_locations" => "locations#get_locations"
|
||||||
|
|
||||||
resources :locations
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
resources :locations
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
14
vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb
vendored
Normal file
14
vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class Panel::Gprs::BackEnd::LocationsControllerTest < ActionController::TestCase
|
||||||
|
test "should get index" do
|
||||||
|
get :index
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
test "should get edit" do
|
||||||
|
get :edit
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
4
vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb
vendored
Normal file
4
vendor/built_in_modules/gprs/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class Panel::Gprs::BackEnd::LocationsHelperTest < ActionView::TestCase
|
||||||
|
end
|
Loading…
Reference in New Issue