Fix code formatting and minor errors
@@ -423,6 +423,7 @@ var conditionalAuthFunctions = $.parseJSON('<%=availableJsFunctionsJson%>');
CodeMirror.commands.autocomplete(myCodeMirror, null, {completeSingle: false})
});
+ var contentToggle = 0;
$("#enableScript").click(function () {
checkScriptEnabled();
@@ -449,8 +450,6 @@ var conditionalAuthFunctions = $.parseJSON('<%=availableJsFunctionsJson%>');
showHideTemplateList();
}
- var contentToggle = 0;
-
addTemplate.click(function (e) {
showHideTemplateList();
e.preventDefault();
@@ -462,14 +461,14 @@ var conditionalAuthFunctions = $.parseJSON('<%=availableJsFunctionsJson%>');
if (contentToggle == 0) {
addTemplate.css("background-image", "url(images/templates.png)");
- templates.animate({width: 25}, { duration: 300, queue: false });
- codeMirror.animate({marginRight: 26}, { duration: 200, queue: false });
+ templates.animate({width: 25}, {duration: 50, queue: false});
+ codeMirror.animate({marginRight: 26}, {duration: 125, queue: false});
contentToggle = 1;
}
- else if (contentToggle == 1) {
+ else {
addTemplate.css("background-image", "url(images/template-close.png)");
- codeMirror.animate({marginRight: 212}, { duration: 300, queue: false });
- templates.animate({width:210},{ duration: 200, queue: false });
+ codeMirror.animate({marginRight: 212}, {duration: 125, queue: false});
+ templates.animate({width: 210}, {duration: 50, queue: false});
contentToggle = 0;
}
}
