From c1b8980db8625365327885c0a6cb4f10770ecc9d Mon Sep 17 00:00:00 2001 From: Alexandre Bourlier <alexandre@happy-dev.fr> Date: Thu, 21 Jun 2018 14:33:57 +0200 Subject: [PATCH] synthax : members page : updating names from ldp to sib --- dist/lib/sib-core | 2 +- dist/lib/sib-router | 2 +- src/html/members.html | 15 ++++----------- src/html/menu.html | 32 ++++++++++++++++---------------- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/dist/lib/sib-core b/dist/lib/sib-core index 444d2583..cbba4db4 160000 --- a/dist/lib/sib-core +++ b/dist/lib/sib-core @@ -1 +1 @@ -Subproject commit 444d258357cc525300c291e45f7be7f920f972e1 +Subproject commit cbba4db47150bcac8e86a364e2a4b20ad27fb387 diff --git a/dist/lib/sib-router b/dist/lib/sib-router index e374dc48..488ca64e 160000 --- a/dist/lib/sib-router +++ b/dist/lib/sib-router @@ -1 +1 @@ -Subproject commit e374dc48aed24e62096a9ca6c15e5f78833c35ca +Subproject commit 488ca64e9aafd20bbdb15c2d087f4771d135d681 diff --git a/src/html/members.html b/src/html/members.html index e66d853d..8ecfdbc4 100644 --- a/src/html/members.html +++ b/src/html/members.html @@ -1,30 +1,23 @@ <script> - class LDPDisplayCell extends LDPWidget { + class LDPDisplayCell extends SIBDisplayLookupList { get template() { return `<div name="${this.name}">${this.value.city} - ${this.value.country}</div>`; } - - render() { - store.get(this.value).then( (value) => { - this._value = value; - this.innerHTML = this.template; - }); - } } customElements.define("ldp-display-cell", LDPDisplayCell); </script> <div id="members" class="view" style="display: none"> - <ldp-display + <sib-display id="profiles-list" data-src="<?php echo $sdn; ?>/members/" set-name="firstname, name-separator, lastname" value-name-separator=" " value-city-separator=", " data-fields="avatar, name, cell" - widget-avatar="ldp-display-img" + widget-avatar="sib-display-img" widget-cell="ldp-display-cell" search-fields="firstname, lastname" next="member" - ></ldp-display> + ></sib-display> </div> diff --git a/src/html/menu.html b/src/html/menu.html index 21090ec6..f0a4a5ae 100644 --- a/src/html/menu.html +++ b/src/html/menu.html @@ -1,35 +1,35 @@ <nav class="navbar bg-white fixed-top border-bottom pb-0 d-md-flex" id="navbar"> - <ldp-router id="navbar-router" class="navbar-nav" default-route="members"> - <ldp-route id="menu-title" class="nav-item" name="dashboard"> + <sib-router id="navbar-router" class="navbar-nav" default-route="members"> + <sib-route id="menu-title" class="nav-item" name="dashboard"> HAPPY DEV - </ldp-route> + </sib-route> <div id="menu-items" class="col-7 col-md-7"> - <ldp-route class="nav-item pb-2 active align-self-stretch text-center text-md-left" name="members"> + <sib-route class="nav-item pb-2 active align-self-stretch text-center text-md-left" name="members"> <i class="fa fa-users" aria-hidden="true"></i> <span class="d-none d-md-inline"> Membres</span> - </ldp-route> - <ldp-route class="d-none" name="member" id-prefix="<?php echo $sdn; ?>/members/"></ldp-route> - <ldp-route class="d-none" name="edit-profile" id-prefix="<?php echo $sdn; ?>/members/"></ldp-route> + </sib-route> + <sib-route class="d-none" name="member" id-prefix="<?php echo $sdn; ?>/members/"></sib-route> + <sib-route class="d-none" name="edit-profile" id-prefix="<?php echo $sdn; ?>/members/"></sib-route> - <ldp-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="projects"> + <sib-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="projects"> <i class="fa fa-tasks" aria-hidden="true"></i> <span class="d-none d-md-inline"> Projets</span> - </ldp-route> - <ldp-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></ldp-route> - <ldp-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route> + </sib-route> + <sib-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></sib-route> + <sib-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route> - <ldp-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="channels"> + <sib-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="channels"> <i class="fa fa-comments" aria-hidden="true"></i> <span class="d-none d-md-inline"> Channels</span> - </ldp-route> - <ldp-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route> - <ldp-route class="d-none" name="channel-edition" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route> + </sib-route> + <sib-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route> + <sib-route class="d-none" name="channel-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route> </div> <div class="col-2 col-md-1"></div> - </ldp-router> + </sib-router> <div id="search-bar"> <input id="search-input" class="form-control" type="search" placeholder="ctrl + k"/> -- GitLab