diff --git a/css/ui/views.css b/css/ui/views.css new file mode 100644 index 0000000000..949ec0b44c --- /dev/null +++ b/css/ui/views.css @@ -0,0 +1,27 @@ +.breadcrumbs { + color: #000000; +} + +.breadcrumbs a { + color: #000000; +} + +div.appframe-titlebar { + padding: 6px; + background: #eeeeee; /* Old browsers */ + background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */ + background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */ + border-bottom: 1px solid #ccc; +} + +div.appframe-toolbar { + padding: 4px; + background: #eeeeee; + border-top: 1px solid #f8f8f8; + border-bottom: 1px solid #ccc; +} \ No newline at end of file diff --git a/js/wn/views/appframe.js b/js/wn/views/appframe.js new file mode 100644 index 0000000000..19b1375a3e --- /dev/null +++ b/js/wn/views/appframe.js @@ -0,0 +1,32 @@ +wn.views.AppFrame = Class.extend({ + init: function(parent) { + this.buttons = {}; + this.$w = $('
').appendTo(parent); + + this.$titlebar = $('
\ + ×\ +
').appendTo(this.$w); + + this.$w.find('.close').click(function() { + window.history.back(); + }) + + }, + add_button: function(label, click, icon) { + if(!this.$w.find('.appframe-toolbar').length) + this.$w.append('
'); + + args = { label: label, icon:'' }; + if(icon) { + args.icon = ''; + } + this.buttons[label] = $(repl('', args)) + .click(click) + .appendTo(this.$w.find('.appframe-toolbar')); + + }, + clear_buttons: function() { + this.$w.find('.appframe-toolbar').empty(); + } +}) \ No newline at end of file