From 04ac771edb0dc7e7b1d2503f854d84a50b43ea80 Mon Sep 17 00:00:00 2001 From: stefanocudini Date: Mon, 12 Nov 2018 00:07:28 +0100 Subject: [PATCH] new templates tabPlace_ui_hist, tabUser_ui_hist, tabUser_ui_friends, ,fix popups opts --- packages/core/client/Place.js | 2 +- packages/core/client/User.js | 2 +- packages/core/settings.js | 5 ++++ packages/ui/client/views/panels/friends.html | 8 +++--- packages/ui/client/views/panels/place.html | 27 ++++++++++++++++--- .../client/views/panels/place/histplace.html | 17 ------------ packages/ui/client/views/panels/user.html | 16 +++++++++-- .../ui/client/views/panels/user/friends.html | 2 +- .../ui/client/views/panels/user/friends.js | 2 +- .../ui/client/views/panels/user/histuser.html | 2 +- packages/ui/package.js | 1 - private/settings.light-ui.json | 7 ++++- 12 files changed, 58 insertions(+), 33 deletions(-) delete mode 100644 packages/ui/client/views/panels/place/histplace.html diff --git a/packages/core/client/Place.js b/packages/core/client/Place.js index d1f0d476..280dde65 100644 --- a/packages/core/client/Place.js +++ b/packages/core/client/Place.js @@ -101,7 +101,7 @@ Kepler.Place = Class.extend({ Blaze.renderWithData(Template[self.templatePopup], self.rData, divp); - self.marker.bindPopup(divp.firstChild, K.Map.options.popup); + self.marker.bindPopup(divp.firstChild, opts.popups); } else { e.target.on('click', function(ee) { diff --git a/packages/core/client/User.js b/packages/core/client/User.js index cc2eb8c5..def246b4 100644 --- a/packages/core/client/User.js +++ b/packages/core/client/User.js @@ -113,7 +113,7 @@ Kepler.User = Class.extend({ var div = L.DomUtil.create('div',''); if(Template[self.templatePopup]) Blaze.renderWithData(Template[self.templatePopup], self, div); - this.bindPopup(div.firstChild, K.Map.options.popup); + this.bindPopup(div.firstChild, opts.popups); } } else diff --git a/packages/core/settings.js b/packages/core/settings.js index 67bc3d2c..4266a629 100644 --- a/packages/core/settings.js +++ b/packages/core/settings.js @@ -29,6 +29,11 @@ Kepler.settings = { "awayOnWindowBlur": true }, "templates": { + //TODO refact.. templates without placeholder + "tabPlace_ui_hist": { "show": true}, + "tabUser_ui_hist": { "show": true}, + "tabUser_ui_friends": { "show": true}, + //core/ui templates configurations "navSidebar": { "navSidebar_ui_profile": { order:-10 }, diff --git a/packages/ui/client/views/panels/friends.html b/packages/ui/client/views/panels/friends.html index 2a00342e..a92e9d7a 100644 --- a/packages/ui/client/views/panels/friends.html +++ b/packages/ui/client/views/panels/friends.html @@ -5,10 +5,10 @@ -
- {{#with currentUser}} - {{> user_status}} - {{/with}} +
+ {{#with currentUser}} + {{> user_status}} + {{/with}}
diff --git a/packages/ui/client/views/panels/place.html b/packages/ui/client/views/panels/place.html index 1d5206a7..af9ca9e8 100644 --- a/packages/ui/client/views/panels/place.html +++ b/packages/ui/client/views/panels/place.html @@ -23,11 +23,13 @@

{{i18n 'btn_info'}} + {{#if settings 'templates.tabPlace_ui_hist.show'}}
  • {{i18n 'btn_hist'}} -
  • + + {{/if}}
    @@ -36,9 +38,13 @@

    {{> pluginsTemplate name='tabPlace'}}

    + {{#if settings 'templates.tabPlace_ui_hist.show'}}
    - {{> tab_histplace}} + + {{> tabPlace_ui_hist}} +
    + {{/if}} @@ -64,7 +70,6 @@

    + \ No newline at end of file diff --git a/packages/ui/client/views/panels/place/histplace.html b/packages/ui/client/views/panels/place/histplace.html deleted file mode 100644 index 6f00ef6a..00000000 --- a/packages/ui/client/views/panels/place/histplace.html +++ /dev/null @@ -1,17 +0,0 @@ - - \ No newline at end of file diff --git a/packages/ui/client/views/panels/user.html b/packages/ui/client/views/panels/user.html index 42900bb8..bd1b78b5 100644 --- a/packages/ui/client/views/panels/user.html +++ b/packages/ui/client/views/panels/user.html @@ -48,11 +48,14 @@

    {{i18n 'btn_info'}} + {{#if settings 'templates.tabUser_ui_friends.show'}}
  • {{i18n 'btn_friends'}}
  • + {{/if}} + {{#if settings 'templates.tabUser_ui_hist.show'}} {{#if isFriend}}
  • @@ -60,6 +63,7 @@

  • {{/if}} + {{/if}}
    @@ -68,14 +72,22 @@

    {{> pluginsTemplate name='tabUser'}}

    + {{#if settings 'templates.tabUser_ui_friends.show'}}
    - {{> tab_friends}} + + {{> tabUser_ui_friends}} +
    + {{/if}} + {{#if settings 'templates.tabUser_ui_hist.show'}} {{#if isFriend}}
    - {{> tab_histuser}} + + {{> tabUser_ui_hist}} +
    {{/if}} + {{/if}} {{/if}} diff --git a/packages/ui/client/views/panels/user/friends.html b/packages/ui/client/views/panels/user/friends.html index d445ea55..51d322a3 100644 --- a/packages/ui/client/views/panels/user/friends.html +++ b/packages/ui/client/views/panels/user/friends.html @@ -1,5 +1,5 @@ -