1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 14:21:23 +00:00

Merge branch 'edit'

This commit is contained in:
llj
2013-01-31 11:56:36 +08:00

View File

@@ -120,7 +120,7 @@
<h3>{% trans 'Library' %} <span class="op-target">{{repo.name}}</span> {% trans 'is encrypted' %}</h3> <h3>{% trans 'Library' %} <span class="op-target">{{repo.name}}</span> {% trans 'is encrypted' %}</h3>
<label>{% trans 'Password' %}</label><br /> <label>{% trans 'Password' %}</label><br />
<input type="password" name="password" maxlength="15" class="long-input" /> <input type="password" name="password" maxlength="15" class="long-input" />
<p class="tip">{% trans 'The password will be kept in the server for only 1 hour.' %}</p> <p class="tip">{% trans "The password will be kept in the server for only 1 hour." %}</p>
<p class="error"></p> <p class="error"></p>
<input type="submit" class="submit" value="{% trans 'Submit' %}" /> <input type="submit" class="submit" value="{% trans 'Submit' %}" />
<button class="simplemodal-close">{% trans 'Cancel' %}</button> <button class="simplemodal-close">{% trans 'Cancel' %}</button>
@@ -184,6 +184,10 @@ var editor = CodeMirror.fromTextArea($('#docu-view')[0], {
if (cursor.yBot >= $(window).height() + $(window).scrollTop() - 60) { if (cursor.yBot >= $(window).height() + $(window).scrollTop() - 60) {
$(window).scrollTop($(window).scrollTop() + parseInt($('#file-edit').css('padding-bottom'))); $(window).scrollTop($(window).scrollTop() + parseInt($('#file-edit').css('padding-bottom')));
} }
// keep the cursor visible when path-op fixed and moving the cursor upward
if (cursor.y - $(window).scrollTop() < $('#path-op').outerHeight()) {
$(window).scrollTop(cursor.y - $('#path-op').outerHeight());
}
}, },
autofocus: true autofocus: true
}); });