@@ -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