Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
28207ce6
Commit
28207ce6
authored
Dec 03, 2014
by
ThorbenQuast
Browse files
editor: make a "cookie" preference to have the user decide if he allows for cookies
to save the last commands
parent
849d8d42
Changes
2
Hide whitespace changes
Inline
Side-by-side
vispa/extensions/codeeditor/static/js/commandline.js
View file @
28207ce6
...
...
@@ -76,6 +76,9 @@ var CommandLine = Emitter.extend({
},
saveToCookie
:
function
(
cmd
)
{
//make sure the user allows for cookies
if
(
!
this
.
view
.
getPreference
(
"
cookies
"
))
return
;
var
key
=
this
.
getCookieKey
();
this
.
commandCookie
[
key
]
=
cmd
;
$
.
cookie
(
"
commands
"
,
JSON
.
stringify
(
this
.
commandCookie
));
...
...
vispa/extensions/codeeditor/static/js/prefs.js
View file @
28207ce6
...
...
@@ -87,10 +87,16 @@ var getDefaultCodeEditorPreferences = function() {
//history commands
commandHistory
:
{
description
:
"
The total number of stored commands.
"
,
description
:
"
The total number of stored commands
in a session
.
"
,
type
:
"
integer
"
,
value
:
3
,
range
:
[
1
,
10
,
1
]
},
cookies
:
{
description
:
"
Allow the web-browser to store the last executed command.
"
,
type
:
"
boolean
"
,
value
:
true
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment