with connection and some save settings…
This commit is contained in:
parent
c2ac682787
commit
c158375d02
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 |
|
@ -481,6 +481,9 @@ var orbitDesktop = function(dom){
|
||||||
case "sections":
|
case "sections":
|
||||||
sections();
|
sections();
|
||||||
break;
|
break;
|
||||||
|
case "connection":
|
||||||
|
connection();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$("div#settings ul#setting_left_nav li a").removeClass('thmc1 thmtxt').data('clicked',null);
|
$("div#settings ul#setting_left_nav li a").removeClass('thmc1 thmtxt').data('clicked',null);
|
||||||
$(this).addClass('thmc1 thmtxt').data('clicked',true);
|
$(this).addClass('thmc1 thmtxt').data('clicked',true);
|
||||||
|
@ -684,6 +687,7 @@ var orbitDesktop = function(dom){
|
||||||
$(this).miniColors("value", o.rgb2hex(color));
|
$(this).miniColors("value", o.rgb2hex(color));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$("div#settings div#panel_r").load("/desktop/settingthemes",function(){
|
$("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+']')
|
||||||
|
@ -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(){
|
$(o.contentHolder).empty().load("/desktop/"+target,function(){
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
|
|
|
@ -38,6 +38,10 @@ class DesktopController< ApplicationController
|
||||||
render "desktop/settings/sections", :layout => false
|
render "desktop/settings/sections", :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def settingconnection
|
||||||
|
render "desktop/settings/connections", :layout => false
|
||||||
|
end
|
||||||
|
|
||||||
def journal_p
|
def journal_p
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,13 @@ class OtheraccountsController< ApplicationController
|
||||||
require 'net/https'
|
require 'net/https'
|
||||||
include REXML
|
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
|
def gmail
|
||||||
url = URI.parse("https://mail.google.com/mail/feed/atom")
|
url = URI.parse("https://mail.google.com/mail/feed/atom")
|
||||||
req = Net::HTTP::Get.new(url.path)
|
req = Net::HTTP::Get.new(url.path)
|
||||||
|
|
|
@ -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
|
|
@ -17,6 +17,7 @@ class User
|
||||||
|
|
||||||
has_many :managing_apps,:class_name => "AppManager"
|
has_many :managing_apps,:class_name => "AppManager"
|
||||||
has_one :desktop, :autosave => true, :dependent => :destroy
|
has_one :desktop, :autosave => true, :dependent => :destroy
|
||||||
|
has_many :otheraccount, :autosave => true, :dependent => :destroy
|
||||||
belongs_to :role
|
belongs_to :role
|
||||||
has_and_belongs_to_many :sub_roles
|
has_and_belongs_to_many :sub_roles
|
||||||
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
|
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Account</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="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="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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
|
@ -117,7 +117,10 @@ Orbit::Application.routes.draw do
|
||||||
match '/desktop/journal_p/'=>'desktop#journal_p'
|
match '/desktop/journal_p/'=>'desktop#journal_p'
|
||||||
match '/desktop/journal_p_list/'=>'desktop#journal_p_list'
|
match '/desktop/journal_p_list/'=>'desktop#journal_p_list'
|
||||||
match '/desktop/journal_p_add/'=>'desktop#journal_p_add'
|
match '/desktop/journal_p_add/'=>'desktop#journal_p_add'
|
||||||
|
match '/desktop/settingconnection/'=>'desktop#settingconnection'
|
||||||
match '/desktop/forgmail/'=>'otheraccounts#gmail'
|
match '/desktop/forgmail/'=>'otheraccounts#gmail'
|
||||||
|
match '/desktop/save_account_info/'=>'otheraccounts#saveaccountinfo'
|
||||||
|
|
||||||
match '/desktop/temp_func/'=>'desktop#temp_func'
|
match '/desktop/temp_func/'=>'desktop#temp_func'
|
||||||
|
|
||||||
match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
|
match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
|
||||||
|
|
|
@ -42,4 +42,14 @@ var gmail = function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var saveaccount = function(){
|
||||||
|
var usernm = $("#gmail input[type=text]").val();
|
||||||
|
var pwd = $("#gmail input[type=password]").val();
|
||||||
|
usernm = "hr@rulingcom.com";
|
||||||
|
pwd = "hr08973";
|
||||||
|
if(usernm!="" && pwd!=""){
|
||||||
|
$.post("/desktop/save_account_info",{email:usernm,password:pwd,account:"gmail"})
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue