-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial work on making plugin out of vue app, re #6
- Loading branch information
Showing
15 changed files
with
120 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import createVueApplication from 'arches/arches/app/media/js/utils/create-vue-application'; | ||
|
||
import { definePreset } from '@primevue/themes'; | ||
import Aura from '@primevue/themes/aura'; | ||
|
||
import Search from '@/afrc/Search/SearchPage.vue'; | ||
|
||
export function createAFRCApp() { | ||
const EditableReportPreset = definePreset(Aura, { | ||
components: { | ||
toast: { | ||
summary: { fontSize: '1.5rem' }, | ||
detail: { fontSize: '1.25rem' }, | ||
}, | ||
}, | ||
}); | ||
|
||
const EditableReportTheme = { | ||
theme: { | ||
preset: EditableReportPreset, | ||
}, | ||
}; | ||
createVueApplication(Search, EditableReportTheme).then(vueApp => { | ||
vueApp.mount('#search-mounting-point'); | ||
}); | ||
} |
12 changes: 12 additions & 0 deletions
12
afrc/media/js/views/components/plugins/afrc-search-plugin.js
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,12 @@ | ||
define([ | ||
'knockout', | ||
'views/afrc-search', | ||
'templates/views/components/plugins/afrc-search-plugin.htm', | ||
], function(ko, AFRCSEarchComponent, AFRCSEarchTemplate) { | ||
return ko.components.register('afrc-search-plugin', { | ||
viewModel: function() { | ||
AFRCSEarchComponent.createAFRCApp(); | ||
}, | ||
template: AFRCSEarchTemplate, | ||
}); | ||
}); |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("models", "11499_add_editlog_resourceinstance_idx"), | ||
] | ||
|
||
forward_sql = """ | ||
INSERT INTO public.plugins( | ||
pluginid, name, icon, component, componentname, config, slug, sortorder, helptemplate) | ||
VALUES ('929e1b9b-a9dc-4603-ae0a-f129d89d8b66', | ||
'{"en": "Search Reference Collections"}', | ||
'fa fa-search', | ||
'views/components/plugins/afrc-search-plugin', | ||
'afrc-search-plugin', | ||
'{"show": true, "description": {"en": null}, "i18n_properties": ["description"]}', | ||
'afrc-search', | ||
1, | ||
'' | ||
); | ||
""" | ||
reverse_sql = """ | ||
DELETE FROM public.plugins WHERE pluginid = '929e1b9b-a9dc-4603-ae0a-f129d89d8b66'; | ||
""" | ||
|
||
operations = [ | ||
migrations.RunPython(forward_sql, reverse_sql), | ||
] |
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
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
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 @@ | ||
<div id="search-mounting-point"></div> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.