witten
/
luminotes
Archived
1
0
Fork 0

Replaced title button with font face button. Needs more work in IE. Also added more rounded corners to several display elements.

This commit is contained in:
Dan Helfman 2008-12-09 16:02:49 -08:00
parent 233b800978
commit 86df93c15c
22 changed files with 127 additions and 16 deletions

1
NEWS
View File

@ -1,6 +1,7 @@
1.5.11:
* Decreased the default note text font size, so now you can see more of your
notes at once.
* Added more rounded corners to several display elements.
1.5.10: December 4, 2008
* Fixed a bug in which certain new installations of Luminotes Desktop

View File

@ -14,6 +14,7 @@ body {
}
.note_frame {
-moz-border-radius: 5px;
text-align: left;
margin: 0em;
padding: 1.5em;

View File

@ -40,10 +40,10 @@
background-image: url(/static/images/toolbar/strikethrough_button.png);
}
#title_button_preload {
#font_button_preload {
height: 0;
overflow: hidden;
background-image: url(/static/images/toolbar/title_button.png);
background-image: url(/static/images/toolbar/font_button.png);
}
#bullet_list_button_preload {
@ -65,6 +65,8 @@
}
.hook_area {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding-top: 1.5em;
padding-bottom: 1.5em;
width: 100%;
@ -156,6 +158,8 @@
}
.thumbnail_area {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: #fffece;
padding-bottom: 0.5em;
}

View File

@ -107,10 +107,10 @@ h1 {
background-image: url(/static/images/toolbar/strikethrough_button_hover.png);
}
#title_button_hover_preload {
#font_button_hover_preload {
height: 0;
overflow: hidden;
background-image: url(/static/images/toolbar/title_button_hover.png);
background-image: url(/static/images/toolbar/font_button_hover.png);
}
#bullet_list_button_hover_preload {
@ -167,10 +167,10 @@ h1 {
background-image: url(/static/images/toolbar/strikethrough_button_down_hover.png);
}
#title_button_down_hover_preload {
#font_button_down_hover_preload {
height: 0;
overflow: hidden;
background-image: url(/static/images/toolbar/title_button_down_hover.png);
background-image: url(/static/images/toolbar/font_button_down_hover.png);
}
#bullet_list_button_down_hover_preload {
@ -227,10 +227,10 @@ h1 {
background-image: url(/static/images/toolbar/strikethrough_button_down.png);
}
#title_button_down_preload {
#font_button_down_preload {
height: 0;
overflow: hidden;
background-image: url(/static/images/toolbar/title_button_down.png);
background-image: url(/static/images/toolbar/font_button_down.png);
}
#bullet_list_button_down_preload {
@ -493,6 +493,9 @@ h1 {
}
.note_button {
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-radius: 4px;
border-style: outset;
border-width: 0px;
background-color: #d0e0f0;
@ -511,9 +514,12 @@ h1 {
#save_button {
margin-left: 0.5em;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
.note_frame {
-moz-border-radius: 5px;
margin: 0em;
padding: 0em;
overflow: hidden;
@ -549,6 +555,7 @@ h1 {
}
.pulldown {
-moz-border-radius: 4px;
position: absolute;
font-size: 72%;
text-align: left;
@ -579,16 +586,23 @@ h1 {
}
.pulldown_label {
-moz-user-select: none;
color: #000000;
text-decoration: none;
}
.font_label {
font-size: 125%;
}
.pulldown_label:hover {
color: #ff6600;
cursor: pointer;
}
.message {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding: 0.5em;
margin-bottom: 0.5em;
font-weight: bold;
@ -596,12 +610,16 @@ h1 {
}
.message_inner {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding: 0.5em;
line-height: 140%;
background-color: #ffaa44;
}
.error {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding: 0.5em;
border: 1px solid #550000;
margin-bottom: 0.5em;
@ -611,6 +629,8 @@ h1 {
}
.error_inner {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding: 0.5em;
line-height: 140%;
color: #ffffff;
@ -618,6 +638,8 @@ h1 {
}
.message_button {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
margin-left: 0.5em;
border-style: outset;
border-width: 0px;
@ -861,6 +883,8 @@ h1 {
}
.hook_action_area {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: #ffff99;
font-weight: bold;
padding: 1em;

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

View File

@ -330,7 +330,7 @@ Wiki.prototype.populate = function ( startup_notes, current_notes, note_read_wri
connect( "italic", "onclick", function ( event ) { self.toggle_button( event, "italic" ); } );
connect( "underline", "onclick", function ( event ) { self.toggle_button( event, "underline" ); } );
connect( "strikethrough", "onclick", function ( event ) { self.toggle_button( event, "strikethrough" ); } );
connect( "title", "onclick", function ( event ) { self.toggle_button( event, "title" ); } );
connect( "font", "onclick", this, "toggle_font_button" );
connect( "insertUnorderedList", "onclick", function ( event ) { self.toggle_button( event, "insertUnorderedList" ); } );
connect( "insertOrderedList", "onclick", function ( event ) { self.toggle_button( event, "insertOrderedList" ); } );
@ -342,7 +342,7 @@ Wiki.prototype.populate = function ( startup_notes, current_notes, note_read_wri
this.make_image_button( "italic" );
this.make_image_button( "underline" );
this.make_image_button( "strikethrough" );
this.make_image_button( "title" );
this.make_image_button( "font" );
this.make_image_button( "insertUnorderedList", "bullet_list" );
this.make_image_button( "insertOrderedList", "numbered_list" );
@ -1332,7 +1332,7 @@ Wiki.prototype.update_toolbar = function() {
this.update_button( "italic", "i", node_names );
this.update_button( "underline", "u", node_names );
this.update_button( "strikethrough", "strike", node_names );
this.update_button( "title", "h3", node_names );
this.update_button( "font", "font", node_names );
this.update_button( "insertUnorderedList", "ul", node_names );
this.update_button( "insertOrderedList", "ol", node_names );
@ -1407,6 +1407,30 @@ Wiki.prototype.toggle_attach_button = function ( event ) {
event.stop();
}
Wiki.prototype.toggle_font_button = function ( event ) {
if ( this.focused_editor && this.focused_editor.read_write ) {
this.focused_editor.focus();
// if a pulldown is already open, then just close it
var existing_div = getElement( "font_pulldown" );
if ( existing_div ) {
this.up_image_button( "font" );
existing_div.pulldown.shutdown();
existing_div.pulldown = null;
return;
}
this.down_image_button( "font" );
this.clear_messages();
this.clear_pulldowns();
new Font_pulldown( this, this.notebook.object_id, this.invoker, event.target(), this.focused_editor );
}
event.stop();
}
Wiki.prototype.hide_editor = function ( event, editor ) {
this.clear_messages();
this.clear_pulldowns();
@ -4196,6 +4220,63 @@ Suggest_pulldown.prototype.shutdown = function () {
}
function Font_pulldown( wiki, notebook_id, invoker, anchor, editor ) {
anchor.pulldown = this;
this.anchor = anchor;
this.editor = editor;
Pulldown.call( this, wiki, notebook_id, "font_pulldown", anchor );
this.invoker = invoker;
var fonts = [
[ "Sans Serif", "sans-serif" ],
[ "Serif", "serif" ],
[ "Monospace", "monospace" ],
[ "Comic", "comic sans ms,sans-serif" ],
[ "Garamond", "garamond,serif" ],
[ "Georgia", "georgia,serif" ],
[ "Tahoma", "tahoma,sans-serif" ],
[ "Trebuchet", "trebuchet ms,sans-serif" ],
[ "Verdana", "verdana,sans-serif" ]
];
var self = this;
for ( var i in fonts ) {
var font = fonts[ i ];
var font_name = font[ 0 ];
var font_family = font[ 1 ];
var label = createDOM( "label", { "class": "pulldown_label font_label", "style": "font-family: " + font_family + ";" },
font_name
);
label.font_family = font_family;
appendChildNodes( this.div, createDOM( "div", {}, label ) );
connect( label, "onclick", function ( event ) { self.font_name_clicked( event ); } );
}
Pulldown.prototype.finish_init.call( this );
}
Font_pulldown.prototype = new function () { this.prototype = Pulldown.prototype; };
Font_pulldown.prototype.constructor = Font_pulldown;
Font_pulldown.prototype.font_name_clicked = function ( event ) {
var label = event.src();
this.editor.focus();
// FIXME: this doesn't work in IE 7 from this click handler, but it works elsewhere (like in the constructor)
this.editor.exec_command( "fontname", label.font_family );
this.shutdown();
}
Font_pulldown.prototype.shutdown = function () {
Pulldown.prototype.shutdown.call( this );
this.anchor.pulldown = null;
disconnectAll( this );
}
function Note_tree( wiki, notebook_id, invoker ) {
this.wiki = wiki;
this.notebook_id = notebook_id;

View File

@ -62,8 +62,8 @@ class Toolbar( Div ):
) ),
Div( Input(
type = u"image",
id = u"title", title = u"title",
src = u"/static/images/toolbar/title_button.png",
id = u"font", title = u"font",
src = u"/static/images/toolbar/font_button.png",
width = u"40", height = u"40",
class_ = "image_button",
) ),
@ -94,7 +94,7 @@ class Toolbar( Div ):
Span( id = "italic_button_hover_preload" ),
Span( id = "underline_button_hover_preload" ),
Span( id = "strikethrough_button_hover_preload" ),
Span( id = "title_button_hover_preload" ),
Span( id = "font_button_hover_preload" ),
Span( id = "bullet_list_button_hover_preload" ),
Span( id = "numbered_list_button_hover_preload" ),
@ -105,7 +105,7 @@ class Toolbar( Div ):
Span( id = "italic_button_down_hover_preload" ),
Span( id = "underline_button_down_hover_preload" ),
Span( id = "strikethrough_button_down_hover_preload" ),
Span( id = "title_button_down_hover_preload" ),
Span( id = "font_button_down_hover_preload" ),
Span( id = "bullet_list_button_down_hover_preload" ),
Span( id = "numbered_list_button_down_hover_preload" ),
@ -116,7 +116,7 @@ class Toolbar( Div ):
Span( id = "italic_button_down_preload" ),
Span( id = "underline_button_down_preload" ),
Span( id = "strikethrough_button_down_preload" ),
Span( id = "title_button_down_preload" ),
Span( id = "font_button_down_preload" ),
Span( id = "bullet_list_button_down_preload" ),
Span( id = "numbered_list_button_down_preload" ),