editor cleanup (second pass)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<style>
|
||||
.acw-chap pre, .acw-chap pre span, span.acw-char-check, .acw-chap .selection-area div
|
||||
{
|
||||
font:11px 'Courier', monospaced;
|
||||
line-height:11px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.acw-chap .wrapped-row
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-wrapped-row.gif');
|
||||
background-repeat:no-repeat;
|
||||
background-position:25px 4px;
|
||||
}
|
||||
.acw-chap .sidebar
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bg-sidebar.gif');
|
||||
line-height:11px;
|
||||
}
|
||||
.acw-chap .sidebar .row-number
|
||||
{
|
||||
text-align:right;
|
||||
font-size:9px;
|
||||
font-family:'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
|
||||
color:#999;
|
||||
}
|
||||
|
||||
.acw-chap .folding-expand-inner
|
||||
{
|
||||
width:14px;
|
||||
height:10px;
|
||||
margin-left:2px;
|
||||
display:inline;
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand-inner.gif');
|
||||
}
|
||||
.acw-chap .folding-expand
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-expand.gif');
|
||||
}
|
||||
.acw-chap .folding-start
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-start.gif');
|
||||
}
|
||||
.acw-chap .folding-stop
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-folding-stop.gif');
|
||||
}
|
||||
.acw-chap .bookmark-default
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/chap-bookmark-default.gif');
|
||||
}
|
||||
.acw-chap .void
|
||||
{
|
||||
background-image:url('{{=URL(r=request,c='static',f='eamy')}}/void.gif');
|
||||
}
|
||||
</style>
|
||||
<script src="{{=URL(r=request,c='static',f='eamy/eamy.js')}}" type="text/javascript"></script>
|
||||
<script src="{{=URL(r=request,c='static',f='js/jquery.hotkeys.js')}}" type="text/javascript" charset="utf-8"></script>
|
||||
{{if request.args[1]=="views":}}
|
||||
<script src="{{=URL(r=request,c='static',f='eamy/bundle_markup.js')}}" type="text/javascript"></script>
|
||||
{{else:}}
|
||||
<script src="{{=URL(r=request,c='static',f='eamy/bundle_python.js')}}" type="text/javascript"></script>
|
||||
{{pass}}
|
||||
<script language="Javascript" type="text/javascript" src="/{{=request.application}}/static/js/ajax_editor.js"></script>
|
||||
|
||||
<script language="Javascript" type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
setTimeout("keepalive('{{=URL('keepalive')}}')",10000);
|
||||
|
||||
});
|
||||
jQuery(document).bind('keydown', 'alt+f1',function (evt){
|
||||
doClickSave();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user