24d3e25126
This patch resolves #295 by making the Download Settings fieldset collapsed by default and moving the examples of URIs in textarea into the placeholder of textarea itself. It also allows form submission when textarea is focused by pressing Ctrl+Enter.
17 lines
406 B
JavaScript
17 lines
406 B
JavaScript
webui.directive("textarea", function() {
|
|
return {
|
|
restrict: "E",
|
|
link: function(scope, element) {
|
|
element.attr(
|
|
"placeholder",
|
|
element.attr("placeholder").replace(/\\n/g, "\n")
|
|
).bind("keydown keypress", function(event) {
|
|
if (event.ctrlKey && event.which === 13) {
|
|
event.preventDefault();
|
|
scope.$close();
|
|
}
|
|
});
|
|
}
|
|
};
|
|
});
|