Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zotero-vue-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jerome Chauveau
zotero-vue-client
Commits
1cab3a66
Commit
1cab3a66
authored
Dec 11, 2020
by
Jerome Chauveau
Browse files
Options
Downloads
Patches
Plain Diff
simplication du process + sélection émise au format JSON
parent
f64bd419
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+2
-5
2 additions, 5 deletions
README.md
package.json
+1
-1
1 addition, 1 deletion
package.json
src/App.vue
+1
-2
1 addition, 2 deletions
src/App.vue
src/components/ZoteroVueClient.vue
+4
-17
4 additions, 17 deletions
src/components/ZoteroVueClient.vue
with
8 additions
and
25 deletions
README.md
+
2
−
5
View file @
1cab3a66
...
@@ -36,14 +36,11 @@ Another example with custom options :
...
@@ -36,14 +36,11 @@ Another example with custom options :
default-id="475425"
default-id="475425"
:options="{
:options="{
pageLength: 10,
pageLength: 10,
editableConfig: false,
editableConfig: false
format: 'json'
}"
}"
@entry-selected="selectedEntryCallback"/>
@entry-selected="selectedEntryCallback"/>
```
```
`selectedEntryCallback`
will received the selected entry as argument (in JSON format)
available formats : https://www.zotero.org/support/dev/web_api/v3/basics#export_formats.
*zotero-vue-client*
uses 'tei'
as default one.
### Customize configuration
### Customize configuration
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
1cab3a66
{
{
"name"
:
"zotero-vue-client"
,
"name"
:
"zotero-vue-client"
,
"version"
:
"0.1.
2
"
,
"version"
:
"0.1.
3
"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"serve"
:
"vue-cli-service serve"
,
...
...
This diff is collapsed.
Click to expand it.
src/App.vue
+
1
−
2
View file @
1cab3a66
...
@@ -19,8 +19,7 @@
...
@@ -19,8 +19,7 @@
methods
:
{
methods
:
{
selectedEntry
(
entry
){
selectedEntry
(
entry
){
console
.
log
(
"
entry key =
"
,
entry
.
key
)
alert
(
JSON
.
stringify
(
entry
))
alert
(
entry
.
serialized
)
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/components/ZoteroVueClient.vue
+
4
−
17
View file @
1cab3a66
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<ul>
<ul>
<li
class=
"zotero-entry"
<li
class=
"zotero-entry"
v-for=
"entry in entries"
v-for=
"entry in entries"
@
click=
"entrySelected(entry
.key
)"
@
click=
"entrySelected(entry)"
:key=
"'entry-' + entry.key"
>
:key=
"'entry-' + entry.key"
>
<ul>
<ul>
<li
class=
"zotero-title"
>
{{
entry
.
data
.
title
}}
</li>
<li
class=
"zotero-title"
>
{{
entry
.
data
.
title
}}
</li>
...
@@ -77,8 +77,7 @@
...
@@ -77,8 +77,7 @@
default
:
function
()
{
default
:
function
()
{
return
{
return
{
editableConfig
:
true
,
editableConfig
:
true
,
pageLength
:
5
,
pageLength
:
5
format
:
'
tei
'
}
}
}
}
}
}
...
@@ -135,20 +134,8 @@
...
@@ -135,20 +134,8 @@
this
.
doQuery
(
false
);
this
.
doQuery
(
false
);
},
},
entrySelected
(
entryKey
){
entrySelected
(
entry
){
let
suffix
=
this
.
type
+
'
s
'
+
'
/
'
+
this
.
groupOrUserId
+
'
/items/
'
+
entryKey
this
.
$emit
(
'
entry-selected
'
,
entry
)
fetch
(
'
https://api.zotero.org/
'
+
suffix
+
'
?format=
'
+
this
.
format
)
.
then
(
response
=>
response
.
text
()).
then
(
entry
=>
{
console
.
log
()
this
.
$emit
(
'
entry-selected
'
,
{
key
:
entryKey
,
url
:
'
http://zotero.org/
'
+
suffix
,
serialized
:
entry
})
})
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment