From f4fc9875971272564e5c8e91ac0e1d731005a2e0 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Thu, 17 Oct 2013 16:20:06 +0200 Subject: [PATCH] editor cleanup (second pass) --- applications/admin/controllers/default.py | 11 +-- applications/admin/models/0.py | 16 ---- .../admin/views/default.mobile/amy_ajax.html | 77 ------------------- 3 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 applications/admin/views/default.mobile/amy_ajax.html diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 64d3aec5..5963d260 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -571,16 +571,7 @@ def edit(): if not(request.ajax) and not(is_mobile): # return the scaffolding, the rest will be through ajax requests response.title = T('Editing %s') % app - editarea_preferences = {} - editarea_preferences['FONT_SIZE'] = '10' - editarea_preferences['FULL_SCREEN'] = 'false' - editarea_preferences['ALLOW_TOGGLE'] = 'true' - editarea_preferences['REPLACE_TAB_BY_SPACES'] = '4' - editarea_preferences['DISPLAY'] = 'onload' - for key in editarea_preferences: - if key in globals(): - editarea_preferences[key] = globals()[key] - return response.render ('default/edit.html', dict(app=request.args[0], editor_settings=preferences, editarea_preferences=editarea_preferences)) + return response.render ('default/edit.html', dict(app=request.args[0], editor_settings=preferences)) # show settings tab and save prefernces if 'settings' in request.vars: diff --git a/applications/admin/models/0.py b/applications/admin/models/0.py index a6cc1940..669ffd27 100644 --- a/applications/admin/models/0.py +++ b/applications/admin/models/0.py @@ -8,22 +8,6 @@ WEB2PY_VERSION_URL = WEB2PY_URL + '/examples/default/version' # the user-interface feature that allows you to edit files in your web # browser. -# Displays the editor in full screen mode. The value must be 'true' or 'false' -FULL_SCREEN = 'false' - -# Display a check box under the editor to allow the user to switch -# between the editor and a simple -# HTML text area. The value must be 'true' or 'false' -ALLOW_TOGGLE = 'true' - -# Replaces tab characters with space characters. -# The value can be 'false' (meaning that tabs are not replaced), -# or an integer > 0 that specifies the number of spaces to replace a tab with. -REPLACE_TAB_BY_SPACES = 4 - -# Toggle on/off the code editor instead of textarea on startup -DISPLAY = "onload" or "later" - # if demo mode is True then admin works readonly and does not require login DEMO_MODE = False diff --git a/applications/admin/views/default.mobile/amy_ajax.html b/applications/admin/views/default.mobile/amy_ajax.html deleted file mode 100644 index 718d27ed..00000000 --- a/applications/admin/views/default.mobile/amy_ajax.html +++ /dev/null @@ -1,77 +0,0 @@ - - - -{{if request.args[1]=="views":}} - -{{else:}} - -{{pass}} - - - -