From: Łukasz Rekucki Date: Mon, 24 Aug 2009 15:59:05 +0000 (+0200) Subject: Merge branch 'master' of git@stigma:platforma X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/b157bbf02932396c65c0aca9638c96200c4665df?hp=c7917ce18f0f62eac89e1eb4b6ae6d8c48133600 Merge branch 'master' of git@stigma:platforma Conflicts: project/static/js/jquery.hpanel.js project/static/js/panels.js project/templates/explorer/panels/xmleditor.html --- diff --git a/apps/toolbar/templates/toolbar/toolbar.html b/apps/toolbar/templates/toolbar/toolbar.html index c508929f..c6b5ebb9 100644 --- a/apps/toolbar/templates/toolbar/toolbar.html +++ b/apps/toolbar/templates/toolbar/toolbar.html @@ -1,14 +1,14 @@ {% load toolbar_tags %} -
-
    +
    +
      {% for group in groups %}
    1. {{ group.name }}
    2. {% endfor %}
     
    -
    +
    {% for group in groups %} -
      +
        {% for button in group.button_set.all %}
      1. {{ button.label }}
      2. {% endfor %} diff --git a/project/static/css/master.css b/project/static/css/master.css index 88e6583e..76a56325 100644 --- a/project/static/css/master.css +++ b/project/static/css/master.css @@ -194,12 +194,12 @@ label { /* = XML Editor panel = */ /* ==================== */ -#toolbar { +.toolbar { height: 48px; overflow: hidden; } -#toolbar, #toolbar ol, #sidebar-toolbar, #sidebar-toolbar ol { +.toolbar, .toolbar ol { /* overflow: hidden;*/ display: block; margin: 0; @@ -208,15 +208,7 @@ label { border-top: 1px solid #AAA; } -#sidebar-toolbar { - width: 0; -} - -#sidebar-toolbar, #sidebar-toolbar ol { - overflow: hidden; -} - -#sidebar-tabs li, #toolbar-tabs li { +.toolbar-tabs li { font-size: 14px; display: block; float: left; @@ -232,24 +224,24 @@ label { -webkit-border-top-right-radius: 8px; } -#sidebar-tabs, #toolbar-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 { +.toolbar-tabs li:hover, .toolbar-tabs li.active { cursor: default; background-color: #EEE; border-bottom: 1px solid #EEE; } -#toolbar-buttons { +.toolbar-buttons { background-color: #EEE; border-bottom: 1px solid #AAA; } -#toolbar-buttons li { +.toolbar-buttons li { display: block; font-size: 12px; padding: 1px 8px; @@ -260,7 +252,7 @@ label { float: left; } -#toolbar-buttons li:hover { +.toolbar-buttons li:hover { background-color: #777; color: #FFF; cursor: default; @@ -280,3 +272,6 @@ div.isection p { margin: 0.5em 1em; } +.change-notification { + color: red; +} diff --git a/project/static/js/jquery.hpanel.js b/project/static/js/jquery.hpanel.js index d33e47fb..2f917a88 100644 --- a/project/static/js/jquery.hpanel.js +++ b/project/static/js/jquery.hpanel.js @@ -5,7 +5,6 @@ settings: {}, current_data: {}, resize_start: function(event, mydata) { - $.log('Overlay: ' + mydata.overlay); $(document).bind('mousemove', mydata, $.hpanel.resize_changed). bind('mouseup', mydata, $.hpanel.resize_stop); @@ -43,10 +42,8 @@ $.fn.makeHorizPanel = function(options) { - $.log('Making an hpanel out of "#' + $(this).attr('id') + '"'); var root = $(this) var all_panels = $('.panel-wrap', root) - $.log('Panels: ' + all_panels); /* create an overlay */ var overlay_root = $("
        "); diff --git a/project/static/js/jquery.resizable.js b/project/static/js/jquery.resizable.js deleted file mode 100644 index 3fae2bf0..00000000 --- a/project/static/js/jquery.resizable.js +++ /dev/null @@ -1,54 +0,0 @@ -(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(options) { - var settings = { - minWidth: 0, - maxWidth: $(window).width() - } - - $.extend(settings, options); - - var element = $(this); - var handle = $('.panel-slider', element) - - handle.mousedown(function(event) { - var position = element.position(); - console.log('Mouse down on position: ' + position); - /* from this point on, the panel should resize events */ - - /* $.resizable.settings = settings; - $.resizable.data = { - element: element, - width: parseInt(element.css('width')) || element[0].scrollWidth || 0, - mouseX: event.pageX, - }; */ - - $(document).mousemove($.resizable.ondrag, element).mouseup($.resizable.stop, element); - /* $('body').css('cursor', 'col-resize'); */ - }); - - /* stop drag events */ - handle.bind('dragstart', function(event) { event.preventDefault(); }) - .bind('drag', function(event) { event.preventDefault(); }) - .bind('draggesture', function(event) { event.preventDefault(); }); - }; -})(jQuery); - diff --git a/project/static/js/panels.js b/project/static/js/panels.js index d5fc757d..c53d1354 100644 --- a/project/static/js/panels.js +++ b/project/static/js/panels.js @@ -1,15 +1,13 @@ function loadPanel(target, url) { $.log('ajax', url, 'into', target); + $('.change-notification', $(target).parent()).fadeOut(); $(document).trigger('panel:unload', target); $.ajax({ url: url, dataType: 'html', success: function(data, textStatus) { - $.log(target, 'ajax success'); $(target).html(data); - $.log(target, 'triggering panel:load'); $(document).trigger('panel:load', target); - // panel(target); }, error: function(request, textStatus, errorThrown) { $.log('ajax', url, target, 'error:', textStatus, errorThrown); @@ -24,21 +22,17 @@ function panel(load, unload) { unloadHandler = function(event, panel) { if (self && self == panel) { - $.log('Panel', panel, 'unloading'); $(document).unbind('panel:unload.' + eventId); $(panel).html(''); unload(event, panel); - $.log('Panel', panel, 'unloaded'); return false; } }; $(document).one('panel:load', function(event, panel) { self = panel; - $.log('Panel', panel, 'loading'); $(document).bind('panel:unload.' + eventId, unloadHandler); load(event, panel); - $.log('Panel', panel, 'loaded'); }); } diff --git a/project/templates/explorer/file_xml.html b/project/templates/explorer/file_xml.html index c6caca69..a109f93b 100644 --- a/project/templates/explorer/file_xml.html +++ b/project/templates/explorer/file_xml.html @@ -5,7 +5,6 @@ - {% endblock extrahead %} @@ -16,23 +15,26 @@
        - - + + +
        - + +
        diff --git a/project/templates/explorer/panels/gallery.html b/project/templates/explorer/panels/gallery.html index d35366e1..60935bcd 100644 --- a/project/templates/explorer/panels/gallery.html +++ b/project/templates/explorer/panels/gallery.html @@ -27,7 +27,6 @@ $(window).bind('resize', {'panel': panel}, resizeEditor); resizeEditor(null, panel); }, function(event, panel) { - console.log('unloaded gallery panel', panel); }); })() diff --git a/project/templates/explorer/panels/htmleditor.html b/project/templates/explorer/panels/htmleditor.html index 0eab0b28..3b1791e1 100644 --- a/project/templates/explorer/panels/htmleditor.html +++ b/project/templates/explorer/panels/htmleditor.html @@ -5,14 +5,14 @@
        \ No newline at end of file diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index 350f6e85..0c8724fd 100644 --- a/project/templates/explorer/panels/xmleditor.html +++ b/project/templates/explorer/panels/xmleditor.html @@ -7,49 +7,71 @@ - -