diff --git a/boot.php b/boot.php index e4d8663a3f..6e3f8c0b50 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1337' ); +define ( 'FRIENDICA_VERSION', '3.0.1338' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1143 ); diff --git a/library/jquery_ac/friendica.complete.js b/library/jquery_ac/friendica.complete.js new file mode 100644 index 0000000000..81eba564e1 --- /dev/null +++ b/library/jquery_ac/friendica.complete.js @@ -0,0 +1,395 @@ +/** +* Ajax Autocomplete for jQuery, version 1.1.3 +* (c) 2010 Tomas Kirda +* +* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license. +* For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/ +* +* Last Review: 04/19/2010 +* Heavily modified for contact completion in Friendica (add photos, hover tips. etc.) 11-May-2012 mike@macgirvin.com +*/ + +/*jslint onevar: true, evil: true, nomen: true, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */ +/*global window: true, document: true, clearInterval: true, setInterval: true, jQuery: true */ + +(function($) { + + var reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g'); + + function fnFormatResult(value, data, currentValue) { + var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')'; + return value.replace(new RegExp(pattern, 'gi'), '$1<\/strong>'); + } + + function Autocomplete(el, options) { + this.el = $(el); + this.el.attr('autocomplete', 'off'); + this.suggestions = []; + this.data = []; + this.badQueries = []; + this.selectedIndex = -1; + this.currentValue = this.el.val(); + this.intervalId = 0; + this.cachedResponse = []; + this.onChangeInterval = null; + this.ignoreValueChange = false; + this.serviceUrl = options.serviceUrl; + this.isLocal = false; + this.options = { + autoSubmit: false, + minChars: 1, + maxHeight: 300, + deferRequestBy: 0, + width: 0, + highlight: true, + params: {}, + fnFormatResult: fnFormatResult, + delimiter: null, + zIndex: 9999 + }; + this.initialize(); + this.setOptions(options); + } + + $.fn.autocomplete = function(options) { + return new Autocomplete(this.get(0)||$(''), options); + }; + + + Autocomplete.prototype = { + + killerFn: null, + + initialize: function() { + + var me, uid, autocompleteElId; + me = this; + uid = Math.floor(Math.random()*0x100000).toString(16); + autocompleteElId = 'Autocomplete_' + uid; + + this.killerFn = function(e) { + if ($(e.target).parents('.autocomplete').size() === 0) { + me.killSuggestions(); + me.disableKillerFn(); + } + }; + + if (!this.options.width) { this.options.width = this.el.width(); } + this.mainContainerId = 'AutocompleteContainter_' + uid; + + $('
').appendTo('body'); + + this.container = $('#' + autocompleteElId); + this.fixPosition(); + if (window.opera) { + this.el.keypress(function(e) { me.onKeyPress(e); }); + } else { + this.el.keydown(function(e) { me.onKeyPress(e); }); + } + this.el.keyup(function(e) { me.onKeyUp(e); }); + this.el.blur(function() { me.enableKillerFn(); }); + this.el.focus(function() { me.fixPosition(); }); + }, + + setOptions: function(options){ + var o = this.options; + $.extend(o, options); + if(o.lookup){ + this.isLocal = true; + if($.isArray(o.lookup)){ o.lookup = { suggestions:o.lookup, data:[] }; } + } + $('#'+this.mainContainerId).css({ zIndex:o.zIndex }); + this.container.css({ maxHeight: o.maxHeight + 'px', width:o.width }); + }, + + clearCache: function(){ + this.cachedResponse = []; + this.badQueries = []; + }, + + disable: function(){ + this.disabled = true; + }, + + enable: function(){ + this.disabled = false; + }, + + fixPosition: function() { + var offset = this.el.offset(); + $('#' + this.mainContainerId).css({ top: (offset.top + this.el.innerHeight()) + 'px', left: offset.left + 'px' }); + }, + + enableKillerFn: function() { + var me = this; + $(document).bind('click', me.killerFn); + }, + + disableKillerFn: function() { + var me = this; + $(document).unbind('click', me.killerFn); + }, + + killSuggestions: function() { + var me = this; + this.stopKillSuggestions(); + this.intervalId = window.setInterval(function() { me.hide(); me.stopKillSuggestions(); }, 300); + }, + + stopKillSuggestions: function() { + window.clearInterval(this.intervalId); + }, + + onKeyPress: function(e) { + if (this.disabled || !this.enabled) { return; } + // return will exit the function + // and event will not be prevented + switch (e.keyCode) { + case 27: //KEY_ESC: + this.el.val(this.currentValue); + this.hide(); + break; + case 9: //KEY_TAB: + case 13: //KEY_RETURN: + if (this.selectedIndex === -1) { + this.hide(); + return; + } + this.select(this.selectedIndex); + if(e.keyCode === 9){ return; } + break; + case 38: //KEY_UP: + this.moveUp(); + break; + case 40: //KEY_DOWN: + this.moveDown(); + break; + default: + return; + } + e.stopImmediatePropagation(); + e.preventDefault(); + }, + + onKeyUp: function(e) { + if(this.disabled){ return; } + switch (e.keyCode) { + case 38: //KEY_UP: + case 40: //KEY_DOWN: + return; + } + clearInterval(this.onChangeInterval); + if (this.currentValue !== this.el.val()) { + if (this.options.deferRequestBy > 0) { + // Defer lookup in case when value changes very quickly: + var me = this; + this.onChangeInterval = setInterval(function() { me.onValueChange(); }, this.options.deferRequestBy); + } else { + this.onValueChange(); + } + } + }, + + onValueChange: function() { + clearInterval(this.onChangeInterval); + this.currentValue = this.el.val(); + var q = this.getQuery(this.currentValue); + this.selectedIndex = -1; + if (this.ignoreValueChange) { + this.ignoreValueChange = false; + return; + } + if (q === '' || q.length < this.options.minChars) { + this.hide(); + } else { + this.getSuggestions(q); + } + }, + + getQuery: function(val) { + var d, arr; + d = this.options.delimiter; + if (!d) { return $.trim(val); } + arr = val.split(d); + return $.trim(arr[arr.length - 1]); + }, + + getSuggestionsLocal: function(q) { + var ret, arr, len, val, i; + arr = this.options.lookup; + len = arr.suggestions.length; + ret = { suggestions:[], data:[] }; + q = q.toLowerCase(); + for(i=0; i< len; i++){ + val = arr.suggestions[i]; + if(val.toLowerCase().indexOf(q) === 0){ + ret.suggestions.push(val); + ret.data.push(arr.data[i]); + } + } + return ret; + }, + + getSuggestions: function(q) { + var cr, me; + cr = this.isLocal ? this.getSuggestionsLocal(q) : this.cachedResponse[q]; + if (cr && $.isArray(cr.suggestions)) { + this.suggestions = cr.suggestions; + this.data = cr.data; + this.suggest(); + } else if (!this.isBadQuery(q)) { + me = this; + me.options.params.query = q; + $.get(this.serviceUrl, me.options.params, function(txt) { me.processResponse(txt); }, 'text'); + } + }, + + isBadQuery: function(q) { + var i = this.badQueries.length; + while (i--) { + if (q.indexOf(this.badQueries[i]) === 0) { return true; } + } + return false; + }, + + hide: function() { + this.enabled = false; + this.selectedIndex = -1; + this.container.hide(); + }, + + suggest: function() { + if (this.suggestions.length === 0) { + this.hide(); + return; + } + + var me, len, div, f, v, i, s, mOver, mClick, l, img; + me = this; + len = this.suggestions.length; + f = this.options.fnFormatResult; + v = this.getQuery(this.currentValue); + mOver = function(xi) { return function() { me.activate(xi); }; }; + mClick = function(xi) { return function() { me.select(xi); }; }; + this.container.hide().empty(); + for (i = 0; i < len; i++) { + s = this.suggestions[i]; + l = this.links[i]; + img = '' + s + ' '; + div = $((me.selectedIndex === i ? '
' + img + f(s, this.data[i], v) + '
'); + div.mouseover(mOver(i)); + div.click(mClick(i)); + this.container.append(div); + } + this.enabled = true; + this.container.show(); + }, + + processResponse: function(text) { + var response; + try { + response = eval('(' + text + ')'); + } catch (err) { return; } + if (!$.isArray(response.data)) { response.data = []; } + if(!this.options.noCache){ + this.cachedResponse[response.query] = response; + if (response.suggestions.length === 0) { this.badQueries.push(response.query); } + } + if (response.query === this.getQuery(this.currentValue)) { + this.photos = response.photos; + this.links = response.links; + this.suggestions = response.suggestions; + this.data = response.data; + this.suggest(); + } + }, + + activate: function(index) { + var divs, activeItem; + divs = this.container.children(); + // Clear previous selection: + if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) { + $(divs.get(this.selectedIndex)).removeClass(); + } + this.selectedIndex = index; + if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) { + activeItem = divs.get(this.selectedIndex); + $(activeItem).addClass('selected'); + } + return activeItem; + }, + + deactivate: function(div, index) { + div.className = ''; + if (this.selectedIndex === index) { this.selectedIndex = -1; } + }, + + select: function(i) { + var selectedValue, f; + selectedValue = this.suggestions[i]; + if (selectedValue) { + this.el.val(selectedValue); + if (this.options.autoSubmit) { + f = this.el.parents('form'); + if (f.length > 0) { f.get(0).submit(); } + } + this.ignoreValueChange = true; + this.hide(); + this.onSelect(i); + } + }, + + moveUp: function() { + if (this.selectedIndex === -1) { return; } + if (this.selectedIndex === 0) { + this.container.children().get(0).className = ''; + this.selectedIndex = -1; + this.el.val(this.currentValue); + return; + } + this.adjustScroll(this.selectedIndex - 1); + }, + + moveDown: function() { + if (this.selectedIndex === (this.suggestions.length - 1)) { return; } + this.adjustScroll(this.selectedIndex + 1); + }, + + adjustScroll: function(i) { + var activeItem, offsetTop, upperBound, lowerBound; + activeItem = this.activate(i); + offsetTop = activeItem.offsetTop; + upperBound = this.container.scrollTop(); + lowerBound = upperBound + this.options.maxHeight - 25; + if (offsetTop < upperBound) { + this.container.scrollTop(offsetTop); + } else if (offsetTop > lowerBound) { + this.container.scrollTop(offsetTop - this.options.maxHeight + 25); + } + this.el.val(this.getValue(this.suggestions[i])); + }, + + onSelect: function(i) { + var me, fn, s, d; + me = this; + fn = me.options.onSelect; + s = me.suggestions[i]; + d = me.data[i]; + me.el.val(me.getValue(s)); + if ($.isFunction(fn)) { fn(s, d, me.el); } + }, + + getValue: function(value){ + var del, currVal, arr, me; + me = this; + del = me.options.delimiter; + if (!del) { return value; } + currVal = me.currentValue; + arr = currVal.split(del); + if (arr.length === 1) { return value; } + return currVal.substr(0, currVal.length - arr[arr.length - 1].length) + value; + } + + }; + +}(jQuery)); diff --git a/mod/acl.php b/mod/acl.php index 402d37376c..168b1f59f0 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -127,12 +127,15 @@ function acl_init(&$a){ if($type == 'm') { $x = array(); $x['query'] = $search; + $x['photos'] = array(); + $x['links'] = array(); $x['suggestions'] = array(); $x['data'] = array(); if(count($r)) { foreach($r as $g) { - $x['suggestions'][] = sprintf( t('%s [%s]'),$g['name'],$g['url']); - // '' . t('Image/photo') . '' . + $x['photos'][] = $g['micro']; + $x['links'][] = $g['url']; + $x['suggestions'][] = $g['name']; // sprintf( t('%s [%s]'),$g['name'],$g['url']); $x['data'][] = intval($g['id']); } } diff --git a/mod/message.php b/mod/message.php index b8695fdd93..71f83b47a2 100644 --- a/mod/message.php +++ b/mod/message.php @@ -18,15 +18,19 @@ function message_init(&$a) { )); $base = $a->get_baseurl(); - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; $a->page['htmlhead'] .= <<< EOT @@ -95,10 +99,6 @@ function message_content(&$a) { $myprofile = $a->get_baseurl(true) . '/profile/' . $a->user['nickname']; - - - - $tpl = get_markup_template('mail_head.tpl'); $header = replace_macros($tpl, array( '$messages' => t('Messages'), @@ -172,28 +172,36 @@ function message_content(&$a) { )); $preselect = (isset($a->argv[2])?array($a->argv[2]):false); - - if(defined('EMAIL_AUTOCOMP')) { + - // here's where we want to do contact autocomplete - // just figure out how to make it do the right thing - // pictures would be nice, but that didn't work when I tried. - // It sort of barely works, but needs help - // (the json backend is found in mod/acl.php) + $prename = $preurl = $preid = ''; - $select = ''; - } - else { + if($preselect) { + $r = q("select name, url, id from contact where uid = %d and id = %d limit 1", + intval(local_user()), + intval($a->argv[2]) + ); + if(count($r)) { + $prename = $r[0]['name']; + $preurl = $r[0]['url']; + $preid = $r[0]['id']; + } + } - // the ugly select box + $prefill = (($preselect) ? $prename : ''); - $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); - } + // the ugly select box + + $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); $tpl = get_markup_template('prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), '$to' => t('To:'), + '$showinputs' => 'true', + '$prefill' => $prefill, + '$autocomp' => $autocomp, + '$preid' => $preid, '$subject' => t('Subject:'), '$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''), '$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''), @@ -369,9 +377,10 @@ function message_content(&$a) { $seen = $message['seen']; } + + $select = $message['name'] . ''; $parent = ''; - $tpl = get_markup_template('mail_display.tpl'); $o = replace_macros($tpl, array( @@ -386,6 +395,7 @@ function message_content(&$a) { // reply '$header' => t('Send Reply'), '$to' => t('To:'), + '$showinputs' => '', '$subject' => t('Subject:'), '$subjtxt' => template_escape($message['title']), '$readonly' => ' readonly="readonly" style="background: #BBBBBB;" ', diff --git a/util/messages.po b/util/messages.po index 37878d86a9..485dfd7b7e 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.3.1337\n" +"Project-Id-Version: 3.0.1338\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-09 10:00-0700\n" +"POT-Creation-Date: 2012-05-10 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,8 +48,8 @@ msgstr "" #: ../../mod/register.php:38 ../../mod/regmod.php:116 ../../mod/item.php:124 #: ../../mod/item.php:140 ../../mod/profile_photo.php:19 #: ../../mod/profile_photo.php:139 ../../mod/profile_photo.php:150 -#: ../../mod/profile_photo.php:163 ../../mod/message.php:40 -#: ../../mod/message.php:92 ../../mod/allfriends.php:9 +#: ../../mod/profile_photo.php:163 ../../mod/message.php:44 +#: ../../mod/message.php:96 ../../mod/allfriends.php:9 #: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53 #: ../../mod/follow.php:8 ../../mod/display.php:138 ../../mod/profiles.php:7 #: ../../mod/profiles.php:365 ../../mod/delegate.php:6 @@ -158,7 +158,7 @@ msgstr "" #: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102 #: ../../addon/posterous/posterous.php:103 #: ../../view/theme/cleanzero/config.php:80 -#: ../../view/theme/diabook/theme.php:683 +#: ../../view/theme/diabook/theme.php:685 #: ../../view/theme/diabook/config.php:190 #: ../../view/theme/quattro/config.php:52 ../../view/theme/dispy/config.php:70 #: ../../include/conversation.php:555 @@ -532,8 +532,8 @@ msgid "Share" msgstr "" #: ../../mod/photos.php:1214 ../../mod/editpost.php:104 -#: ../../mod/wallmessage.php:145 ../../mod/message.php:206 -#: ../../mod/message.php:398 ../../include/conversation.php:361 +#: ../../mod/wallmessage.php:145 ../../mod/message.php:213 +#: ../../mod/message.php:405 ../../include/conversation.php:361 #: ../../include/conversation.php:706 ../../include/conversation.php:983 msgid "Please wait" msgstr "" @@ -631,7 +631,7 @@ msgid "Edit" msgstr "" #: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143 -#: ../../mod/message.php:204 ../../mod/message.php:396 +#: ../../mod/message.php:211 ../../mod/message.php:403 #: ../../include/conversation.php:965 msgid "Upload photo" msgstr "" @@ -641,7 +641,7 @@ msgid "Attach file" msgstr "" #: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144 -#: ../../mod/message.php:205 ../../mod/message.php:397 +#: ../../mod/message.php:212 ../../mod/message.php:404 #: ../../include/conversation.php:969 msgid "Insert web link" msgstr "" @@ -1775,8 +1775,8 @@ msgid "Remove account" msgstr "" #: ../../mod/settings.php:88 ../../mod/admin.php:735 ../../mod/admin.php:940 -#: ../../addon/mathjax/mathjax.php:36 ../../view/theme/diabook/theme.php:700 -#: ../../include/nav.php:137 +#: ../../addon/mathjax/mathjax.php:36 ../../view/theme/diabook/theme.php:571 +#: ../../view/theme/diabook/theme.php:701 ../../include/nav.php:137 msgid "Settings" msgstr "" @@ -2368,7 +2368,7 @@ msgstr "" msgid "Number of daily wall messages for %s exceeded. Message failed." msgstr "" -#: ../../mod/wallmessage.php:56 ../../mod/message.php:61 +#: ../../mod/wallmessage.php:56 ../../mod/message.php:65 msgid "No recipient selected." msgstr "" @@ -2376,15 +2376,15 @@ msgstr "" msgid "Unable to check your home location." msgstr "" -#: ../../mod/wallmessage.php:62 ../../mod/message.php:68 +#: ../../mod/wallmessage.php:62 ../../mod/message.php:72 msgid "Message could not be sent." msgstr "" -#: ../../mod/wallmessage.php:65 ../../mod/message.php:71 +#: ../../mod/wallmessage.php:65 ../../mod/message.php:75 msgid "Message collection failure." msgstr "" -#: ../../mod/wallmessage.php:68 ../../mod/message.php:74 +#: ../../mod/wallmessage.php:68 ../../mod/message.php:78 msgid "Message sent." msgstr "" @@ -2397,7 +2397,7 @@ msgstr "" msgid "Please enter a link URL:" msgstr "" -#: ../../mod/wallmessage.php:131 ../../mod/message.php:195 +#: ../../mod/wallmessage.php:131 ../../mod/message.php:199 msgid "Send Private Message" msgstr "" @@ -2408,18 +2408,18 @@ msgid "" "your site allow private mail from unknown senders." msgstr "" -#: ../../mod/wallmessage.php:133 ../../mod/message.php:196 -#: ../../mod/message.php:388 +#: ../../mod/wallmessage.php:133 ../../mod/message.php:200 +#: ../../mod/message.php:395 msgid "To:" msgstr "" -#: ../../mod/wallmessage.php:134 ../../mod/message.php:197 -#: ../../mod/message.php:389 +#: ../../mod/wallmessage.php:134 ../../mod/message.php:204 +#: ../../mod/message.php:396 msgid "Subject:" msgstr "" -#: ../../mod/wallmessage.php:140 ../../mod/message.php:201 -#: ../../mod/message.php:392 ../../mod/invite.php:113 +#: ../../mod/wallmessage.php:140 ../../mod/message.php:208 +#: ../../mod/message.php:399 ../../mod/invite.php:113 msgid "Your message:" msgstr "" @@ -2962,7 +2962,7 @@ msgstr "" msgid "New Message" msgstr "" -#: ../../mod/message.php:65 +#: ../../mod/message.php:69 msgid "Unable to locate contact information." msgstr "" @@ -2974,55 +2974,55 @@ msgstr "" msgid "Conversation removed." msgstr "" -#: ../../mod/message.php:237 +#: ../../mod/message.php:244 msgid "No messages." msgstr "" -#: ../../mod/message.php:244 +#: ../../mod/message.php:251 #, php-format msgid "Unknown sender - %s" msgstr "" -#: ../../mod/message.php:247 +#: ../../mod/message.php:254 #, php-format msgid "You and %s" msgstr "" -#: ../../mod/message.php:250 +#: ../../mod/message.php:257 #, php-format msgid "%s and You" msgstr "" -#: ../../mod/message.php:260 ../../mod/message.php:381 +#: ../../mod/message.php:267 ../../mod/message.php:388 msgid "Delete conversation" msgstr "" -#: ../../mod/message.php:263 +#: ../../mod/message.php:270 msgid "D, d M Y - g:i A" msgstr "" -#: ../../mod/message.php:265 +#: ../../mod/message.php:272 #, php-format msgid "%d message" msgid_plural "%d messages" msgstr[0] "" msgstr[1] "" -#: ../../mod/message.php:300 +#: ../../mod/message.php:307 msgid "Message not available." msgstr "" -#: ../../mod/message.php:365 +#: ../../mod/message.php:372 msgid "Delete message" msgstr "" -#: ../../mod/message.php:383 +#: ../../mod/message.php:390 msgid "" "No secure communications available. You may be able to " "respond from the sender's profile page." msgstr "" -#: ../../mod/message.php:387 +#: ../../mod/message.php:394 msgid "Send Reply" msgstr "" @@ -4683,10 +4683,6 @@ msgstr "" msgid "event" msgstr "" -#: ../../addon/hangman/hangman.php:19 -msgid "Hangman" -msgstr "" - #: ../../addon/uhremotestorage/uhremotestorage.php:84 #, php-format msgid "" @@ -5641,26 +5637,38 @@ msgstr "" #: ../../view/theme/diabook/theme.php:130 #: ../../view/theme/diabook/theme.php:571 +#: ../../view/theme/diabook/theme.php:675 +#: ../../view/theme/diabook/config.php:201 msgid "Community Pages" msgstr "" #: ../../view/theme/diabook/theme.php:418 +#: ../../view/theme/diabook/theme.php:677 +#: ../../view/theme/diabook/config.php:203 msgid "Community Profiles" msgstr "" #: ../../view/theme/diabook/theme.php:439 +#: ../../view/theme/diabook/theme.php:682 +#: ../../view/theme/diabook/config.php:208 msgid "Last users" msgstr "" #: ../../view/theme/diabook/theme.php:468 +#: ../../view/theme/diabook/theme.php:684 +#: ../../view/theme/diabook/config.php:210 msgid "Last likes" msgstr "" #: ../../view/theme/diabook/theme.php:513 +#: ../../view/theme/diabook/theme.php:683 +#: ../../view/theme/diabook/config.php:209 msgid "Last photos" msgstr "" #: ../../view/theme/diabook/theme.php:550 +#: ../../view/theme/diabook/theme.php:680 +#: ../../view/theme/diabook/config.php:206 msgid "Find Friends" msgstr "" @@ -5677,6 +5685,8 @@ msgid "Invite Friends" msgstr "" #: ../../view/theme/diabook/theme.php:606 +#: ../../view/theme/diabook/theme.php:676 +#: ../../view/theme/diabook/config.php:202 msgid "Earth Layers" msgstr "" @@ -5696,14 +5706,20 @@ msgid "Set latitude (Y) for Earth Layer" msgstr "" #: ../../view/theme/diabook/theme.php:626 +#: ../../view/theme/diabook/theme.php:678 +#: ../../view/theme/diabook/config.php:204 msgid "Help or @NewHere ?" msgstr "" #: ../../view/theme/diabook/theme.php:633 +#: ../../view/theme/diabook/theme.php:679 +#: ../../view/theme/diabook/config.php:205 msgid "Connect Services" msgstr "" #: ../../view/theme/diabook/theme.php:640 +#: ../../view/theme/diabook/theme.php:681 +#: ../../view/theme/diabook/config.php:207 msgid "Last Tweets" msgstr "" @@ -5712,54 +5728,34 @@ msgstr "" msgid "Set twitter search term" msgstr "" +#: ../../view/theme/diabook/theme.php:663 +#: ../../view/theme/diabook/theme.php:664 +#: ../../view/theme/diabook/theme.php:665 +#: ../../view/theme/diabook/theme.php:666 +#: ../../view/theme/diabook/theme.php:667 +#: ../../view/theme/diabook/theme.php:668 +#: ../../view/theme/diabook/theme.php:669 +#: ../../view/theme/diabook/theme.php:670 +#: ../../view/theme/diabook/theme.php:671 +#: ../../view/theme/diabook/theme.php:672 ../../include/acl_selectors.php:288 +msgid "don't show" +msgstr "" + +#: ../../view/theme/diabook/theme.php:663 +#: ../../view/theme/diabook/theme.php:664 +#: ../../view/theme/diabook/theme.php:665 +#: ../../view/theme/diabook/theme.php:666 +#: ../../view/theme/diabook/theme.php:667 +#: ../../view/theme/diabook/theme.php:668 +#: ../../view/theme/diabook/theme.php:669 +#: ../../view/theme/diabook/theme.php:670 +#: ../../view/theme/diabook/theme.php:671 +#: ../../view/theme/diabook/theme.php:672 ../../include/acl_selectors.php:287 +msgid "show" +msgstr "" + #: ../../view/theme/diabook/theme.php:673 -#: ../../view/theme/diabook/config.php:201 -msgid "Show \"Cummunity Pages\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:674 -#: ../../view/theme/diabook/config.php:202 -msgid "Show \"Earth Layers\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:675 -#: ../../view/theme/diabook/config.php:203 -msgid "Show \"Cummunity Profiles\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:676 -#: ../../view/theme/diabook/config.php:204 -msgid "Show \"Help or @NewHere\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:677 -#: ../../view/theme/diabook/config.php:205 -msgid "Show \"Connect Services\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:678 -#: ../../view/theme/diabook/config.php:206 -msgid "Show \"Find Friends\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:679 -#: ../../view/theme/diabook/config.php:207 -msgid "Show \"Last Tweets\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:680 -#: ../../view/theme/diabook/config.php:208 -msgid "Show \"Last Users\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:681 -#: ../../view/theme/diabook/config.php:209 -msgid "Show \"Last Photos\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:682 -#: ../../view/theme/diabook/config.php:210 -msgid "Show \"Last Likes\" at right-hand coloumn?" +msgid "Show/hide boxes at right-hand coloumn:" msgstr "" #: ../../view/theme/diabook/config.php:194 @@ -6683,14 +6679,6 @@ msgstr "" msgid "Visible to everybody" msgstr "" -#: ../../include/acl_selectors.php:287 -msgid "show" -msgstr "" - -#: ../../include/acl_selectors.php:288 -msgid "don't show" -msgstr "" - #: ../../include/enotify.php:14 msgid "Friendica Notification" msgstr "" diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 60d4646cce..17acc1eab0 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -33,6 +33,7 @@ just contact me, if you are intesrested in joining

diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index 84dd648345..cc7da1b000 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -143,12 +143,12 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear 'dark'=>'dark', ); $close_pagesC = array( - '1'=>'hide', - '0'=>'show', + '0'=>'show', + '1'=>'hide', ); $close_mapqueryC = array( - '1'=>'hide', - '0'=>'show', + '0'=>'show', + '1'=>'hide', ); $close_profilesC = array( '0'=>'show', @@ -167,8 +167,8 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '1'=>'hide', ); $close_twitterC = array( - '1'=>'hide', - '0'=>'show', + '0'=>'show', + '1'=>'hide', ); $close_lastusersC = array( '0'=>'show', @@ -196,18 +196,18 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors), '$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm), '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom), - '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX), - '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY), - '$close_pages' => array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC), - '$close_mapquery' => array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC), - '$close_profiles' => array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC), - '$close_helpers' => array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC), - '$close_services' => array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC), - '$close_friends' => array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC), - '$close_twitter' => array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC), - '$close_lastusers' => array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC), - '$close_lastphotos' => array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC), - '$close_lastlikes' => array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC), + '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX), + '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY), + '$close_pages' => array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC), + '$close_mapquery' => array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC), + '$close_profiles' => array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC), + '$close_helpers' => array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC), + '$close_services' => array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC), + '$close_friends' => array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC), + '$close_twitter' => array('diabook_close_twitter', t('Last tweets'), $close_twitter, '', $close_twitterC), + '$close_lastusers' => array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC), + '$close_lastphotos' => array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC), + '$close_lastlikes' => array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC), )); return $o; } diff --git a/view/theme/diabook/diabook-dark/style-network.css b/view/theme/diabook/diabook-dark/style-network.css index d9e2d00948..678e8597c7 100644 --- a/view/theme/diabook/diabook-dark/style-network.css +++ b/view/theme/diabook/diabook-dark/style-network.css @@ -831,7 +831,7 @@ ul.menu-popup .empty { box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } .acpopupitem { - color: #2e2f2e; + color: #eec; padding: 4px; clear: left; } diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css index 24d319f8a2..189bd30bf4 100644 --- a/view/theme/diabook/diabook-dark/style.css +++ b/view/theme/diabook/diabook-dark/style.css @@ -3,10 +3,7 @@ * Additional Changes: Michael Vogel **/ -/* ========= */ -/* = Admin = */ -/* ========= */ - +/** Fancy Box **/ #fancybox-content { width: 0; height: 0; @@ -19,6 +16,11 @@ background: #2e2e2f !important; } + +/* ========= */ +/* = Admin = */ +/* ========= */ + #adminpage { /* width: 80%;*/ } @@ -633,7 +635,7 @@ header #banner #logo-text { text-decoration: none; } .mail-list-wrapper { - background-color: #eec; + background-color: #333; margin-bottom: 5px; width: 100%; height: auto; @@ -644,6 +646,7 @@ header #banner #logo-text { float: left; width: 20%; overflow: hidden; + background: #2e2e2f; } .mail-list-wrapper .mail-subject { width: 30%; @@ -915,7 +918,7 @@ nav #nav-apps-link.selected { } .notify-seen { - background: none repeat scroll 0 0 #DDDDDD; + background: none repeat scroll 0 0 #666; } ul.menu-popup { @@ -1685,7 +1688,7 @@ body .pageheader{ .wall-item-comment-wrapper .comment-edit-text-full { font-size: 14px; height: 4em; - color: #2e302e; + color: #eec; border: 1px solid #2e302e; } .comment-edit-preview { diff --git a/view/theme/diabook/js/jquery.twitter.search.js b/view/theme/diabook/js/jquery.twitter.search.js index d3ccfe68e7..a57bd255d8 100644 --- a/view/theme/diabook/js/jquery.twitter.search.js +++ b/view/theme/diabook/js/jquery.twitter.search.js @@ -202,7 +202,7 @@ // default styling a: { textDecoration: 'none', color: '#3B5998' }, bird: { width: '50px', height: '20px', position: 'absolute', left: '-30px', top: '-20px', border: 'none' }, - container: { overflow: 'hidden', backgroundColor: '', height: '600px' }, + container: { overflow: 'hidden', backgroundColor: '', height: '600px', width: '170px' }, fail: { background: '#6cc5c3 url(http://cloud.github.com/downloads/malsup/twitter/failwhale.png) no-repeat 50% 50%', height: '100%', padding: '10px' }, frame: { border: '0px solid #C2CFF1', borderRadius: '0px', '-moz-border-radius': '0px', '-webkit-border-radius': '0px' }, tweet: { padding: '5px 10px', clear: 'left' }, diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 15c0794fa0..7336383d7a 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -391,8 +391,8 @@ if ($color=="dark") $color_path = "/diabook-dark/"; ); function open_boxsettings() { - $("div#boxsettings").attr("style","display: block;height:500px;width:450px;"); - $("label").attr("style","width: 350px;"); + $("div#boxsettings").attr("style","display: block;height:500px;width:300px;"); + $("label").attr("style","width: 150px;"); }; ';} @@ -608,9 +608,9 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' ); $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' ); $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' ); - $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom); - $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX); - $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY); + $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layers'), $ELZoom, '', $ELZoom); + $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX); + $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY); if (isset($_POST['diabook-settings-map-sub']) && $_POST['diabook-settings-map-sub']!=''){ set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']); set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']); @@ -660,26 +660,28 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' ); $close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' ); $close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' ); - $close_pagesC = array('1'=>'hide', '0'=>'show',); - $close_mapqueryC = array('1'=>'hide', '0'=>'show',); - $close_profilesC = array('0'=>'show', '1'=>'hide',); - $close_helpersC = array('0'=>'show', '1'=>'hide',); - $close_servicesC = array('0'=>'show', '1'=>'hide',); - $close_friendsC = array('0'=>'show', '1'=>'hide',); - $close_twitterC = array('1'=>'hide', '0'=>'show',); - $close_lastusersC = array('0'=>'show', '1'=>'hide',); - $close_lastphotosC = array('0'=>'show','1'=>'hide',); - $close_lastlikesC = array('0'=>'show', '1'=>'hide',); - $aside['$close_pages'] = array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC); - $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC); - $aside['$close_profiles'] = array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC); - $aside['$close_helpers'] = array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC); - $aside['$close_services'] = array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC); - $aside['$close_friends'] = array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC); - $aside['$close_twitter'] = array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC); - $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC); - $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC); - $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC); + $close_pagesC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_mapqueryC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_profilesC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_helpersC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_servicesC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_friendsC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_twitterC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_lastusersC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_lastphotosC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_lastlikesC = array('1'=>t("don't show"), '0'=>t("show"),); + $boxsettings['title'] = Array("", t('Show/hide boxes at right-hand column:'), "", ""); + $aside['$boxsettings'] = $boxsettings; + $aside['$close_pages'] = array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC); + $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC); + $aside['$close_profiles'] = array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC); + $aside['$close_helpers'] = array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC); + $aside['$close_services'] = array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC); + $aside['$close_friends'] = array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC); + $aside['$close_twitter'] = array('diabook_close_twitter', t('Last Tweets'), $close_twitter, '', $close_twitterC); + $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC); + $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC); + $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC); $aside['$sub'] = t('Submit'); $baseurl = $a->get_baseurl($ssl_state); $aside['$baseurl'] = $baseurl; @@ -694,7 +696,6 @@ if ($color=="dark") $color_path = "/diabook-dark/"; set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']); set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']); set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']); - header("Location: network"); } } $close = t('Settings'); diff --git a/view/theme/diabook/theme_settings.tpl b/view/theme/diabook/theme_settings.tpl index 68b22a1685..ad024dfe99 100644 --- a/view/theme/diabook/theme_settings.tpl +++ b/view/theme/diabook/theme_settings.tpl @@ -6,7 +6,22 @@ {{inc field_select.tpl with $field=$resolution}}{{endinc}} +
+ +
+
+

Show/hide boxes at right-hand column

+{{inc field_select.tpl with $field=$close_pages}}{{endinc}} +{{inc field_select.tpl with $field=$close_profiles}}{{endinc}} +{{inc field_select.tpl with $field=$close_helpers}}{{endinc}} +{{inc field_select.tpl with $field=$close_services}}{{endinc}} +{{inc field_select.tpl with $field=$close_friends}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastusers}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastphotos}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastlikes}}{{endinc}} +{{inc field_select.tpl with $field=$close_twitter}}{{endinc}} {{inc field_input.tpl with $field=$TSearchTerm}}{{endinc}} +{{inc field_select.tpl with $field=$close_mapquery}}{{endinc}} {{inc field_input.tpl with $field=$ELPosX}}{{endinc}} @@ -18,22 +33,9 @@ -{{inc field_select.tpl with $field=$close_pages}}{{endinc}} -{{inc field_select.tpl with $field=$close_profiles}}{{endinc}} -{{inc field_select.tpl with $field=$close_helpers}}{{endinc}} -{{inc field_select.tpl with $field=$close_services}}{{endinc}} -{{inc field_select.tpl with $field=$close_friends}}{{endinc}} -{{inc field_select.tpl with $field=$close_lastusers}}{{endinc}} -{{inc field_select.tpl with $field=$close_lastphotos}}{{endinc}} -{{inc field_select.tpl with $field=$close_lastlikes}}{{endinc}} -{{inc field_select.tpl with $field=$close_twitter}}{{endinc}} -{{inc field_select.tpl with $field=$close_mapquery}}{{endinc}} - -
- -
+
diff --git a/view/theme/duepuntozero/prv_message.tpl b/view/theme/duepuntozero/prv_message.tpl new file mode 100644 index 0000000000..b5cda9c85e --- /dev/null +++ b/view/theme/duepuntozero/prv_message.tpl @@ -0,0 +1,39 @@ + +

$header

+ +
+
+ +$parent + +
$to
+ +{{ if $showinputs }} + + +{{ else }} +$select +{{ endif }} + +
$subject
+ + +
$yourmessage
+ + + +
+ +
+
+
+ +
+ +
+
+
+
+
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 7cbcdc4d2c..b978c13e51 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -3166,4 +3166,12 @@ ul.menu-popup { } #id_term { width:100px; -} \ No newline at end of file +} + +#recip { + +} +.autocomplete-w1 { background: #ffffff; no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; } +.autocomplete { color:#000; border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } +.autocomplete .selected { background:#F0F0F0; } +.autocomplete div { padding:2px 5px; white-space:nowrap; overflow:hidden; }