mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 22:33:17 +00:00
Merge branch 'edit'
This commit is contained in:
@@ -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
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user