--- /dev/null
+(function($){
+ $.resizable = {
+ element: {},
+ drag: function(event) {
+ $.resizable.element.element.css({
+ width: Math.max(event.pageX - $.resizable.element.mouseX + $.resizable.element.width, 0)
+ })
+ $.resizable.element.element.trigger('resizable:resize');
+ return false;
+ },
+ stop: function() {
+ $.resizable.element.element.trigger('resizable:stop');
+ $().unbind('mousemove', $.resizable.drag).unbind('mouseup', $.resizable.stop);
+ return false;
+ }
+ };
+
+ $.fn.resizable = function(handle) {
+ var element = $(this);
+ $(handle, element).mousedown(function(event) {
+ var position = element.position();
+ $.resizable.element = {
+ element: element,
+ width: parseInt(element.css('width')) || element[0].scrollWidth || 0,
+ mouseX: event.pageX,
+ };
+ $().mousemove($.resizable.drag).mouseup($.resizable.stop);
+ });
+ };
+})(jQuery);
+
<script src="/static/js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/js/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
+ <script src="/static/js/jquery.resizable.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$('#id_folders').change(function() {
$('#images').load('{% url folder_image_ajax %}' + $('#id_folders').val() + '/', function() {
- $('#images').data('lastScroll', -1000);
+ $('#images-wrap').data('lazyload:lastCheckedScrollTop', -10000);
});
});
$('iframe').width($(window).width() - $('#sidebar').outerWidth());
$('iframe').height($(window).height() - 100);
$('#images-wrap, #toggle-sidebar').height($(window).height() - 100);
+ $('#images-wrap').width($('#sidebar').width() - 8);
}
$('#toggle-sidebar').toggle(function() {
return event.ctrlKey && keys[event.keyCode];
});
+ // $('#sidebar').bind('resizable:resize', resizePanels).resizable('#toggle-sidebar');
+
resizePanels();
}
});