From 9ffa79e44e24959652cbcd3c587bd35d4576ec31 Mon Sep 17 00:00:00 2001 From: Eston Bond Date: Tue, 2 Nov 2010 16:37:46 -0700 Subject: [PATCH] Adding this before my battery dies --- scratch/js/gollum-editor/gollum.editor.js | 49 ++++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/scratch/js/gollum-editor/gollum.editor.js b/scratch/js/gollum-editor/gollum.editor.js index e3ee688a..9caab8b3 100644 --- a/scratch/js/gollum-editor/gollum.editor.js +++ b/scratch/js/gollum-editor/gollum.editor.js @@ -85,7 +85,7 @@ * */ $.GollumEditor.Dialog = function( argObject ) { - return Dialog.init( argObject ); + Dialog.init( argObject ); }; @@ -414,7 +414,52 @@ * */ var Dialog = { - //TODO + + markupCreated = false, + + createMarkup: function( title, body ) { + return '
' + + '

' + title + '

' + + '
' + body + '
' + '
' + + 'OK' + + '' + + 'Cancel' + + '
'; + }, + + hide: function() { + $('#gollum-editor-dialog') + }, + + init: function( argObject ) { + + }, + + show: function( title, body ) { + if ( Dialog.markupCreated ) { + $('#gollum-editor-dialog').remove(); + } + var $dialog = $( Dialog.createMarkup( title, body ) ); + $('body').append( $dialog ); + Dialog.position(); // position this thing + Dialog.attachEvents(); + $('#gollum-editor-dialog').animate({ opacity: 0 }, { + duration: 1, + complete: function() { + $('#gollum-editor-dialog').addClass('active'); + $('#gollum-editor-dialog').animate({ opacity: 100 }, { + duration: 700 + }); + } + }); + + }, + + position: function() { + + } + }; })(jQuery);