- Campus
+ Loading...
@@ -16,7 +17,7 @@
-
-
+
-
+
-
diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb
index aeb53e43..8000f816 100755
--- a/app/views/desktop/index.html.erb
+++ b/app/views/desktop/index.html.erb
@@ -80,6 +80,8 @@
orbitDesktop.prototype.themefolder = "desktop_themes";
orbitDesktop.prototype.notifyImgPath = "/assets/";
orbitDesktop.prototype.desktopId = "<%= @desktop.id %>";
+ orbitDesktop.prototype.sectionId = "<%= @section.id %>";
+ //uselessfunction();
var od = new orbitDesktop("#ajax_container");
- o.notify("Notification Working!!","imp",5)
+ o.notify("Notification Working!!","imp",3)
diff --git a/config/routes.rb b/config/routes.rb
index 8735b7e7..b90a5c7b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -108,6 +108,9 @@ Orbit::Application.routes.draw do
match '/desktop/settings'=>'desktop#settings'
match '/desktop/get_desktop_settings/'=>'desktop#get_desktop_settings'
match '/desktop/save_desktop_settings/'=>'desktop#save_desktop_settings'
+ match '/desktop/getgroups/'=>'desktop#getgroups'
+ match '/desktop/getsectionlist/'=>'desktop#getsectionlist'
+ match '/desktop/temp_func/'=>'desktop#temp_func'
match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
!request.query_string.include?("inner=true")
}
diff --git a/public/desktop_widgets/clock/bg_blue.png b/public/desktop_widgets/clock/temp/bg_blue.png
similarity index 100%
rename from public/desktop_widgets/clock/bg_blue.png
rename to public/desktop_widgets/clock/temp/bg_blue.png
diff --git a/public/desktop_widgets/clock/bg_green.png b/public/desktop_widgets/clock/temp/bg_green.png
similarity index 100%
rename from public/desktop_widgets/clock/bg_green.png
rename to public/desktop_widgets/clock/temp/bg_green.png
diff --git a/public/desktop_widgets/clock/bg_orange.png b/public/desktop_widgets/clock/temp/bg_orange.png
similarity index 100%
rename from public/desktop_widgets/clock/bg_orange.png
rename to public/desktop_widgets/clock/temp/bg_orange.png
diff --git a/public/desktop_widgets/clock/clock.css b/public/desktop_widgets/clock/temp/clock.css
similarity index 100%
rename from public/desktop_widgets/clock/clock.css
rename to public/desktop_widgets/clock/temp/clock.css
diff --git a/public/desktop_widgets/clock1/clock1.js b/public/desktop_widgets/clock1/clock1.js
new file mode 100755
index 00000000..d4237c01
--- /dev/null
+++ b/public/desktop_widgets/clock1/clock1.js
@@ -0,0 +1,171 @@
+/*!
+ * jquery.tzineClock.js - Tutorialzine Colorful Clock Plugin
+ *
+ * Copyright (c) 2009 Martin Angelov
+ * http://tutorialzine.com/
+ *
+ * Licensed under MIT
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Launch : December 2009
+ * Version : 1.0
+ * Released: Monday 28th December, 2009 - 00:00
+ */
+
+(function($){
+
+ // A global array used by the functions of the plug-in:
+ var gVars = {};
+
+ // Extending the jQuery core:
+ $.fn.tzineClock = function(opts){
+
+ // "this" contains the elements that were selected when calling the plugin: $('elements').tzineClock();
+ // If the selector returned more than one element, use the first one:
+
+ var container = this.eq(0);
+
+ if(!container)
+ {
+ try{
+ console.log("Invalid selector!");
+ } catch(e){}
+
+ return false;
+ }
+
+ if(!opts) opts = {};
+
+ var defaults = {
+ /* Additional options will be added in future versions of the plugin. */
+ };
+
+ /* Merging the provided options with the default ones (will be used in future versions of the plugin): */
+ $.each(defaults,function(k,v){
+ opts[k] = opts[k] || defaults[k];
+ })
+
+ // Calling the setUp function and passing the container,
+ // will be available to the setUp function as "this":
+ setUp.call(container);
+
+ return this;
+ }
+
+ function setUp()
+ {
+ // The colors of the dials:
+ var colors = ['orange','blue','green'];
+
+ var tmp;
+
+ for(var i=0;i<3;i++)
+ {
+ // Creating a new element and setting the color as a class name:
+
+ tmp = $('
+
').attr('class',colors[i]+' clock').html(
+ ''+
+
+ ''+
+
+ '
'+
+ ''+
+ '
'+
+
+ ''+
+ ''+
+ '
'
+ );
+
+ // Appending to the container:
+ $(this).append(tmp);
+
+ // Assigning some of the elements as variables for speed:
+ tmp.rotateLeft = tmp.find('.rotate.left');
+ tmp.rotateRight = tmp.find('.rotate.right');
+ tmp.display = tmp.find('.display');
+
+ // Adding the dial as a global variable. Will be available as gVars.colorName
+ gVars[colors[i]] = tmp;
+ }
+
+ // Setting up a interval, executed every 1000 milliseconds:
+ setInterval(function(){
+
+ var currentTime = new Date();
+ var h = currentTime.getHours();
+ var m = currentTime.getMinutes();
+ var s = currentTime.getSeconds();
+
+ animation(gVars.green, s, 60);
+ animation(gVars.blue, m, 60);
+ animation(gVars.orange, h, 24);
+
+ },1000);
+ }
+
+ function animation(clock, current, total)
+ {
+ // Calculating the current angle:
+ var angle = (360/total)*(current+1);
+
+ var element;
+
+ if(current==0)
+ {
+ // Hiding the right half of the background:
+ clock.rotateRight.hide();
+
+ // Resetting the rotation of the left part:
+ rotateElement(clock.rotateLeft,0);
+ }
+
+ if(angle<=180)
+ {
+ // The left part is rotated, and the right is currently hidden:
+ element = clock.rotateLeft;
+ }
+ else
+ {
+ // The first part of the rotation has completed, so we start rotating the right part:
+ clock.rotateRight.show();
+ clock.rotateLeft.show();
+
+ rotateElement(clock.rotateLeft,180);
+
+ element = clock.rotateRight;
+ angle = angle-180;
+ }
+
+ rotateElement(element,angle);
+
+ // Setting the text inside of the display element, inserting a leading zero if needed:
+ clock.display.html(current<10?'0'+current:current);
+ }
+
+ function rotateElement(element,angle)
+ {
+ // Rotating the element, depending on the browser:
+ var rotate = 'rotate('+angle+'deg)';
+
+ if(element.css('MozTransform')!=undefined)
+ element.css('MozTransform',rotate);
+
+ else if(element.css('WebkitTransform')!=undefined)
+ element.css('WebkitTransform',rotate);
+
+ // A version for internet explorer using filters, works but is a bit buggy (no surprise here):
+ else if(element.css("filter")!=undefined)
+ {
+ var cos = Math.cos(Math.PI * 2 / 360 * angle);
+ var sin = Math.sin(Math.PI * 2 / 360 * angle);
+
+ element.css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+cos+",M12=-"+sin+",M21="+sin+",M22="+cos+",SizingMethod='auto expand',FilterType='nearest neighbor')");
+
+ element.css("left",-Math.floor((element.width()-200)/2));
+ element.css("top",-Math.floor((element.height()-200)/2));
+ }
+
+ }
+
+})(jQuery)
\ No newline at end of file
diff --git a/public/desktop_widgets/clock1/img/bg_blue.png b/public/desktop_widgets/clock1/img/bg_blue.png
new file mode 100644
index 00000000..7f53ed5c
Binary files /dev/null and b/public/desktop_widgets/clock1/img/bg_blue.png differ
diff --git a/public/desktop_widgets/clock1/img/bg_green.png b/public/desktop_widgets/clock1/img/bg_green.png
new file mode 100644
index 00000000..ce092cfc
Binary files /dev/null and b/public/desktop_widgets/clock1/img/bg_green.png differ
diff --git a/public/desktop_widgets/clock1/img/bg_orange.png b/public/desktop_widgets/clock1/img/bg_orange.png
new file mode 100644
index 00000000..f13fdc7c
Binary files /dev/null and b/public/desktop_widgets/clock1/img/bg_orange.png differ
diff --git a/public/desktop_widgets/clock1/index.html.erb b/public/desktop_widgets/clock1/index.html.erb
new file mode 100755
index 00000000..51eb7f8a
--- /dev/null
+++ b/public/desktop_widgets/clock1/index.html.erb
@@ -0,0 +1,76 @@
+
+
+
\ No newline at end of file
diff --git a/public/desktop_widgets/clock1/temp/bg_blue.png b/public/desktop_widgets/clock1/temp/bg_blue.png
new file mode 100755
index 00000000..ea275d1b
Binary files /dev/null and b/public/desktop_widgets/clock1/temp/bg_blue.png differ
diff --git a/public/desktop_widgets/clock1/temp/bg_green.png b/public/desktop_widgets/clock1/temp/bg_green.png
new file mode 100755
index 00000000..393618c2
Binary files /dev/null and b/public/desktop_widgets/clock1/temp/bg_green.png differ
diff --git a/public/desktop_widgets/clock1/temp/bg_orange.png b/public/desktop_widgets/clock1/temp/bg_orange.png
new file mode 100755
index 00000000..84d32207
Binary files /dev/null and b/public/desktop_widgets/clock1/temp/bg_orange.png differ
diff --git a/public/desktop_widgets/clock1/temp/clock.css b/public/desktop_widgets/clock1/temp/clock.css
new file mode 100755
index 00000000..7bba2ba0
--- /dev/null
+++ b/public/desktop_widgets/clock1/temp/clock.css
@@ -0,0 +1,69 @@
+.clock{
+ /* The .clock div. Created dynamically by jQuery */
+ background-color:#252525;
+ height:200px;
+ width:200px;
+ position:relative;
+ overflow:hidden;
+ float:left;
+}
+
+.clock .rotate{
+ /* There are two .rotate divs - one for each half of the background */
+ position:absolute;
+ width:200px;
+ height:200px;
+ top:0;
+ left:0;
+}
+
+.rotate.right{
+ display:none;
+ z-index:11;
+}
+
+.clock .bg, .clock .front{
+ width:100px;
+ height:200px;
+ background-color:#252525;
+ position:absolute;
+ top:0;
+}
+
+.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;
+ color:#F5F5F5;
+ font-size:60px;
+ text-align:center;
+ top:65px;
+ left:0;
+
+ /* CSS3 text shadow: */
+ text-shadow:4px 4px 5px #333333;
+}
+
+/* The left part of the background: */
+
+.clock .bg.left{ left:0; }
+
+/* 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; }
+
+/* The right part of the background: */
+.clock .bg.right{ left:100px; }
+
+.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; }
+
+
+.clock .front.left{
+ left:0;
+ z-index:10;
+}
diff --git a/public/desktop_widgets/weather1/img/clouds_180x150_bg.jpg b/public/desktop_widgets/weather1/img/clouds_180x150_bg.jpg
new file mode 100644
index 00000000..744cdaec
Binary files /dev/null and b/public/desktop_widgets/weather1/img/clouds_180x150_bg.jpg differ
diff --git a/public/desktop_widgets/weather1/index.html.erb b/public/desktop_widgets/weather1/index.html.erb
new file mode 100644
index 00000000..1dfa1849
--- /dev/null
+++ b/public/desktop_widgets/weather1/index.html.erb
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/public/desktop_widgets/weather1/weather1.js b/public/desktop_widgets/weather1/weather1.js
new file mode 100644
index 00000000..e69de29b