diff --git a/lib/gollum/frontend/public/javascript/gollum.dialog.js b/lib/gollum/frontend/public/javascript/gollum.dialog.js index c6252a02..6594a756 100644 --- a/lib/gollum/frontend/public/javascript/gollum.dialog.js +++ b/lib/gollum/frontend/public/javascript/gollum.dialog.js @@ -12,10 +12,10 @@ markupCreated: false, attachEvents: function( evtOK ) { - $('#gollum-editor-action-ok').click(function( e ) { + $('#gollum-dialog-action-ok').click(function( e ) { Dialog.eventOK( e, evtOK ); }); - $('#gollum-editor-action-cancel').click( Dialog.eventCancel ); + $('#gollum-dialog-action-cancel').click( Dialog.eventCancel ); }, createFieldMarkup: function( fieldArray ) { @@ -59,7 +59,7 @@ if ( fieldAttributes.type == 'code' ) { html+= ' class="code"'; } - html += ' id="gollum-editor-dialog-generated-field-' + + html += ' id="gollum-dialog-dialog-generated-field-' + fieldAttributes.id + '">'; } @@ -68,16 +68,16 @@ createMarkup: function( title, body ) { Dialog.markupCreated = true; - return '
' + - '
' + - '
' + - '

' + + return '
' + + '
' + + '
' + + '

' + title +'

' + - '
' + body + '
' + - '' + + '
' + + 'Cancel' + - 'OK' + '
' + '
' + @@ -95,7 +95,7 @@ var results = []; // get the results from each field and build them into the object - $('#gollum-editor-dialog-body input').each(function() { + $('#gollum-dialog-dialog-body input').each(function() { results[$(this).attr('name')] = $(this).val(); }); @@ -108,10 +108,10 @@ }, hide: function() { - $('#gollum-editor-dialog').animate({ opacity: 0 }, { + $('#gollum-dialog-dialog').animate({ opacity: 0 }, { duration: 200, complete: function() { - $('#gollum-editor-dialog').removeClass('active'); + $('#gollum-dialog-dialog').removeClass('active'); } }); }, @@ -137,7 +137,7 @@ } if ( Dialog.markupCreated ) { - $('#gollum-editor-dialog').remove(); + $('#gollum-dialog-dialog').remove(); } var $dialog = $( Dialog.createMarkup( title, body ) ); $('body').append( $dialog ); @@ -153,12 +153,12 @@ debug('Dialog: No markup to show. Please use init first.') } else { debug('Showing dialog'); - $('#gollum-editor-dialog').animate({ opacity: 0 }, { + $('#gollum-dialog-dialog').animate({ opacity: 0 }, { duration: 1, complete: function() { - $('#gollum-editor-dialog').addClass('active'); + $('#gollum-dialog-dialog').addClass('active'); Dialog.position(); // position this thing - $('#gollum-editor-dialog').animate({ opacity: 1 }, { + $('#gollum-dialog-dialog').animate({ opacity: 1 }, { duration: 500 }); } @@ -167,9 +167,9 @@ }, position: function() { - var dialogHeight = $('#gollum-editor-dialog-inner').height(); + var dialogHeight = $('#gollum-dialog-dialog-inner').height(); debug(dialogHeight); - $('#gollum-editor-dialog-inner') + $('#gollum-dialog-dialog-inner') .css('height', dialogHeight + 'px') .css('margin-top', -1 * parseInt( dialogHeight / 2 )); }