aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-26 20:57:09 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-26 20:57:09 +0000
commita2250e1854f23351b2a39e304e2bd5977f3fd867 (patch)
treec7a846a455073b88ef2db21115baf21fee57b138 /views
parent657295df1ff884ed9f00b001389978b142ac6ba7 (diff)
downloadelgg-a2250e1854f23351b2a39e304e2bd5977f3fd867.tar.gz
elgg-a2250e1854f23351b2a39e304e2bd5977f3fd867.tar.bz2
Fixes #2982 friends collections work even if the code is convoluted and poorly written.
git-svn-id: http://code.elgg.org/elgg/trunk@8495 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/core/friends/collections.php2
-rw-r--r--views/default/css/elements/forms.php15
-rw-r--r--views/default/css/elements/misc.php5
-rw-r--r--views/default/forms/friends/collections/add.php (renamed from views/default/forms/friends/collections/edit.php)2
-rw-r--r--views/default/input/friendspicker.php13
5 files changed, 25 insertions, 12 deletions
diff --git a/views/default/core/friends/collections.php b/views/default/core/friends/collections.php
index 5c1c824e7..d88d591ad 100644
--- a/views/default/core/friends/collections.php
+++ b/views/default/core/friends/collections.php
@@ -32,7 +32,7 @@ if (is_array($vars['collections']) && sizeof($vars['collections'])) {
<script>
$(document).ready(function(){
$('#friends_collections_accordian h2').click(function () {
- $(this.parentNode).children("[class=friends-picker]").slideToggle("fast");
+ $(this.parentNode).children("[class=friends-picker-main-wrapper]").slideToggle("fast");
//return false;
});
});
diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php
index c237c79a5..7c2d273f2 100644
--- a/views/default/css/elements/forms.php
+++ b/views/default/css/elements/forms.php
@@ -104,6 +104,9 @@ input[type="radio"] {
padding:0;
width: 730px;
height: auto;
+ background-color: #dedede;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
}
.friendspicker-savebuttons {
background: white;
@@ -176,8 +179,8 @@ input[type="radio"] {
}
.friends-picker-navigation-l a, .friends-picker-navigation-r a {
display: block;
- height: 43px;
- width: 43px;
+ height: 40px;
+ width: 40px;
}
.friends-picker-navigation-l {
right: 48px;
@@ -188,16 +191,16 @@ input[type="radio"] {
z-index:1;
}
.friends-picker-navigation-l {
- background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat left top;
+ background: url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat left top;
}
.friends-picker-navigation-r {
- background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat -60px top;
+ background: url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat -60px top;
}
.friends-picker-navigation-l:hover {
- background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat left -44px;
+ background: url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat left -44px;
}
.friends-picker-navigation-r:hover {
- background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat -60px -44px;
+ background: url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat -60px -44px;
}
.friendspicker-savebuttons .elgg-button-submit,
.friendspicker-savebuttons .elgg-button-cancel {
diff --git a/views/default/css/elements/misc.php b/views/default/css/elements/misc.php
index abcbb894a..d159761a1 100644
--- a/views/default/css/elements/misc.php
+++ b/views/default/css/elements/misc.php
@@ -50,11 +50,14 @@
margin: 10px 0;
padding: 4px 2px 4px 6px;
}
+#friends_collections_accordian li h2:hover {
+ background-color: #333333;
+}
#friends_collections_accordian .friends_collections_controls {
float: right;
font-size: 70%;
}
-#friends_collections_accordian .friends-picker {
+#friends_collections_accordian .friends-picker-main-wrapper {
background: none repeat scroll 0 0 white;
display: none;
padding: 0;
diff --git a/views/default/forms/friends/collections/edit.php b/views/default/forms/friends/collections/add.php
index 975307085..644c7adb9 100644
--- a/views/default/forms/friends/collections/edit.php
+++ b/views/default/forms/friends/collections/add.php
@@ -17,7 +17,7 @@ if (isset($vars['collection'])) {
$highlight = 'all';
}
-echo "<div><label>" . elgg_echo("friends:collectionname") . "<br/>";
+echo "<div class=\"mtm\"><label>" . elgg_echo("friends:collectionname") . "<br/>";
echo elgg_view("input/text", array(
"name" => "collection_name",
"value" => $title,
diff --git a/views/default/input/friendspicker.php b/views/default/input/friendspicker.php
index b95640b0b..82ef3e3d7 100644
--- a/views/default/input/friendspicker.php
+++ b/views/default/input/friendspicker.php
@@ -3,6 +3,8 @@
* Elgg friends picker
* Lists the friends picker
*
+ * @warning Below is the ugliest code in Elgg. It needs to be rewritten or removed
+ *
* @package Elgg
* @subpackage Core
*
@@ -99,7 +101,7 @@ foreach ($users as $letter => $letter_users) {
if (!$callback) {
?>
- <div class="friends-picker">
+ <div class="friends-picker-main-wrapper">
<?php
@@ -118,7 +120,7 @@ if (!isset($vars['replacement'])) {
?>
<?php //@todo JS 1.8: no ?>
<script language="text/javascript">
- $(function() { // onload...do
+ $(function() { // onload...do
$('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
var inputs = [];
$(':input', this).each(function() {
@@ -145,6 +147,11 @@ if (!isset($vars['replacement'])) {
<form id="collectionMembersForm<?php echo $friendspicker; ?>" action="<?php echo $formtarget; ?>" method="post"> <!-- action="" method=""> -->
<?php
+ echo elgg_view('input/securitytoken');
+ echo elgg_view('input/hidden', array(
+ 'name' => 'collection_id',
+ 'value' => $vars['collection_id'],
+ ));
}
?>
@@ -305,7 +312,7 @@ if (!isset($vars['replacement'])) {
// initialise picker
$("div#friends-picker<?php echo $friendspicker; ?>").friendsPicker(<?php echo $friendspicker; ?>);
</script>
-<script>
+<script type="text/javascript">
$(document).ready(function () {
// manually add class to corresponding tab for panels that have content
<?php