From 999c3439e6897525ff23bcbac9beb6a61f4bb421 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Tue, 6 Nov 2012 08:43:19 -0700 Subject: [PATCH] fix mobile photo uploads; better theme control; frost improvements --- boot.php | 33 ++- include/conversation.php | 12 +- include/onepoll.php | 267 +++++++++--------- index.php | 46 ++- mod/wall_upload.php | 8 +- view/field_checkbox.tpl | 2 +- view/theme/frost-mobile/end.tpl | 2 +- view/theme/frost-mobile/field_checkbox.tpl | 2 +- view/theme/frost-mobile/head.tpl | 2 +- .../js/jquery.divgrow-1.3.1.f1.js | 92 ++++++ .../js/jquery.divgrow-1.3.1.f1.min.js | 30 ++ view/theme/frost-mobile/js/main.js | 38 ++- view/theme/frost-mobile/js/main.min.js | 2 +- view/theme/frost-mobile/js/theme.js | 10 +- view/theme/frost-mobile/js/theme.min.js | 2 +- view/theme/frost-mobile/login-style.css | 14 +- view/theme/frost-mobile/login_head.tpl | 2 +- view/theme/frost-mobile/style.css | 50 +++- view/theme/frost-mobile/theme.php | 20 +- view/theme/frost-mobile/wall_thread.tpl | 6 +- view/theme/frost/end.tpl | 4 +- .../theme/frost/js/jquery.divgrow-1.3.1.f1.js | 92 ++++++ .../frost/js/jquery.divgrow-1.3.1.f1.min.js | 30 ++ view/theme/frost/js/main.js | 38 ++- view/theme/frost/js/main.min.js | 2 +- view/theme/frost/js/theme.js | 4 +- view/theme/frost/js/theme.min.js | 2 +- view/theme/frost/login-style.css | 9 + view/theme/frost/login_head.tpl | 2 +- view/theme/frost/style.css | 27 +- view/theme/frost/theme.php | 15 +- view/theme/frost/wall_thread.tpl | 18 +- 32 files changed, 605 insertions(+), 278 deletions(-) create mode 100644 view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js create mode 100644 view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js create mode 100644 view/theme/frost/js/jquery.divgrow-1.3.1.f1.js create mode 100644 view/theme/frost/js/jquery.divgrow-1.3.1.f1.min.js diff --git a/boot.php b/boot.php index 4bdf25d410..addc0c107c 100644 --- a/boot.php +++ b/boot.php @@ -361,17 +361,26 @@ if(! class_exists('App')) { // Allow themes to control internal parameters // by changing App values in theme.php - // - // Possibly should make these part of the plugin - // system, but it seems like overkill to invoke - // all the plugin machinery just to change a couple - // of values + public $sourcename = ''; public $videowidth = 425; public $videoheight = 350; public $force_max_items = 0; public $theme_thread_allow = true; + // An array for all theme-controllable parameters + // Mostly unimplemented yet. Only options 'stylesheet' and + // beyond are used. + + public $theme = array( + 'sourcename' => '', + 'videowidth' => 425, + 'videoheight' => 350, + 'force_max_items' => 0, + 'thread_allow' => true, + 'stylesheet' => '' + ); + private $scheme; private $hostname; private $baseurl; @@ -580,6 +589,13 @@ if(! class_exists('App')) { $interval = 40000; $this->page['title'] = $this->config['sitename']; + + /* put the head template at the beginning of page['htmlhead'] + * since the code added by the modules frequently depends on it + * being first + */ + if(!isset($this->page['htmlhead'])) + $this->page['htmlhead'] = ''; $tpl = get_markup_template('head.tpl'); $this->page['htmlhead'] = replace_macros($tpl,array( '$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!! @@ -590,14 +606,16 @@ if(! class_exists('App')) { '$showmore' => t('show more'), '$showfewer' => t('show fewer'), '$update_interval' => $interval - )); + )) . $this->page['htmlhead']; } function init_page_end() { + if(!isset($this->page['end'])) + $this->page['end'] = ''; $tpl = get_markup_template('end.tpl'); $this->page['end'] = replace_macros($tpl,array( '$baseurl' => $this->get_baseurl() // FIXME for z_path!!!! - )); + )) . $this->page['end']; } function set_curl_code($code) { @@ -917,6 +935,7 @@ if(! function_exists('login')) { $tpl = get_markup_template("login.tpl"); $_SESSION['return_url'] = $a->query_string; + $a->module = 'login'; } diff --git a/include/conversation.php b/include/conversation.php index 43d20a4014..1de77feb1b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -865,11 +865,15 @@ function format_like($cnt,$arr,$type,$id) { $total = count($arr); if($total >= MAX_LIKERS) $arr = array_slice($arr, 0, MAX_LIKERS - 1); - if($total < MAX_LIKERS) - $arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1]; - $str = implode(', ', $arr); - if($total >= MAX_LIKERS) + if($total < MAX_LIKERS) { + $last = t('and') . ' ' . $arr[count($arr)-1]; + $arr2 = array_slice($arr, 0, -1); + $str = implode(', ', $arr2) . ' ' . $last; + } + if($total >= MAX_LIKERS) { + $str = implode(', ', $arr); $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS ); + } $str = (($type === 'like') ? sprintf( t('%s like this.'), $str) : sprintf( t('%s don\'t like this.'), $str)); $o .= "\t" . ''; } diff --git a/include/onepoll.php b/include/onepoll.php index 019455e820..a50d234e22 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -294,34 +294,147 @@ function onepoll_run(&$argv, &$argc){ $metas = email_msg_meta($mbox,implode(',',$msgs)); if(count($metas) != count($msgs)) { logger("onepoll: for " . $mailconf[0]['user'] . " there are ". count($msgs) . " messages but received " . count($metas) . " metas", LOGGER_DEBUG); - break; } - $msgs = array_combine($msgs, $metas); + else { + $msgs = array_combine($msgs, $metas); - foreach($msgs as $msg_uid => $meta) { - logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA); + foreach($msgs as $msg_uid => $meta) { + logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA); - $datarray = array(); -// $meta = email_msg_meta($mbox,$msg_uid); -// $headers = email_msg_headers($mbox,$msg_uid); + $datarray = array(); + // $meta = email_msg_meta($mbox,$msg_uid); + // $headers = email_msg_headers($mbox,$msg_uid); - $datarray['uri'] = msgid2iri(trim($meta->message_id,'<>')); + $datarray['uri'] = msgid2iri(trim($meta->message_id,'<>')); - // Have we seen it before? - $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1", - intval($importer_uid), - dbesc($datarray['uri']) - ); + // Have we seen it before? + $r = q("SELECT * FROM `item` WHERE `uid` = %d AND `uri` = '%s' LIMIT 1", + intval($importer_uid), + dbesc($datarray['uri']) + ); - if(count($r)) { - logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'],LOGGER_DEBUG); - if($meta->deleted && ! $r[0]['deleted']) { - q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1", - dbesc(datetime_convert()), - intval($r[0]['id']) - ); + if(count($r)) { + logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'],LOGGER_DEBUG); + if($meta->deleted && ! $r[0]['deleted']) { + q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `id` = %d LIMIT 1", + dbesc(datetime_convert()), + intval($r[0]['id']) + ); + } + /*switch ($mailconf[0]['action']) { + case 0: + logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'].". Doing nothing.", LOGGER_DEBUG); + break; + case 1: + logger("Mail: Deleting ".$msg_uid." for ".$mailconf[0]['user']); + imap_delete($mbox, $msg_uid, FT_UID); + break; + case 2: + logger("Mail: Mark as seen ".$msg_uid." for ".$mailconf[0]['user']); + imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID); + break; + case 3: + logger("Mail: Moving ".$msg_uid." to ".$mailconf[0]['movetofolder']." for ".$mailconf[0]['user']); + imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID); + if ($mailconf[0]['movetofolder'] != "") + imap_mail_move($mbox, $msg_uid, $mailconf[0]['movetofolder'], FT_UID); + break; + }*/ + continue; } - /*switch ($mailconf[0]['action']) { + + + // look for a 'references' or an 'in-reply-to' header and try to match with a parent item we have locally. + + // $raw_refs = ((x($headers,'references')) ? str_replace("\t",'',$headers['references']) : ''); + $raw_refs = ((property_exists($meta,'references')) ? str_replace("\t",'',$meta->references) : ''); + if(! trim($raw_refs)) + $raw_refs = ((property_exists($meta,'in_reply_to')) ? str_replace("\t",'',$meta->in_reply_to) : ''); + $raw_refs = trim($raw_refs); // Don't allow a blank reference in $refs_arr + + if($raw_refs) { + $refs_arr = explode(' ', $raw_refs); + if(count($refs_arr)) { + for($x = 0; $x < count($refs_arr); $x ++) + $refs_arr[$x] = "'" . msgid2iri(str_replace(array('<','>',' '),array('','',''),dbesc($refs_arr[$x]))) . "'"; + } + $qstr = implode(',',$refs_arr); + $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE `uri` IN ( $qstr ) AND `uid` = %d LIMIT 1", + intval($importer_uid) + ); + if(count($r)) + $datarray['parent-uri'] = $r[0]['parent-uri']; // Set the parent as the top-level item + // $datarray['parent-uri'] = $r[0]['uri']; + } + + + if(! x($datarray,'parent-uri')) + $datarray['parent-uri'] = $datarray['uri']; + + // Decoding the header + $subject = imap_mime_header_decode($meta->subject); + $datarray['title'] = ""; + foreach($subject as $subpart) + if ($subpart->charset != "default") + $datarray['title'] .= iconv($subpart->charset, 'UTF-8//IGNORE', $subpart->text); + else + $datarray['title'] .= $subpart->text; + + $datarray['title'] = notags(trim($datarray['title'])); + + //$datarray['title'] = notags(trim($meta->subject)); + $datarray['created'] = datetime_convert('UTC','UTC',$meta->date); + + // Is it reply? + $reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") or + (substr(strtolower($datarray['title']), 0, 3) == "re-") or + (raw_refs != "")); + + $r = email_get_msg($mbox,$msg_uid, $reply); + if(! $r) { + logger("Mail: can't fetch msg ".$msg_uid." for ".$mailconf[0]['user']); + continue; + } + $datarray['body'] = escape_tags($r['body']); + + logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']); + + // some mailing lists have the original author as 'from' - add this sender info to msg body. + // todo: adding a gravatar for the original author would be cool + + if(! stristr($meta->from,$contact['addr'])) { + $from = imap_mime_header_decode($meta->from); + $fromdecoded = ""; + foreach($from as $frompart) + if ($frompart->charset != "default") + $fromdecoded .= iconv($frompart->charset, 'UTF-8//IGNORE', $frompart->text); + else + $fromdecoded .= $frompart->text; + + $datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body']; + } + + $datarray['uid'] = $importer_uid; + $datarray['contact-id'] = $contact['id']; + if($datarray['parent-uri'] === $datarray['uri']) + $datarray['private'] = 1; + if(($contact['network'] === NETWORK_MAIL) && (! get_pconfig($importer_uid,'system','allow_public_email_replies'))) { + $datarray['private'] = 1; + $datarray['allow_cid'] = '<' . $contact['id'] . '>'; + } + $datarray['author-name'] = $contact['name']; + $datarray['author-link'] = 'mailbox'; + $datarray['author-avatar'] = $contact['photo']; + + $stored_item = item_store($datarray); + q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d", + dbesc($datarray['parent-uri']), + intval($importer_uid) + ); + q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1", + intval($stored_item) + ); + switch ($mailconf[0]['action']) { case 0: logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'].". Doing nothing.", LOGGER_DEBUG); break; @@ -339,119 +452,7 @@ function onepoll_run(&$argv, &$argc){ if ($mailconf[0]['movetofolder'] != "") imap_mail_move($mbox, $msg_uid, $mailconf[0]['movetofolder'], FT_UID); break; - }*/ - continue; - } - - - // look for a 'references' or an 'in-reply-to' header and try to match with a parent item we have locally. - -// $raw_refs = ((x($headers,'references')) ? str_replace("\t",'',$headers['references']) : ''); - $raw_refs = ((property_exists($meta,'references')) ? str_replace("\t",'',$meta->references) : ''); - if(! trim($raw_refs)) - $raw_refs = ((property_exists($meta,'in_reply_to')) ? str_replace("\t",'',$meta->in_reply_to) : ''); - $raw_refs = trim($raw_refs); // Don't allow a blank reference in $refs_arr - - if($raw_refs) { - $refs_arr = explode(' ', $raw_refs); - if(count($refs_arr)) { - for($x = 0; $x < count($refs_arr); $x ++) - $refs_arr[$x] = "'" . msgid2iri(str_replace(array('<','>',' '),array('','',''),dbesc($refs_arr[$x]))) . "'"; } - $qstr = implode(',',$refs_arr); - $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE `uri` IN ( $qstr ) AND `uid` = %d LIMIT 1", - intval($importer_uid) - ); - if(count($r)) - $datarray['parent-uri'] = $r[0]['parent-uri']; // Set the parent as the top-level item -// $datarray['parent-uri'] = $r[0]['uri']; - } - - - if(! x($datarray,'parent-uri')) - $datarray['parent-uri'] = $datarray['uri']; - - // Decoding the header - $subject = imap_mime_header_decode($meta->subject); - $datarray['title'] = ""; - foreach($subject as $subpart) - if ($subpart->charset != "default") - $datarray['title'] .= iconv($subpart->charset, 'UTF-8//IGNORE', $subpart->text); - else - $datarray['title'] .= $subpart->text; - - $datarray['title'] = notags(trim($datarray['title'])); - - //$datarray['title'] = notags(trim($meta->subject)); - $datarray['created'] = datetime_convert('UTC','UTC',$meta->date); - - // Is it reply? - $reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") or - (substr(strtolower($datarray['title']), 0, 3) == "re-") or - (raw_refs != "")); - - $r = email_get_msg($mbox,$msg_uid, $reply); - if(! $r) { - logger("Mail: can't fetch msg ".$msg_uid." for ".$mailconf[0]['user']); - continue; - } - $datarray['body'] = escape_tags($r['body']); - - logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']); - - // some mailing lists have the original author as 'from' - add this sender info to msg body. - // todo: adding a gravatar for the original author would be cool - - if(! stristr($meta->from,$contact['addr'])) { - $from = imap_mime_header_decode($meta->from); - $fromdecoded = ""; - foreach($from as $frompart) - if ($frompart->charset != "default") - $fromdecoded .= iconv($frompart->charset, 'UTF-8//IGNORE', $frompart->text); - else - $fromdecoded .= $frompart->text; - - $datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body']; - } - - $datarray['uid'] = $importer_uid; - $datarray['contact-id'] = $contact['id']; - if($datarray['parent-uri'] === $datarray['uri']) - $datarray['private'] = 1; - if(($contact['network'] === NETWORK_MAIL) && (! get_pconfig($importer_uid,'system','allow_public_email_replies'))) { - $datarray['private'] = 1; - $datarray['allow_cid'] = '<' . $contact['id'] . '>'; - } - $datarray['author-name'] = $contact['name']; - $datarray['author-link'] = 'mailbox'; - $datarray['author-avatar'] = $contact['photo']; - - $stored_item = item_store($datarray); - q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d", - dbesc($datarray['parent-uri']), - intval($importer_uid) - ); - q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1", - intval($stored_item) - ); - switch ($mailconf[0]['action']) { - case 0: - logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'].". Doing nothing.", LOGGER_DEBUG); - break; - case 1: - logger("Mail: Deleting ".$msg_uid." for ".$mailconf[0]['user']); - imap_delete($mbox, $msg_uid, FT_UID); - break; - case 2: - logger("Mail: Mark as seen ".$msg_uid." for ".$mailconf[0]['user']); - imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID); - break; - case 3: - logger("Mail: Moving ".$msg_uid." to ".$mailconf[0]['movetofolder']." for ".$mailconf[0]['user']); - imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID); - if ($mailconf[0]['movetofolder'] != "") - imap_mail_move($mbox, $msg_uid, $mailconf[0]['movetofolder'], FT_UID); - break; } } } diff --git a/index.php b/index.php index 7d7674530a..bd5b3e396e 100644 --- a/index.php +++ b/index.php @@ -115,19 +115,9 @@ if(! x($_SESSION,'authenticated')) header('X-Account-Management-Status: none'); -/* - * Create the page head after setting the language - * and getting any auth credentials - */ - -$a->init_pagehead(); - -/** - * Build the page ending -- this is stuff that goes right before - * the closing tag - */ - -$a->init_page_end(); +/* set up page['htmlhead'] and page['end'] for the modules to use */ +$a->page['htmlhead'] = ''; +$a->page['end'] = ''; if(! x($_SESSION,'sysmsg')) @@ -300,8 +290,32 @@ if($a->module_loaded) { $a->page['content'] .= $arr['content']; } + if(function_exists(str_replace('-','_',current_theme()) . '_content_loaded')) { + $func = str_replace('-','_',current_theme()) . '_content_loaded'; + $func($a); + } + } + +/* + * Create the page head after setting the language + * and getting any auth credentials + * + * Moved init_pagehead() and init_page_end() to after + * all the module functions have executed so that all + * theme choices made by the modules can take effect + */ + +$a->init_pagehead(); + +/** + * Build the page ending -- this is stuff that goes right before + * the closing tag + */ + +$a->init_page_end(); + // If you're just visiting, let javascript take you home if(x($_SESSION,'visitor_home')) @@ -366,7 +380,11 @@ if($a->module != 'install') { * Build the page - now that we have all the components */ -$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => current_theme_url())); +if(!$a->theme['stylesheet']) + $stylesheet = current_theme_url(); +else + $stylesheet = $a->theme['stylesheet']; +$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); if($a->is_mobile || $a->is_tablet) { if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { diff --git a/mod/wall_upload.php b/mod/wall_upload.php index ee1bf3c14c..17de7cceb7 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -4,6 +4,8 @@ require_once('Photo.php'); function wall_upload_post(&$a) { + logger("wall upload: starting new upload", LOGGER_DEBUG); + if($a->argc > 1) { if(! x($_FILES,'media')) { $nick = $a->argv[1]; @@ -160,10 +162,12 @@ function wall_upload_post(&$a) { if ($_REQUEST['hush']!='yeah') { /*existing code*/ - if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) + if(local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || x($_REQUEST['nomce'])) ) { echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n"; - else + } + else { echo '

getExt()."\" alt=\"$basename\" />

"; + } /*existing code*/ } else { diff --git a/view/field_checkbox.tpl b/view/field_checkbox.tpl index afab292433..5e170370ab 100644 --- a/view/field_checkbox.tpl +++ b/view/field_checkbox.tpl @@ -1,5 +1,5 @@ -
+
$field.3 diff --git a/view/theme/frost-mobile/end.tpl b/view/theme/frost-mobile/end.tpl index 623b99a240..9183f7a32c 100644 --- a/view/theme/frost-mobile/end.tpl +++ b/view/theme/frost-mobile/end.tpl @@ -5,7 +5,7 @@ --> - + diff --git a/view/theme/frost-mobile/field_checkbox.tpl b/view/theme/frost-mobile/field_checkbox.tpl index 90cc2d6785..9fbf84eac9 100644 --- a/view/theme/frost-mobile/field_checkbox.tpl +++ b/view/theme/frost-mobile/field_checkbox.tpl @@ -1,5 +1,5 @@ -
+

$field.3 diff --git a/view/theme/frost-mobile/head.tpl b/view/theme/frost-mobile/head.tpl index 111f5f6173..3d534300db 100644 --- a/view/theme/frost-mobile/head.tpl +++ b/view/theme/frost-mobile/head.tpl @@ -29,5 +29,5 @@ - + diff --git a/view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js b/view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js new file mode 100644 index 0000000000..e57722d1b6 --- /dev/null +++ b/view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2010 Simon Hibbard +* +* Permission is hereby granted, free of charge, to any person +* obtaining a copy of this software and associated documentation +* files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, +* copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following +* conditions: + +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ + +/* +* Version: V1.3.1-f1 +* Release: 22-12-2010 +* Based on jQuery 1.4.2 +* +* 2012-10-29: Modified by Zach Prezkuta to allow dynamic full heights +*/ + +(function ($) { + var divgrowid = 0; + $.fn.divgrow = function (options) { + var options = $.extend({}, { initialHeight: 100, moreText: "+ Show More", lessText: "- Show Less", speed: 1000, showBrackets: true }, options); + + return this.each(function () { + divgrowid++; + + obj = $(this); + + //var fullHeight = obj.height() + 10; + + obj.css('height', options.initialHeight).css('overflow', 'hidden'); + if (options.showBrackets) { + obj.after('

[…]

'); + } + else { + obj.after(''); + } + $("a.divgrow-showmore").html(options.moreText); + + $("." + "divgrow-obj-" + divgrowid).toggle(function () { + //alert(obj.attr('class')); + // Set the height from the elements rel value + //var height = $(this).prevAll("div:first").attr('rel'); + + var fullHeight = $(this).prevAll("div:first")[0].scrollHeight + 10; + $(this).prevAll("div:first").animate({ height: fullHeight + "px" }, options.speed, function () { // Animation complete. + + // Hide the overlay text when expanded, change the link text + if (options.showBrackets) { + $(this).nextAll("p.divgrow-brackets:first").fadeOut(); + } + $(this).nextAll("a.divgrow-showmore:first").html(options.lessText); + + }); + + + }, function () { + + $(this).prevAll("div:first").stop(true, false).animate({ height: options.initialHeight }, options.speed, function () { // Animation complete. + + // show the overlay text while closed, change the link text + if (options.showBrackets) { + $(this).nextAll("p.divgrow-brackets:first").stop(true, false).fadeIn(); + } + $(this).nextAll("a.divgrow-showmore:first").stop(true, false).html(options.moreText); + + }); + }); + + }); + }; +})(jQuery); + + + + + diff --git a/view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js b/view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js new file mode 100644 index 0000000000..9232430574 --- /dev/null +++ b/view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js @@ -0,0 +1,30 @@ +/* +* Copyright (c) 2010 Simon Hibbard +* +* Permission is hereby granted, free of charge, to any person +* obtaining a copy of this software and associated documentation +* files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, +* copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following +* conditions: + +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*//* +* Version: V1.3.1-f1 +* Release: 22-12-2010 +* Based on jQuery 1.4.2 +* +* 2012-10-29: Modified by Zach Prezkuta to allow dynamic full heights +*/(function(e){var t=0;e.fn.divgrow=function(n){var n=e.extend({},{initialHeight:100,moreText:"+ Show More",lessText:"- Show Less",speed:1e3,showBrackets:!0},n);return this.each(function(){t++,obj=e(this),obj.css("height",n.initialHeight).css("overflow","hidden"),n.showBrackets?obj.after('

[…]

"):obj.after('"),e("a.divgrow-showmore").html(n.moreText),e(".divgrow-obj-"+t).toggle(function(){var t=e(this).prevAll("div:first")[0].scrollHeight+10;e(this).prevAll("div:first").animate({height:t+"px"},n.speed,function(){n.showBrackets&&e(this).nextAll("p.divgrow-brackets:first").fadeOut(),e(this).nextAll("a.divgrow-showmore:first").html(n.lessText)})},function(){e(this).prevAll("div:first").stop(!0,!1).animate({height:n.initialHeight},n.speed,function(){n.showBrackets&&e(this).nextAll("p.divgrow-brackets:first").stop(!0,!1).fadeIn(),e(this).nextAll("a.divgrow-showmore:first").stop(!0,!1).html(n.moreText)})})})}})(jQuery); \ No newline at end of file diff --git a/view/theme/frost-mobile/js/main.js b/view/theme/frost-mobile/js/main.js index b751b8398f..a56c313125 100644 --- a/view/theme/frost-mobile/js/main.js +++ b/view/theme/frost-mobile/js/main.js @@ -38,6 +38,8 @@ msie = $j.browser.msie ; + collapseHeight(); + /* setup tooltips *//* $j("a,.tt").each(function(){ var e = $j(this); @@ -333,20 +335,7 @@ }); - var bimgs = $j(".wall-item-body > img").not(function() { return this.complete; }); - var bimgcount = bimgs.length; - - if (bimgcount) { - bimgs.load(function() { - bimgcount--; - if (! bimgcount) { - collapseHeight(); - - } - }); - } else { - collapseHeight(); - } + collapseHeight(); // reset vars for inserting individual items @@ -385,14 +374,18 @@ }); } - function collapseHeight() { - $j(".wall-item-body").each(function() { - if($j(this).height() > 310) { - if(! $j(this).hasClass('divmore')) { - $j(this).divgrow({ initialHeight: 300, showBrackets: false, speed: 0 }); - $j(this).addClass('divmore'); - } - } + function collapseHeight(elems) { + var elemName = '.wall-item-body:not(.divmore)'; + if(typeof elems != 'undefined') { + elemName = elems + ' ' + elemName; + } + $j(elemName).each(function() { + if($j(this).height() > 350) { + $j('html').height($j('html').height()); + $j(this).divgrow({ initialHeight: 300, showBrackets: false, speed: 0 }); + $j(this).addClass('divmore'); + $j('html').height('auto'); + } }); } @@ -542,6 +535,7 @@ else { $j("#collapsed-comments-" + id).show(); $j("#hide-comments-" + id).html(window.showFewer); + collapseHeight("#collapsed-comments-" + id); } } diff --git a/view/theme/frost-mobile/js/main.min.js b/view/theme/frost-mobile/js/main.min.js index 64d52ee006..eb91cd947f 100644 --- a/view/theme/frost-mobile/js/main.min.js +++ b/view/theme/frost-mobile/js/main.min.js @@ -1 +1 @@ -function openClose(e){document.getElementById(e).style.display=="block"?document.getElementById(e).style.display="none":document.getElementById(e).style.display="block"}function openMenu(e){document.getElementById(e).style.display="block"}function closeMenu(e){document.getElementById(e).style.display="none"}function NavUpdate(){if(!stopped){var e="ping"+(localUser!=0?"?f=&uid="+localUser:"");$j.get(e,function(e){$j(e).find("result").each(function(){$j("nav").trigger("nav-update",this),$j("#live-network").length&&(src="network",liveUpdate()),$j("#live-profile").length&&(src="profile",liveUpdate()),$j("#live-community").length&&(src="community",liveUpdate()),$j("#live-notes").length&&(src="notes",liveUpdate()),$j("#live-display").length&&(src="display",liveUpdate()),$j("#live-photos").length&&liking&&(liking=0,window.location.href=window.location.href)})})}timer=setTimeout(NavUpdate,updateInterval)}function liveUpdate(){if(src==null||stopped||!profile_uid){$j(".like-rotator").hide();return}if($j(".comment-edit-text-full").length||in_progress){livetime&&clearTimeout(livetime),livetime=setTimeout(liveUpdate,1e4);return}livetime!=null&&(livetime=null),prev="live-"+src,in_progress=!0;var e=netargs.length?"/"+netargs:"",t="update_"+src+e+"&p="+profile_uid+"&page="+profile_page+"&msie="+(msie?1:0);$j.get(t,function(e){in_progress=!1,$j(".toplevel_item",e).each(function(){var e=$j(this).attr("id");if($j("#"+e).length==0&&profile_page==1)$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("#"+prev).after($j(this));else{var t=$j(".hide-comments-total",this).attr("id");if(typeof t!="undefined"){t=t.split("-")[3];var n=$j("#collapsed-comments-"+t).is(":visible")}$j("img",this).each(function(){$j(this).attr("src",$j(this).attr("dst"))}),$j("html").height($j("html").height()),$j("#"+e).replaceWith($j(this)),typeof t!="undefined"&&n&&showHideComments(t),$j("html").height("auto")}prev=e});var t=$j(".wall-item-body > img").not(function(){return this.complete}),n=t.length;n?t.load(function(){n--,n||collapseHeight()}):collapseHeight(),$j(".like-rotator").hide(),commentBusy&&(commentBusy=!1,$j("body").css("cursor","auto")),$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl")})}function collapseHeight(){$j(".wall-item-body").each(function(){$j(this).height()>310&&($j(this).hasClass("divmore")||($j(this).divgrow({initialHeight:300,showBrackets:!1,speed:0}),$j(this).addClass("divmore")))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.touches[0].pageX||e.touches[0].pageY)t.x=e.touches[0].pageX,t.y=e.touches[0].pageY;else if(e.touches[0].clientX||e.touches[0].clientY)t.x=e.touches[0].clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.touches[0].clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.touches[0].x||e.touches[0].y)t.touches[0].x=e.touches[0].x,t.touches[0].y=e.touches[0].y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function showHideComments(e){$j("#collapsed-comments-"+e).is(":visible")?($j("#collapsed-comments-"+e).hide(),$j("#hide-comments-"+e).html(window.showMore)):($j("#collapsed-comments-"+e).show(),$j("#hide-comments-"+e).html(window.showFewer))}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n'+e.desc+'
'+e.version+'
'+e.credits+"
")})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").show(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),$j("img[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:(menu.css("display")=="none"?($j(this).parent().addClass("selected"),menu.show(),menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").hide(),last_popup_menu=menu,last_popup_button=$j(this).parent()):($j(this).parent().removeClass("selected"),menu.hide(),menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").show(),last_popup_menu=null,last_popup_button=null),!1)}),$j("html").click(function(t){e(t)});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("
").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("
").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format(""+e.attr("name")+""),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:1e3})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate()});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t350&&($j("html").height($j("html").height()),$j(this).divgrow({initialHeight:300,showBrackets:!1,speed:0}),$j(this).addClass("divmore"),$j("html").height("auto"))})}function imgbright(e){$j(e).removeClass("drophide").addClass("drop")}function imgdull(e){$j(e).removeClass("drop").addClass("drophide")}function dolike(e,t){unpause(),$j("#like-rotator-"+e.toString()).show(),$j.get("like/"+e.toString()+"?verb="+t,NavUpdate),liking=1}function dostar(e){e=e.toString(),$j.get("starred/"+e,function(t){t.match(/1/)?($j("#starred-"+e).addClass("starred"),$j("#starred-"+e).removeClass("unstarred"),$j("#star-"+e).addClass("hidden"),$j("#unstar-"+e).removeClass("hidden")):($j("#starred-"+e).addClass("unstarred"),$j("#starred-"+e).removeClass("starred"),$j("#star-"+e).removeClass("hidden"),$j("#unstar-"+e).addClass("hidden"))})}function getPosition(e){var t={x:0,y:0};if(e.touches[0].pageX||e.touches[0].pageY)t.x=e.touches[0].pageX,t.y=e.touches[0].pageY;else if(e.touches[0].clientX||e.touches[0].clientY)t.x=e.touches[0].clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft,t.y=e.touches[0].clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;else if(e.touches[0].x||e.touches[0].y)t.touches[0].x=e.touches[0].x,t.touches[0].y=e.touches[0].y;return t}function lockview(e,t){e=e||window.event,cursor=getPosition(e),lockvisible?lockviewhide():(lockvisible=!0,$j.get("lockview/"+t,function(e){$j("#panel").html(e),$j("#panel").css({left:cursor.x+5,top:cursor.y+5}),$j("#panel").show()}))}function lockviewhide(){lockvisible=!1,$j("#panel").hide()}function post_comment(e){return unpause(),commentBusy=!0,$j("body").css("cursor","wait"),$j("#comment-preview-inp-"+e).val("0"),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){if(t.success){$j("#comment-edit-wrapper-"+e).hide(),$j("#comment-edit-text-"+e).val("");var n=document.getElementById("comment-edit-text-"+e);n&&commentClose(n,e),timer&&clearTimeout(timer),timer=setTimeout(NavUpdate,10)}t.reload&&(window.location.href=t.reload)},"json"),!1}function preview_comment(e){return $j("#comment-preview-inp-"+e).val("1"),$j("#comment-edit-preview-"+e).show(),$j.post("item",$j("#comment-edit-form-"+e).serialize(),function(t){t.preview&&($j("#comment-edit-preview-"+e).html(t.preview),$j("#comment-edit-preview-"+e+" a").click(function(){return!1}))},"json"),!0}function showHideComments(e){$j("#collapsed-comments-"+e).is(":visible")?($j("#collapsed-comments-"+e).hide(),$j("#hide-comments-"+e).html(window.showMore)):($j("#collapsed-comments-"+e).show(),$j("#hide-comments-"+e).html(window.showFewer),collapseHeight("#collapsed-comments-"+e))}function preview_post(){return $j("#jot-preview").val("1"),$j("#jot-preview-content").show(),tinyMCE.triggerSave(),$j.post("item",$j("#profile-jot-form").serialize(),function(e){e.preview&&($j("#jot-preview-content").html(e.preview),$j("#jot-preview-content a").click(function(){return!1}))},"json"),$j("#jot-preview").val("0"),!0}function unpause(){totStopped=!1,stopped=!1,$j("#pause").html("")}function bin2hex(e){var t,n,r=0,i=[];e+="",r=e.length;for(n=0;n'+e.desc+'
'+e.version+'
'+e.credits+"
")})}var src=null,prev=null,livetime=null,msie=!1,stopped=!1,totStopped=!1,timer=null,pr=0,liking=0,in_progress=!1,langSelect=!1,commentBusy=!1,last_popup_menu=null,last_popup_button=null;$j(function(){function e(e){last_popup_menu&&"#"+last_popup_menu.attr("id")!==$j(e.target).attr("rel")&&(last_popup_menu.hide(),last_popup_menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").show(),last_popup_button.removeClass("selected"),last_popup_menu=null,last_popup_button=null)}$j.ajaxSetup({cache:!1}),msie=$j.browser.msie,collapseHeight(),$j(".onoff input").each(function(){val=$j(this).val(),id=$j(this).attr("id"),$j("#"+id+"_onoff ."+(val==0?"on":"off")).addClass("hidden")}),$j(".onoff > a").click(function(e){e.preventDefault();var t=$j(this).siblings("input"),n=1-t.val(),r=t.attr("id");$j("#"+r+"_onoff ."+(n==0?"on":"off")).addClass("hidden"),$j("#"+r+"_onoff ."+(n==1?"on":"off")).removeClass("hidden"),t.val(n)}),$j("img[rel^=#]").click(function(t){return e(t),menu=$j($j(this).attr("rel")),t.preventDefault(),t.stopPropagation(),menu.attr("popup")=="false"?!1:(menu.css("display")=="none"?($j(this).parent().addClass("selected"),menu.show(),menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").hide(),last_popup_menu=menu,last_popup_button=$j(this).parent()):($j(this).parent().removeClass("selected"),menu.hide(),menu.attr("id")=="nav-notifications-menu"&&$j(".main-container").show(),last_popup_menu=null,last_popup_button=null),!1)}),$j("html").click(function(t){e(t)});var t=unescape($j("#nav-notifications-template[rel=template]").html()),n=unescape($j("
").append($j("#nav-notifications-see-all").clone()).html()),r=unescape($j("
").append($j("#nav-notifications-mark-all").clone()).html()),i=unescape($j("#nav-notifications-menu").html());$j("nav").bind("nav-update",function(e,s){var o=$j(s).find("invalid").text();o==1&&(window.location.href=window.location.href);var u=$j(s).find("net").text();u==0?(u="",$j("#net-update").removeClass("show")):$j("#net-update").addClass("show"),$j("#net-update").html(u);var a=$j(s).find("home").text();a==0?(a="",$j("#home-update").removeClass("show")):$j("#home-update").addClass("show"),$j("#home-update").html(a);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update").removeClass("show")):$j("#intro-update").addClass("show"),$j("#intro-update").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update").removeClass("show")):$j("#mail-update").addClass("show"),$j("#mail-update").html(l);var f=$j(s).find("intro").text();f==0?(f="",$j("#intro-update-li").removeClass("show")):$j("#intro-update-li").addClass("show"),$j("#intro-update-li").html(f);var l=$j(s).find("mail").text();l==0?(l="",$j("#mail-update-li").removeClass("show")):$j("#mail-update-li").addClass("show"),$j("#mail-update-li").html(l);var c=$j(s).find("notif");c.children("note").length==0?$j("#nav-notifications-menu").html(i):(nnm=$j("#nav-notifications-menu"),nnm.html(n+r),c.children("note").each(function(){e=$j(this),text=e.text().format(""+e.attr("name")+""),html=t.format(e.attr("href"),e.attr("photo"),text,e.attr("date"),e.attr("seen")),nnm.append(html)})),notif=c.attr("count"),notif>0?$j("#nav-notifications-linkmenu").addClass("on"):$j("#nav-notifications-linkmenu").removeClass("on"),notif==0?(notif="",$j("#notify-update").removeClass("show")):$j("#notify-update").addClass("show"),$j("#notify-update").html(notif);var h=$j(s).find("sysmsgs");h.children("notice").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"notice",life:1e3})}),h.children("info").each(function(){text=$j(this).text(),$j.jGrowl(text,{sticky:!1,theme:"info",life:1e3})})}),NavUpdate()});var lockvisible=!1;String.prototype.format=function(){var e=this;for(var t=0;t"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r)}function qCommentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).val();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r),$j(e).val("")}function jotVideoURL(){reply=prompt(window.vidURL),reply&&reply.length&&addeditortext("[video]"+reply+"[/video]")}function jotAudioURL(){reply=prompt(window.audURL),reply&&reply.length&&addeditortext("[audio]"+reply+"[/audio]")}function jotGetLocation(){reply=prompt(window.whereAreU,$j("#jot-location").val()),reply&&reply.length&&$j("#jot-location").val(reply)}function jotShare(e){$j("#jot-popup").length!=0&&$j("#jot-popup").show(),$j("#like-rotator-"+e).show(),$j.get("share/"+e,function(t){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(t),$j("#like-rotator-"+e).hide(),$j(window).scrollTop(0)})})}function linkdropper(e){var t=e.dataTransfer.types.contains("text/uri-list");t&&e.preventDefault()}function showEvent(e){}function itemTag(e){reply=prompt(window.term),reply&&reply.length&&(reply=reply.replace("#",""),reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("tagger/"+e+"?term="+reply,NavUpdate),liking=1))}function itemFiler(e){$j.get("filer/",function(t){var n=$j("#id_term_label",t).text();reply=prompt(n),reply&&reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("filer/"+e+"?term="+reply,NavUpdate),liking=1)})}function jotClearLocation(){$j("#jot-coord").val(""),$j("#profile-nolocation-wrapper").hide()}function addeditortext(e){if(plaintext=="none"){var t=$j("#profile-jot-text").val();$j("#profile-jot-text").val(t+e)}}$j(document).ready(function(){$j("#profile-jot-text").focus(enableOnUser),$j("#profile-jot-text").click(enableOnUser);if(typeof window.AjaxUpload!="undefined")switch(window.ajaxType){case"jot-header":var e=new window.AjaxUpload("wall-image-upload",{action:"wall_upload/"+window.nickname,name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}}),t=new window.AjaxUpload("wall-file-upload",{action:"wall_attach/"+window.nickname,name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}});break;case"msg-header":var e=new window.AjaxUpload("prvmail-upload",{action:"wall_upload/"+window.nickname,name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){tinyMCE.execCommand("mceInsertRawHTML",!1,t),$j("#profile-rotator").hide()}});break;default:}typeof window.aclInit!="undefined"&&typeof acl=="undefined"&&(acl=new ACL(baseurl+"/acl",[window.allowCID,window.allowGID,window.denyCID,window.denyGID])),window.autoCompleteType=="display-head"&&$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl");if(window.aclType=="event_head"){$j("#events-calendar").fullCalendar({events:baseurl+"/events/json/",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},timeFormat:"H(:mm)",eventClick:function(e,t,n){showEvent(e.id)},eventRender:function(e,t,n){if(e.item["author-name"]==null)return;switch(n.name){case"month":t.find(".fc-event-title").html("{1} : {2}".format(e.item["author-avatar"],e.item["author-name"],e.title));break;case"agendaWeek":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location));break;case"agendaDay":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location))}}});var n=location.href.replace(baseurl,"").split("/");n.length>=4&&$j("#events-calendar").fullCalendar("gotoDate",n[2],n[3]-1);var r=location.hash.split("-");r.length==2&&r[0]=="#link"&&showEvent(r[1])}(window.aclType=="settings-head"||window.aclType=="photos_head"||window.aclType=="event_head")&&$j("#contact_allow, #contact_deny, #group_allow, #group_deny").change(function(){var e;$j("#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected").each(function(){e=$j(this).text(),$j("#jot-perms-icon").removeClass("unlock").addClass("lock"),$j("#jot-public").hide()}),e==null&&($j("#jot-perms-icon").removeClass("lock").addClass("unlock"),$j("#jot-public").show())}).trigger("change");switch(window.autocompleteType){case"msg-header":var i=$j("#recip").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350,onSelect:function(e,t){$j("#recip-complete").val(t)}});break;case"contacts-head":var i=$j("#contacts-search").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350});i.setOptions({params:{type:"a"}});break;default:}$j("#event-share-checkbox").change(function(){$j("#event-share-checkbox").is(":checked")?$j("#acl-wrapper").show():$j("#acl-wrapper").hide()}).trigger("change"),$j(".popupbox").click(function(){var e=$j($j(this).attr("href")).parent();return e.css("display")=="none"?e.show():e.hide(),!1})}),$j(function(){$j("nav").bind("nav-update",function(e,t){var n=$j("#pending-update"),r=$j(t).find("register").text();r=="0"?(r="",n.hide()):n.show(),n.html(r)})});var editor=!1,textlen=0,plaintext="none",ispublic=window.isPublic;switch(window.ajaxType){case"jot-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&(reply=bin2hex(reply),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+reply,function(e){addeditortext(e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&(t=bin2hex(t),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+t,function(e){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(e),$j("#profile-rotator").hide()})}))}break;case"msg-header":case"wallmsg-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+reply,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+t,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}break;default:}typeof window.geoTag=="function"&&window.geoTag(); \ No newline at end of file +function insertFormatting(e,t,n){var r=$j("#comment-edit-text-"+n).val();r==e&&(r="",$j("#comment-edit-text-"+n).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+n).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+n),$j("#comment-edit-text-"+n).val(r)),textarea=document.getElementById("comment-edit-text-"+n);if(document.selection)textarea.focus(),selected=document.selection.createRange(),t=="url"?selected.text="["+t+"=http://]"+selected.text+"[/"+t+"]":selected.text="["+t+"]"+selected.text+"[/"+t+"]";else if(textarea.selectionStart||textarea.selectionStart=="0"){var i=textarea.selectionStart,s=textarea.selectionEnd;t=="url"?textarea.value=textarea.value.substring(0,i)+"["+t+"=http://]"+textarea.value.substring(i,s)+"[/"+t+"]"+textarea.value.substring(s,textarea.value.length):textarea.value=textarea.value.substring(0,i)+"["+t+"]"+textarea.value.substring(i,s)+"[/"+t+"]"+textarea.value.substring(s,textarea.value.length)}return!0}function cmtBbOpen(e){$j(".comment-edit-bb-"+e).show()}function cmtBbClose(e){$j(".comment-edit-bb-"+e).hide()}function initEditor(e){if(editor==0){if(plaintext=="none"){$j("#profile-jot-text").css({height:200,color:"#000"}),$j("#profile-jot-text").contact_autocomplete(baseurl+"/acl"),editor=!0,$j("a#jot-perms-icon, a#settings-default-perms-menu").click(function(){var e=$j("#profile-jot-acl-wrapper").parent();return e.css("display")=="none"?e.show():e.hide(),!1}),$j(".jothidden").show(),typeof e!="undefined"&&e();return}}else typeof e!="undefined"&&e()}function enableOnUser(){if(editor)return;$j(this).val(""),initEditor()}function wallInitEditor(){var e=window.editSelect;e!="none"?tinyMCE.init({theme:"advanced",mode:"specific_textareas",editor_selector:/(profile-jot-text|prvmail-text)/,plugins:"bbcode,paste",theme_advanced_buttons1:"bold,italic,underline,undo,redo,link,unlink,image,forecolor",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_blockformats:"blockquote,code",gecko_spellcheck:!0,paste_text_sticky:!0,entity_encoding:"raw",add_unload_trigger:!1,remove_linebreaks:!1,force_p_newlines:!1,force_br_newlines:!0,forced_root_block:"",convert_urls:!1,content_css:baseurl+"/view/custom_tinymce.css",theme_advanced_path:!1,setup:function(e){e.onInit.add(function(e){e.pasteAsPlainText=!0;var t=e.editorId,n=$j("#"+t);typeof n.attr("tabindex")!="undefined"&&($j("#"+t+"_ifr").attr("tabindex",n.attr("tabindex")),n.attr("tabindex",null))})}}):$j("#prvmail-text").contact_autocomplete(baseurl+"/acl")}function initCrop(){function e(e,t){$("x1").value=e.x1,$("y1").value=e.y1,$("x2").value=e.x2,$("y2").value=e.y2,$("width").value=t.width,$("height").value=t.height}Event.observe(window,"load",function(){new Cropper.ImgWithPreview("croppa",{previewWrap:"previewWrap",minWidth:175,minHeight:175,maxWidth:640,maxHeight:640,ratioDim:{x:100,y:100},displayOnInit:!0,onEndCrop:e})})}function confirmDelete(){return confirm(window.delItem)}function commentOpen(e,t){e.value==window.commentEmptyText&&(e.value="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),$j("#mod-cmnt-wrap-"+t).show(),openMenu("comment-edit-submit-wrapper-"+t))}function commentClose(e,t){e.value==""&&(e.value=window.commentEmptyText,$j("#comment-edit-text-"+t).removeClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).addClass("comment-edit-text-empty"),$j("#mod-cmnt-wrap-"+t).hide(),closeMenu("comment-edit-submit-wrapper-"+t))}function commentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).html();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r)}function qCommentInsert(e,t){var n=$j("#comment-edit-text-"+t).val();n==window.commentEmptyText&&(n="",$j("#comment-edit-text-"+t).addClass("comment-edit-text-full"),$j("#comment-edit-text-"+t).removeClass("comment-edit-text-empty"),openMenu("comment-edit-submit-wrapper-"+t));var r=$j(e).val();r=r.replace("<","<"),r=r.replace(">",">"),r=r.replace("&","&"),r=r.replace(""",'"'),$j("#comment-edit-text-"+t).val(n+r),$j(e).val("")}function jotVideoURL(){reply=prompt(window.vidURL),reply&&reply.length&&addeditortext("[video]"+reply+"[/video]")}function jotAudioURL(){reply=prompt(window.audURL),reply&&reply.length&&addeditortext("[audio]"+reply+"[/audio]")}function jotGetLocation(){reply=prompt(window.whereAreU,$j("#jot-location").val()),reply&&reply.length&&$j("#jot-location").val(reply)}function jotShare(e){$j("#jot-popup").length!=0&&$j("#jot-popup").show(),$j("#like-rotator-"+e).show(),$j.get("share/"+e,function(t){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(t),$j("#like-rotator-"+e).hide(),$j(window).scrollTop(0)})})}function linkdropper(e){var t=e.dataTransfer.types.contains("text/uri-list");t&&e.preventDefault()}function showEvent(e){}function itemTag(e){reply=prompt(window.term),reply&&reply.length&&(reply=reply.replace("#",""),reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("tagger/"+e+"?term="+reply,NavUpdate),liking=1))}function itemFiler(e){$j.get("filer/",function(t){var n=$j("#id_term_label",t).text();reply=prompt(n),reply&&reply.length&&(commentBusy=!0,$j("body").css("cursor","wait"),$j.get("filer/"+e+"?term="+reply,NavUpdate),liking=1)})}function jotClearLocation(){$j("#jot-coord").val(""),$j("#profile-nolocation-wrapper").hide()}function addeditortext(e){if(plaintext=="none"){var t=$j("#profile-jot-text").val();$j("#profile-jot-text").val(t+e)}}$j(document).ready(function(){$j("#profile-jot-text").focus(enableOnUser),$j("#profile-jot-text").click(enableOnUser);if(typeof window.AjaxUpload!="undefined")switch(window.ajaxType){case"jot-header":var e=new window.AjaxUpload("wall-image-upload",{action:"wall_upload/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}}),t=new window.AjaxUpload("wall-file-upload",{action:"wall_attach/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){addeditortext(t),$j("#profile-rotator").hide()}});break;case"msg-header":var e=new window.AjaxUpload("prvmail-upload",{action:"wall_upload/"+window.nickname+"?nomce=1",name:"userfile",onSubmit:function(e,t){$j("#profile-rotator").show()},onComplete:function(e,t){tinyMCE.execCommand("mceInsertRawHTML",!1,t),$j("#profile-rotator").hide()}});break;default:}typeof window.aclInit!="undefined"&&typeof acl=="undefined"&&(acl=new ACL(baseurl+"/acl",[window.allowCID,window.allowGID,window.denyCID,window.denyGID])),window.autoCompleteType=="display-head"&&$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl");if(window.aclType=="event_head"){$j("#events-calendar").fullCalendar({events:baseurl+"/events/json/",header:{left:"prev,next today",center:"title",right:"month,agendaWeek,agendaDay"},timeFormat:"H(:mm)",eventClick:function(e,t,n){showEvent(e.id)},eventRender:function(e,t,n){if(e.item["author-name"]==null)return;switch(n.name){case"month":t.find(".fc-event-title").html("{1} : {2}".format(e.item["author-avatar"],e.item["author-name"],e.title));break;case"agendaWeek":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location));break;case"agendaDay":t.find(".fc-event-title").html("{1}

{2}

{3}

".format(e.item["author-avatar"],e.item["author-name"],e.item.desc,e.item.location))}}});var n=location.href.replace(baseurl,"").split("/");n.length>=4&&$j("#events-calendar").fullCalendar("gotoDate",n[2],n[3]-1);var r=location.hash.split("-");r.length==2&&r[0]=="#link"&&showEvent(r[1])}(window.aclType=="settings-head"||window.aclType=="photos_head"||window.aclType=="event_head")&&$j("#contact_allow, #contact_deny, #group_allow, #group_deny").change(function(){var e;$j("#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected").each(function(){e=$j(this).text(),$j("#jot-perms-icon").removeClass("unlock").addClass("lock"),$j("#jot-public").hide()}),e==null&&($j("#jot-perms-icon").removeClass("lock").addClass("unlock"),$j("#jot-public").show())}).trigger("change");switch(window.autocompleteType){case"msg-header":var i=$j("#recip").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350,onSelect:function(e,t){$j("#recip-complete").val(t)}});break;case"contacts-head":var i=$j("#contacts-search").autocomplete({serviceUrl:baseurl+"/acl",minChars:2,width:350});i.setOptions({params:{type:"a"}});break;default:}$j("#event-share-checkbox").change(function(){$j("#event-share-checkbox").is(":checked")?$j("#acl-wrapper").show():$j("#acl-wrapper").hide()}).trigger("change"),$j(".popupbox").click(function(){var e=$j($j(this).attr("href")).parent();return e.css("display")=="none"?e.show():e.hide(),!1})}),$j(function(){$j("nav").bind("nav-update",function(e,t){var n=$j("#pending-update"),r=$j(t).find("register").text();r=="0"?(r="",n.hide()):n.show(),n.html(r)})});var editor=!1,textlen=0,plaintext="none",ispublic=window.isPublic;switch(window.ajaxType){case"jot-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&(reply=bin2hex(reply),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+reply,function(e){addeditortext(e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&(t=bin2hex(t),$j("#profile-rotator").show(),$j.get("parse_url?binurl="+t,function(e){editor||$j("#profile-jot-text").val(""),initEditor(function(){addeditortext(e),$j("#profile-rotator").hide()})}))}break;case"msg-header":case"wallmsg-header":function jotGetLink(){reply=prompt(window.linkURL),reply&&reply.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+reply,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}function linkdrop(e){var t=e.dataTransfer.getData("text/uri-list");e.target.textContent=t,e.preventDefault(),t&&t.length&&($j("#profile-rotator").show(),$j.get("parse_url?url="+t,function(e){tinyMCE.execCommand("mceInsertRawHTML",!1,e),$j("#profile-rotator").hide()}))}break;default:}typeof window.geoTag=="function"&&window.geoTag(); \ No newline at end of file diff --git a/view/theme/frost-mobile/login-style.css b/view/theme/frost-mobile/login-style.css index 37661cfbc7..222da2db8b 100644 --- a/view/theme/frost-mobile/login-style.css +++ b/view/theme/frost-mobile/login-style.css @@ -24,15 +24,17 @@ div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; padding-left: 58px; + margin: 0px; } div.jGrowl div.info { background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; color: #ffffff; padding-left: 58px; + margin: 0px; } #jGrowl.top-right { top: 15px; - right: 15px; + right: 10px; } .login-button { @@ -75,6 +77,16 @@ div.section-wrapper { margin-left: 50px; } +.field.checkbox label { + margin-left: auto; + float: auto; + /*margin-left: 100px;*/ +} +.field.checkbox input { + width: auto; + margin-left: 30px; +} + #login_openid { margin-top: 50px; } diff --git a/view/theme/frost-mobile/login_head.tpl b/view/theme/frost-mobile/login_head.tpl index 7a5d606cba..47651ad8ad 100644 --- a/view/theme/frost-mobile/login_head.tpl +++ b/view/theme/frost-mobile/login_head.tpl @@ -1,2 +1,2 @@ - + diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index 0fe0efd736..2580f4b788 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -65,7 +65,7 @@ img { border :0px; } width: 384px; }*/ -code { +/*code { font-family: Courier, monospace; white-space: pre; display: block; @@ -85,6 +85,24 @@ blockquote { margin-right: 0px; width: 260px; overflow: hidden; +}*/ + +code { + font-family: Courier, monospace; + white-space: pre; + display: block; + overflow: auto; + border: 1px solid #444; + background: #EEE; + color: #444; + padding: 10px; + margin-top: 20px; +} + +blockquote { + background-color: #f4f8f9; + border-left: 4px solid #dae4ee; + padding: 0.4em; } .icollapse-wrapper, .ccollapse-wrapper { @@ -1163,13 +1181,13 @@ input#dfrn-url { /* background: #EEEEEE;*/ } -.wall-item-like, .wall-item-dislike { +.wall-item-like, .wall-item-dislike, .wall-item-boring { font-style: italic; margin-left: 0px; opacity: 0.6; } -.wall-item-like.comment, .wall-item-dislike.comment { +.wall-item-like.comment, .wall-item-dislike.comment, .wall-item-boring.comment { margin-left: 5px; } @@ -1368,10 +1386,19 @@ input#dfrn-url { -webkit-border-radius: 0; } +.wall-item-content blockquote { + margin-left: 0px; + margin-right: 0px; +} + .comment .wall-item-content img { max-width: 280px; } +.comment .wall-item-content ul { + padding-left: 1.5em; +} + .divgrow-showmore { display: block; clear: both; @@ -1411,7 +1438,6 @@ input#dfrn-url { } .wall-item-body code { - width: 260px; overflow: hidden; } @@ -1421,12 +1447,6 @@ input#dfrn-url { /* width: 280px;*/ } -.comment .wall-item-body blockquote { - margin-left: 0px; - margin-right: 0px; - width: 260px; -} - .wall-item-tools { clear: both; /* background-image: url("head.jpg"); @@ -3404,6 +3424,7 @@ aside input[type='text'] { } + .field .onoff { float: left; width: 80px; @@ -3714,6 +3735,7 @@ aside input[type='text'] { background-size: 100% 100%; background-image: url('images/star.png'); background-repeat: no-repeat; + opacity: 0.5; } /*.tagged { background-position: -48px -48px; }*/ @@ -3863,15 +3885,17 @@ div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; padding-left: 58px; + margin: 0px; } div.jGrowl div.info { background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; color: #ffffff; padding-left: 58px; + margin: 0px; } #jGrowl.top-right { top: 15px; - right: 15px; + right: 10px; } .qcomment { border: 1px solid #EEE; @@ -4009,7 +4033,7 @@ width:650px; } }*/ -@media only screen and (min-device-width: 768px) +/*@media only screen and (min-device-width: 768px) { .wall-item-body code { width: 700px; @@ -4023,5 +4047,5 @@ width:650px; width: 700px; } -} +}*/ diff --git a/view/theme/frost-mobile/theme.php b/view/theme/frost-mobile/theme.php index b934522c6d..c295a91a65 100644 --- a/view/theme/frost-mobile/theme.php +++ b/view/theme/frost-mobile/theme.php @@ -4,29 +4,27 @@ * Name: Frost--mobile version * Description: Like frosted glass * Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0). - * Version: Version 0.2.15 + * Version: Version 0.2.16 * Author: Zach P * Maintainer: Zach P */ $a->theme_info = array(); +$a->sourcename = 'Friendica mobile web'; +$a->videowidth = 250; +$a->videoheight = 200; +$a->theme_thread_allow = false; +$a->force_max_items = 10; -function frost_mobile_init(&$a) { +function frost_mobile_content_loaded(&$a) { // I could do this in style.php, but by having the CSS in a file the browser will cache it, // making pages load faster if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) { - $a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']); - +// $a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']); + $a->theme['stylesheet'] = $a->get_baseurl() . '/view/theme/frost-mobile/login-style.css'; } if( $a->module === 'login' ) $a->page['end'] .= ''; - - $a->sourcename = 'Friendica mobile web'; - $a->videowidth = 250; - $a->videoheight = 200; - $a->theme_thread_allow = false; - $a->force_max_items = 10; - } diff --git a/view/theme/frost-mobile/wall_thread.tpl b/view/theme/frost-mobile/wall_thread.tpl index 04874997b5..dec5a7183c 100644 --- a/view/theme/frost-mobile/wall_thread.tpl +++ b/view/theme/frost-mobile/wall_thread.tpl @@ -12,7 +12,8 @@ {{ if $item.owner_url }}
- $item.owner_name + $item.owner_name +
$item.wall
{{ endif }} @@ -21,7 +22,8 @@ onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)">-->
- $item.name + $item.name + diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index ede5d7cc76..4878e25310 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -85,6 +85,7 @@ blockquote { } .hide-comments-outer:hover { opacity: 1.0; + border-bottom: 1px solid #DDD; /* manually prevent the border from changing color */ } .hide-comments { margin-left: 5px; @@ -3418,18 +3419,18 @@ aside input[type='text'] { background-repeat: no-repeat; } /*.dislike { background-position: -112px 0px;}*/ -.icon.dislike { +.tool.dislike { display: block; width: 15px; height: 16px;/* 23 24*/ background-size: 100% 100%; background-image: url('images/disapprove-16.png'); background-repeat: no-repeat; opacity: 0.4; } -.icon.dislike:hover { +.tool.dislike:hover { opacity: 1.0; } /*.like { background-position: -128px 0px;}*/ -.icon.like { +.tool.like { display: block; width: 15px; height: 16px;/* 23 24*/ margin-right: 6px; background-size: 100% 100%; @@ -3437,7 +3438,7 @@ aside input[type='text'] { background-repeat: no-repeat; opacity: 0.4; } -.icon.like:hover { +.tool.like:hover { opacity: 1.0; } /*.link { background-position: -144px 0px;}*/ @@ -3466,14 +3467,14 @@ aside input[type='text'] { .pause { background-position: -48px -16px;} .play { background-position: -64px -16px;} /*.pencil { background-position: -80px -16px;}*/ -.icon.pencil { +.tool.pencil { display: block; width: 16px; height: 16px; background-size: 100% 100%; background-image: url('images/pencil-16.png'); background-repeat: no-repeat; opacity: 0.4; } -.icon.pencil:hover { +.tool.pencil:hover { opacity: 1.0; } /*.small-pencil { background-position: -96px -16px;}*/ @@ -3488,14 +3489,14 @@ aside input[type='text'] { opacity: 1.0; } /*.recycle { background-position: -112px -16px;}*/ -.icon.recycle { +.tool.recycle { display: block; width: 16px; height: 16px;/*24 23*/ background-size: 100% 100%; background-image: url('images/recycle-16.png'); background-repeat: no-repeat; opacity: 0.4; } -.icon.recycle:hover { +.tool.recycle:hover { opacity: 1.0; } /*.remote-link { background-position: -128px -16px;}*/ @@ -3556,32 +3557,32 @@ aside input[type='text'] { .off { background-position: 0px -48px; } /*.starred { background-position: -16px -48px; }*/ -.icon.starred { +.tool.starred { display: block; width: 16px; height: 16px; background-size: 100% 100%; background-image: url('images/star-yellow-16.png'); background-repeat: no-repeat; } /*.unstarred { background-position: -32px -48px; }*/ -.icon.unstarred { +.tool.unstarred { display: block; width: 16px; height: 16px; background-size: 100% 100%; background-image: url('images/star-16.png'); background-repeat: no-repeat; opacity: 0.4; } -.icon.unstarred:hover { +.tool.unstarred:hover { opacity: 1.0; } /*.tagged { background-position: -48px -48px; }*/ -.icon.tagged { +.tool.tagged { display: block; width: 16px; height: 16px; background-size: 100% 100%; background-image: url('images/tag-16.png'); background-repeat: no-repeat; opacity: 0.4; } -.icon.tagged:hover { +.tool.tagged:hover { opacity: 1.0; } .yellow { background-position: -64px -48px; } diff --git a/view/theme/frost/theme.php b/view/theme/frost/theme.php index a3d4b0ac96..e515f13c8a 100644 --- a/view/theme/frost/theme.php +++ b/view/theme/frost/theme.php @@ -4,25 +4,26 @@ * Name: Frost * Description: Like frosted glass * Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0). - * Version: Version 0.3 + * Version: Version 0.3.1 * Author: Zach P * Maintainer: Zach P */ $a->theme_info = array(); +$a->videowidth = 400; +$a->videoheight = 330; +$a->theme_thread_allow = false; -function frost_init(&$a) { +function frost_content_loaded(&$a) { // I could do this in style.php, but by having the CSS in a file the browser will cache it, // making pages load faster if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) { - $a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']); + //$a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']); + $a->theme['stylesheet'] = $a->get_baseurl() . '/view/theme/frost/login-style.css'; } if( $a->module === 'login' ) $a->page['end'] .= ''; - $a->videowidth = 400; - $a->videoheight = 330; - $a->theme_thread_allow = false; - } + diff --git a/view/theme/frost/wall_thread.tpl b/view/theme/frost/wall_thread.tpl index ffc57f00b2..e82657583f 100644 --- a/view/theme/frost/wall_thread.tpl +++ b/view/theme/frost/wall_thread.tpl @@ -12,7 +12,8 @@ {{ if $item.owner_url }}
- $item.owner_name + $item.owner_name +
$item.wall
{{ endif }} @@ -20,7 +21,8 @@ onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')" onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)"> - $item.name + $item.name + menu
    @@ -63,9 +65,9 @@
    {{ if $item.vote }} {{ endif }} @@ -73,12 +75,12 @@ {{ endif }} {{ if $item.edpost }} - + {{ endif }} {{ if $item.star }} - - + + {{ endif }} {{ if $item.filer }}