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
2e0c9c90
Commit
2e0c9c90
authored
Jul 08, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE] Editing oleObjects.
parent
e51f4b55
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
8 deletions
+47
-8
apps/documenteditor/main/app/template/ImageSettings.template
apps/documenteditor/main/app/template/ImageSettings.template
+1
-1
apps/presentationeditor/main/app/template/ImageSettings.template
...esentationeditor/main/app/template/ImageSettings.template
+8
-3
apps/presentationeditor/main/app/view/ImageSettings.js
apps/presentationeditor/main/app/view/ImageSettings.js
+35
-3
apps/presentationeditor/main/locale/en.json
apps/presentationeditor/main/locale/en.json
+2
-0
apps/spreadsheeteditor/main/app/template/ImageSettings.template
...preadsheeteditor/main/app/template/ImageSettings.template
+1
-1
No files found.
apps/documenteditor/main/app/template/ImageSettings.template
View file @
2e0c9c90
...
...
@@ -52,7 +52,7 @@
</tr>
<tr>
<td class="padding-small" colspan=2>
<button type="button" class="btn btn-text-default hidden" id="image-button-edit-object" style="width:
85
px;"><%= scope.textEdit %></button>
<button type="button" class="btn btn-text-default hidden" id="image-button-edit-object" style="width:
100
px;"><%= scope.textEdit %></button>
</td>
</tr>
<tr>
...
...
apps/presentationeditor/main/app/template/ImageSettings.template
View file @
2e0c9c90
...
...
@@ -24,17 +24,22 @@
</tr>
<tr>
<td colspan=2>
<label class="header"><%= scope.textInsert %></label>
<label class="header"
id="image-lbl-replace"
><%= scope.textInsert %></label>
</td>
</tr>
<tr>
<td
class="padding-small"
width="50%">
<td width="50%">
<button type="button" class="btn btn-text-default" id="image-button-from-file" style="width:85px;"><%= scope.textFromFile %></button>
</td>
<td
class="padding-small"
width="50%">
<td width="50%">
<button type="button" class="btn btn-text-default" id="image-button-from-url" style="width:85px;"><%= scope.textFromUrl %></button>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<button type="button" class="btn btn-text-default hidden" id="image-button-edit-object" style="width:100px;"><%= scope.textEdit %></button>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<div class="separator horizontal"></div>
...
...
apps/presentationeditor/main/app/view/ImageSettings.js
View file @
2e0c9c90
...
...
@@ -70,7 +70,8 @@ define([
this
.
_state
=
{
Width
:
0
,
Height
:
0
,
DisabledControls
:
false
DisabledControls
:
false
,
isOleObject
:
false
};
this
.
lockedControls
=
[];
this
.
_locked
=
false
;
...
...
@@ -98,12 +99,21 @@ define([
});
this
.
lockedControls
.
push
(
this
.
btnInsertFromUrl
);
this
.
btnEditObject
=
new
Common
.
UI
.
Button
({
el
:
$
(
'
#image-button-edit-object
'
)
});
this
.
lockedControls
.
push
(
this
.
btnEditObject
);
this
.
btnOriginalSize
.
on
(
'
click
'
,
_
.
bind
(
this
.
setOriginalSize
,
this
));
this
.
btnInsertFromFile
.
on
(
'
click
'
,
_
.
bind
(
function
(
btn
){
if
(
this
.
api
)
this
.
api
.
ChangeImageFromFile
();
this
.
fireEvent
(
'
editcomplete
'
,
this
);
},
this
));
this
.
btnInsertFromUrl
.
on
(
'
click
'
,
_
.
bind
(
this
.
insertFromUrl
,
this
));
this
.
btnEditObject
.
on
(
'
click
'
,
_
.
bind
(
function
(
btn
){
// if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData());
// this.fireEvent('editcomplete', this);
},
this
));
$
(
this
.
el
).
on
(
'
click
'
,
'
#image-advanced-link
'
,
_
.
bind
(
this
.
openAdvancedSettings
,
this
));
},
...
...
@@ -114,6 +124,7 @@ define([
}));
this
.
linkAdvanced
=
$
(
'
#image-advanced-link
'
);
this
.
lblReplace
=
$
(
'
#image-lbl-replace
'
);
},
setApi
:
function
(
api
)
{
...
...
@@ -157,6 +168,25 @@ define([
}
this
.
btnOriginalSize
.
setDisabled
(
props
.
get_ImageUrl
()
===
null
||
props
.
get_ImageUrl
()
===
undefined
||
this
.
_locked
);
var
pluginGuid
=
props
.
asc_getPluginGuid
();
value
=
(
pluginGuid
!==
null
&&
pluginGuid
!==
undefined
);
if
(
this
.
_state
.
isOleObject
!==
value
)
{
this
.
btnInsertFromUrl
.
setVisible
(
!
value
);
this
.
btnInsertFromFile
.
setVisible
(
!
value
);
this
.
btnEditObject
.
setVisible
(
value
);
this
.
lblReplace
.
text
(
value
?
this
.
textEditObject
:
this
.
textInsert
);
this
.
_state
.
isOleObject
=
value
;
}
if
(
this
.
_state
.
isOleObject
)
{
// var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});
// this.btnEditObject.setDisabled(plugin===null || plugin ===undefined);
this
.
btnEditObject
.
setDisabled
(
true
);
}
else
{
this
.
btnInsertFromUrl
.
setDisabled
(
pluginGuid
===
null
);
this
.
btnInsertFromFile
.
setDisabled
(
pluginGuid
===
null
);
}
}
},
...
...
@@ -253,10 +283,12 @@ define([
textWidth
:
'
Width
'
,
textHeight
:
'
Height
'
,
textOriginalSize
:
'
Default Size
'
,
textInsert
:
'
Insert
Image
'
,
textInsert
:
'
Replace
Image
'
,
textFromUrl
:
'
From URL
'
,
textFromFile
:
'
From File
'
,
textAdvanced
:
'
Show advanced settings
'
textAdvanced
:
'
Show advanced settings
'
,
textEditObject
:
'
Edit Object
'
,
textEdit
:
'
Edit
'
},
PE
.
Views
.
ImageSettings
||
{}));
});
\ No newline at end of file
apps/presentationeditor/main/locale/en.json
View file @
2e0c9c90
...
...
@@ -397,6 +397,8 @@
"PE.Views.HyperlinkSettingsDialog.txtPrev"
:
"Previous Slide"
,
"PE.Views.HyperlinkSettingsDialog.txtSlide"
:
"Slide"
,
"PE.Views.ImageSettings.textAdvanced"
:
"Show advanced settings"
,
"PE.Views.ImageSettings.textEdit"
:
"Edit"
,
"PE.Views.ImageSettings.textEditObject"
:
"Edit Object"
,
"PE.Views.ImageSettings.textFromFile"
:
"From File"
,
"PE.Views.ImageSettings.textFromUrl"
:
"From URL"
,
"PE.Views.ImageSettings.textHeight"
:
"Height"
,
...
...
apps/spreadsheeteditor/main/app/template/ImageSettings.template
View file @
2e0c9c90
...
...
@@ -44,7 +44,7 @@
</tr>
<tr>
<td colspan=2>
<button type="button" class="btn btn-text-default hidden" id="image-button-edit-object" style="width:
85
px;"><%= scope.textEdit %></button>
<button type="button" class="btn btn-text-default hidden" id="image-button-edit-object" style="width:
100
px;"><%= scope.textEdit %></button>
</td>
</tr>
<tr class="finish-cell"></tr>
...
...
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