From e88969cd6aa550af6bdfe587bc6b1642b6168f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 20 May 2016 20:01:47 +0200 Subject: [PATCH] admin: add handles to sortable items (#11015) --- tests/test_admin_pages.py | 8 ++++---- wcs/admin/fields.py | 4 +++- wcs/admin/workflows.py | 14 +++++++------ wcs/qommon/static/css/dc2/admin.css | 40 ++++++++++++++++++++++++++++++++++++- wcs/qommon/static/js/biglist.js | 4 ++++ 5 files changed, 58 insertions(+), 12 deletions(-) diff --git a/tests/test_admin_pages.py b/tests/test_admin_pages.py index a8e32ef..9abeb00 100644 --- a/tests/test_admin_pages.py +++ b/tests/test_admin_pages.py @@ -766,7 +766,7 @@ def test_form_new_field(pub): assert resp.location == 'http://example.net/backoffice/forms/1/fields/' resp = resp.follow() assert 'foobar' in resp.body - assert 'Use drag and drop to reorder fields.' in resp.body + assert 'Use drag and drop' in resp.body assert len(FormDef.get(1).fields) == 1 assert FormDef.get(1).fields[0].key == 'string' @@ -796,7 +796,7 @@ def test_form_delete_field(pub): resp = app.get('/backoffice/forms/1/') resp = resp.click(href='fields/') assert '1st field' in resp.body - assert 'Use drag and drop to reorder fields.' in resp.body + assert 'Use drag and drop' in resp.body resp = resp.click(href='1/delete') resp = resp.forms[0].submit() @@ -960,7 +960,7 @@ def test_form_edit_page_field(pub): assert resp.location == 'http://example.net/backoffice/forms/1/fields/' resp = resp.follow() assert 'foobar' in resp.body - assert 'Use drag and drop to reorder fields.' in resp.body + assert 'Use drag and drop' in resp.body assert len(FormDef.get(1).fields) == 1 assert FormDef.get(1).fields[0].key == 'page' @@ -1306,7 +1306,7 @@ def test_workflows_new(pub): resp = resp.forms[0].submit() assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/' resp = resp.follow() - assert 'Use drag and drop to reorder items' in resp.body + assert 'Use drag and drop' in resp.body # fill action resp = resp.click('Display message') diff --git a/wcs/admin/fields.py b/wcs/admin/fields.py index a1749c3..f9e98f8 100644 --- a/wcs/admin/fields.py +++ b/wcs/admin/fields.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # w.c.s. - web application for online forms # Copyright (C) 2005-2010 Entr'ouvert # @@ -201,7 +203,7 @@ class FieldsDirectory(Directory): r += htmltext(_('In a multipage form, the first field should be of type "page".')) r += htmltext('') - r += htmltext('

%s

') % _('Use drag and drop to reorder fields.') + r += htmltext('

%s

') % _('Use drag and drop with the ⠿ handles to reorder items.') if self.page_no is not None: r += htmltext('

') r += htmltext('%s') % _('Display all pages') diff --git a/wcs/admin/workflows.py b/wcs/admin/workflows.py index 2eedd28..26c671b 100644 --- a/wcs/admin/workflows.py +++ b/wcs/admin/workflows.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # w.c.s. - web application for online forms # Copyright (C) 2005-2010 Entr'ouvert # @@ -422,8 +424,8 @@ class WorkflowStatusPage(Directory): if str(self.workflow.id).startswith(str('_')): r += htmltext('