Skip to content
Browse files

Styled plugins

  • Loading branch information...
1 parent e0e6957 commit e847a8de13aea8e2c60881608bdca12141c274a5 @zerokilobytes committed May 12, 2012
View
4 examples/index.html
@@ -6,9 +6,9 @@
<title>Development</title>
</head>
<body>
- <div id="desktop" class="" style="position: relative;"></div>
+ <div id="desktop" class=""></div>
</body>
-<script src="../src/jquery.js" type="text/javascript"></script>
+<script src="../src/vendor/jquery.js" type="text/javascript"></script>
<script src="../src/main.js" type="text/javascript"></script>
</html>
<span></span>
View
6 src/core/application.js
@@ -24,8 +24,8 @@ var Application = function(container, options){
return $this;
};
- this.registerComponent = function(component){
- $this.window.addComponent(component);
+ this.registerPlugin = function(plugin){
+ $this.window.addPlugin(plugin);
};
this.registerWindow = function(windowPanel){
@@ -47,7 +47,7 @@ var Application = function(container, options){
}
function _render(){
$("body").css("overflow", "hidden");
- //$this.container.css('background-color', 'green');
+ $this.container.css('position', 'relative');
$this.container.width($(window).width());
$this.container.height($(window).height());
View
0 src/core/component/reader.js
No changes.
View
4 src/core/ui/window.js
@@ -9,9 +9,9 @@ var Window = $model({
$panel: null,
init: function(panel){
},
- addComponent: function(component){
+ addPlugin: function(plugin){
var object = this;
- component.render(function(data){
+ plugin.render(function(data){
object.$panel.append(data);
});
},
View
19 src/jquery.jgadget.js
@@ -1,19 +0,0 @@
-/*!
- * JGadgets JavaScript Framework
- *
- * Copyright 2012, Markel Mairs
- *
- * Date: May 6, 2012
- */
-
-(function( $ ){
- $.fn.gadget = function( options ) {
-
- // Create some defaults, extending them with any options that were provided
- var settings = $.extend( {}, options);
-
- //$.getScript("../");
- };
-})( jQuery );
-
-$(window).gadget({});
View
2 src/main.js
@@ -14,7 +14,7 @@
application = new Application($("#desktop"));
application.registerWindow(new DesktopPlugin());
- application.registerComponent(new TaskbarPlugin());
+ application.registerPlugin(new TaskbarPlugin());
application.start();
$log.write("E3");
View
BIN src/plugins/desktop/computer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN src/plugins/desktop/ipad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 src/plugins/desktop/script.js
@@ -10,6 +10,10 @@ var DesktopPlugin = $model({
load: function(){
var object = this;
include_style("plugins/desktop/style.css");
- this.$panel.addClass("desktopPlugin");
+ this.$panel.addClass("windowPanel");
+
+ load_file("plugins/desktop/template.jst", function(data){
+ object.$panel.append(data);
+ });
}
});
View
3 src/plugins/desktop/style.css
@@ -1,4 +1,7 @@
+body {margin:0}
.desktopPlugin {
background-color: eeeeee;
border: dotted 1px #AAA;
+ height: 100%;
+ padding: 15px 5px 0px 2px;
}
View
4 src/plugins/desktop/template.jst
@@ -1 +1,3 @@
-<div style="background-color:red;">Desktop</div>
+<div class="desktopPlugin">
+<img src="../src/plugins/desktop/computer.png" alt="My Computer"
+</div>
View
7 src/plugins/taskbar/style.css
@@ -1,11 +1,10 @@
.taskBar {
position: absolute;
- background-color: #818085;
+ background-color: #EEEEEE ;
bottom: 0;
- height: 20px;
+ height: 40px;
width: 100%;
- box-shadow: 10px 10px 10px #888;
- padding: 20px;
z-index: 1000;
border: solid 1px #AAA;
+ border-color: rgba(0, 0, 0, 0.1);
}
View
0 src/jquery.js → src/vendor/jquery.js
File renamed without changes.

0 comments on commit e847a8d

Please sign in to comment.
Something went wrong with that request. Please try again.