Egregious bugs
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
Gollum Editor
|
Gollum Editor
|
||||||
- Style / Generate dialogs
|
- Style / Generate dialogs
|
||||||
- Dynamically show/hide different function bar buttons based on active language capabilities
|
|
||||||
- Def: Org
|
- Def: Org
|
||||||
- Def: Pod
|
- Def: Pod
|
||||||
- Def: RDoc
|
- Def: RDoc
|
||||||
|
|||||||
@@ -71,6 +71,10 @@
|
|||||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#gollum-editor #gollum-editor-function-bar a.disabled {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
#gollum-editor #gollum-editor-function-bar span.function-divider {
|
#gollum-editor #gollum-editor-function-bar span.function-divider {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
@@ -41,14 +41,6 @@
|
|||||||
<span class="function-divider"> </span>
|
<span class="function-divider"> </span>
|
||||||
<a href="#" id="function-link" class="function-button">Link</a>
|
<a href="#" id="function-link" class="function-button">Link</a>
|
||||||
<a href="#" id="function-image" class="function-button">Image</a>
|
<a href="#" id="function-image" class="function-button">Image</a>
|
||||||
|
|
||||||
<div id="gollum-editor-format-selector">
|
|
||||||
<select name="gollum-editor-format-select"
|
|
||||||
id="gollum-editor-format-select" disabled>
|
|
||||||
<option name="Markdown" value="markdown" selected>
|
|
||||||
Markdown</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<fieldset id="gollum-editor-fields">
|
<fieldset id="gollum-editor-fields">
|
||||||
<textarea id="gollum-editor-body"
|
<textarea id="gollum-editor-body"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Usage:
|
* Usage:
|
||||||
* $.GollumEditor(); on DOM ready.
|
* $.GollumEditor(); on DOM ready.
|
||||||
*/
|
*/
|
||||||
(function($) {
|
// (function($) {
|
||||||
|
|
||||||
// Editor options
|
// Editor options
|
||||||
var DefaultOptions = {
|
var DefaultOptions = {
|
||||||
@@ -258,8 +258,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
activate: function() {
|
activate: function() {
|
||||||
$('#gollum-editor-function-bar a.function-button')
|
// check these out
|
||||||
.click( FunctionBar.evtFunctionButtonClick );
|
$('#gollum-editor-function-bar a.function-button').each(function() {
|
||||||
|
if ( LanguageDefinition.getDefinitionFor( $(this).attr('id') ) )
|
||||||
|
$(this).click( FunctionBar.evtFunctionButtonClick );
|
||||||
|
else
|
||||||
|
$(this).addClass('disabled');
|
||||||
|
});
|
||||||
|
|
||||||
// show bar as active
|
// show bar as active
|
||||||
$('#gollum-editor-function-bar').addClass( 'active' );
|
$('#gollum-editor-function-bar').addClass( 'active' );
|
||||||
FunctionBar.isActive = true;
|
FunctionBar.isActive = true;
|
||||||
@@ -422,7 +428,7 @@
|
|||||||
*/
|
*/
|
||||||
var Dialog = {
|
var Dialog = {
|
||||||
|
|
||||||
markupCreated = false,
|
markupCreated: false,
|
||||||
|
|
||||||
attachEvents: function( evtOK ) {
|
attachEvents: function( evtOK ) {
|
||||||
$('#gollum-editor-action-ok').click( Dialog.eventOK( evtOK ) );
|
$('#gollum-editor-action-ok').click( Dialog.eventOK( evtOK ) );
|
||||||
@@ -457,7 +463,7 @@
|
|||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
$('#gollum-editor-dialog').animate({ opacity: 0 }, {
|
$('#gollum-editor-dialog').animate({ opacity: 0 }, {
|
||||||
duration: 700
|
duration: 700,
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$('#gollum-editor-dialog').removeClass('active');
|
$('#gollum-editor-dialog').removeClass('active');
|
||||||
}
|
}
|
||||||
@@ -506,7 +512,7 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
})(jQuery);
|
// })(jQuery);
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
$.GollumEditor();
|
$.GollumEditor();
|
||||||
|
|||||||
@@ -103,6 +103,6 @@ var ASCIIDoc = {
|
|||||||
|
|
||||||
|
|
||||||
// this is necessary for GollumEditor to pick this up
|
// this is necessary for GollumEditor to pick this up
|
||||||
jQuery.GollumEditor.defineLanguage('markdown', ASCIIDoc);
|
jQuery.GollumEditor.defineLanguage('asciidoc', ASCIIDoc);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ var MarkDown = {
|
|||||||
'function-blockquote' : {
|
'function-blockquote' : {
|
||||||
search: /(.+)([\n]?)/gi,
|
search: /(.+)([\n]?)/gi,
|
||||||
replace: "> $1$2"
|
replace: "> $1$2"
|
||||||
},
|
},
|
||||||
|
|
||||||
'function-link' : {
|
'function-link' : {
|
||||||
exec: function( txt, selText, $field ) {
|
exec: function( txt, selText, $field ) {
|
||||||
|
|||||||
@@ -106,6 +106,6 @@ var Textile = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.GollumEditor.defineLanguage('markdown', Textile);
|
jQuery.GollumEditor.defineLanguage('textile', Textile);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user