1
0
Fork 0

Merge pull request #461 from pixelroot/master

Version 0.4
This commit is contained in:
fermionic 2012-09-08 07:33:26 -07:00
commit 1088257aad
7 changed files with 237 additions and 55 deletions

2
.gitignore vendored
View file

@ -21,3 +21,5 @@ report/
.buildpath
.externalToolBuilders
.settings
view/theme/smoothly

93
view/theme/smoothly/comment_item.tpl Normal file → Executable file
View file

@ -1,31 +1,66 @@
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
{{ if $threaded }}
<span id="hide-commentbox-$id" class="hide-commentbox fakelink" onclick="showHideCommentBox($id);">$comment</span>
<form class="comment-edit-form" style="display: none;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
{{ else }}
<form class="comment-edit-form" style="display: block;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
{{ endif }}
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<ul class="comment-edit-bb-$id">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="$edbold"
onclick="insertFormatting('$comment','b', $id);"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="$editalic"
onclick="insertFormatting('$comment','i', $id);"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="$eduline"
onclick="insertFormatting('$comment','u', $id);"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="$edquote"
onclick="insertFormatting('$comment','quote', $id);"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="$edcode"
onclick="insertFormatting('$comment','code', $id);"></a></li>
<li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="$edimg"
onclick="insertFormatting('$comment','img', $id);"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="$edurl"
onclick="insertFormatting('$comment','url', $id);"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="$edvideo"
onclick="insertFormatting('$comment','video', $id);"></a></li>
</ul>
<div class="comment-edit-bb-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);" >$comment</textarea>
{{ if $qcomment }}
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
<option value=""></option>
{{ for $qcomment as $qc }}
<option value="$qc">$qc</option>
{{ endfor }}
</select>
{{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
</div>
<div class="comment-edit-end"></div>
</form>
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
{{ if $qcomment }}
{{ for $qcomment as $qc }}
<span class="fakelink qcomment" onclick="commentInsert(this,$id); return false;" >$qc</span>
&nbsp;
{{ endfor }}
{{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
</div>
<div class="comment-edit-end"></div>
</form>
</div>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>

View file

Before

Width:  |  Height:  |  Size: 74 B

After

Width:  |  Height:  |  Size: 74 B

View file

@ -1,11 +1,10 @@
<div id="profile-jot-wrapper" >
<div id="profile-jot-banner-wrapper">
<div id="profile-jot-desc" >&nbsp;</div>
<div id="character-counter" class="grey" style="display: none;">0</div>
<div id="profile-rotator-wrapper" style="display: $visitor;" >
<img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display:none;" />
</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" />
@ -16,12 +15,14 @@
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
<div id="jot-text-wrap">
<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="88" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
</div>
<div id="profile-upload-wrapper" class="jot-tool" style="display: none;" >
<div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="icon border camera" title="$upload"></a></div>
<div id="wall-image-upload-div" ><a onclick="return false;" id="wall-image-upload" class="icon border camera" title="$upload"></a></div>
</div>
<div id="profile-attach-wrapper" class="jot-tool" style="display: none;" >
<div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="icon border attach" title="$attach"></a></div>

View file

@ -0,0 +1,61 @@
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<div id="mod-cmnt-wrap-$id" class="mod-cmnt-wrap" style="display:none">
<div id="mod-cmnt-name-lbl-$id" class="mod-cmnt-name-lbl">$lbl_modname</div>
<input type="text" id="mod-cmnt-name-$id" class="mod-cmnt-name" name="mod-cmnt-name" value="$modname" />
<div id="mod-cmnt-email-lbl-$id" class="mod-cmnt-email-lbl">$lbl_modemail</div>
<input type="text" id="mod-cmnt-email-$id" class="mod-cmnt-email" name="mod-cmnt-email" value="$modemail" />
<div id="mod-cmnt-url-lbl-$id" class="mod-cmnt-url-lbl">$lbl_modurl</div>
<input type="text" id="mod-cmnt-url-$id" class="mod-cmnt-url" name="mod-cmnt-url" value="$modurl" />
</div>
<ul class="comment-edit-bb-$id">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="$edbold"
onclick="insertFormatting('$comment','b', $id);"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="$editalic"
onclick="insertFormatting('$comment','i', $id);"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="$eduline"
onclick="insertFormatting('$comment','u', $id);"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="$edquote"
onclick="insertFormatting('$comment','quote', $id);"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="$edcode"
onclick="insertFormatting('$comment','code', $id);"></a></li>
<li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="$edimg"
onclick="insertFormatting('$comment','img', $id);"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="$edurl"
onclick="insertFormatting('$comment','url', $id);"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="$edvideo"
onclick="insertFormatting('$comment','video', $id);"></a></li>
</ul>
<div class="comment-edit-bb-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);" >$comment</textarea>
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
</div>
<div class="comment-edit-end"></div>
</form>
</div>

View file

@ -79,10 +79,10 @@ li {
input[type=text] {
border: 2px solid #b0b0b0;
border: 1px solid #b0b0b0;
padding: 2px;
/*width: 300px;*/
margin-left: 3px;
width: 466px;
margin-left: 0px;
-webkit-border-radius: 3px 3px 3px 3px;
-moz-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
@ -145,7 +145,7 @@ section {
.mframe {
padding: 2px;
background-color: #efefef;
border: 2px solid #dddddd;
border: 1px solid #dddddd;
-moz-box-shadow: 3px 3px 4px #959494;
-webkit-box-shadow: 3px 3px 4px #959494;
box-shadow: 3px 3px 4px #959494;
@ -451,7 +451,7 @@ aside {
/*width: 21%;*/
width: 200px; /*250*/
margin-top: 40px; /*50*/
font-size: 0.8em;
font-size: 1.0em;
font-style: bold;
}
@ -547,13 +547,14 @@ aside h4 { font-size: 1.3em; }
#netsearch-box {
background-color: #f6f6f6;
padding: 10px 8px 10px 8px;
padding: 5px 5px 5px 5px;
}
#netsearch-box input[type="text"] {
width: 97%;
width: 175px;
}
#netsearch-box input[type="submit"] {
width: 48%;
margin-top: 5px;
}
h3#search:before {
@ -666,7 +667,7 @@ h3#search:before {
ul .sidebar-group-li{
list-style: none;
font-size: 1.2em;
font-size: 1.0em;
padding-bottom: 5px;
}
@ -1047,13 +1048,17 @@ profile-jot-banner-wrapper {
}
.wall-item-lock-wrapper { float: right; }
.wall-item-dislike,
.wall-item-like,
.wall-item-author {
/*clear: left;*/
.wall-item-like {
clear: left;
font-size: 0.9em;
margin: 0px 0px 10px 450px; /*140*/
padding-left: 0px; /*10*/
/* font-variant:small-caps; */
margin: 0px 0px 10px 450px;
padding-left: 0px;
}
.wall-item-author {
font-size: 0.9em;
margin: 0px 0px 0px 100px;
padding-left: 0px;
}
.wall-item-author a {
@ -1571,7 +1576,7 @@ div[id$="wrapper"] br { clear: left; }
select, input {
margin-top: 0px;
border: 2px solid #b0b0b0;
border: 1px solid #b0b0b0;
padding: 2px;
-webkit-border-radius: 3px 3px 3px 3px;
-moz-border-radius: 3px 3px 3px 3px;
@ -1766,7 +1771,7 @@ margin-left: 0px;
float: left;
padding: 5px;
background-color: #efefef;
border: 2px dotted #eeeeee;
border: 1px dotted #eeeeee;
-moz-box-shadow: 3px 3px 4px #959494;
-webkit-box-shadow: 3px 3px 4px #959494;
box-shadow: 3px 3px 4px #959494;
@ -3309,7 +3314,7 @@ ul.menu-popup {
}
hr.line-dots {
background: url("icons/dot.png") repeat-x scroll left center transparent;
background: url("dot.png") repeat-x scroll left center transparent;
border: medium none;
/*padding: 0.5em 0;*/
}

View file

@ -2,18 +2,96 @@
/*
* Name: Smoothly
* Version: Version 0.3
* Author: Alex <alex@friendica.pixelbits.de>
* Maintainer: Alex alex@friendica.pixelbits.de>
* Description: Theme optimized for Tablets (iPad etc.)
* Description: Theme opzimized for Tablets
* Version: 0.4
* Author: Alex <https://friendica.pixelbits.de/profile/alex>
* Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
* Screenshot: <a href="screenshot.png">Screenshot</a>
*/
$a->theme_info = array();
function smoothly_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
function insertFormatting(comment,BBcode,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
$("#comment-edit-text-" + id).val(tmpStr);
}
textarea = document.getElementById("comment-edit-text-" +id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url"){
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url"){
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}
function cmtBbOpen(id) {
$(".comment-edit-bb-" + id).show();
}
function cmtBbClose(comment, id) {
$(".comment-edit-bb-" + id).hide();
}
$(document).ready(function() {
$('html').click(function() { $("#nav-notifications-menu" ).hide(); });
$('.group-edit-icon').hover(
function() {
$(this).addClass('icon'); $(this).removeClass('iconspacer');},
function() {
$(this).removeClass('icon'); $(this).addClass('iconspacer');}
);
$('.sidebar-group-element').hover(
function() {
id = $(this).attr('id');
$('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
function() {
id = $(this).attr('id');
$('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
);
$('.savedsearchdrop').hover(
function() {
$(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
function() {
$(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
);
$('.savedsearchterm').hover(
function() {
id = $(this).attr('id');
$('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
function() {
id = $(this).attr('id');
$('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
);
});
</script>
EOT;
}