with connection and some save settings…

This commit is contained in:
Harry Bomrah committed 2012-04-26 21:30:13 +08:00
1 parent c2ac682787
commit c158375d02
13 files changed
+90 -1

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

+14
View File
@@ -481,6 +481,9 @@ var orbitDesktop = function(dom){
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);
@@ -684,6 +687,7 @@ var orbitDesktop = function(dom){
$(this).miniColors("value", o.rgb2hex(color));
});
}
$("div#settings div#panel_r").load("/desktop/settingthemes",function(){
$.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){
$('#st1 .theme_list [id='+theme+']')
@@ -696,6 +700,16 @@ var orbitDesktop = function(dom){
})
})
}
var connection = function(){
var bindHandlers = function(){
}
$("div#settings div#panel_r").load("/desktop/settingconnection",function(){
bindHandlers();
})
}
$(o.contentHolder).empty().load("/desktop/"+target,function(){
bindHandlers();
+4
View File
@@ -38,6 +38,10 @@ class DesktopController< ApplicationController
render "desktop/settings/sections", :layout => false
end
def settingconnection
render "desktop/settings/connections", :layout => false
end
def journal_p
render :layout => false
end
@@ -5,6 +5,13 @@ class OtheraccountsController< ApplicationController
require 'net/https'
include REXML
def saveaccountinfo
@email = params['email']
@password = params['password']
@account = params['account']
OtherAccount.new(email: @email, encrypted_password: @password, type: @account)
end
def gmail
url = URI.parse("https://mail.google.com/mail/feed/atom")
req = Net::HTTP::Get.new(url.path)
+15
View File
@@ -0,0 +1,15 @@
class OtherAccount
include Mongoid::Document
include Mongoid::Timestamps
field :type
field :email
field :encrypted_password
attr_encrypted :encrypted_password, :key => 'rulingorbit.com', :encode => true
belongs_to :user
end
+1
View File
@@ -17,6 +17,7 @@ class User
has_many :managing_apps,:class_name => "AppManager"
has_one :desktop, :autosave => true, :dependent => :destroy
has_many :otheraccount, :autosave => true, :dependent => :destroy
belongs_to :role
has_and_belongs_to_many :sub_roles
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
+1 -1
View File
@@ -14,7 +14,7 @@
<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="" class="admtxt hh2 w2 hp" onclick='return false;'>Connection</a></li>
<li><a href="connection" class="admtxt hh2 w2 hp" onclick='return false;'>Connection</a></li>
</ul>
</div>
</div>
@@ -0,0 +1,35 @@
<div class="tinycanvas vp">
<div class="scrollbar sb_v vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport">
<div class="overview">
<div class="s_title hh3">Connections</div>
<table width="100%" class="s_form">
<tr>
<td rowspan="2"><img src="assets/gmail.png" alt=""></td>
<td valign="top"><label for="s_name1">Username</label><input type="text" /></td>
</tr>
<tr>
<td><label for="s_name1">Password</label><input type="password" /></td>
</tr>
<tr>
<td rowspan="2"><img src="assets/facebook.png" alt=""></td>
<td><label for="s_name1">Username</label><input type="text" /></td>
</tr>
<tr>
<td><label for="s_name1">Password</label><input type="password" /></td>
</tr>
<tr>
<td rowspan="2"><img src="assets/twitter.png"></td>
<td><label for="s_name1">Username</label><input type="text" /></td>
</tr>
<tr>
<td><label for="s_name1">Password</label><input type="password" /></td>
</tr>
</table>
<div class="s_action">
<a href="" id="connection_save_btn" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick='return false;'>Save</a>
</div>
</div>
</div>
</div>