Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
e0737d18
Commit
e0737d18
authored
Aug 24, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Delay rendering controls on the right panel.
parent
d38c8714
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1232 additions
and
1206 deletions
+1232
-1206
apps/spreadsheeteditor/main/app/view/ChartSettings.js
apps/spreadsheeteditor/main/app/view/ChartSettings.js
+146
-140
apps/spreadsheeteditor/main/app/view/ImageSettings.js
apps/spreadsheeteditor/main/app/view/ImageSettings.js
+29
-23
apps/spreadsheeteditor/main/app/view/ParagraphSettings.js
apps/spreadsheeteditor/main/app/view/ParagraphSettings.js
+85
-74
apps/spreadsheeteditor/main/app/view/ShapeSettings.js
apps/spreadsheeteditor/main/app/view/ShapeSettings.js
+409
-416
apps/spreadsheeteditor/main/app/view/TableSettings.js
apps/spreadsheeteditor/main/app/view/TableSettings.js
+116
-104
apps/spreadsheeteditor/main/app/view/TextArtSettings.js
apps/spreadsheeteditor/main/app/view/TextArtSettings.js
+447
-449
No files found.
apps/spreadsheeteditor/main/app/view/ChartSettings.js
View file @
e0737d18
This diff is collapsed.
Click to expand it.
apps/spreadsheeteditor/main/app/view/ImageSettings.js
View file @
e0737d18
...
...
@@ -64,7 +64,6 @@ define([
},
initialize
:
function
()
{
var
me
=
this
;
this
.
_initSettings
=
true
;
this
.
_nRatio
=
1
;
...
...
@@ -82,7 +81,33 @@ define([
this
.
_noApply
=
false
;
this
.
render
();
},
render
:
function
()
{
var
el
=
$
(
this
.
el
);
el
.
html
(
this
.
template
({
scope
:
this
}));
},
setApi
:
function
(
api
)
{
if
(
api
==
undefined
)
return
;
this
.
api
=
api
;
return
this
;
},
updateMetricUnit
:
function
()
{
if
(
this
.
spinners
)
{
for
(
var
i
=
0
;
i
<
this
.
spinners
.
length
;
i
++
)
{
var
spinner
=
this
.
spinners
[
i
];
spinner
.
setDefaultUnit
(
Common
.
Utils
.
Metric
.
getCurrentMetricName
());
spinner
.
setStep
(
Common
.
Utils
.
Metric
.
getCurrentMetric
()
==
Common
.
Utils
.
Metric
.
c_MetricUnits
.
pt
?
1
:
0.1
);
}
}
},
createDelayedControls
:
function
()
{
var
me
=
this
;
this
.
spnWidth
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#image-spin-width
'
),
step
:
.
1
,
...
...
@@ -160,33 +185,12 @@ define([
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
},
this
));
this
.
btnInsertFromUrl
.
on
(
'
click
'
,
_
.
bind
(
this
.
insertFromUrl
,
this
));
},
render
:
function
()
{
var
el
=
$
(
this
.
el
);
el
.
html
(
this
.
template
({
scope
:
this
}));
this
.
lblReplace
=
$
(
'
#image-lbl-replace
'
);
},
setApi
:
function
(
api
)
{
if
(
api
==
undefined
)
return
;
this
.
api
=
api
;
return
this
;
},
updateMetricUnit
:
function
()
{
if
(
this
.
spinners
)
{
for
(
var
i
=
0
;
i
<
this
.
spinners
.
length
;
i
++
)
{
var
spinner
=
this
.
spinners
[
i
];
spinner
.
setDefaultUnit
(
Common
.
Utils
.
Metric
.
getCurrentMetricName
());
spinner
.
setStep
(
Common
.
Utils
.
Metric
.
getCurrentMetric
()
==
Common
.
Utils
.
Metric
.
c_MetricUnits
.
pt
?
1
:
0.1
);
}
}
},
createDelayedElements
:
function
()
{
this
.
createDelayedControls
();
this
.
updateMetricUnit
();
},
...
...
@@ -323,6 +327,8 @@ define([
},
disableControls
:
function
(
disable
)
{
if
(
this
.
_initSettings
)
return
;
if
(
this
.
_state
.
DisabledControls
!==
disable
)
{
this
.
_state
.
DisabledControls
=
disable
;
_
.
each
(
this
.
lockedControls
,
function
(
item
)
{
...
...
apps/spreadsheeteditor/main/app/view/ParagraphSettings.js
View file @
e0737d18
...
...
@@ -70,7 +70,6 @@ define([
},
initialize
:
function
()
{
var
me
=
this
;
this
.
_initSettings
=
true
;
this
.
_state
=
{
...
...
@@ -85,68 +84,6 @@ define([
this
.
_locked
=
false
;
this
.
render
();
this
.
_arrLineRule
=
[
{
displayValue
:
this
.
textAuto
,
defaultValue
:
1
,
value
:
c_paragraphLinerule
.
LINERULE_AUTO
,
minValue
:
0.5
,
step
:
0.01
,
defaultUnit
:
''
},
{
displayValue
:
this
.
textExact
,
defaultValue
:
5
,
value
:
c_paragraphLinerule
.
LINERULE_EXACT
,
minValue
:
0.03
,
step
:
0.01
,
defaultUnit
:
'
cm
'
}
];
// Short Size
this
.
cmbLineRule
=
new
Common
.
UI
.
ComboBox
({
el
:
$
(
'
#paragraph-combo-line-rule
'
),
cls
:
'
input-group-nr
'
,
menuStyle
:
'
min-width: 85px;
'
,
editable
:
false
,
data
:
this
.
_arrLineRule
});
this
.
cmbLineRule
.
setValue
(
c_paragraphLinerule
.
LINERULE_AUTO
);
this
.
lockedControls
.
push
(
this
.
cmbLineRule
);
this
.
numLineHeight
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#paragraph-spin-line-height
'
),
step
:
.
01
,
width
:
85
,
value
:
'
1.5
'
,
defaultUnit
:
""
,
maxValue
:
132
,
minValue
:
0.5
});
this
.
lockedControls
.
push
(
this
.
numLineHeight
);
this
.
numSpacingBefore
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#paragraph-spin-spacing-before
'
),
step
:
.
1
,
width
:
85
,
value
:
'
0 cm
'
,
defaultUnit
:
"
cm
"
,
maxValue
:
55.88
,
minValue
:
0
,
allowAuto
:
true
,
autoText
:
this
.
txtAutoText
});
this
.
spinners
.
push
(
this
.
numSpacingBefore
);
this
.
lockedControls
.
push
(
this
.
numSpacingBefore
);
this
.
numSpacingAfter
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#paragraph-spin-spacing-after
'
),
step
:
.
1
,
width
:
85
,
value
:
'
0.35 cm
'
,
defaultUnit
:
"
cm
"
,
maxValue
:
55.88
,
minValue
:
0
,
allowAuto
:
true
,
autoText
:
this
.
txtAutoText
});
this
.
spinners
.
push
(
this
.
numSpacingAfter
);
this
.
lockedControls
.
push
(
this
.
numSpacingAfter
);
this
.
numLineHeight
.
on
(
'
change
'
,
_
.
bind
(
this
.
onNumLineHeightChange
,
this
));
this
.
numSpacingBefore
.
on
(
'
change
'
,
_
.
bind
(
this
.
onNumSpacingBeforeChange
,
this
));
this
.
numSpacingAfter
.
on
(
'
change
'
,
_
.
bind
(
this
.
onNumSpacingAfterChange
,
this
));
this
.
cmbLineRule
.
on
(
'
selected
'
,
_
.
bind
(
this
.
onLineRuleSelect
,
this
));
this
.
cmbLineRule
.
on
(
'
hide:after
'
,
_
.
bind
(
this
.
onHideMenus
,
this
));
$
(
this
.
el
).
on
(
'
click
'
,
'
#paragraph-advanced-link
'
,
_
.
bind
(
this
.
openAdvancedSettings
,
this
));
},
render
:
function
()
{
...
...
@@ -209,6 +146,8 @@ define([
},
_onLineSpacing
:
function
(
value
)
{
if
(
this
.
_initSettings
)
return
;
var
linerule
=
value
.
asc_getLineRule
();
var
line
=
value
.
asc_getLine
();
...
...
@@ -302,22 +241,92 @@ define([
spinner
.
setStep
(
Common
.
Utils
.
Metric
.
getCurrentMetric
()
==
Common
.
Utils
.
Metric
.
c_MetricUnits
.
pt
?
1
:
0.01
);
}
}
var
rec
=
this
.
cmbLineRule
.
store
.
at
(
1
);
rec
.
set
({
defaultUnit
:
Common
.
Utils
.
Metric
.
getCurrentMetricName
(),
minValue
:
parseFloat
(
Common
.
Utils
.
Metric
.
fnRecalcFromMM
(
0.3
).
toFixed
(
2
)),
step
:
(
Common
.
Utils
.
Metric
.
getCurrentMetric
()
==
Common
.
Utils
.
Metric
.
c_MetricUnits
.
pt
)
?
1
:
0.01
});
if
(
this
.
_state
.
LineRule
!==
null
)
{
var
obj
;
rec
=
this
.
cmbLineRule
.
store
.
findWhere
((
obj
=
{},
obj
[
'
value
'
]
=
this
.
_state
.
LineRule
,
obj
));
if
(
!
rec
)
rec
=
this
.
cmbLineRule
.
store
.
at
(
0
);
this
.
numLineHeight
.
setDefaultUnit
(
rec
.
get
(
'
defaultUnit
'
));
this
.
numLineHeight
.
setStep
(
rec
.
get
(
'
step
'
));
if
(
this
.
cmbLineRule
)
{
var
rec
=
this
.
cmbLineRule
.
store
.
at
(
1
);
rec
.
set
({
defaultUnit
:
Common
.
Utils
.
Metric
.
getCurrentMetricName
(),
minValue
:
parseFloat
(
Common
.
Utils
.
Metric
.
fnRecalcFromMM
(
0.3
).
toFixed
(
2
)),
step
:
(
Common
.
Utils
.
Metric
.
getCurrentMetric
()
==
Common
.
Utils
.
Metric
.
c_MetricUnits
.
pt
)
?
1
:
0.01
});
if
(
this
.
_state
.
LineRule
!==
null
)
{
var
obj
;
rec
=
this
.
cmbLineRule
.
store
.
findWhere
((
obj
=
{},
obj
[
'
value
'
]
=
this
.
_state
.
LineRule
,
obj
));
if
(
!
rec
)
rec
=
this
.
cmbLineRule
.
store
.
at
(
0
);
this
.
numLineHeight
.
setDefaultUnit
(
rec
.
get
(
'
defaultUnit
'
));
this
.
numLineHeight
.
setStep
(
rec
.
get
(
'
step
'
));
}
}
},
createDelayedControls
:
function
()
{
var
me
=
this
;
this
.
_arrLineRule
=
[
{
displayValue
:
this
.
textAuto
,
defaultValue
:
1
,
value
:
c_paragraphLinerule
.
LINERULE_AUTO
,
minValue
:
0.5
,
step
:
0.01
,
defaultUnit
:
''
},
{
displayValue
:
this
.
textExact
,
defaultValue
:
5
,
value
:
c_paragraphLinerule
.
LINERULE_EXACT
,
minValue
:
0.03
,
step
:
0.01
,
defaultUnit
:
'
cm
'
}
];
// Short Size
this
.
cmbLineRule
=
new
Common
.
UI
.
ComboBox
({
el
:
$
(
'
#paragraph-combo-line-rule
'
),
cls
:
'
input-group-nr
'
,
menuStyle
:
'
min-width: 85px;
'
,
editable
:
false
,
data
:
this
.
_arrLineRule
});
this
.
cmbLineRule
.
setValue
(
c_paragraphLinerule
.
LINERULE_AUTO
);
this
.
lockedControls
.
push
(
this
.
cmbLineRule
);
this
.
numLineHeight
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#paragraph-spin-line-height
'
),
step
:
.
01
,
width
:
85
,
value
:
'
1.5
'
,
defaultUnit
:
""
,
maxValue
:
132
,
minValue
:
0.5
});
this
.
lockedControls
.
push
(
this
.
numLineHeight
);
this
.
numSpacingBefore
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#paragraph-spin-spacing-before
'
),
step
:
.
1
,
width
:
85
,
value
:
'
0 cm
'
,
defaultUnit
:
"
cm
"
,
maxValue
:
55.88
,
minValue
:
0
,
allowAuto
:
true
,
autoText
:
this
.
txtAutoText
});
this
.
spinners
.
push
(
this
.
numSpacingBefore
);
this
.
lockedControls
.
push
(
this
.
numSpacingBefore
);
this
.
numSpacingAfter
=
new
Common
.
UI
.
MetricSpinner
({
el
:
$
(
'
#paragraph-spin-spacing-after
'
),
step
:
.
1
,
width
:
85
,
value
:
'
0.35 cm
'
,
defaultUnit
:
"
cm
"
,
maxValue
:
55.88
,
minValue
:
0
,
allowAuto
:
true
,
autoText
:
this
.
txtAutoText
});
this
.
spinners
.
push
(
this
.
numSpacingAfter
);
this
.
lockedControls
.
push
(
this
.
numSpacingAfter
);
this
.
numLineHeight
.
on
(
'
change
'
,
_
.
bind
(
this
.
onNumLineHeightChange
,
this
));
this
.
numSpacingBefore
.
on
(
'
change
'
,
_
.
bind
(
this
.
onNumSpacingBeforeChange
,
this
));
this
.
numSpacingAfter
.
on
(
'
change
'
,
_
.
bind
(
this
.
onNumSpacingAfterChange
,
this
));
this
.
cmbLineRule
.
on
(
'
selected
'
,
_
.
bind
(
this
.
onLineRuleSelect
,
this
));
this
.
cmbLineRule
.
on
(
'
hide:after
'
,
_
.
bind
(
this
.
onHideMenus
,
this
));
$
(
this
.
el
).
on
(
'
click
'
,
'
#paragraph-advanced-link
'
,
_
.
bind
(
this
.
openAdvancedSettings
,
this
));
},
createDelayedElements
:
function
()
{
this
.
createDelayedControls
();
this
.
updateMetricUnit
();
},
...
...
@@ -365,6 +374,8 @@ define([
},
disableControls
:
function
(
disable
)
{
if
(
this
.
_initSettings
)
return
;
if
(
this
.
_state
.
DisabledControls
!==
disable
)
{
this
.
_state
.
DisabledControls
=
disable
;
_
.
each
(
this
.
lockedControls
,
function
(
item
)
{
...
...
apps/spreadsheeteditor/main/app/view/ShapeSettings.js
View file @
e0737d18
This diff is collapsed.
Click to expand it.
apps/spreadsheeteditor/main/app/view/TableSettings.js
View file @
e0737d18
This diff is collapsed.
Click to expand it.
apps/spreadsheeteditor/main/app/view/TextArtSettings.js
View file @
e0737d18
This diff is collapsed.
Click to expand it.
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