Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2pext
plugin_dbui
Commits
ee46e174
Commit
ee46e174
authored
8 years ago
by
LE GAC Renaud
Browse files
Options
Downloads
Patches
Plain Diff
Update AceEditor to simplify the javaScript code.
parent
0896b426
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!30
Release 0.9.3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
static/plugin_dbui/src/form/field/AceEditor.js
+9
-31
9 additions, 31 deletions
static/plugin_dbui/src/form/field/AceEditor.js
with
9 additions
and
31 deletions
static/plugin_dbui/src/form/field/AceEditor.js
+
9
−
31
View file @
ee46e174
...
...
@@ -48,8 +48,6 @@ Ext.define('Dbui.form.field.AceEditor', {
// private property
editor
:
null
,
panel
:
null
,
value
:
undefined
,
// jshint strict: false
...
...
@@ -59,13 +57,10 @@ Ext.define('Dbui.form.field.AceEditor', {
var
me
=
this
;
me
.
items
=
[{
height
:
me
.
editorHeight
,
layout
:
'
fit
'
,
frame
:
true
,
items
:
{
xtype
:
'
component
'
,
height
:
me
.
editorHeight
},
xtype
:
'
panel
'
style
:
'
border: 1px solid #99BCE8;
'
,
xtype
:
'
component
'
}];
me
.
anchor
=
'
100%
'
;
...
...
@@ -75,17 +70,18 @@ Ext.define('Dbui.form.field.AceEditor', {
},
// private method requests by the component model of ExtJS
// notice that afterLayout is called after setValue
//
// NOTE:
// - method afterLayout is called after setValue
// - method setValue fill the property me.value
//
afterLayout
:
function
()
{
var
me
=
this
;
if
(
!
me
.
panel
)
{
me
.
panel
=
me
.
child
(
'
panel
'
);
}
// instantiate the editor
if
(
!
me
.
editor
)
{
me
.
editor
=
ace
.
edit
(
me
.
panel
.
child
(
'
component
'
).
getId
());
me
.
editor
=
ace
.
edit
(
me
.
child
(
'
component
'
).
getId
());
me
.
editor
.
getSession
().
setMode
(
'
ace/mode/
'
+
me
.
language
);
me
.
editor
.
setTheme
(
'
ace/theme/
'
+
me
.
theme
);
me
.
editor
.
setFontSize
(
me
.
fontSize
);
...
...
@@ -107,7 +103,6 @@ Ext.define('Dbui.form.field.AceEditor', {
me
.
editor
.
destroy
();
delete
me
.
editor
;
delete
me
.
panel
;
me
.
callParent
(
arguments
);
},
...
...
@@ -130,22 +125,5 @@ Ext.define('Dbui.form.field.AceEditor', {
}
return
undefined
;
},
/**
* Set the value for this field.
* Notice that setValue is called before afterLayout
*
* @param {String} value
*
*/
setValue
:
function
(
value
)
{
"
use strict
"
;
var
me
=
this
;
me
.
value
=
value
;
return
me
;
}
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment