From f68fe22cba09fba605a2ef0832daffa0bcf9a9e5 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 5 Nov 2012 23:04:54 +0800 Subject: [PATCH] Desktop Widgtes updates.. --- app/assets/javascripts/orbitdesktop.js | 11 +- app/controllers/desktop_controller.rb | 36 +++++- .../desktop_publications_controller.rb | 1 + app/controllers/desktop_widgets_controller.rb | 3 +- app/models/design/css_default.rb | 6 +- app/models/design/design.rb | 6 +- app/models/design/image.rb | 6 +- app/models/design/javascript.rb | 6 +- app/models/design/stylesheet.rb | 107 +++++++----------- app/models/desktop/desktop.rb | 3 +- app/models/desktop/desktop_widget.rb | 12 +- app/models/desktop/group.rb | 13 +-- app/models/desktop/tile.rb | 1 + app/models/desktop/widget_layout.rb | 2 +- app/models/user/user.rb | 2 +- app/views/desktop/journal_pages/list.html.erb | 29 ++++- config/routes.rb | 4 + lib/parsers/parser_layout_widget.rb | 13 ++- .../{index.html.erb => index.html} | 0 public/desktop_widgets/browser/default.css | 1 + .../javascripts/browser.js} | 0 public/desktop_widgets/browser/settings.json | 6 + .../index.html.erb => browser/widget.html} | 0 public/desktop_widgets/clock/default.css | 59 +++++----- .../default.css} | 16 +-- .../img => googlesearch/images}/google_64.png | Bin .../javascripts/google.js} | 0 .../googlesearch/settings.json | 7 ++ .../desktop_widgets/googlesearch/widget.html | 13 +++ .../4fa78161c88514014d7c59c0.js | 0 .../index.html.erb | 0 .../4fa78197c88514014d7c59c4.js | 0 .../index.html.erb => youtube/index.html} | 0 33 files changed, 217 insertions(+), 146 deletions(-) rename public/desktop_widgets/509091e6bd98eb0352000009/{index.html.erb => index.html} (100%) create mode 100755 public/desktop_widgets/browser/default.css rename public/desktop_widgets/{4fba4bf36f4fea8095e389eb/4fba4bf36f4fea8095e389eb.js => browser/javascripts/browser.js} (100%) create mode 100644 public/desktop_widgets/browser/settings.json rename public/desktop_widgets/{4fba4bf36f4fea8095e389eb/index.html.erb => browser/widget.html} (100%) rename public/desktop_widgets/{4fa78140c88514014d7c59be/index.html.erb => googlesearch/default.css} (59%) mode change 100644 => 100755 rename public/desktop_widgets/{4fa78140c88514014d7c59be/img => googlesearch/images}/google_64.png (100%) rename public/desktop_widgets/{4fa78140c88514014d7c59be/4fa78140c88514014d7c59be.js => googlesearch/javascripts/google.js} (100%) create mode 100644 public/desktop_widgets/googlesearch/settings.json create mode 100644 public/desktop_widgets/googlesearch/widget.html rename public/desktop_widgets/{4fa78161c88514014d7c59c0 => timetable}/4fa78161c88514014d7c59c0.js (100%) rename public/desktop_widgets/{4fa78161c88514014d7c59c0 => timetable}/index.html.erb (100%) rename public/desktop_widgets/{4fa78197c88514014d7c59c4 => youtube}/4fa78197c88514014d7c59c4.js (100%) rename public/desktop_widgets/{4fa78197c88514014d7c59c4/index.html.erb => youtube/index.html} (100%) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 230d6c07..2b4eb629 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -332,9 +332,9 @@ var orbitDesktop = function(dom){ if(j==0)$group.attr("id",tile.group_id); if(tile.data_category == "app") - $li = $('
  • '+tile.title+'

  • '); + $li = $('
  • '+tile.title+'

  • '); else - $li = $('
  • '+tile.title+'

    Loading...
  • '); + $li = $('
  • '+tile.title+'

    Loading...
  • '); $group.find('.col'+colindex).append($li); } @@ -1557,10 +1557,10 @@ var orbitDesktop = function(dom){ var widget = $(this); if(widget.attr("data-category")=="widget"){ var widgename = widget.attr("data-content"); - $.getScript("/desktop_widgets/"+widgename+"/"+widgename+".js",function(){ - widget.find("div.appholder").load("/desktop_widgets/"+widgename+"/index.html.erb"); + $.getScript(widget.attr("js-link"),function(){ + widget.find("div.appholder").load(widget.attr("data-content")); }); - // $(this).find("div.appholder").append( $('').attr('href', "/desktop_widgets/"+widgename+"/css/"+widgename+".css")); + $(this).find("div.appholder").append( '') } }) @@ -1697,3 +1697,4 @@ orbitDesktop.prototype.currentUsername = "Harry"; var uselessfunction = function(){ $.post("/desktop/temp_func",{sectionid:"4f83e7bbbd98eb041600001d"}); } + diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb index 286ec1c4..ff657441 100644 --- a/app/controllers/desktop_controller.rb +++ b/app/controllers/desktop_controller.rb @@ -103,11 +103,41 @@ class DesktopController< ApplicationController def getgroups @section = Section.find(params["sectionid"]) @groups = @section.groups - a = Array.new + + gr = Array.new @groups.each do |group| - a << group.tiles + a = Array.new + t = group.tiles + t.each do |tile| + data_content = "" + jsfile = [] + cssfile = "" + shape = "w1 h1" + if tile.data_category == "widget" + widge = DesktopWidget.find(tile.desktop_widget_id.to_s) + # data_content = widge.widget_layout.file + data_content = "desktop/widget_layout?id="+tile.desktop_widget_id.to_s + jsfile = widge.javascripts.collect{|js| js.file} + cssfile = widge.css_default.file + shape = widge.shape + title = widge.name + else + data_content = tile.data_content + title = tile.title + end + a << {"id"=>tile.id,"data_category"=>tile.data_category,"data_content"=>data_content,"js"=>jsfile,"css"=>cssfile,"shape"=>shape,"position"=>tile.position,"title"=>title} + end + gr << a end - render :json =>a.to_json + render :json =>gr.to_json + end + + def widget_layout + widget = DesktopWidget.find(params[:id]) + link = '' + content = widget.widget_layout.body + dhtml = link + content + render :text => dhtml.html_safe end def getsectionlist diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index 14307022..fc3f36ab 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -8,6 +8,7 @@ class DesktopPublicationsController< ApplicationController end def journal_p_add + debugger render "desktop/journal_pages/add", :layout => false end diff --git a/app/controllers/desktop_widgets_controller.rb b/app/controllers/desktop_widgets_controller.rb index 6807082c..2605f367 100644 --- a/app/controllers/desktop_widgets_controller.rb +++ b/app/controllers/desktop_widgets_controller.rb @@ -31,7 +31,8 @@ class DesktopWidgetsController < OrbitBackendController zip_file.entries.each do |entry| case (path = entry.to_s) - when /\A(#{zip_name})\/(default\.css)\z/ #for default css + when /\A(#{zip_name})\/(default\.css)\z/ + #for default css dw.build_css_default(:file => get_temp_file(zip_file, dir, entry)) when /\A(#{zip_name})\/(widget\.html)\z/ #for layout html dw.build_widget_layout(:file => get_temp_file(zip_file, dir, entry)) diff --git a/app/models/design/css_default.rb b/app/models/design/css_default.rb index 9b2b17fc..bd4baa8c 100644 --- a/app/models/design/css_default.rb +++ b/app/models/design/css_default.rb @@ -1,6 +1,8 @@ class CssDefault < Stylesheet - belongs_to :design - belongs_to :desktop_widget + # belongs_to :design + # belongs_to :desktop_widget + + belongs_to :css, polymorphic: true end diff --git a/app/models/design/design.rb b/app/models/design/design.rb index c9d87982..54870a89 100644 --- a/app/models/design/design.rb +++ b/app/models/design/design.rb @@ -8,11 +8,11 @@ class Design field :title, :type => String field :version, :type => String - has_one :css_default, :autosave => true, :dependent => :destroy + has_one :css_default, as: :css, :autosave => true, :dependent => :destroy has_one :layout, :autosave => true, :dependent => :destroy has_one :css_reset, :autosave => true, :dependent => :destroy - has_many :images, :autosave => true, :dependent => :destroy - has_many :javascripts, :autosave => true, :dependent => :destroy + has_many :images,as: :imgs, :autosave => true, :dependent => :destroy + has_many :javascripts, as: :js, :autosave => true, :dependent => :destroy has_many :pages has_many :themes, :autosave => true, :dependent => :destroy diff --git a/app/models/design/image.rb b/app/models/design/image.rb index 355f66f7..d1a57d7f 100644 --- a/app/models/design/image.rb +++ b/app/models/design/image.rb @@ -10,8 +10,10 @@ class Image mount_uploader :file, ImageUploader - belongs_to :design - belongs_to :desktop_widget + # belongs_to :design + # belongs_to :desktop_widget + + belongs_to :imgs, polymorphic: true before_save :set_name diff --git a/app/models/design/javascript.rb b/app/models/design/javascript.rb index 4d13d0a3..808679d7 100644 --- a/app/models/design/javascript.rb +++ b/app/models/design/javascript.rb @@ -1,4 +1,6 @@ class Javascript < DesignFile - belongs_to :design - belongs_to :desktop_widget + # belongs_to :design + # belongs_to :desktop_widget + + belongs_to :js, polymorphic: true end diff --git a/app/models/design/stylesheet.rb b/app/models/design/stylesheet.rb index 47c13585..5e9a5775 100644 --- a/app/models/design/stylesheet.rb +++ b/app/models/design/stylesheet.rb @@ -1,67 +1,40 @@ -class Stylesheet < DesignFile - belongs_to :design - belongs_to :desktop_widget - mount_uploader :file_orig, AssetUploader - - def parse_urls - orig_content = content = self.file.read.force_encoding("UTF-8") - # self.remove_file! - # self.remove_file_orig! - names = [] - images = self.design.images - content.scan(/(?<=url)(.*?)(?=\))/){ - css_name = $1.gsub(' ','').gsub('(','') - name = File.basename(css_name).gsub(/[\\\"]/, '') - image = images.detect{ |i| i.file_identifier.eql?(name) } rescue nil - image.update_attribute(:in_css, true) if image - file_name = image.file_url rescue nil - names << [css_name, file_name] - } - names.each do |name| - content.gsub!(name[0], name[1]) if name[1] - end - Dir.mktmpdir('f_path') { |dir| - orig_file_name = self.file_identifier - - temp_file = File.new(dir + '/' + orig_file_name, 'w+') - temp_file.write orig_content.force_encoding("UTF-8") - self.file_orig = temp_file - - temp_file = File.new(dir + '/' + orig_file_name, 'w+') - temp_file.write content.force_encoding("UTF-8") - self.file = temp_file - self.save - } - end - def parse_widgets_urls - orig_content = content = self.file.read.force_encoding("UTF-8") - # self.remove_file! - # self.remove_file_orig! - names = [] - images = self.desktop_widget.images - content.scan(/(?<=url)(.*?)(?=\))/){ - css_name = $1.gsub(' ','').gsub('(','') - name = File.basename(css_name).gsub(/[\\\"]/, '') - image = images.detect{ |i| i.file_identifier.eql?(name) } rescue nil - image.update_attribute(:in_css, true) if image - file_name = image.file_url rescue nil - names << [css_name, file_name] - } - names.each do |name| - content.gsub!(name[0], name[1]) if name[1] - end - Dir.mktmpdir('f_path') { |dir| - orig_file_name = self.file_identifier - - temp_file = File.new(dir + '/' + orig_file_name, 'w+') - temp_file.write orig_content.force_encoding("UTF-8") - self.file_orig = temp_file - - temp_file = File.new(dir + '/' + orig_file_name, 'w+') - temp_file.write content.force_encoding("UTF-8") - self.file = temp_file - self.save - } - end - -end +class Stylesheet < DesignFile + # belongs_to :design + mount_uploader :file_orig, AssetUploader + + def parse_urls + orig_content = content = self.file.read.force_encoding("UTF-8") + # self.remove_file! + # self.remove_file_orig! + names = {} + images = self.css.images + content.scan(/(?<=url)(.*?)(?=\))/){ + css_name = $1.gsub(' ','').gsub('(','') + unless names.has_key?(css_name) + name = File.basename(css_name).gsub(/[\\\"]/, '') + image = images.detect{ |i| i.file_identifier.eql?(name) } rescue nil + if image + image.update_attribute(:in_css, true) + file_name = image.file_url + names.merge!({css_name => file_name}) + end + end + } + names.each_pair do |key, value| + content.gsub!(key, value) + end + Dir.mktmpdir('f_path') { |dir| + orig_file_name = self.file_identifier + + temp_file = File.new(dir + '/' + orig_file_name, 'w+') + temp_file.write orig_content.force_encoding("UTF-8") + self.file_orig = temp_file + + temp_file = File.new(dir + '/' + orig_file_name, 'w+') + temp_file.write content.force_encoding("UTF-8") + self.file = temp_file + self.save + } + end + +end diff --git a/app/models/desktop/desktop.rb b/app/models/desktop/desktop.rb index 20a6e577..6633005f 100644 --- a/app/models/desktop/desktop.rb +++ b/app/models/desktop/desktop.rb @@ -2,11 +2,12 @@ class Desktop include Mongoid::Document include Mongoid::Timestamps - field :theme, default: "4f8d3f493b67fcd05f086359" + field :theme, default: "4f8d3f533b67fcd05f08635a" field :customtheme field :wallpaper belongs_to :user + has_and_belongs_to_many :desktop_widgets, :autosave => true has_many :sections, :autosave => true, :dependent => :destroy # has_many :desktop_widgets, :autosave => true, :dependent => :destroy diff --git a/app/models/desktop/desktop_widget.rb b/app/models/desktop/desktop_widget.rb index 20eda85a..feb40aa7 100644 --- a/app/models/desktop/desktop_widget.rb +++ b/app/models/desktop/desktop_widget.rb @@ -8,13 +8,15 @@ class DesktopWidget field :shape field :version, :type => String - has_one :css_default, :autosave => true, :dependent => :destroy + has_one :css_default, as: :css, :autosave => true, :dependent => :destroy has_one :widget_layout, :autosave => true, :dependent => :destroy - has_many :images, :autosave => true, :dependent => :destroy - has_many :javascripts, :autosave => true, :dependent => :destroy + has_many :images, as: :imgs, :autosave => true, :dependent => :destroy + has_many :javascripts, as: :js, :autosave => true, :dependent => :destroy + has_and_belongs_to_many :desktops, :autosave => true + belongs_to :tiles, :autosave => true accepts_nested_attributes_for :images, :allow_destroy => true - accepts_nested_attributes_for :javascripts, :allow_destroy => true + accepts_nested_attributes_for :javascripts, :allow_destroy => true after_save :parse_css_for_images @@ -24,7 +26,7 @@ class DesktopWidget protected def parse_css_for_images - self.css_default.parse_widgets_urls + self.css_default.parse_urls parse_widget_for_images(self) end diff --git a/app/models/desktop/group.rb b/app/models/desktop/group.rb index 7346ad1e..2c1992f0 100644 --- a/app/models/desktop/group.rb +++ b/app/models/desktop/group.rb @@ -7,13 +7,12 @@ class Group before_create :initialize_tile def initialize_tile - self.tiles.build(data_category: "widget", data_content: "timetable", position: 1, shape: "w2 h2", title: "Tiime Table") - self.tiles.build(data_category: "app", data_content: "quotes", position: 2, shape: "w1 h1", title: "Quotes") - self.tiles.build(data_category: "widget", data_content: "weather", position: 3, shape: "w2 h2", title: "Weather") - self.tiles.build(data_category: "widget", data_content: "clock", position: 4, shape: "w2 h1", title: "Clock") - self.tiles.build(data_category: "app", data_content: "dailyenglish", position: 5, shape: "w1 h1", title: "Daily English Word") - self.tiles.build(data_category: "widget", data_content: "school_events", position: 6, shape: "w2 h1", title: "School Events") + self.tiles.build(data_category: "app", data_content: "quotes", position: 5, shape: "w1 h1", title: "Quotes") + self.tiles.build(data_category: "app", data_content: "dailyenglish", position: 6, shape: "w1 h1", title: "Daily English Word") + widgets = self.section.desktop.desktop_widgets.collect{|widget| widget.id} + for i in 0..3 + self.tiles.build(data_category: "widget", position: i+1,desktop_widget_id: widgets[i]) + end end - end \ No newline at end of file diff --git a/app/models/desktop/tile.rb b/app/models/desktop/tile.rb index 306338a1..91840d8a 100644 --- a/app/models/desktop/tile.rb +++ b/app/models/desktop/tile.rb @@ -9,5 +9,6 @@ class Tile field :title belongs_to :group + has_one :desktop_widget end diff --git a/app/models/desktop/widget_layout.rb b/app/models/desktop/widget_layout.rb index 25389682..5bf24805 100644 --- a/app/models/desktop/widget_layout.rb +++ b/app/models/desktop/widget_layout.rb @@ -5,7 +5,7 @@ class WidgetLayout < DesignFile field :body belongs_to :desktop_widget - + def content self.file.read.force_encoding("UTF-8") rescue '' diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 3ae7bf5d..32de983f 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -179,7 +179,7 @@ class User end def initialize_desktop - self.build_desktop + self.build_desktop(desktop_widget_ids: DesktopWidget.all.collect{|widget| widget.id}) end protected diff --git a/app/views/desktop/journal_pages/list.html.erb b/app/views/desktop/journal_pages/list.html.erb index e32e4d6c..3d396711 100644 --- a/app/views/desktop/journal_pages/list.html.erb +++ b/app/views/desktop/journal_pages/list.html.erb @@ -61,6 +61,18 @@ +
    +
    New Share
    +
    + +
    +
    @@ -72,4 +84,19 @@ - \ No newline at end of file + +Panel::PersonalJournal::Plugin::WritingJournals + diff --git a/config/routes.rb b/config/routes.rb index 17e96a60..383a69ae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -201,6 +201,7 @@ namespace :desktop do match '/getapplist/'=>'desktop#getapplist' match '/newpositions/'=>'desktop#newpositions' match '/settingconnection/'=>'desktop#settingconnection' + match '/widget_layout' => 'desktop#widget_layout' match '/journal_p/'=>'desktop_publications#journal_p' @@ -221,6 +222,9 @@ namespace :desktop do 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' end diff --git a/lib/parsers/parser_layout_widget.rb b/lib/parsers/parser_layout_widget.rb index 6749dae3..382657d8 100644 --- a/lib/parsers/parser_layout_widget.rb +++ b/lib/parsers/parser_layout_widget.rb @@ -2,13 +2,20 @@ module ParserLayoutWidget require 'nokogiri' def parse_widget_for_images(widget) - widge = Nokogiri::HTML(widget.widget_layout.body) - + content = widget.widget_layout.file.read.force_encoding("UTF-8") + widge = Nokogiri::HTML(content) + a = [] + b = [] widge.css('.widget_image').each do |page_image| image = widget.images.where( file: File.basename(page_image['src']))[0] + a << page_image['src'] + b << image.file image.update_attributes(:html_id => page_image['id'], :html_class => page_image['class'], :in_html => true) if image end - + a.each_with_index do |img,i| + content = content.gsub(img,b[i].to_s) + end + widget.widget_layout.update_attributes(:body => content) end diff --git a/public/desktop_widgets/509091e6bd98eb0352000009/index.html.erb b/public/desktop_widgets/509091e6bd98eb0352000009/index.html similarity index 100% rename from public/desktop_widgets/509091e6bd98eb0352000009/index.html.erb rename to public/desktop_widgets/509091e6bd98eb0352000009/index.html diff --git a/public/desktop_widgets/browser/default.css b/public/desktop_widgets/browser/default.css new file mode 100755 index 00000000..fe1e395e --- /dev/null +++ b/public/desktop_widgets/browser/default.css @@ -0,0 +1 @@ +/* No Css */ \ No newline at end of file diff --git a/public/desktop_widgets/4fba4bf36f4fea8095e389eb/4fba4bf36f4fea8095e389eb.js b/public/desktop_widgets/browser/javascripts/browser.js similarity index 100% rename from public/desktop_widgets/4fba4bf36f4fea8095e389eb/4fba4bf36f4fea8095e389eb.js rename to public/desktop_widgets/browser/javascripts/browser.js diff --git a/public/desktop_widgets/browser/settings.json b/public/desktop_widgets/browser/settings.json new file mode 100644 index 00000000..3ce3df02 --- /dev/null +++ b/public/desktop_widgets/browser/settings.json @@ -0,0 +1,6 @@ +{ + "author" : "Harry", + "name" : "Browser", + "shape" : "w2 h1", + "version" : "1.0" +} diff --git a/public/desktop_widgets/4fba4bf36f4fea8095e389eb/index.html.erb b/public/desktop_widgets/browser/widget.html similarity index 100% rename from public/desktop_widgets/4fba4bf36f4fea8095e389eb/index.html.erb rename to public/desktop_widgets/browser/widget.html diff --git a/public/desktop_widgets/clock/default.css b/public/desktop_widgets/clock/default.css index 8790b137..24125313 100755 --- a/public/desktop_widgets/clock/default.css +++ b/public/desktop_widgets/clock/default.css @@ -1,8 +1,8 @@ .clock{ /* The .clock div. Created dynamically by jQuery */ - /*background-color:#252525;*/ - height:200px; - width:200px; + background-color:#111; + height:75px; + width:75px; position:relative; overflow:hidden; float:left; @@ -11,21 +11,21 @@ .clock .rotate{ /* There are two .rotate divs - one for each half of the background */ position:absolute; - width:200px; - height:200px; + width:75px; + height:75px; top:0; left:0; } .rotate.right{ display:none; - z-index:11; + z-index:9; } .clock .bg, .clock .front{ - width:100px; - height:200px; - /*background-color:#252525;*/ + width:37.5px; + height:75px; + background-color:#111; position:absolute; top:0; } @@ -33,37 +33,42 @@ .clock .display{ /* Holds the number of seconds, minutes or hours respectfully */ position:absolute; - width:200px; - font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; - z-index:20; + width:75px; + font-family: Orbitron, sans-serif; + z-index:17; color:#F5F5F5; - font-size:60px; + font-size:21px; text-align:center; - top:65px; - left:0; - - /* CSS3 text shadow: */ - text-shadow:4px 4px 5px #333333; + top:27.5px; + left:0px; + } /* The left part of the background: */ -.clock .bg.left{ left:0; } +.clock .bg.left{ left:0px; } /* Individual styles for each color: */ -.orange .bg.left{ background:url(bg_orange.png) no-repeat left top; } -.green .bg.left{ background:url(bg_green.png) no-repeat left top; } -.blue .bg.left{ background:url(bg_blue.png) no-repeat left top; } +.orange .bg.left{ background:url(desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_orange.png) no-repeat left top; } +.green .bg.left{ background:url(desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_green.png) no-repeat left top; } +.blue .bg.left{ background:url(desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_blue.png) no-repeat left top; } /* The right part of the background: */ -.clock .bg.right{ left:100px; } +.clock .bg.right{ left:37.5px; } -.orange .bg.right{ background:url(bg_orange.png) no-repeat right top; } -.green .bg.right{ background:url(bg_green.png) no-repeat right top; } -.blue .bg.right{ background:url(bg_blue.png) no-repeat right top; } +.orange .bg.right{ background:url(desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_orange.png) no-repeat right top; } +.green .bg.right{ background:url(desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_green.png) no-repeat right top; } +.blue .bg.right{ background:url(desktop_widgets/4fa7810ac88514014d7c59bc/img/bg_blue.png) no-repeat right top; } .clock .front.left{ left:0; - z-index:10; + z-index:15; } +#fancyClock { + position: absolute; + overflow: hidden; + top: 50%; + left: 50%; + margin: -36px 0 0 -114px; +} \ No newline at end of file diff --git a/public/desktop_widgets/4fa78140c88514014d7c59be/index.html.erb b/public/desktop_widgets/googlesearch/default.css old mode 100644 new mode 100755 similarity index 59% rename from public/desktop_widgets/4fa78140c88514014d7c59be/index.html.erb rename to public/desktop_widgets/googlesearch/default.css index 341b8d81..1aede945 --- a/public/desktop_widgets/4fa78140c88514014d7c59be/index.html.erb +++ b/public/desktop_widgets/googlesearch/default.css @@ -1,4 +1,3 @@ - -
    - -
    - \ No newline at end of file +} \ No newline at end of file diff --git a/public/desktop_widgets/4fa78140c88514014d7c59be/img/google_64.png b/public/desktop_widgets/googlesearch/images/google_64.png similarity index 100% rename from public/desktop_widgets/4fa78140c88514014d7c59be/img/google_64.png rename to public/desktop_widgets/googlesearch/images/google_64.png diff --git a/public/desktop_widgets/4fa78140c88514014d7c59be/4fa78140c88514014d7c59be.js b/public/desktop_widgets/googlesearch/javascripts/google.js similarity index 100% rename from public/desktop_widgets/4fa78140c88514014d7c59be/4fa78140c88514014d7c59be.js rename to public/desktop_widgets/googlesearch/javascripts/google.js diff --git a/public/desktop_widgets/googlesearch/settings.json b/public/desktop_widgets/googlesearch/settings.json new file mode 100644 index 00000000..ddb52727 --- /dev/null +++ b/public/desktop_widgets/googlesearch/settings.json @@ -0,0 +1,7 @@ +{ + "author" : "Eric", + "name" : "Google Search", + "shape" : "w2 h1", + "version" : "1.0" + +} diff --git a/public/desktop_widgets/googlesearch/widget.html b/public/desktop_widgets/googlesearch/widget.html new file mode 100644 index 00000000..df5c715b --- /dev/null +++ b/public/desktop_widgets/googlesearch/widget.html @@ -0,0 +1,13 @@ + +
    + +
    + \ No newline at end of file diff --git a/public/desktop_widgets/4fa78161c88514014d7c59c0/4fa78161c88514014d7c59c0.js b/public/desktop_widgets/timetable/4fa78161c88514014d7c59c0.js similarity index 100% rename from public/desktop_widgets/4fa78161c88514014d7c59c0/4fa78161c88514014d7c59c0.js rename to public/desktop_widgets/timetable/4fa78161c88514014d7c59c0.js diff --git a/public/desktop_widgets/4fa78161c88514014d7c59c0/index.html.erb b/public/desktop_widgets/timetable/index.html.erb similarity index 100% rename from public/desktop_widgets/4fa78161c88514014d7c59c0/index.html.erb rename to public/desktop_widgets/timetable/index.html.erb diff --git a/public/desktop_widgets/4fa78197c88514014d7c59c4/4fa78197c88514014d7c59c4.js b/public/desktop_widgets/youtube/4fa78197c88514014d7c59c4.js similarity index 100% rename from public/desktop_widgets/4fa78197c88514014d7c59c4/4fa78197c88514014d7c59c4.js rename to public/desktop_widgets/youtube/4fa78197c88514014d7c59c4.js diff --git a/public/desktop_widgets/4fa78197c88514014d7c59c4/index.html.erb b/public/desktop_widgets/youtube/index.html similarity index 100% rename from public/desktop_widgets/4fa78197c88514014d7c59c4/index.html.erb rename to public/desktop_widgets/youtube/index.html