aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme
diff options
context:
space:
mode:
authorSimon <simon@kisikew.org>2012-04-15 00:20:12 -0700
committerSimon <simon@kisikew.org>2012-04-15 00:20:12 -0700
commitf299749758112361ee6384cd75d11b2c3a57352a (patch)
treefce1c1b2d497adae72d77e09c6bf005c8900256b /view/theme
parent4572179a24d575df19b96427479dc11f7d137683 (diff)
parent6a2f0eb475356ebe946a499a7a8bdee487b7ff32 (diff)
downloadvolse-hubzilla-f299749758112361ee6384cd75d11b2c3a57352a.tar.gz
volse-hubzilla-f299749758112361ee6384cd75d11b2c3a57352a.tar.bz2
volse-hubzilla-f299749758112361ee6384cd75d11b2c3a57352a.zip
Merge pull request #237 from simonlnu/master
REALLY fix fpostit this time
Diffstat (limited to 'view/theme')
-rw-r--r--view/theme/dispy-dark/bottom.tpl1
-rw-r--r--view/theme/dispy-dark/default.php5
-rw-r--r--view/theme/dispy-dark/head.tpl29
-rw-r--r--view/theme/dispy-dark/jot-header.tpl1
-rw-r--r--view/theme/dispy-dark/lang_selector.tpl10
-rw-r--r--view/theme/dispy-dark/style.css14
-rw-r--r--view/theme/dispy-dark/theme.php39
-rw-r--r--view/theme/dispy/bottom.tpl1
-rw-r--r--view/theme/dispy/default.php5
-rw-r--r--view/theme/dispy/head.tpl29
-rw-r--r--view/theme/dispy/header.tpl0
-rw-r--r--view/theme/dispy/js/jquery.autogrow.textarea.js46
-rw-r--r--view/theme/dispy/lang_selector.tpl10
-rw-r--r--view/theme/dispy/style.css12
-rw-r--r--view/theme/dispy/theme.php39
15 files changed, 159 insertions, 82 deletions
diff --git a/view/theme/dispy-dark/bottom.tpl b/view/theme/dispy-dark/bottom.tpl
new file mode 100644
index 000000000..1b7dda8f8
--- /dev/null
+++ b/view/theme/dispy-dark/bottom.tpl
@@ -0,0 +1 @@
+<script type="text/javascript" src="$baseurl/view/theme/dispy/js/jquery.autogrow.textarea.js"></script>
diff --git a/view/theme/dispy-dark/default.php b/view/theme/dispy-dark/default.php
index b02f41947..729f9be2a 100644
--- a/view/theme/dispy-dark/default.php
+++ b/view/theme/dispy-dark/default.php
@@ -28,9 +28,10 @@
<?php if(x($page,'aside_right_bottom')) echo $page['aside_right_bottom']; ?>
</aside>
</article>
- <footer id="page-footer">
- <?php if(x($page,'footer')) echo $page['footer']; ?>
+ <footer id="footer">
+ <?php if(x($page, 'footer')) echo $page['footer']; ?>
</footer>
+ <?php if (x($page, 'bottom')) echo $page['bottom']; ?>
</body>
</html>
diff --git a/view/theme/dispy-dark/head.tpl b/view/theme/dispy-dark/head.tpl
index d1bdc256b..d42b19aef 100644
--- a/view/theme/dispy-dark/head.tpl
+++ b/view/theme/dispy-dark/head.tpl
@@ -1,33 +1,29 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta charset="UTF-8" />
<base href="$baseurl/" />
<meta name="generator" content="$generator" />
+<link rel="shortcut icon" href="$baseurl/images/friendica-32.png" />
+<link rel="search" href="$baseurl/opensearch"
+ type="application/opensearchdescription+xml" title="Search in Friendica" />
<link rel="stylesheet" href="$baseurl/library/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<link rel="stylesheet" href="$baseurl/library/tiptip/tipTip.css" type="text/css" media="screen" />
<link rel="stylesheet" href="$baseurl/library/jgrowl/jquery.jgrowl.css" type="text/css" media="screen" />
-
<link rel="stylesheet" type="text/css" href="$stylesheet" media="all" />
-
-<link rel="shortcut icon" href="$baseurl/images/friendica-32.png" />
-<link rel="search"
- href="$baseurl/opensearch"
- type="application/opensearchdescription+xml"
- title="Search in Friendica" />
-
<!--[if IE]>
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
-<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
-<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
-<script type="text/javascript" src="$baseurl/js/fk.autocomplete.js" ></script>
+<script type="text/javascript" src="$baseurl/js/jquery.js"></script>
+<script type="text/javascript" src="$baseurl/js/acl.js"></script>
+<script type="text/javascript" src="$baseurl/js/main.js"></script>
+<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js"></script>
+<script type="text/javascript" src="$baseurl/js/fk.autocomplete.js"></script>
<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
-<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js" ></script>
-<script type="text/javascript" src="$baseurl/js/acl.js" ></script>
-<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.js" ></script>
-<script type="text/javascript" src="$baseurl/js/main.js" ></script>
+<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
+<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.js"></script>
+<!-- in dispy-dark -->
<script>
-
var updateInterval = $update_interval;
function confirmDelete() { return confirm("$delitem"); }
@@ -48,7 +44,6 @@
}
}
-
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == '$comment') {
diff --git a/view/theme/dispy-dark/jot-header.tpl b/view/theme/dispy-dark/jot-header.tpl
index 5838729cc..c55ac503a 100644
--- a/view/theme/dispy-dark/jot-header.tpl
+++ b/view/theme/dispy-dark/jot-header.tpl
@@ -346,4 +346,3 @@ function enableOnUser(){
}
</script>
-
diff --git a/view/theme/dispy-dark/lang_selector.tpl b/view/theme/dispy-dark/lang_selector.tpl
new file mode 100644
index 000000000..e777a0a86
--- /dev/null
+++ b/view/theme/dispy-dark/lang_selector.tpl
@@ -0,0 +1,10 @@
+<div id="lang-select-icon" class="icon s22 language" title="$title" onclick="openClose('language-selector');" ></div>
+<div id="language-selector" style="display: none;" >
+ <form action="#" method="post" >
+ <select name="system_language" onchange="this.form.submit();" >
+ {{ for $langs.0 as $v=>$l }}
+ <option value="$v" {{if $v==$langs.1}}selected="selected"{{endif}}>$l</option>
+ {{ endfor }}
+ </select>
+ </form>
+</div>
diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css
index 80e77bfc8..20f5c5898 100644
--- a/view/theme/dispy-dark/style.css
+++ b/view/theme/dispy-dark/style.css
@@ -2394,6 +2394,12 @@ div[id$="wrapper"] br {
.admin.link {
list-style-position: inside;
}
+#adminpage {
+ color: #eec;
+ background: #2e2f2e;
+ margin: 5px;
+ padding: 10px;
+}
#adminpage dl {
clear:left;
margin-bottom: 2px;
@@ -2415,7 +2421,6 @@ div[id$="wrapper"] br {
#adminpage .submit {
clear:left;
}
-
#adminpage #pluginslist {
margin: 0;
padding: 0;
@@ -2432,7 +2437,6 @@ div[id$="wrapper"] br {
float:left;
margin-right: 1em;
}
-
#adminpage table {
width: 100%;
border-bottom: 1px solid #000;
@@ -2455,9 +2459,13 @@ div[id$="wrapper"] br {
text-align: right;
}
#adminpage #users a {
- color: #2e2f2e;
+ color: #eec;
text-decoration: underline;
}
+#users .name {
+ color: #eec;
+}
+
/**
* Form fields
diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php
index d5d489be2..6275980bc 100644
--- a/view/theme/dispy-dark/theme.php
+++ b/view/theme/dispy-dark/theme.php
@@ -76,7 +76,7 @@ function dispy_dark_init(&$a) {
// click outside notifications menu closes it
$('html').click(function() {
$('#nav-notifications-linkmenu').removeClass('selected');
- document.getElementById("nav-notifications-menu").style.display = "none";
+ $('#nav-notifications-menu').css({display: 'none'});
});
$('#nav-notifications-linkmenu').click(function(event) {
@@ -85,7 +85,7 @@ function dispy_dark_init(&$a) {
// click outside profiles menu closes it
$('html').click(function() {
$('#profiles-menu-trigger').removeClass('selected');
- document.getElementById("profiles-menu").style.display = "none";
+ $('#profiles-menu').css({display: 'none'});
});
$('#profiles-menu').click(function(event) {
@@ -138,6 +138,8 @@ function dispy_dark_init(&$a) {
});
</script>
EOT;
+
+ js_in_foot();
}
function dispy_dark_community_info() {
@@ -145,26 +147,25 @@ function dispy_dark_community_info() {
$url = $a->get_baseurl($ssl_state);
$aside['$url'] = $url;
- $fpostitJS = <<<FPI
- javascript: (function() {
- the_url = ' . $url . '/view/theme/' . $a->theme_info['name'] . '/fpostit/fpostit.php?url=' +
- encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' +
- encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ?
- document.getSelection() : document.selection.createRange().text));
- a_funct = function() {
- if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) {
- location.href = the_url;
- }
- if (/Firefox/.test(navigator.userAgent)) {
- setTimeout(a_funct, 0)
- } else {
- a_funct();
- }
- })();
-FPI;
+ $fpostitJS = "javascript:(function() {"
+ . "the_url = '" . $url . "/view/theme/".$a->theme_info['name']."/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text));
+ a_funct = function() {
+ if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url;};
+ if (/Firefox/.test(navigator.userAgent)) {setTimeout(a_funct, 0);}
+ else {a_funct();}})()";
$aside['$fpostitJS'] = $fpostitJS;
$tpl = file_get_contents(dirname(__file__) . '/communityhome.tpl');
return $a->page['aside_bottom'] = replace_macros($tpl, $aside);
}
+function js_in_foot() {
+ /** @purpose insert stuff in bottom of page
+ */
+ $a = get_app();
+ $baseurl = $a->get_baseurl($ssl_state);
+ $bottom['$baseurl'] = $baseurl;
+ $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl');
+
+ return $a->page['bottom'] = replace_macros($tpl, $bottom);
+}
diff --git a/view/theme/dispy/bottom.tpl b/view/theme/dispy/bottom.tpl
new file mode 100644
index 000000000..1b7dda8f8
--- /dev/null
+++ b/view/theme/dispy/bottom.tpl
@@ -0,0 +1 @@
+<script type="text/javascript" src="$baseurl/view/theme/dispy/js/jquery.autogrow.textarea.js"></script>
diff --git a/view/theme/dispy/default.php b/view/theme/dispy/default.php
index b02f41947..729f9be2a 100644
--- a/view/theme/dispy/default.php
+++ b/view/theme/dispy/default.php
@@ -28,9 +28,10 @@
<?php if(x($page,'aside_right_bottom')) echo $page['aside_right_bottom']; ?>
</aside>
</article>
- <footer id="page-footer">
- <?php if(x($page,'footer')) echo $page['footer']; ?>
+ <footer id="footer">
+ <?php if(x($page, 'footer')) echo $page['footer']; ?>
</footer>
+ <?php if (x($page, 'bottom')) echo $page['bottom']; ?>
</body>
</html>
diff --git a/view/theme/dispy/head.tpl b/view/theme/dispy/head.tpl
index d1bdc256b..d42b19aef 100644
--- a/view/theme/dispy/head.tpl
+++ b/view/theme/dispy/head.tpl
@@ -1,33 +1,29 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta charset="UTF-8" />
<base href="$baseurl/" />
<meta name="generator" content="$generator" />
+<link rel="shortcut icon" href="$baseurl/images/friendica-32.png" />
+<link rel="search" href="$baseurl/opensearch"
+ type="application/opensearchdescription+xml" title="Search in Friendica" />
<link rel="stylesheet" href="$baseurl/library/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<link rel="stylesheet" href="$baseurl/library/tiptip/tipTip.css" type="text/css" media="screen" />
<link rel="stylesheet" href="$baseurl/library/jgrowl/jquery.jgrowl.css" type="text/css" media="screen" />
-
<link rel="stylesheet" type="text/css" href="$stylesheet" media="all" />
-
-<link rel="shortcut icon" href="$baseurl/images/friendica-32.png" />
-<link rel="search"
- href="$baseurl/opensearch"
- type="application/opensearchdescription+xml"
- title="Search in Friendica" />
-
<!--[if IE]>
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
-<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
-<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
-<script type="text/javascript" src="$baseurl/js/fk.autocomplete.js" ></script>
+<script type="text/javascript" src="$baseurl/js/jquery.js"></script>
+<script type="text/javascript" src="$baseurl/js/acl.js"></script>
+<script type="text/javascript" src="$baseurl/js/main.js"></script>
+<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js"></script>
+<script type="text/javascript" src="$baseurl/js/fk.autocomplete.js"></script>
<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
-<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js" ></script>
-<script type="text/javascript" src="$baseurl/js/acl.js" ></script>
-<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.js" ></script>
-<script type="text/javascript" src="$baseurl/js/main.js" ></script>
+<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
+<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.js"></script>
+<!-- in dispy-dark -->
<script>
-
var updateInterval = $update_interval;
function confirmDelete() { return confirm("$delitem"); }
@@ -48,7 +44,6 @@
}
}
-
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == '$comment') {
diff --git a/view/theme/dispy/header.tpl b/view/theme/dispy/header.tpl
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/view/theme/dispy/header.tpl
diff --git a/view/theme/dispy/js/jquery.autogrow.textarea.js b/view/theme/dispy/js/jquery.autogrow.textarea.js
new file mode 100644
index 000000000..806e34f51
--- /dev/null
+++ b/view/theme/dispy/js/jquery.autogrow.textarea.js
@@ -0,0 +1,46 @@
+(function($) {
+
+ /*
+ * Auto-growing textareas; technique ripped from Facebook
+ */
+ $.fn.autogrow = function(options) {
+
+ this.filter('textarea').each(function() {
+
+ var $this = $(this),
+ minHeight = $this.height(),
+ lineHeight = $this.css('lineHeight');
+
+ var shadow = $('<div></div>').css({
+ position: 'absolute',
+ top: -10000,
+ left: -10000,
+ width: $(this).width(),
+ fontSize: $this.css('fontSize'),
+ fontFamily: $this.css('fontFamily'),
+ lineHeight: $this.css('lineHeight'),
+ resize: 'none'
+ }).appendTo(document.body);
+
+ var update = function() {
+
+ var val = this.value.replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/&/g, '&amp;')
+ .replace(/\n/g, '<br/>');
+
+ shadow.html(val);
+ $(this).css('height', Math.max(shadow.height() + 20, minHeight));
+ }
+
+ $(this).change(update).keyup(update).keydown(update);
+
+ update.apply(this);
+
+ });
+
+ return this;
+
+ }
+
+})(jQuery); \ No newline at end of file
diff --git a/view/theme/dispy/lang_selector.tpl b/view/theme/dispy/lang_selector.tpl
new file mode 100644
index 000000000..e777a0a86
--- /dev/null
+++ b/view/theme/dispy/lang_selector.tpl
@@ -0,0 +1,10 @@
+<div id="lang-select-icon" class="icon s22 language" title="$title" onclick="openClose('language-selector');" ></div>
+<div id="language-selector" style="display: none;" >
+ <form action="#" method="post" >
+ <select name="system_language" onchange="this.form.submit();" >
+ {{ for $langs.0 as $v=>$l }}
+ <option value="$v" {{if $v==$langs.1}}selected="selected"{{endif}}>$l</option>
+ {{ endfor }}
+ </select>
+ </form>
+</div>
diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css
index 92d27a2c8..9d10d2409 100644
--- a/view/theme/dispy/style.css
+++ b/view/theme/dispy/style.css
@@ -2395,6 +2395,12 @@ div[id$="wrapper"] br {
.admin.link {
list-style-position: inside;
}
+#adminpage {
+ color: #111;
+ background: transparent;
+ margin: 5px;
+ padding: 10px;
+}
#adminpage dl {
clear:left;
margin-bottom: 2px;
@@ -2416,7 +2422,6 @@ div[id$="wrapper"] br {
#adminpage .submit {
clear:left;
}
-
#adminpage #pluginslist {
margin: 0;
padding: 0;
@@ -2433,7 +2438,6 @@ div[id$="wrapper"] br {
float:left;
margin-right: 1em;
}
-
#adminpage table {
width: 100%;
border-bottom: 1px solid #000;
@@ -2459,6 +2463,10 @@ div[id$="wrapper"] br {
/* color: #;*/
text-decoration: underline;
}
+#users .name {
+ color: #eec;
+}
+
/**
* Form fields
diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php
index edc9b9548..125910593 100644
--- a/view/theme/dispy/theme.php
+++ b/view/theme/dispy/theme.php
@@ -76,7 +76,7 @@ function dispy_init(&$a) {
// click outside notifications menu closes it
$('html').click(function() {
$('#nav-notifications-linkmenu').removeClass('selected');
- document.getElementById("nav-notifications-menu").style.display = "none";
+ $('#nav-notifications-menu').css({display: 'none'});
});
$('#nav-notifications-linkmenu').click(function(event) {
@@ -85,7 +85,7 @@ function dispy_init(&$a) {
// click outside profiles menu closes it
$('html').click(function() {
$('#profiles-menu-trigger').removeClass('selected');
- document.getElementById("profiles-menu").style.display = "none";
+ $('#profiles-menu').css({display: 'none'});
});
$('#profiles-menu').click(function(event) {
@@ -138,6 +138,8 @@ function dispy_init(&$a) {
});
</script>
EOT;
+
+ js_in_foot();
}
function dispy_community_info() {
@@ -145,26 +147,25 @@ function dispy_community_info() {
$url = $a->get_baseurl($ssl_state);
$aside['$url'] = $url;
- $fpostitJS = <<<FPI
- javascript: (function() {
- the_url = ' . $url . '/view/theme/' . $a->theme_info['name'] . '/fpostit/fpostit.php?url=' +
- encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' +
- encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ?
- document.getSelection() : document.selection.createRange().text));
- a_funct = function() {
- if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) {
- location.href = the_url;
- }
- if (/Firefox/.test(navigator.userAgent)) {
- setTimeout(a_funct, 0)
- } else {
- a_funct();
- }
- })();
-FPI;
+ $fpostitJS = "javascript:(function() {"
+ . "the_url = '" . $url . "/view/theme/".$a->theme_info['name']."/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text));
+ a_funct = function() {
+ if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url;};
+ if (/Firefox/.test(navigator.userAgent)) {setTimeout(a_funct, 0);}
+ else {a_funct();}})()";
$aside['$fpostitJS'] = $fpostitJS;
$tpl = file_get_contents(dirname(__file__) . '/communityhome.tpl');
return $a->page['aside_bottom'] = replace_macros($tpl, $aside);
}
+function js_in_foot() {
+ /** @purpose insert stuff in bottom of page
+ */
+ $a = get_app();
+ $baseurl = $a->get_baseurl($ssl_state);
+ $bottom['$baseurl'] = $baseurl;
+ $tpl = file_get_contents(dirname(__file__) . '/bottom.tpl');
+
+ return $a->page['bottom'] = replace_macros($tpl, $bottom);
+}