From: Ɓukasz Rekucki Date: Mon, 21 Sep 2009 10:37:03 +0000 (+0200) Subject: DC panel quick fix. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/d96e0c45b35295d3e6012b8e2c93fe42d8d72ca9?hp=d810a9340ec7f203753fde341321c76ae8cf897a DC panel quick fix. Last edited fix. --- diff --git a/apps/explorer/views.py b/apps/explorer/views.py index 76d04563..e5876e92 100644 --- a/apps/explorer/views.py +++ b/apps/explorer/views.py @@ -307,7 +307,7 @@ def file_commit(request, path, repo): @with_repo def file_dc(request, path, repo): errors = None - rpath = file_path(fileid) + rpath = file_path(path) if request.method == 'POST': form = forms.DublinCoreForm(request.POST) diff --git a/project/static/js/editor.js b/project/static/js/editor.js index 0cbb9341..f94d33c4 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -425,7 +425,7 @@ Editor.prototype.saveToBranch = function(msg) if(self.autosaveTimer) { clearTimeout(self.autosaveTimer); } - if (data.warnings === null) { + if (data.warnings === null || data.warning === undefined) { self.showPopup('save-successful'); } else { self.showPopup('save-warn', data.warnings[0]); diff --git a/project/templates/explorer/file_list.html b/project/templates/explorer/file_list.html index 4e5a12ad..1eac095b 100644 --- a/project/templates/explorer/file_list.html +++ b/project/templates/explorer/file_list.html @@ -55,7 +55,7 @@ $(function() { $.each(options.recentFiles, function(index) { var fileId = options.recentFiles[index].fileId; - $('#recent-file-list ul').append('
  • ' + fileId + '
  • '); + $('#recent-file-list ul').append('
  • ' + fileId + '
  • '); }); }); diff --git a/project/urls.py b/project/urls.py index a9fad54f..2c1fab7b 100644 --- a/project/urls.py +++ b/project/urls.py @@ -22,6 +22,7 @@ urlpatterns = patterns('', # Editor panels url(r'^editor/'+PATH_SEC+'/panel/(?P[a-z]+)/$', 'explorer.views.panel_view', name='panel_view'), url(r'^editor/'+PATH_END, 'explorer.views.display_editor', name='editor_view'), + url(r'^editor/$', 'explorer.views.file_list', name='editor_base'), url(r'^editor/'+PATH_SEC+'/split$', 'explorer.views.split_text'), url(r'^editor/'+PATH_SEC+'/split-success',