Hide help if there is no help definition for the given language
This commit is contained in:
@@ -550,6 +550,9 @@
|
|||||||
// deactivate the function bar; it's not gonna work now
|
// deactivate the function bar; it's not gonna work now
|
||||||
FunctionBar.deactivate();
|
FunctionBar.deactivate();
|
||||||
}
|
}
|
||||||
|
if ( Help.isShown() ) {
|
||||||
|
Help.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -775,6 +778,27 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
hide: function() {
|
||||||
|
$('#gollum-editor-help').animate({
|
||||||
|
opacity: 0
|
||||||
|
}, 200,
|
||||||
|
function() {
|
||||||
|
$('#gollum-editor-help')
|
||||||
|
.animate({ height: 'hide' }, 200);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
show: function() {
|
||||||
|
$('#gollum-editor-help').animate({
|
||||||
|
height: 'show'
|
||||||
|
}, 200,
|
||||||
|
function() {
|
||||||
|
$('#gollum-editor-help')
|
||||||
|
.animate({ opacity: 1 }, 300);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Help.showHelpFor
|
* Help.showHelpFor
|
||||||
* Displays the actual help content given the two menu indexes, which are
|
* Displays the actual help content given the two menu indexes, which are
|
||||||
@@ -809,6 +833,11 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
isShown: function() {
|
||||||
|
return ( $('#gollum-editor-help').is(':visible') );
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Help.isValidHelpFormat
|
* Help.isValidHelpFormat
|
||||||
* Does a quick check to make sure that the help definition isn't in a
|
* Does a quick check to make sure that the help definition isn't in a
|
||||||
@@ -862,25 +891,8 @@
|
|||||||
*/
|
*/
|
||||||
evtHelpButtonClick: function( e ) {
|
evtHelpButtonClick: function( e ) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if ( Help.isShown() ) Help.hide();
|
||||||
// cascaded animations are prettier
|
else Help.show();
|
||||||
if ( $('#gollum-editor-help').is(':visible') ) {
|
|
||||||
$('#gollum-editor-help').animate({
|
|
||||||
opacity: 0
|
|
||||||
}, 200,
|
|
||||||
function() {
|
|
||||||
$('#gollum-editor-help')
|
|
||||||
.animate({ height: 'hide' }, 200);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$('#gollum-editor-help').animate({
|
|
||||||
height: 'show'
|
|
||||||
}, 200,
|
|
||||||
function() {
|
|
||||||
$('#gollum-editor-help')
|
|
||||||
.animate({ opacity: 1 }, 300);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* IE7 Styles
|
* IE7 Styles
|
||||||
* Fix how text selections occur in IE7/8 so we actually get the right text
|
* Fix how text selections occur in IE7/8 so we actually get the right text
|
||||||
* Figure out why Dialogs won't fire in IE7 (likely a css issue)
|
* Figure out why Dialogs won't fire in IE7 (likely a css issue)
|
||||||
* Hide help if the new JS file doesn't have working help.
|
|
||||||
* Hide function bar if language definition is malformed (non-404 results)
|
|
||||||
|
|
||||||
* Write Editor/Sidebar implementation notes for Rick
|
* Write Editor/Sidebar implementation notes for Rick
|
||||||
* Find some clever way to represent page hierarchy.
|
* Find some clever way to represent page hierarchy.
|
||||||
|
|||||||
Reference in New Issue
Block a user