new icons and widgets
This commit is contained in:
1 parent
01af32aa60
commit
193cee2df7
28 files changed
+167
-86
No files matched your search
@@ -35,16 +35,42 @@ class DesktopController< ApplicationController
|
||||
#ajax data load....
|
||||
|
||||
def save_desktop_settings
|
||||
@desktop = Desktop.find(params["id"])
|
||||
@desktop.update_attributes(:theme => params["theme"])
|
||||
@desktop = Desktop.find(params["desktopid"])
|
||||
@savewhat = params["save"]
|
||||
case @savewhat
|
||||
when "theme"
|
||||
@desktop.update_attributes(:theme => params["theme"])
|
||||
when "desktopnames"
|
||||
@sections = @desktop.sections
|
||||
x = 0;
|
||||
@sections.each do |section|
|
||||
@desktopnewnames = params["desktopnms"]
|
||||
section.update_attributes(:name => @desktopnewnames[x] )
|
||||
x = x+1
|
||||
end
|
||||
end
|
||||
a = Array.new
|
||||
a << {"success"=>"true"}
|
||||
render :json=>a.to_json
|
||||
end
|
||||
|
||||
def get_desktop_settings
|
||||
@desktop = Desktop.find(params["id"])
|
||||
render :json => @desktop.to_json
|
||||
@desktop = Desktop.find(params["desktopid"])
|
||||
@getwhat = params["get"]
|
||||
case @getwhat
|
||||
when "desktop"
|
||||
render :json => @desktop.to_json
|
||||
when "sectionnames"
|
||||
secnames = Array.new
|
||||
@sections = @desktop.sections
|
||||
@sections.each do |section|
|
||||
secnames << section.name
|
||||
end
|
||||
render :json => secnames.to_json
|
||||
when "theme"
|
||||
@theme = @desktop.theme
|
||||
render :json => @theme.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def getgroups
|
||||
|
||||
Reference in new issue
Block a user