app store page added… and few other changes..

This commit is contained in:
Harry Bomrah committed 2012-05-04 20:28:12 +08:00
1 parent 4dc82e91a0
commit fcc875bb5d
11 files changed
+131 -11

No files matched your search

+62 -6
View File
@@ -26,7 +26,7 @@ var orbitDesktop = function(dom){
this.transitionTime = 500;
this.currenthtml = "desktop.html";
this.currentface = "home";
this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":""};
this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":"","appstore":""};
this.tp = "";
this.sectionList;
this.initialize = function(){
@@ -112,6 +112,15 @@ var orbitDesktop = function(dom){
});
}
});
$("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);
});
}
});
$(window).resize(function(){
var ww = $(window).width();
$("img#thmbackground").attr({"width":ww});
@@ -314,9 +323,7 @@ var orbitDesktop = function(dom){
};
this.tempFunc = function(th){
o.confirm("What","","",function(reply){
alert(reply);
})
$.post("desktop/twitter",function(){});
};
this.initializeAppSearch = function(target){ //this is application search ie is app manager initialization
@@ -1018,7 +1025,7 @@ var orbitDesktop = function(dom){
bindSecondaryHandlers();
}
$("div#settings div#panel_r").load("/desktop/journal_p_list",function(){
$("div#journal_p div#panel_r").load("/desktop/journal_p_list",function(){
$.getJSON("/desktop_publications/getjournals",function(journals){
journalData = eval(journals);
journalview();
@@ -1045,7 +1052,7 @@ var orbitDesktop = function(dom){
.delay(1500)
.addClass('op00', 500);
}
$("div#settings div#panel_r").load("/desktop/journal_p_add",function(){
$("div#journal_p div#panel_r").load("/desktop/journal_p_add",function(){
bindHandlers();
})
}
@@ -1061,6 +1068,55 @@ var orbitDesktop = function(dom){
list();
}
};
this.initializeAppstore = function(target){
o.currenthtml = target;
o.currentface = "appstore";
var bindHandlers = function(){
$('.s_menu a').on({
click: function(){
if(!$(this).hasClass('active')){
var tfunc = $(this).attr('href');
switch(tfunc){
case 'widgets':
widgets();
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(){
}
$("div#apps_store div#panel_r").load("/desktop_appstore/widgets",function(){
bindHandlers();
})
}
if(!o.desktopData[o.currentface]){
$(o.contentHolder).empty().load("/desktop_appstore/"+target,function(){
widgets();
bindHandlers();
});
}else{
$(o.contentHolder).html(o.desktopData[o.currentface]);
widgets();
bindHandlers();
}
}
this.loadWallpaper = function(wallpaper){ // this is to load new wallpaper
if(!wallpaper)wallpapernm = o.themesettings.background;else wallpapernm = wallpaper
var ww = $(window).width();
@@ -0,0 +1,11 @@
class DesktopAppstoreController< ApplicationController
def appstore
render "desktop/appstore", :layout => false
end
def widgets
render "desktop/appstore/widgets", :layout => false
end
end
@@ -1,7 +1,7 @@
class DesktopPublicationsController< ApplicationController
def journal_p
render "desktop/journal_p", :layout => false
end
def journal_p
render "desktop/journal_p", :layout => false
end
def journal_p_list
render "desktop/journal_pages/list", :layout => false
@@ -3,6 +3,7 @@ class OtheraccountsController< ApplicationController
require 'rexml/document'
require 'net/http'
require 'net/https'
# require 'twitter'
include REXML
def saveaccountinfo
@@ -50,6 +51,12 @@ class OtheraccountsController< ApplicationController
end
def twitter
# token = "Yh9qYe0lhWk27TZJamnhrA"
# secret = "iBgxJ5BrxfGFLkp7aB6pyCSzd0zcJiYDqJGFBK6Wdo"
# oauth = Twitter::OAuth.new(token,secret)
# oauth_token = oauth.request_token.token
# oauth_secret = oauth.request_token.secret
end
+26
View File
@@ -0,0 +1,26 @@
<div id="apps_store">
<div id="content">
<div id="header" class="hh3">
<div class="dtitle w2 hh3 hp">
<span class="thmtxth">App Store</span>
</div>
</div>
<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;'>Online Store</a></li>
<li><a href="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;'>Registeration</a></li>
</ul>
</div>
</div>
<div id="panel_r" class="ph pw admbg hp">
</div>
<div class="clear"></div>
</div>
</div>
</div>
@@ -0,0 +1 @@
this is widget page...
+4 -1
View File
@@ -1,10 +1,13 @@
<div id="journal_p">
<div id="settings">
<div id="content">
<div id="header" class="hh3">
<div class="dtitle w2 hh3 hp">
<span class="thmtxth">Journal Papers</span>
</div>
<div id="search_app" class="hfn w2 hh2 hp thmc3">
<input type="text" class="ini_input form" value="Search" id="searchbox" />
<input type="submit" class="ini_input submit thmc1" value="Submit"/>
</div>
</div>
<div id="holder">
<div id="panel_l" class="ph">
@@ -64,5 +64,6 @@
</li>
</ul>
</div>
<!-- <div style="z-index:999;position:relative;"><button onclick="o.tempFunc()">Twitter</button> -->
</div>
</div>