quattro: first work on jot style

This commit is contained in:
Fabio Comuni 2011-12-19 18:02:43 +01:00
parent a6f3b58293
commit 16d45e5c13
6 changed files with 256 additions and 189 deletions

View file

@ -81,7 +81,7 @@ function initEditor(cb){
ed.onInit.add(function(ed) { ed.onInit.add(function(ed) {
ed.pasteAsPlainText = true; ed.pasteAsPlainText = true;
$("#profile-jot-text-loading").hide(); $("#profile-jot-text-loading").hide();
$("#profile-jot-submit-wrapper").show(); $(".jothidden").show();
if (typeof cb!="undefined") cb(); if (typeof cb!="undefined") cb();
}); });
@ -98,19 +98,21 @@ function initEditor(cb){
} }
} }
function enableOnUser(){
if (editor) return;
$(this).val("");
initEditor();
}
</script> </script>
<script type="text/javascript" src="js/ajaxupload.js" ></script> <script type="text/javascript" src="js/ajaxupload.js" ></script>
<script> <script>
var ispublic = '$ispublic'; var ispublic = '$ispublic';
$(document).ready(function() { $(document).ready(function() {
/* enable tinymce on focus */ /* enable tinymce on focus and click */
$("#profile-jot-text").focus(function(){ $("#profile-jot-text").focus(enableOnUser);
if (editor) return; $("#profile-jot-text").click(enableOnUser);
$(this).val("");
initEditor();
});
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(
'wall-image-upload', 'wall-image-upload',

View file

@ -1,64 +1,36 @@
<form action="$action" method="post">
<div id="profile-jot-wrapper" > <div id="jot">
<div id="profile-jot-banner-wrapper">
<div id="profile-jot-desc" >&nbsp;</div> <div id="profile-jot-desc" >&nbsp;</div>
<input name="title" id="jot-title" type="text" placeholder="$titleplaceholder" value="$title" class="jothidden" style="display:none">
<div id="character-counter" class="grey"></div> <div id="character-counter" class="grey"></div>
</div>
<div id="profile-jot-banner-end"></div>
<form id="profile-jot-form" action="$action" method="post" >
<input type="hidden" name="type" value="$ptyp" /> <input type="hidden" name="type" value="$ptyp" />
<input type="hidden" name="profile_uid" value="$profile_uid" /> <input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="location" id="jot-location" value="$defloc" /> <input type="hidden" name="location" id="jot-location" value="$defloc" />
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="title" id="jot-title" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
{{ if $content }}<script>initEditor();</script>{{ endif }} {{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-jot-submit-wrapper" style="display:none">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
<div id="profile-upload-wrapper" style="display: $visitor;" >
<div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div>
</div>
<div id="profile-attach-wrapper" style="display: $visitor;" >
<div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div>
</div>
<div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" > <ul id="jot-tools" class="jothidden" style="display:none">
<a id="profile-link" class="icon link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;"></a> <li><a href="#" onclick="return false;" id="wall-image-upload">$upload</a></li>
</div> <li><a href="#" onclick="return false;" id="wall-file-upload" >$attach</a></li>
<div id="profile-video-wrapper" style="display: $visitor;" > <li><a id="profile-link" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">$weblink</a></li>
<a id="profile-video" class="icon video" title="$video" onclick="jotVideoURL();return false;"></a> <li><a id="profile-video" onclick="jotVideoURL();return false;">$video</a></li>
</div> <li><a id="profile-audio" onclick="jotAudioURL();return false;">$audio</a></li>
<div id="profile-audio-wrapper" style="display: $visitor;" > <li><a id="profile-location" onclick="jotGetLocation();return false;">$setloc</a></li>
<a id="profile-audio" class="icon audio" title="$audio" onclick="jotAudioURL();return false;"></a> <li><a id="profile-nolocation" onclick="jotClearLocation();return false;">$noloc</a></li>
</div>
<div id="profile-location-wrapper" style="display: $visitor;" >
<a id="profile-location" class="icon globe" title="$setloc" onclick="jotGetLocation();return false;"></a>
</div>
<div id="profile-nolocation-wrapper" style="display: none;" >
<a id="profile-nolocation" class="icon noglobe" title="$noloc" onclick="jotClearLocation();return false;"></a>
</div>
<div id="profile-title-wrapper" style="display: $visitor;" >
<a id="profile-title" class="icon article" title="$title" onclick="jotTitle();return false;"></a>
</div>
<div id="profile-jot-plugin-wrapper">
$jotplugins $jotplugins
<li class="perms"><a id="jot-perms-icon" href="#profile-jot-acl-wrapper" class="icon s22 $lockstate $bang" title="$permset" ></a></li>
<li class="submit"><input type="submit" id="profile-jot-submit" name="submit" value="$share" /></li>
</ul>
</div> </div>
<div id="profile-rotator-wrapper" style="display: $visitor;" > </form>
<img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div>
<div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" >
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon $lockstate" title="$permset" ></a>$bang
</div>
<div id="profile-jot-perms-end"></div>
<div style="display: none;"> <div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;"> <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
@ -70,8 +42,6 @@
</div> </div>
</div> </div>
</div>
<div id="profile-jot-end"></div>
</form>
</div>

View file

@ -21,36 +21,32 @@
{{ if $content }}<script>initEditor();</script>{{ endif }} {{ if $content }}<script>initEditor();</script>{{ endif }}
<div id="profile-jot-submit-wrapper" style="display:none"> <div id="profile-jot-submit-wrapper" style="display:none">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
<div id="profile-upload-wrapper" style="display: $visitor;" > <div id="profile-upload-wrapper" style="display: $visitor;" >
<div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="camera" title="$upload">image upload</a></div> <div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div>
</div> </div>
<div id="profile-attach-wrapper" style="display: $visitor;" > <div id="profile-attach-wrapper" style="display: $visitor;" >
<div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="attach" title="$attach">attach file</a></div> <div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div>
</div> </div>
<div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" > <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >
<a id="profile-link" class="link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;">enter link</a> <a id="profile-link" class="icon link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;"></a>
</div> </div>
<div id="profile-video-wrapper" style="display: $visitor;" > <div id="profile-video-wrapper" style="display: $visitor;" >
<a id="profile-video" class="video" title="$video" onclick="jotVideoURL();return false;">video url</a> <a id="profile-video" class="icon video" title="$video" onclick="jotVideoURL();return false;"></a>
</div> </div>
<div id="profile-audio-wrapper" style="display: $visitor;" > <div id="profile-audio-wrapper" style="display: $visitor;" >
<a id="profile-audio" class="audio" title="$audio" onclick="jotAudioURL();return false;">audio url</a> <a id="profile-audio" class="icon audio" title="$audio" onclick="jotAudioURL();return false;"></a>
</div> </div>
<div id="profile-location-wrapper" style="display: $visitor;" > <div id="profile-location-wrapper" style="display: $visitor;" >
<a id="profile-location" class="globe" title="$setloc" onclick="jotGetLocation();return false;">set location</a> <a id="profile-location" class="icon globe" title="$setloc" onclick="jotGetLocation();return false;"></a>
</div> </div>
<div id="profile-nolocation-wrapper" style="display: none;" > <div id="profile-nolocation-wrapper" style="display: none;" >
<a id="profile-nolocation" class="noglobe" title="$noloc" onclick="jotClearLocation();return false;">no location</a> <a id="profile-nolocation" class="icon noglobe" title="$noloc" onclick="jotClearLocation();return false;"></a>
</div> </div>
<div id="profile-title-wrapper" style="display: $visitor;" > <div id="profile-title-wrapper" style="display: $visitor;" >
<a id="profile-title" class="article" title="$title" onclick="jotTitle();return false;">title</a> <a id="profile-title" class="icon article" title="$title" onclick="jotTitle();return false;"></a>
</div> </div>
<div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" >
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="$lockstate" title="$permset" >permissions</a>$bang
</div>
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
<div id="profile-jot-perms-end"></div>
<div id="profile-jot-plugin-wrapper"> <div id="profile-jot-plugin-wrapper">
$jotplugins $jotplugins
@ -59,6 +55,10 @@
<div id="profile-rotator-wrapper" style="display: $visitor;" > <div id="profile-rotator-wrapper" style="display: $visitor;" >
<img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div> </div>
<div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" >
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon $lockstate" title="$permset" ></a>$bang
</div>
<div id="profile-jot-perms-end"></div>
<div style="display: none;"> <div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;"> <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">

View file

@ -78,3 +78,15 @@
@CommentBoxFullBorderColor: @Grey5; @CommentBoxFullBorderColor: @Grey5;
@TagColor: @Grey1; @TagColor: @Grey1;
@JotToolsBackgroundColor: @Metalic4;
@JotToolsBorderColor: @Metalic2;
@JotToolsOverBackgroundColor: @Metalic3;
@JotToolsOverBorderColor: @Metalic1;
@JotToolsText: @Grey2;
@JotSubmitBackgroundColor: @Grey2;
@JotSubmitText: @Grey4;
@JotSubmitOverBackgroundColor: @Metalic1;
@JotSubmitOverText: @Grey4;
@JotPermissionUnlockBackgroundColor: @Grey2;
@JotPermissionLockBackgroundColor: @Grey4;

View file

@ -9,6 +9,7 @@ body {
margin: 50px 0px 0px 0px; margin: 50px 0px 0px 0px;
display:table; display:table;
} }
h4 { font-size: 1.1em }
.shadow(@x: 0px, @y: 5px){ .shadow(@x: 0px, @y: 5px){
-webkit-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); -webkit-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7);
@ -40,6 +41,7 @@ a:hover {color: @LinkHover; text-decoration: underline; }
.left { float: left; } .left { float: left; }
.right { float: right; } .right { float: right; }
.hidden { display: none; } .hidden { display: none; }
.clear { clear: both; }
code { code {
font-family: Courier, monospace; font-family: Courier, monospace;
@ -338,6 +340,7 @@ section {
position: relative; position: relative;
padding: 10px; padding: 10px;
margin-bottom: 20px; margin-bottom: 20px;
width: 780px;
} }
.wall-item-decor { position: absolute; left: 790px; top: -10px; width: 16px;} .wall-item-decor { position: absolute; left: 790px; top: -10px; width: 16px;}
.unstarred { display: none; } .unstarred { display: none; }
@ -457,77 +460,85 @@ section {
} }
} }
/* editor */
#jot {
#profile-jot-wrapper {
width: 100%; width: 100%;
margin: 0px 2em 20px 0px; margin: 0px 2em 20px 0px;
}
.profile-jot-text { .profile-jot-text {
height: 1em; width: 100%; font-size: 10px; height: 1em; width: 99%; font-size: 10px;
color: @CommentBoxEmptyColor; color: @CommentBoxEmptyColor;
border: 1px solid @CommentBoxEmptyBorderColor; border: 1px solid @CommentBoxEmptyBorderColor;
padding:0.3em; padding:0.3em;
} }
#profile-jot-plugin-wrapper,
#profile-jot-submit-wrapper {
margin-top: 10px;
}
#jot-tools {
#profile-jot-submit { margin: 0px; padding: 0px;
height: 40px; overflow: none;
width: 800px;
background-color: @JotToolsBackgroundColor;
border-bottom: 2px solid @JotToolsBorderColor;
li {
list-style: none;
float: left; float: left;
width: 80px;
height: 40px;
border-bottom: 2px solid @JotToolsBorderColor;
a {
display: block;
color: @JotToolsText;
width: 100%;
height:40px;
text-align: center;
line-height: 40px;
overflow: hidden;
} }
#profile-upload-wrapper{
float: left;
margin-left: 10px;
} }
#profile-attach-wrapper, li:hover {
#profile-rotator, background-color: @JotToolsOverBackgroundColor;
#profile-link-wrapper, border-bottom: 2px solid @JotToolsOverBorderColor;
#profile-youtube-wrapper, }
#profile-video-wrapper, li.perms {
#profile-audio-wrapper, float: right;
#profile-location-wrapper, width: 40px;
#profile-nolocation-wrapper, a.unlock {
#profile-title-wrapper { width: 30px;
float: left; border-left: 10px solid @JotPermissionUnlockBackgroundColor;
margin-left: 20px; background-color: @JotPermissionUnlockBackgroundColor;
}
a.lock {
width: 30px;
border-left: 10px solid @JotPermissionLockBackgroundColor;
background-color: @JotPermissionLockBackgroundColor;
} }
#profile-jot-perms { }
float: left; li.submit {
margin-left: 35px; float: right;
margin-right: 35px; background-color: @JotSubmitBackgroundColor;
border-bottom: 2px solid @JotSubmitBackgroundColor;
border-right: 1px solid @Grey4;
border-left: 1px solid @Grey4;
input {
border: 0px; margin: 0px; padding: 0px;
background-color: @JotSubmitBackgroundColor;
color: @JotSubmitText;
width: 80px; height: 40px;
line-height: 40px;
}
input:hover {
background-color: @JotSubmitOverBackgroundColor;
color: @JotSubmitOverText;
}
}
} }
#profile-jot-perms-end {
/*clear: left;*/
height: 20px;
} }
#profile-jot-plugin-end{
clear: both;
}
.profile-jot-net {
float: left;
margin-right: 10px;
margin-top: 5px;
margin-bottom: 5px;
}
#profile-jot-networks-end {
clear: both;
}
#profile-jot-end, #about-jot-end {
margin-bottom: 15px;
}
#about-jot-submit-wrapper {
margin-top: 15px;
}
/** buttons **/ /** buttons **/
/*input[type="submit"] { /*input[type="submit"] {
border: 0px; border: 0px;
@ -717,6 +728,31 @@ ul.tabs {
&.radio .field_help { margin-left: 0px; } &.radio .field_help { margin-left: 0px; }
} }
#profile-edit-links li {
list-style: none;
}
/* oauth */
.oauthapp {
height: auto; overflow: auto;
border-bottom: 2px solid #cccccc;
padding-bottom: 1em;
margin-bottom: 1em;
}
.oauthapp img {
float: left;
width: 48px; height: 48px;
margin: 10px;
}
.oauthapp img.noicon {
background-image: url("../../../images/icons/48/plugin.png");
background-position: center center;
background-repeat: no-repeat;
}
.oauthapp a {
float: left;
}
/* page footer */ /* page footer */
footer { height: 100px; display: table-row; } footer { height: 100px; display: table-row; }

View file

@ -168,6 +168,9 @@ body {
margin: 50px 0px 0px 0px; margin: 50px 0px 0px 0px;
display: table; display: table;
} }
h4 {
font-size: 1.1em;
}
a, a:link { a, a:link {
color: #005c94; color: #005c94;
text-decoration: none; text-decoration: none;
@ -189,6 +192,9 @@ a:hover {
.hidden { .hidden {
display: none; display: none;
} }
.clear {
clear: both;
}
code { code {
font-family: Courier, monospace; font-family: Courier, monospace;
white-space: pre; white-space: pre;
@ -609,6 +615,7 @@ section {
position: relative; position: relative;
padding: 10px; padding: 10px;
margin-bottom: 20px; margin-bottom: 20px;
width: 780px;
} }
.wall-item-decor { .wall-item-decor {
position: absolute; position: absolute;
@ -779,67 +786,82 @@ section {
background: url("../../../images/tag.png") no-repeat center right; background: url("../../../images/tag.png") no-repeat center right;
color: #ffffff; color: #ffffff;
} }
#profile-jot-wrapper { /* editor */
#jot {
width: 100%; width: 100%;
margin: 0px 2em 20px 0px; margin: 0px 2em 20px 0px;
} }
.profile-jot-text { #jot .profile-jot-text {
height: 1em; height: 1em;
width: 100%; width: 99%;
font-size: 10px; font-size: 10px;
color: #999999; color: #999999;
border: 1px solid #999999; border: 1px solid #999999;
padding: 0.3em; padding: 0.3em;
} }
#profile-jot-plugin-wrapper, #profile-jot-submit-wrapper { #jot #jot-tools {
margin-top: 10px; margin: 0px;
padding: 0px;
height: 40px;
overflow: none;
width: 800px;
background-color: #0e232e;
border-bottom: 2px solid #9eabb0;
} }
#profile-jot-submit { #jot #jot-tools li {
list-style: none;
float: left; float: left;
width: 80px;
height: 40px;
border-bottom: 2px solid #9eabb0;
} }
#profile-upload-wrapper { #jot #jot-tools li a {
float: left; display: block;
margin-left: 10px; color: #cccccc;
width: 100%;
height: 40px;
text-align: center;
line-height: 40px;
overflow: hidden;
} }
#profile-attach-wrapper, #jot #jot-tools li:hover {
#profile-rotator, background-color: #364e59;
#profile-link-wrapper, border-bottom: 2px solid #bdcdd4;
#profile-youtube-wrapper,
#profile-video-wrapper,
#profile-audio-wrapper,
#profile-location-wrapper,
#profile-nolocation-wrapper,
#profile-title-wrapper {
float: left;
margin-left: 20px;
} }
#profile-jot-perms { #jot #jot-tools li.perms {
float: left; float: right;
margin-left: 35px; width: 40px;
margin-right: 35px;
} }
#profile-jot-perms-end { #jot #jot-tools li.perms a.unlock {
/*clear: left;*/ width: 30px;
border-left: 10px solid #cccccc;
height: 20px; background-color: #cccccc;
} }
#profile-jot-plugin-end { #jot #jot-tools li.perms a.lock {
clear: both; width: 30px;
border-left: 10px solid #666666;
background-color: #666666;
} }
.profile-jot-net { #jot #jot-tools li.submit {
float: left; float: right;
margin-right: 10px; background-color: #cccccc;
margin-top: 5px; border-bottom: 2px solid #cccccc;
margin-bottom: 5px; border-right: 1px solid #666666;
border-left: 1px solid #666666;
} }
#profile-jot-networks-end { #jot #jot-tools li.submit input {
clear: both; border: 0px;
margin: 0px;
padding: 0px;
background-color: #cccccc;
color: #666666;
width: 80px;
height: 40px;
line-height: 40px;
} }
#profile-jot-end, #about-jot-end { #jot #jot-tools li.submit input:hover {
margin-bottom: 15px; background-color: #bdcdd4;
} color: #666666;
#about-jot-submit-wrapper {
margin-top: 15px;
} }
/** buttons **/ /** buttons **/
/*input[type="submit"] { /*input[type="submit"] {
@ -1025,6 +1047,31 @@ ul.tabs li .active {
.field.radio .field_help { .field.radio .field_help {
margin-left: 0px; margin-left: 0px;
} }
#profile-edit-links li {
list-style: none;
}
/* oauth */
.oauthapp {
height: auto;
overflow: auto;
border-bottom: 2px solid #cccccc;
padding-bottom: 1em;
margin-bottom: 1em;
}
.oauthapp img {
float: left;
width: 48px;
height: 48px;
margin: 10px;
}
.oauthapp img.noicon {
background-image: url("../../../images/icons/48/plugin.png");
background-position: center center;
background-repeat: no-repeat;
}
.oauthapp a {
float: left;
}
/* page footer */ /* page footer */
footer { footer {
height: 100px; height: 100px;