diff --git a/NEWS b/NEWS index 181fef8..55fc268 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/static/css/download.css b/static/css/download.css index 7db9333..9b59eaf 100644 --- a/static/css/download.css +++ b/static/css/download.css @@ -14,6 +14,7 @@ body { } .note_frame { + -moz-border-radius: 5px; text-align: left; margin: 0em; padding: 1.5em; diff --git a/static/css/product.css b/static/css/product.css index 1b7a93c..3d45509 100644 --- a/static/css/product.css +++ b/static/css/product.css @@ -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; } diff --git a/static/css/style.css b/static/css/style.css index 8c92468..4eaa119 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -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; diff --git a/static/images/toolbar/font_button.png b/static/images/toolbar/font_button.png new file mode 100644 index 0000000..9372ee9 Binary files /dev/null and b/static/images/toolbar/font_button.png differ diff --git a/static/images/toolbar/font_button.xcf b/static/images/toolbar/font_button.xcf new file mode 100644 index 0000000..4331ad9 Binary files /dev/null and b/static/images/toolbar/font_button.xcf differ diff --git a/static/images/toolbar/font_button_down.png b/static/images/toolbar/font_button_down.png new file mode 100644 index 0000000..7c0de1e Binary files /dev/null and b/static/images/toolbar/font_button_down.png differ diff --git a/static/images/toolbar/font_button_down.xcf b/static/images/toolbar/font_button_down.xcf new file mode 100644 index 0000000..d9b9dea Binary files /dev/null and b/static/images/toolbar/font_button_down.xcf differ diff --git a/static/images/toolbar/font_button_down_hover.png b/static/images/toolbar/font_button_down_hover.png new file mode 100644 index 0000000..1294bcd Binary files /dev/null and b/static/images/toolbar/font_button_down_hover.png differ diff --git a/static/images/toolbar/font_button_down_hover.xcf b/static/images/toolbar/font_button_down_hover.xcf new file mode 100644 index 0000000..e616221 Binary files /dev/null and b/static/images/toolbar/font_button_down_hover.xcf differ diff --git a/static/images/toolbar/font_button_hover.png b/static/images/toolbar/font_button_hover.png new file mode 100644 index 0000000..927c7bf Binary files /dev/null and b/static/images/toolbar/font_button_hover.png differ diff --git a/static/images/toolbar/font_button_hover.xcf b/static/images/toolbar/font_button_hover.xcf new file mode 100644 index 0000000..ce96066 Binary files /dev/null and b/static/images/toolbar/font_button_hover.xcf differ diff --git a/static/images/toolbar/small/font_button.png b/static/images/toolbar/small/font_button.png new file mode 100644 index 0000000..e0d67b8 Binary files /dev/null and b/static/images/toolbar/small/font_button.png differ diff --git a/static/images/toolbar/small/font_button.xcf b/static/images/toolbar/small/font_button.xcf new file mode 100644 index 0000000..fc89f25 Binary files /dev/null and b/static/images/toolbar/small/font_button.xcf differ diff --git a/static/images/toolbar/small/font_button_down.png b/static/images/toolbar/small/font_button_down.png new file mode 100644 index 0000000..eedcfbf Binary files /dev/null and b/static/images/toolbar/small/font_button_down.png differ diff --git a/static/images/toolbar/small/font_button_down.xcf b/static/images/toolbar/small/font_button_down.xcf new file mode 100644 index 0000000..94b8e52 Binary files /dev/null and b/static/images/toolbar/small/font_button_down.xcf differ diff --git a/static/images/toolbar/small/font_button_down_hover.png b/static/images/toolbar/small/font_button_down_hover.png new file mode 100644 index 0000000..549562c Binary files /dev/null and b/static/images/toolbar/small/font_button_down_hover.png differ diff --git a/static/images/toolbar/small/font_button_down_hover.xcf b/static/images/toolbar/small/font_button_down_hover.xcf new file mode 100644 index 0000000..b306a10 Binary files /dev/null and b/static/images/toolbar/small/font_button_down_hover.xcf differ diff --git a/static/images/toolbar/small/font_button_hover.png b/static/images/toolbar/small/font_button_hover.png new file mode 100644 index 0000000..6b9925e Binary files /dev/null and b/static/images/toolbar/small/font_button_hover.png differ diff --git a/static/images/toolbar/small/font_button_hover.xcf b/static/images/toolbar/small/font_button_hover.xcf new file mode 100644 index 0000000..9adf123 Binary files /dev/null and b/static/images/toolbar/small/font_button_hover.xcf differ diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 308737c..d29e79c 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -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; diff --git a/view/Toolbar.py b/view/Toolbar.py index f5fbd85..0b8bafd 100644 --- a/view/Toolbar.py +++ b/view/Toolbar.py @@ -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" ),