Skip to content

Instantly share code, notes, and snippets.

@ma11hew28
Created August 17, 2008 01:15
Show Gist options
  • Save ma11hew28/5776 to your computer and use it in GitHub Desktop.
Save ma11hew28/5776 to your computer and use it in GitHub Desktop.
<% view :about, :pane => :dialog, :width => 300, :bind=>{:visible => 'ScAdmin.appController.isAboutVisible'} do %>
<h1>Sprouted Note</h1>
version: 0.6.1
<hr>
<a href=http://www.maloninc.com/cgi-bin/fswiki/wiki.cgi?page=SproutedNote target=_blank>SproutedNote Wiki</a>
<div> &copy;2008 <a href=mailto:hiroyuki@maloninc.com>Malon,Inc</a> All Rights Reserved. </div>
<div class="buttons">
<%= button_view :outlet => true, :title => 'Close',
:bind=>{:default => 'ScAdmin.appController.isAboutVisible'},
:action => 'ScAdmin.appController.hideAbout' %>
</div>
<% end %>
// ==========================================================================
// ScAdmin.AppController
// ==========================================================================
require('core');
/** @class
(Document Your View Here)
@extends SC.Object
@author AuthorName
@version 0.1
@static
*/
ScAdmin.appController = SC.Object.create(
/** @scope ScAdmin.appController */ {
isAboutVisible: false,
showAbout: function(){
SC.page.get('about').set('isVisible',YES);
},
hideAbout: function(){
SC.page.get('about').set('isVisible',NO);
}
}) ;
- content_for('body') do
- view :header, :class => 'sc-header sc-square-theme' do
.left.app-label{:onClick => 'ScAdmin.appController.showAbout();'}
%img{:src => static_url('images/scadmin-logo.png')}
= label_view :outlet => true, :tag => :span, :value => 'Administration'
<% content_for('body') do %>
<% view :header, :class => 'sc-header sc-square-theme' do %>
<div class="left app-label" onClick = 'ScAdmin.appController.showAbout();'>
<img src="<%= static_url('images/scadmin-logo.png') %>" />
<%= label_view :outlet => true, :tag => :span, :value => 'Administration' %>
</div>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment