From 13c53ccdff67f6f05ffaf480d28dbc7424c4c236 Mon Sep 17 00:00:00 2001 From: luigser Date: Tue, 15 Mar 2016 12:42:55 +0100 Subject: [PATCH] cards updates --- controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html | 10 +++++++++- controllets/paper-card-controllet/paper-card-controllet.html | 7 ++++++- controllets/postit-container-controllet/postit-container-controllet.html | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------- 3 files changed, 104 insertions(+), 89 deletions(-) mode change 100644 => 100755 controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html diff --git a/controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html b/controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html old mode 100644 new mode 100755 index 0ef99ce..91fc670 --- a/controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html +++ b/controllets/cocreation-paper-card-controllet/cocreation-paper-card-controllet.html @@ -83,7 +83,7 @@
- Explore + Explore @@ -124,6 +124,10 @@ type: String, value: "text" }, + roomUrl: { + type: String, + value: undefined + } }, attached: function(){ @@ -134,6 +138,10 @@ var iconButton = Polymer.dom(event).localTarget; iconButton.icon = moreInfo.opened ? 'expand-less' : 'expand-more'; moreInfo.toggle(); + }, + + _onExplore: function(e){ + window.location = this.roomUrl; } }) diff --git a/controllets/paper-card-controllet/paper-card-controllet.html b/controllets/paper-card-controllet/paper-card-controllet.html index 5a479db..c706f6e 100755 --- a/controllets/paper-card-controllet/paper-card-controllet.html +++ b/controllets/paper-card-controllet/paper-card-controllet.html @@ -18,6 +18,9 @@ font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; background-color: white; + position: relative; + float: left; + margin: 40px; } #content { @@ -30,7 +33,7 @@ top: -48px; height: 32px; padding: 16px 0px 0px 8px; - z-index: 1000; + /*z-index: 1000;*/ background: rgba(0,0,0,0.8); color: white; font-weight: 700; @@ -222,11 +225,13 @@ _changeWidth: function(){ this.style.width = this.width + "px"; this.$.content.style.width = this.width - 8 + "px"; + this.$.paper_card_container.style.width = this.width + "px"; }, _changeHeight: function(){ this.style.height = this.height + 64 + "px"; this.$.content.style.height = this.height - 4 + "px"; + this.$.paper_card_container.style.height = this.height + "px"; $(this.$.content).perfectScrollbar(); }, diff --git a/controllets/postit-container-controllet/postit-container-controllet.html b/controllets/postit-container-controllet/postit-container-controllet.html index 7c67b92..f82bf36 100755 --- a/controllets/postit-container-controllet/postit-container-controllet.html +++ b/controllets/postit-container-controllet/postit-container-controllet.html @@ -62,6 +62,7 @@ /*height: 80vh; width: 120vh;*/ display: none; + width: 50%; height: 80%; position: fixed; top: 15%; @@ -88,7 +89,7 @@ top: 0px; right: 0px; --paper-fab-background:#B6B6B6; - z-index: 9999; + /*z-index: 9999;*/ } paper-fab#addPostit { @@ -99,7 +100,7 @@ top: 0px; right: 48px; --paper-fab-background:#2196F3; - z-index: 9999; + /*z-index: 9999;*/ } #container_content { @@ -114,6 +115,7 @@ h2,p{ font-size:100%; font-weight:normal; + word-break: break-all; } ul,li{ list-style:none; @@ -188,6 +190,52 @@ z-index:5; } + #addForm{ + text-decoration:none; + color:#000; + background:#ffc; + display:none; + height:20em; + width:20em; + padding:1em; + -moz-box-shadow:5px 5px 7px rgba(33,33,33,1); + -webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7); + box-shadow: 5px 5px 7px rgba(33,33,33,.7); + -moz-transition:-moz-transform .15s linear; + -o-transition:-o-transform .15s linear; + -webkit-transition:-webkit-transform .15s linear; + position: absolute; + top: 25%; + left: 25%; + } + + #newTitle{ + background: #E6E6E6; + border-radius: 3px; + } + + #newTitle:focus{ + background: transparent; + border-radius: 3px; + border: 2px solid #2196F3; + } + + #newContent{ + background: #E6E6E6; + border-radius: 3px; + } + + #newContent:focus{ + background: transparent; + border-radius: 3px; + border: 2px solid #2196F3; + } + + [contenteditable=true]:empty:before { + content: attr(placeholder); + display: block; /* For Firefox */ + } + + +
+

+

+ + +
+
+ @@ -318,11 +297,17 @@ data : { type: Array, value: undefined + }, + + open : { + type: Boolean, + value: false } }, ready: function(){ $(this.$.container_content).perfectScrollbar(); + if(this.open == true) $(this.$.window).show(); }, _onOpenClick: function() { @@ -331,6 +316,23 @@ _onCloseClick: function(){ $(this.$.window).hide(); + }, + + _onAddPostitClick: function(){ + this.$.addForm.style.display = "block"; + }, + + _onCloseCreatePostitFormClick: function(){ + this.$.addForm.style.display = "none"; + }, + + _onAddNewPostitFormClick: function(){ + //$(this.$.postit_container).append('
  • ' + this.$.newTitle.innerText + '

    ' + this.$.newContent.innerText + '

  • '); + this.fire('postit-container-controllet_create-new-postit', {title : this.$.newTitle.innerText, content: this.$.newContent.innerText, id: this.id}); + this.$.addForm.style.display = "none"; + this.$.newTitle.innerHTML = "Title"; + this.$.newContent.innerHTML = "Content"; + } }); -- libgit2 0.21.4