Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
arikaim-repository committed Mar 31, 2021
1 parent 63a2408 commit 59f8494
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arikaim-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "user",
"description": "Theme editor.",
"short-description": "Theme editor.",
"version": "1.2.1",
"version": "1.2.2",
"repository": "https://github.com/arikaim/theme-editor-extension.git",
"position": "10",
"require": {
Expand Down
4 changes: 4 additions & 0 deletions view/components/admin/editor/simple/logo/image/image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="ui image">
{% set path = '/images/logo.png?' ~ today() %}
<img src="{{ getTemplateUrl(theme_name,path) }}">
</div>
13 changes: 9 additions & 4 deletions view/components/admin/editor/simple/logo/logo.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{ component('components:segment-title',{ title: title }) }}
<div class="p-4 ui image rounded bordered">
<div class="ui image">
{% set path = '/images/logo.png?' ~ today() %}
<img src="{{ getTemplateUrl(theme_name,path) }}">
<div id="image_content" theme-name="{{ theme_name }}">
{{ component('editor::admin.editor.simple.logo.image',{ theme_name: theme_name }) }}
</div>
<div>
<div class="ui basic label fluid">
Expand All @@ -13,9 +12,15 @@
</div>
</div>
</div>
{% if demo_mode != true %}
{% component 'components:tabs.vertical.content' %}
{% set title = null %}
<div class="mt-8">
{{ component('image::admin.images.upload.form',editor_params) }}
</div>
{% endcomponent %}
{% endcomponent %}
{% else %}
<div class="ui warning message">
{{ message }}
</div>
{% endif %}
10 changes: 9 additions & 1 deletion view/components/admin/editor/simple/logo/logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

arikaim.component.onLoaded(function() {
imageUpload.onSuccess = function(result) {
console.log(result);
var theme = $('#image_content').attr('theme-name');

arikaim.page.loadContent({
id: 'image_content',
component: 'editor::admin.editor.simple.logo.image',
params: {
theme_name: theme
}
});
};
});
3 changes: 2 additions & 1 deletion view/components/admin/editor/simple/logo/logo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"title": "Edit Logo",
"labels": {
"size": "Size"
}
},
"message": "Disabled in demo mode."
}

0 comments on commit 59f8494

Please sign in to comment.