From 155bc1a4ec4af72643d2c2f18a09cbd1c732712a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Wed, 26 Aug 2009 10:54:25 +0200 Subject: [PATCH 1/1] =?utf8?q?Dziwny=20merge,=20zwa=C5=BCywszy,=20=C5=BCe?= =?utf8?q?=20wcze=C5=9Bniej=20da=C5=82em=20mv=20panels.js=20editor.js.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/static/js/panels.js | 67 ------------------------ project/templates/explorer/file_xml.html | 1 - 2 files changed, 68 deletions(-) delete mode 100644 project/static/js/panels.js diff --git a/project/static/js/panels.js b/project/static/js/panels.js deleted file mode 100644 index d04b4212..00000000 --- a/project/static/js/panels.js +++ /dev/null @@ -1,67 +0,0 @@ -function Panel(target) { - var self = this; - this.target = target; - this.instanceId = Math.ceil(Math.random() * 1000000000); - $.log('new panel - target: ', this.target); - $(document).bind('panel:unload.' + this.instanceId, - function(event, data) { self.unload(event, data); }); -} - -Panel.prototype.load = function (url) { - $.log('preparing xhr load: ', this.target); - $('.change-notification', $(this.target).parent()).fadeOut(); - $(document).trigger('panel:unload', this.target); - var self = this; - - $.ajax({ - url: url, - dataType: 'html', - success: function(data, tstat) { - load_callback = unload_callback = null; - $(self.target).html(data); - self._onUnload = unload_callback; - - if(load_callback != null) { - $.log('Invoking panel load callback.'); - load_callback(self); - } - }, - error: function(request, textStatus, errorThrown) { - $.log('ajax', url, this.target, 'error:', textStatus, errorThrown); - } - }); -} - -Panel.prototype.unload = function(event, data) { - $.log('got unload signal', this.target, ' target: ', data); - if(this.target == data) { - $(document).unbind('panel:unload.' + this.instanceId); - $(this.target).html(''); - if(this._onUnload != null) this._onUnload(this); - return false; - }; -} - - -/* - * Return the data that should be saved - */ -Panel.prototype.saveData = function() { - return ""; -} - - -$(function() { - $('#panels').makeHorizPanel({}); - $('#panels').css('top', ($('#header').outerHeight() ) + 'px'); - - $('.panel-content').each(function() { - var ctrl = new Panel(this); - $(this).data('ctrl', ctrl); - }); - - $('.panel-toolbar select').change(function() { - var panel = $('.panel-content', $(this).parent().parent()); - $(panel).data('ctrl').load( $(this).val() ); - }); -}); diff --git a/project/templates/explorer/file_xml.html b/project/templates/explorer/file_xml.html index baeb3d12..805f59c4 100644 --- a/project/templates/explorer/file_xml.html +++ b/project/templates/explorer/file_xml.html @@ -6,7 +6,6 @@ - {% endblock extrahead %} -- 2.20.1