-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1735 from FFxSquall/fixes-document-and-image-editor
Refactoring document and image editors
- Loading branch information
Showing
32 changed files
with
684 additions
and
716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import CanvasView from 'demoPage/views/CanvasView'; | ||
|
||
export default function() { | ||
const model = new Backbone.Model({ | ||
images: [ | ||
{ | ||
extension: 'jpg', | ||
id: 'document.3', | ||
name: 'image', | ||
url: 'images/image.jpg', | ||
creator: 'Vladislav Smirnov', | ||
creationDate: '26.08.2019 12:59' | ||
}, | ||
{ | ||
extension: 'jpg', | ||
id: 'document.4', | ||
name: 'image2', | ||
url: 'images/image2.jpg', | ||
creator: 'Vladislav Smirnov', | ||
creationDate: '26.08.2021 12:59', | ||
isLoading: true | ||
}, | ||
{ | ||
extension: 'jpg', | ||
id: 'document.5', | ||
name: '4k_16:9_image', | ||
url: 'images/image3.jpg' | ||
}, | ||
{ | ||
extension: 'webp', | ||
id: 'document.6', | ||
name: 'image4', | ||
url: 'images/image4.webp', | ||
infoWidget: { | ||
text: 'Looong text, very very long tex', | ||
subtext: 'Tony Podkolzin', | ||
picUrl: 'images/VSAvatar.PNG' | ||
} | ||
}, | ||
{ | ||
extension: 'gif', | ||
id: 'document.7', | ||
name: 'cat', | ||
url: 'images/cat.gif' | ||
}, | ||
{ | ||
extension: 'gif', | ||
id: 'document.8', | ||
name: 'dance', | ||
url: 'images/dance.gif', | ||
infoWidget: { | ||
text: '05.04.2077 11:30', | ||
subtext: 'Vladislav Smirnov', | ||
picUrl: 'images/VSAvatar.PNG' | ||
} | ||
} | ||
] | ||
}); | ||
|
||
return new CanvasView({ | ||
view: new Core.form.editors.ImageEditor({ | ||
model, | ||
key: 'images', | ||
autocommit: true, | ||
displayText: 'Image Editor', | ||
title: 'My images', | ||
uploadUrl: null | ||
}), | ||
presentation: "[ {{#each images}}<div>{ id: '{{this.id}}', name: '{{this.name}}' }{{#unless @last}}, {{/unless}}</div>{{/each}} <div>]</div>", | ||
isEditor: true | ||
}); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.