From: Lukasz Rekucki Date: Thu, 20 Aug 2009 21:20:59 +0000 (+0200) Subject: Merge branch 'master' of git@stigma:platforma X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/8dab5054c8fd93cbb2c3067fe48a5efff0c75867?hp=7a3192417060241aa0956762a5e101b5b893d22b Merge branch 'master' of git@stigma:platforma --- diff --git a/project/static/css/master.css b/project/static/css/master.css index 03bcd210..1efa2d66 100644 --- a/project/static/css/master.css +++ b/project/static/css/master.css @@ -74,10 +74,13 @@ label { overflow-y: scroll; } +#whatever { + float: left; +} + #images-wrap { - width: 0px; +/* width: 0px;*/ height: 480px; - border-right: 1px solid #999; overflow-y: scroll; overflow-x: hidden; background-color: #fff; @@ -91,15 +94,17 @@ label { } #toggle-sidebar { + border-left: 1px solid #999; + border-right: 1px solid #999; background-color: #DDD; - width: 7px; + width: 8px; height: 100%; float: left; } #toggle-sidebar:hover { background-color: #999; - cursor: pointer; + cursor: col-resize; } #status-bar { @@ -133,7 +138,7 @@ p { margin: 0; padding: 0; background-color: #CCC; - border-bottom: 1px solid #AAA; + border-top: 1px solid #AAA; } #toolbar { @@ -141,15 +146,26 @@ p { width: 400%; } -#toolbar-tabs li { +#sidebar-toolbar, #sidebar-toolbar ol { + overflow: hidden; + display: block; + margin: 0; + padding: 0; + background-color: #CCC; + border-bottom: 1px solid #AAA; +} + +#sidebar-toolbar { + width: 0; +} + +#sidebar-tabs li, #toolbar-tabs li { font-size: 14px; display: block; float: left; - margin: 4px 4px 0 0; + margin: 4px 0 -1px 4px; padding: 2px 10px 0 10px; - border-left: 1px solid #EEE; - border-right: 1px solid #AAA; - margin-bottom: -1px; + background-color: #CCC; border: 1px solid #AAA; border-radius-topleft: 8px; border-radius-topright: 8px; @@ -159,7 +175,13 @@ p { -webkit-border-top-right-radius: 8px; } -#toolbar-tabs li:hover, #toolbar-tabs li.active { +#sidebar-tabs, #toolbar-tabs { + height: 21px; + z-index: 1000; +/* overflow: hidden;*/ +} + +#sidebar-tabs li:hover, #sidebar-tabs li.active, #toolbar-tabs li:hover, #toolbar-tabs li.active { cursor: default; background-color: #EEE; border-bottom: 1px solid #EEE; @@ -167,6 +189,7 @@ p { #toolbar-buttons { background-color: #EEE; + border-bottom: 1px solid #AAA; } #toolbar-buttons li { diff --git a/project/static/js/jquery.fieldselection.js b/project/static/js/jquery.fieldselection.js deleted file mode 100644 index 448f9dc0..00000000 --- a/project/static/js/jquery.fieldselection.js +++ /dev/null @@ -1,65 +0,0 @@ -(function() { - jQuery.fn.getSelection = function() { - var e = (this.jquery) ? this[0] : this; - - return ( - // Mozilla / dom 3.0 - ('selectionStart' in e && function() { - var l = e.selectionEnd - e.selectionStart; - return { start: e.selectionStart, end: e.selectionEnd, length: l, text: e.value.substr(e.selectionStart, l) }; - }) || - - // Internet Explorer - (document.selection && function() { - e.focus(); - - var r = document.selection.createRange(); - if (r === null) { - return { start: 0, end: e.value.length, length: 0 } - } - - var re = e.createTextRange(); - var rc = re.duplicate(); - re.moveToBookmark(r.getBookmark()); - rc.setEndPoint('EndToStart', re); - - return { start: rc.text.length, end: rc.text.length + r.text.length, length: r.text.length, text: r.text }; - }) || - - // browser not supported - function() { return null; } - )(); - }, - - jQuery.fn.replaceSelection = function() { - var e = this.jquery ? this[0] : this; - var text = arguments[0] || ''; - var scrollTop = $(this).scrollTop(); - - return ( - // Mozilla / dom 3.0 - ('selectionStart' in e && function() { - var selectionStart = e.selectionStart; - console.log(e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length)); - e.value = e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length); - $(e).scrollTop(scrollTop).focus(); - e.selectionStart = selectionStart + text.length; - e.selectionEnd = selectionStart + text.length; - return this; - }) || - - // Internet Explorer - (document.selection && function() { - e.focus(); - document.selection.createRange().text = text; - return this; - }) || - - // browser not supported - function() { - e.value += text; - return jQuery(e); - } - )(); - } -})(); \ No newline at end of file diff --git a/project/static/js/jquery.resizable.js b/project/static/js/jquery.resizable.js new file mode 100644 index 00000000..44111ee9 --- /dev/null +++ b/project/static/js/jquery.resizable.js @@ -0,0 +1,44 @@ +(function($){ + $.resizable = { + settings: {}, + element: {}, + drag: function(event) { + $.resizable.element.element.css({ + width: Math.max(event.pageX - $.resizable.element.mouseX + $.resizable.element.width, + $.resizable.settings.minWidth) + }) + $.resizable.element.element.trigger('resizable:resize'); + return false; + }, + stop: function(event) { + $.resizable.element.element.trigger('resizable:stop'); + $(document).unbind('mousemove', $.resizable.drag).unbind('mouseup', $.resizable.stop) + $('body').css('cursor', 'auto'); + return false; + } + }; + + $.fn.resizable = function(handle, options) { + var settings = { + minWidth: 0, + maxWidth: $(window).width() + } + + $.extend(settings, options); + + var element = $(this); + + $(handle, element).mousedown(function(event) { + var position = element.position(); + $.resizable.settings = settings; + $.resizable.element = { + element: element, + width: parseInt(element.css('width')) || element[0].scrollWidth || 0, + mouseX: event.pageX, + }; + $(document).mousemove($.resizable.drag).mouseup($.resizable.stop); + $('body').css('cursor', 'col-resize'); + }).bind('dragstart', function(event) { event.preventDefault() }); + }; +})(jQuery); + diff --git a/project/templates/explorer/file_xml.html b/project/templates/explorer/file_xml.html index 314c08e3..54583e57 100644 --- a/project/templates/explorer/file_xml.html +++ b/project/templates/explorer/file_xml.html @@ -2,36 +2,27 @@ {% load toolbar_tags %} {% block extrahead %} - +