From 1157b627af8b4f114e1a23608689a02cc176f002 Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Fri, 7 Sep 2012 10:09:24 +0200 Subject: [PATCH 1/8] modified: view/theme/smoothly/style.css modified: view/theme/smoothly/theme.php view/theme/smoothly/mobile --- view/theme/smoothly/style.css | 16 ++++++++++------ view/theme/smoothly/theme.php | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 32374aa3fb..8cf2fabde0 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -1047,13 +1047,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 { diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php index 610f85cb35..e28cc811f5 100644 --- a/view/theme/smoothly/theme.php +++ b/view/theme/smoothly/theme.php @@ -3,7 +3,7 @@ /* * Name: Smoothly * Version: Version 0.3 - * Author: Alex <alex@friendica.pixelbits.de> + * Author: Alex <info@pixelbits.de> * Maintainer: Alex alex@friendica.pixelbits.de> * Description: Theme optimized for Tablets (iPad etc.) * Screenshot: <a href="screenshot.png">Screenshot</a> From 8685ca5a7fdca766cd44b84947f6acd3f396ad8a Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Fri, 7 Sep 2012 10:10:25 +0200 Subject: [PATCH 2/8] new file: view/theme/smoothly/mobile --- view/theme/smoothly/mobile | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 view/theme/smoothly/mobile diff --git a/view/theme/smoothly/mobile b/view/theme/smoothly/mobile new file mode 100644 index 0000000000..e69de29bb2 From 9f7fbbdee3ccdae453f3f7c91d270c864267e36a Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Fri, 7 Sep 2012 16:32:20 +0200 Subject: [PATCH 3/8] modified: view/theme/smoothly/style.css --- .gitignore | 2 ++ view/theme/smoothly/style.css | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 2531fe4cdd..34675be90b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ report/ .buildpath .externalToolBuilders .settings + +view/theme/smoothly \ No newline at end of file diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 8cf2fabde0..a0f1836266 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -79,7 +79,7 @@ li { input[type=text] { - border: 2px solid #b0b0b0; + border: 1px solid #b0b0b0; padding: 2px; /*width: 300px;*/ margin-left: 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; } @@ -1575,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; @@ -1770,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; From c616b05a331ccd14850b7818b16e0cfd20949502 Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Fri, 7 Sep 2012 17:13:51 +0200 Subject: [PATCH 4/8] modified: view/theme/smoothly/jot.tpl modified: view/theme/smoothly/style.css --- view/theme/smoothly/jot.tpl | 11 ++++++----- view/theme/smoothly/style.css | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/view/theme/smoothly/jot.tpl b/view/theme/smoothly/jot.tpl index 9dc1632da1..5f711cf242 100644 --- a/view/theme/smoothly/jot.tpl +++ b/view/theme/smoothly/jot.tpl @@ -1,11 +1,10 @@ + <div id="profile-jot-wrapper" > <div id="profile-jot-banner-wrapper"> <div id="profile-jot-desc" > </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> diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index a0f1836266..d1f50b04d5 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -81,8 +81,8 @@ li { input[type=text] { 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; From 002168ebd91818ee62847be6689600d5fce94fb8 Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Sat, 8 Sep 2012 08:54:18 +0200 Subject: [PATCH 5/8] new file: view/theme/smoothly/js/jquery.ae.image.resize.js new file: view/theme/smoothly/js/jquery.ae.image.resize.min.js modified: view/theme/smoothly/theme.php --- .../smoothly/js/jquery.ae.image.resize.js | 69 +++++++++++ .../smoothly/js/jquery.ae.image.resize.min.js | 1 + view/theme/smoothly/theme.php | 112 +++++++++++++++++- 3 files changed, 176 insertions(+), 6 deletions(-) create mode 100644 view/theme/smoothly/js/jquery.ae.image.resize.js create mode 100644 view/theme/smoothly/js/jquery.ae.image.resize.min.js diff --git a/view/theme/smoothly/js/jquery.ae.image.resize.js b/view/theme/smoothly/js/jquery.ae.image.resize.js new file mode 100644 index 0000000000..bac09cd457 --- /dev/null +++ b/view/theme/smoothly/js/jquery.ae.image.resize.js @@ -0,0 +1,69 @@ +(function( $ ) { + + $.fn.aeImageResize = function( params ) { + + var aspectRatio = 0 + // Nasty I know but it's done only once, so not too bad I guess + // Alternate suggestions welcome :) + , isIE6 = $.browser.msie && (6 == ~~ $.browser.version) + ; + + // We cannot do much unless we have one of these + if ( !params.height && !params.width ) { + return this; + } + + // Calculate aspect ratio now, if possible + if ( params.height && params.width ) { + aspectRatio = params.width / params.height; + } + + // Attach handler to load + // Handler is executed just once per element + // Load event required for Webkit browsers + return this.one( "load", function() { + + // Remove all attributes and CSS rules + this.removeAttribute( "height" ); + this.removeAttribute( "width" ); + this.style.height = this.style.width = ""; + + var imgHeight = this.height + , imgWidth = this.width + , imgAspectRatio = imgWidth / imgHeight + , bxHeight = params.height + , bxWidth = params.width + , bxAspectRatio = aspectRatio; + + // Work the magic! + // If one parameter is missing, we just force calculate it + if ( !bxAspectRatio ) { + if ( bxHeight ) { + bxAspectRatio = imgAspectRatio + 1; + } else { + bxAspectRatio = imgAspectRatio - 1; + } + } + + // Only resize the images that need resizing + if ( (bxHeight && imgHeight > bxHeight) || (bxWidth && imgWidth > bxWidth) ) { + + if ( imgAspectRatio > bxAspectRatio ) { + bxHeight = ~~ ( imgHeight / imgWidth * bxWidth ); + } else { + bxWidth = ~~ ( imgWidth / imgHeight * bxHeight ); + } + + this.height = bxHeight; + this.width = bxWidth; + } + }) + .each(function() { + + // Trigger load event (for Gecko and MSIE) + if ( this.complete || isIE6 ) { + $( this ).trigger( "load" ); + } + }); + }; +})( jQuery ); \ No newline at end of file diff --git a/view/theme/smoothly/js/jquery.ae.image.resize.min.js b/view/theme/smoothly/js/jquery.ae.image.resize.min.js new file mode 100644 index 0000000000..16c30b1239 --- /dev/null +++ b/view/theme/smoothly/js/jquery.ae.image.resize.min.js @@ -0,0 +1 @@ +(function(d){d.fn.aeImageResize=function(a){var i=0,j=d.browser.msie&&6==~~d.browser.version;if(!a.height&&!a.width)return this;if(a.height&&a.width)i=a.width/a.height;return this.one("load",function(){this.removeAttribute("height");this.removeAttribute("width");this.style.height=this.style.width="";var e=this.height,f=this.width,g=f/e,b=a.height,c=a.width,h=i;h||(h=b?g+1:g-1);if(b&&e>b||c&&f>c){if(g>h)b=~~(e/f*c);else c=~~(f/e*b);this.height=b;this.width=c}}).each(function(){if(this.complete||j)d(this).trigger("load")})}})(jQuery); \ No newline at end of file diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php index e28cc811f5..95cc9bd73c 100644 --- a/view/theme/smoothly/theme.php +++ b/view/theme/smoothly/theme.php @@ -2,18 +2,118 @@ /* * Name: Smoothly - * Version: Version 0.3 - * Author: Alex <info@pixelbits.de> - * Maintainer: Alex alex@friendica.pixelbits.de> - * Description: Theme optimized for Tablets (iPad etc.) - * Screenshot: <a href="screenshot.png">Screenshot</a> + * 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.jpg">Screenshot</a> */ +$a->theme_info = array( + 'extends' => 'smoothly', +); +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; +// get resize configuration + +$resize=false; +$site_resize = get_config('smoothly', 'resize' ); +if(local_user()) $resize = get_pconfig(local_user(), 'smoothly', 'resize' ); + +if ($resize===false) $resize=$site_resize; +if ($resize===false) $resize=0; + +if (intval($resize) > 0) { +//load jquery.ae.image.resize.js +$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/smoothly/js/jquery.ae.image.resize.js"; +$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS); +$a->page['htmlhead'] .= ' +<script> + + $(function() { + $(".wall-item-content img").aeImageResize({height: '.$resize.', width: '.$resize.'}); + }); +</script>';} +} + From 393a91ea7857de46f22cd4d8460476505593e89f Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Sat, 8 Sep 2012 09:24:37 +0200 Subject: [PATCH 6/8] modified: view/theme/smoothly/comment_item.tpl new file: view/theme/smoothly/dot.png new file: view/theme/smoothly/moderated_comment.tpl modified: view/theme/smoothly/style.css modified: view/theme/smoothly/theme.php deleted: view/theme/smoothly/icons/dot.png deleted: view/theme/smoothly/js/jquery.ae.image.resize.js deleted: view/theme/smoothly/js/jquery.ae.image.resize.min.js --- view/theme/smoothly/comment_item.tpl | 93 +++++++++++++++------- view/theme/smoothly/dot.png | Bin 0 -> 74 bytes view/theme/smoothly/moderated_comment.tpl | 61 ++++++++++++++ view/theme/smoothly/style.css | 2 +- view/theme/smoothly/theme.php | 32 ++------ 5 files changed, 131 insertions(+), 57 deletions(-) mode change 100644 => 100755 view/theme/smoothly/comment_item.tpl create mode 100644 view/theme/smoothly/dot.png create mode 100755 view/theme/smoothly/moderated_comment.tpl diff --git a/view/theme/smoothly/comment_item.tpl b/view/theme/smoothly/comment_item.tpl old mode 100644 new mode 100755 index 2e9dc5160f..f64ae753b6 --- a/view/theme/smoothly/comment_item.tpl +++ b/view/theme/smoothly/comment_item.tpl @@ -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> - - {{ 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> diff --git a/view/theme/smoothly/dot.png b/view/theme/smoothly/dot.png new file mode 100644 index 0000000000000000000000000000000000000000..6f532518e753104921e5ff425d698ac2779ebddd GIT binary patch literal 74 zcmeAS@N?(olHy`uVBq!ia0vp^%plCc1|-8Yw(bW~f}SppAr-fh6CBuid3paEvM?Hm WGBtekZ#oT>WbkzLb6Mw<&;$VOGY}O3 literal 0 HcmV?d00001 diff --git a/view/theme/smoothly/moderated_comment.tpl b/view/theme/smoothly/moderated_comment.tpl new file mode 100755 index 0000000000..b0451c8c60 --- /dev/null +++ b/view/theme/smoothly/moderated_comment.tpl @@ -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> diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index d1f50b04d5..9667eaf1d0 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -3314,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;*/ } diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php index 95cc9bd73c..e69b8a3b99 100644 --- a/view/theme/smoothly/theme.php +++ b/view/theme/smoothly/theme.php @@ -6,16 +6,14 @@ * Version: 0.4 * Author: Alex <https://friendica.pixelbits.de/profile/alex> * Maintainer: Alex <https://friendica.pixelbits.de/profile/alex> - * Screenshot: <a href="screenshot.jpg">Screenshot</a> + * Screenshot: <a href="screenshot.png">Screenshot</a> */ -$a->theme_info = array( - 'extends' => 'smoothly', -); +$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(); @@ -52,9 +50,10 @@ function cmtBbOpen(id) { 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');}, @@ -95,25 +94,4 @@ $('.savedsearchterm').hover( </script> EOT; -// get resize configuration - -$resize=false; -$site_resize = get_config('smoothly', 'resize' ); -if(local_user()) $resize = get_pconfig(local_user(), 'smoothly', 'resize' ); - -if ($resize===false) $resize=$site_resize; -if ($resize===false) $resize=0; - -if (intval($resize) > 0) { -//load jquery.ae.image.resize.js -$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/smoothly/js/jquery.ae.image.resize.js"; -$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $imageresizeJS); -$a->page['htmlhead'] .= ' -<script> - - $(function() { - $(".wall-item-content img").aeImageResize({height: '.$resize.', width: '.$resize.'}); - }); -</script>';} } - From b6d310675b0e17ab407d5d269718efd5ec966c8f Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Sat, 8 Sep 2012 09:25:06 +0200 Subject: [PATCH 7/8] deleted: view/theme/smoothly/icons/dot.png deleted: view/theme/smoothly/js/jquery.ae.image.resize.js deleted: view/theme/smoothly/js/jquery.ae.image.resize.min.js --- view/theme/smoothly/icons/dot.png | Bin 74 -> 0 bytes .../smoothly/js/jquery.ae.image.resize.js | 69 ------------------ .../smoothly/js/jquery.ae.image.resize.min.js | 1 - 3 files changed, 70 deletions(-) delete mode 100644 view/theme/smoothly/icons/dot.png delete mode 100644 view/theme/smoothly/js/jquery.ae.image.resize.js delete mode 100644 view/theme/smoothly/js/jquery.ae.image.resize.min.js diff --git a/view/theme/smoothly/icons/dot.png b/view/theme/smoothly/icons/dot.png deleted file mode 100644 index 6f532518e753104921e5ff425d698ac2779ebddd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74 zcmeAS@N?(olHy`uVBq!ia0vp^%plCc1|-8Yw(bW~f}SppAr-fh6CBuid3paEvM?Hm WGBtekZ#oT>WbkzLb6Mw<&;$VOGY}O3 diff --git a/view/theme/smoothly/js/jquery.ae.image.resize.js b/view/theme/smoothly/js/jquery.ae.image.resize.js deleted file mode 100644 index bac09cd457..0000000000 --- a/view/theme/smoothly/js/jquery.ae.image.resize.js +++ /dev/null @@ -1,69 +0,0 @@ -(function( $ ) { - - $.fn.aeImageResize = function( params ) { - - var aspectRatio = 0 - // Nasty I know but it's done only once, so not too bad I guess - // Alternate suggestions welcome :) - , isIE6 = $.browser.msie && (6 == ~~ $.browser.version) - ; - - // We cannot do much unless we have one of these - if ( !params.height && !params.width ) { - return this; - } - - // Calculate aspect ratio now, if possible - if ( params.height && params.width ) { - aspectRatio = params.width / params.height; - } - - // Attach handler to load - // Handler is executed just once per element - // Load event required for Webkit browsers - return this.one( "load", function() { - - // Remove all attributes and CSS rules - this.removeAttribute( "height" ); - this.removeAttribute( "width" ); - this.style.height = this.style.width = ""; - - var imgHeight = this.height - , imgWidth = this.width - , imgAspectRatio = imgWidth / imgHeight - , bxHeight = params.height - , bxWidth = params.width - , bxAspectRatio = aspectRatio; - - // Work the magic! - // If one parameter is missing, we just force calculate it - if ( !bxAspectRatio ) { - if ( bxHeight ) { - bxAspectRatio = imgAspectRatio + 1; - } else { - bxAspectRatio = imgAspectRatio - 1; - } - } - - // Only resize the images that need resizing - if ( (bxHeight && imgHeight > bxHeight) || (bxWidth && imgWidth > bxWidth) ) { - - if ( imgAspectRatio > bxAspectRatio ) { - bxHeight = ~~ ( imgHeight / imgWidth * bxWidth ); - } else { - bxWidth = ~~ ( imgWidth / imgHeight * bxHeight ); - } - - this.height = bxHeight; - this.width = bxWidth; - } - }) - .each(function() { - - // Trigger load event (for Gecko and MSIE) - if ( this.complete || isIE6 ) { - $( this ).trigger( "load" ); - } - }); - }; -})( jQuery ); \ No newline at end of file diff --git a/view/theme/smoothly/js/jquery.ae.image.resize.min.js b/view/theme/smoothly/js/jquery.ae.image.resize.min.js deleted file mode 100644 index 16c30b1239..0000000000 --- a/view/theme/smoothly/js/jquery.ae.image.resize.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(d){d.fn.aeImageResize=function(a){var i=0,j=d.browser.msie&&6==~~d.browser.version;if(!a.height&&!a.width)return this;if(a.height&&a.width)i=a.width/a.height;return this.one("load",function(){this.removeAttribute("height");this.removeAttribute("width");this.style.height=this.style.width="";var e=this.height,f=this.width,g=f/e,b=a.height,c=a.width,h=i;h||(h=b?g+1:g-1);if(b&&e>b||c&&f>c){if(g>h)b=~~(e/f*c);else c=~~(f/e*b);this.height=b;this.width=c}}).each(function(){if(this.complete||j)d(this).trigger("load")})}})(jQuery); \ No newline at end of file From a04d0e6832f6026e1e84099d8f081b2338249e3c Mon Sep 17 00:00:00 2001 From: pixelroot <info@pixelbits.de> Date: Sat, 8 Sep 2012 09:26:13 +0200 Subject: [PATCH 8/8] deleted: view/theme/smoothly/mobile --- view/theme/smoothly/mobile | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 view/theme/smoothly/mobile diff --git a/view/theme/smoothly/mobile b/view/theme/smoothly/mobile deleted file mode 100644 index e69de29bb2..0000000000