From d6d4d3ed3a02c844a7ff0c48411f8b014cff3ee9 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 9 Nov 2011 00:29:14 -0800 Subject: [PATCH 1/4] various testbubble fixes --- view/jot-header.tpl | 3 +- view/theme/dispy/jot-header.tpl | 3 +- view/theme/testbubble/jot-header.tpl | 54 +++++++++++++++++----------- view/theme/testbubble/jot.tpl | 3 -- view/theme/testbubble/mail_head.tpl | 6 +--- 5 files changed, 39 insertions(+), 30 deletions(-) diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 9ded3e9b4..81d7d6d91 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -222,8 +222,9 @@ function initEditor(cb){ event.target.textContent = reply; event.preventDefault(); if(reply && reply.length) { + reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ tinyMCE.execCommand('mceInsertRawHTML',false,data); diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl index 79b10fd40..7a1012230 100644 --- a/view/theme/dispy/jot-header.tpl +++ b/view/theme/dispy/jot-header.tpl @@ -229,8 +229,9 @@ function initEditor(cb) { event.target.textContent = reply; event.preventDefault(); if(reply && reply.length) { + reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ tinyMCE.execCommand('mceInsertRawHTML',false,data); diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl index 0093bf82a..5ada1fdf8 100644 --- a/view/theme/testbubble/jot-header.tpl +++ b/view/theme/testbubble/jot-header.tpl @@ -32,16 +32,37 @@ function initEditor(cb) { content_css: "$baseurl/view/custom_tinymce.css", theme_advanced_path : false, setup : function(ed) { - //Character count - ed.onKeyUp.add(function(ed, e) { - var txt = tinyMCE.activeEditor.getContent(); - textlen = txt.length; - if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) { - $('#profile-jot-desc').html(ispublic); - } - else { - $('#profile-jot-desc').html(' '); - } + cPopup = null; + ed.onKeyDown.add(function(ed,e) { + if(cPopup !== null) + cPopup.onkey(e); + }); + + + + ed.onKeyUp.add(function(ed, e) { + var txt = tinyMCE.activeEditor.getContent(); + match = txt.match(/@([^ \n]+)$/); + if(match!==null) { + if(cPopup === null) { + cPopup = new ACPopup(this,baseurl+"/acl"); + } + if(cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]); + if(! cPopup.ready) cPopup = null; + } + else { + if(cPopup !== null) { cPopup.close(); cPopup = null; } + } + + textlen = txt.length; + if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) { + $('#profile-jot-desc').html(ispublic); + } + else { + $('#profile-jot-desc').html(' '); + } + + //Character count if(textlen <= 140) { $('#character-counter').removeClass('red'); @@ -67,7 +88,6 @@ function initEditor(cb) { $("#profile-upload-wrapper").show(); $("#profile-attach-wrapper").show(); $("#profile-link-wrapper").show(); - $("#profile-youtube-wrapper").show(); $("#profile-video-wrapper").show(); $("#profile-audio-wrapper").show(); $("#profile-location-wrapper").show(); @@ -163,20 +183,13 @@ function initEditor(cb) { if(reply && reply.length) { reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { tinyMCE.execCommand('mceInsertRawHTML',false,data); $('#profile-rotator').hide(); }); } } - function jotGetVideo() { - reply = prompt("$utubeurl"); - if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]'); - } - } - function jotVideoURL() { reply = prompt("$vidurl"); if(reply && reply.length) { @@ -229,8 +242,9 @@ function initEditor(cb) { event.target.textContent = reply; event.preventDefault(); if(reply && reply.length) { + reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ tinyMCE.execCommand('mceInsertRawHTML',false,data); diff --git a/view/theme/testbubble/jot.tpl b/view/theme/testbubble/jot.tpl index d60e8adc2..e0e864572 100644 --- a/view/theme/testbubble/jot.tpl +++ b/view/theme/testbubble/jot.tpl @@ -30,9 +30,6 @@ - diff --git a/view/theme/testbubble/mail_head.tpl b/view/theme/testbubble/mail_head.tpl index 2a4596cd6..afb65f537 100644 --- a/view/theme/testbubble/mail_head.tpl +++ b/view/theme/testbubble/mail_head.tpl @@ -1,7 +1,3 @@

$messages

- +$tab_content From dbf9711e910d10309bdde61340420474586f103d Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 9 Nov 2011 01:54:52 -0800 Subject: [PATCH 2/4] reset theme_info when a profile is loaded (without a theme cookie the default nav template over-rides the nav template for the theme that is loaded afterward) --- boot.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boot.php b/boot.php index af5c2db0b..58a991176 100644 --- a/boot.php +++ b/boot.php @@ -823,6 +823,14 @@ function profile_load(&$a, $nickname, $profile = 0) { $a->page['title'] = $a->profile['name'] . " @ " . $a->config['sitename']; $_SESSION['theme'] = $a->profile['theme']; + /** + * load/reload current theme info + */ + $theme_info_file = "view/theme/".current_theme()."/theme.php"; + if (file_exists($theme_info_file)){ + require_once($theme_info_file); + } + if(! (x($a->page,'aside'))) $a->page['aside'] = ''; From 7fd54ad51f3328d2eb371b51a1e276b346da6d4f Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 9 Nov 2011 16:37:33 -0800 Subject: [PATCH 3/4] revup --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 58a991176..09a66c02c 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDIKA_PLATFORM', 'Friendica'); -define ( 'FRIENDIKA_VERSION', '2.3.1159' ); +define ( 'FRIENDIKA_VERSION', '2.3.1160' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1103 ); From 2b1e01185144ecc0ff5de457efcad5734dd932c8 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 9 Nov 2011 17:55:36 -0800 Subject: [PATCH 4/4] fix to overlapping tabs on testbubble when width too small --- view/theme/testbubble/style.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/view/theme/testbubble/style.css b/view/theme/testbubble/style.css index 4b66d16c5..a094d3393 100644 --- a/view/theme/testbubble/style.css +++ b/view/theme/testbubble/style.css @@ -823,10 +823,9 @@ profile-jot-banner-wrapper { /* ======== */ .tabs { - min-width: 500px; + min-width: 400px; list-style: none; padding: 10px; - margin: 0px 0px 10px 0px; border-bottom: 1px solid #efefef; font-size: 0.9em; } @@ -834,6 +833,8 @@ profile-jot-banner-wrapper { .tab { padding: 5px 10px 5px 10px; + display: inline-block; + margin-bottom: 5px; margin-right: 5px; font-style: bold; } @@ -848,7 +849,7 @@ profile-jot-banner-wrapper { .wall-item-outside-wrapper { max-width: 93%; - border-bottom: 1px solid #dedede; + border-bottom: 1px solid #dedede; margin-top: 20px; padding-right: 10px; padding-left: 12px;