Henning Snater has submitted this change and it was merged.

Change subject: (bug 43291) statementview can display and add references now
......................................................................


(bug 43291) statementview can display and add references now

NOTE: Looks and works much better when used together (rebased onto) Ic205d640. 
Basically, this
      solves the issue of weird entity labels after reloading page after adding 
references.

References can now be displayed with the jQuerz.wikibase.statementview. 
Statements are displayed
as jQuery.wikibase.referenceview which for now inherits from 
jQuery.wikibaseclaimview. This is
because as of now we do not have qualifiers in the claimview or multiple snaks 
in the
referenceview, so both are very similar. Later the code should be refactored 
for both widgets to
use a common base widget (which has the task to display and manage several 
snakview widgets). For
now this solution saves some time.
Furthermore, a new, more generic list widget, jQuery.wikibase.listview, has 
been introduced. This
contains a lot of ugly code borrowed from the claimlistview. Over time, all 
list view widgets
should be refactored to share more code, as we require further list widgets for 
displaying a
Statement's qualifiers and a Reference's collection of Snaks. At the moment 
toolbar and API related
code is not encapsulated enough, this has not improved in this patch set, it is 
rather worse now.

The following will be done in follow ups:
- code cleanup
- CSS styling
- minor fixes required, e.g. references counter does not yet update when adding 
reference

- patch set 3: proper revision store handling when adding references
- patch set 4: 'add' button changed to 'add source'
- patch set 8: fixed optional parameter in repoApi
- patch set 9: rebased

Change-Id: Ib615348067a7bbd2270b6dab128bc53f8f46fcd8
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
A lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
A lib/resources/jquery.wikibase/jquery.wikibase.listview.js
A lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M lib/resources/templates.php
M lib/resources/wikibase.RevisionStore.js
M lib/resources/wikibase.css
M lib/resources/wikibase.store/wikibase.RepoApi.js
M repo/Wikibase.i18n.php
11 files changed, 579 insertions(+), 15 deletions(-)

Approvals:
  Henning Snater: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/46471
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib615348067a7bbd2270b6dab128bc53f8f46fcd8
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to