Last change
on this file since 28897 was 28897, checked in by davidb, 10 years ago |
GUI front-end to server base plus web page content
|
File size:
899 bytes
|
Line | |
---|
1 | Menubar.View = function ( editor ) {
|
---|
2 |
|
---|
3 | var container = new UI.Panel();
|
---|
4 | container.setClass( 'menu' );
|
---|
5 |
|
---|
6 | var title = new UI.Panel();
|
---|
7 | title.setTextContent( 'View' );
|
---|
8 | title.setMargin( '0px' );
|
---|
9 | title.setPadding( '8px' );
|
---|
10 | container.add( title );
|
---|
11 |
|
---|
12 | //
|
---|
13 |
|
---|
14 | var options = new UI.Panel();
|
---|
15 | options.setClass( 'options' );
|
---|
16 | container.add( options );
|
---|
17 |
|
---|
18 | // themes
|
---|
19 |
|
---|
20 | var option = new UI.Panel();
|
---|
21 | option.setClass( 'option' );
|
---|
22 | option.setTextContent( 'Light theme' );
|
---|
23 | option.onClick( function () {
|
---|
24 |
|
---|
25 | editor.setTheme( 'css/light.css' );
|
---|
26 | editor.config.setKey( 'theme', 'css/light.css' );
|
---|
27 |
|
---|
28 | } );
|
---|
29 | options.add( option );
|
---|
30 |
|
---|
31 | // about
|
---|
32 |
|
---|
33 | var option = new UI.Panel();
|
---|
34 | option.setClass( 'option' );
|
---|
35 | option.setTextContent( 'Dark theme' );
|
---|
36 | option.onClick( function () {
|
---|
37 |
|
---|
38 | editor.setTheme( 'css/dark.css' );
|
---|
39 | editor.config.setKey( 'theme', 'css/dark.css' );
|
---|
40 |
|
---|
41 | } );
|
---|
42 | options.add( option );
|
---|
43 |
|
---|
44 | //
|
---|
45 |
|
---|
46 | return container;
|
---|
47 |
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.