Dziwny merge, zważywszy, że wcześniej dałem mv panels.js editor.js.
authorŁukasz Rekucki <lrekucki@gmail.com>
Wed, 26 Aug 2009 08:54:25 +0000 (10:54 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Wed, 26 Aug 2009 08:54:25 +0000 (10:54 +0200)
project/static/js/panels.js [deleted file]
project/templates/explorer/file_xml.html

diff --git a/project/static/js/panels.js b/project/static/js/panels.js
deleted file mode 100644 (file)
index d04b421..0000000
+++ /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() );
-    });
-});
index baeb3d1..805f59c 100644 (file)
@@ -6,7 +6,6 @@
     <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.hpanel.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.hpanel.js" type="text/javascript" charset="utf-8"></script>
-    <script src="/static/js/panels.js" type="text/javascript" charset="utf-8"></script>
     <script src="/static/js/editor.js" type="text/javascript" charset="utf-8"></script>
 {% endblock extrahead %}
 
     <script src="/static/js/editor.js" type="text/javascript" charset="utf-8"></script>
 {% endblock extrahead %}