diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/css.php | 42 | ||||
-rw-r--r-- | views/default/friends/picker.php | 334 |
2 files changed, 198 insertions, 178 deletions
diff --git a/views/default/css.php b/views/default/css.php index 01033a54f..8f5ab7e32 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -1683,7 +1683,7 @@ div.expandall p { overflow: hidden; margin: 0; padding:0; - width: 755px; + width: 685px; height: 270px; /*clear: right;*/ background: white; @@ -1692,7 +1692,8 @@ div.expandall p { .friendsPicker .friendsPicker_container { /* long container used to house end-to-end panels. Width is calculated in JS */ position: relative; - left: 0; top: 0; + left: 0; + top: 0; width: 100%; list-style-type: none; /* -moz-user-select: none; */ @@ -1702,7 +1703,7 @@ div.expandall p { float:left; height: 100%; position: relative; - width: 755px; + width: 685px; margin: 0; padding:0; } @@ -1712,17 +1713,17 @@ div.expandall p { padding: 10px; background: #efefef; min-height: 230px; - } .friendsPickerNavigation { - margin: 0 0 20px 0; + margin: 0 0 10px 0; padding:0; } .friendsPickerNavigation ul { list-style: none; + padding-left: 0; } .friendsPickerNavigation ul li { @@ -1745,12 +1746,10 @@ div.expandall p { .tabHasContent { background: white; color:#333333 !important; } -/* -.friendsPickerNavigation li.tab22 a { background: white; color:#333333; } -*/ + .friendsPickerNavigation li a:hover { - background: lime; - color:white; + background: #333333; + color:white !important; } .friendsPickerNavigation li a.current { @@ -1780,18 +1779,22 @@ div.expandall p { .friendsPickerNavigationL, .friendsPickerNavigationR { position: absolute; - top: 120px; + top: 46px; text-indent: -9000em; } .friendsPickerNavigationL a, .friendsPickerNavigationR a { display: block; +/* height: 87px; width: 43px; +*/ + height: 43px; + width: 43px; } .friendsPickerNavigationL { - right: 78px; + right: 58px; z-index:1; } @@ -1809,4 +1812,19 @@ div.expandall p { } + +/* temp. force profile pic size */ +#profile_info_column_left #profile_icon_wrapper .usericon a.icon img { + width:276px; +} + + + + + + + + + +
\ No newline at end of file diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index 4be60b12e..7a0c57c12 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -1,167 +1,169 @@ -<?php
-
- /**
- * Elgg friends picker
- * Lists the friends picker
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- *
- * @uses $vars['entities'] The array of ElggUser objects
- */
-
- // Initialise internalname
- if (!isset($vars['internalname'])) {
- $internalname = "friend";
- } else {
- $internalname = $vars['internalname'];
- }
-
- // Initialise values
- if (!isset($vars['value'])) {
- $vars['value'] = array();
- } else {
- if (!is_array($vars['value'])) {
- $vars['value'] = (int) $vars['value'];
- $vars['value'] = array($vars['value']);
- }
- }
-
- // We need to count the number of friends pickers on the page.
- global $friendspicker;
- if (!isset($friendspicker)) $friendspicker = 0;
- $friendspicker++;
-
- $users = array();
- $activeletters = array();
-
- // Sort users by letter
- if (is_array($vars['entities']) && sizeof($vars['entities']))
- foreach($vars['entities'] as $user) {
-
- $letter = strtoupper(substr($user->name,0,1));
- if ($letter >= "0" && $letter <= "9") {
- $letter = "0";
- }
- if (!isset($users[$letter])) {
- $users[$letter] = array();
- }
- $users[$letter][$user->name] = $user;
-
- }
-
-?>
-
-<div class="friends_picker">
- <div class="friendsPicker_wrapper">
- <div id="friendsPicker<?php echo $friendspicker; ?>">
- <div class="friendsPicker_container">
-<?php
-
- // Initialise letters
- $letter = 'A';
- while (1 == 1) {
-?>
- <div class="panel" title="<?php echo $letter; ?>">
- <div class="wrapper">
- <h3><?php echo $letter; ?></h3>
-
-<?php
-
- if (isset($users[$letter])) {
- ksort($users[$letter]);
-
- echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
- $col = 0;
-
- foreach($users[$letter] as $friend) {
- if ($col == 0) echo "<tr>";
-
- //echo "<p>" . $user->name . "</p>";
- $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny'));
- $options[$label] = $friend->getGUID();
- if (in_array($friend->getGUID(),$vars['value'])) {
- $checked = "checked = \"checked\"";
- if (!in_array($letter,$activeletters))
- $activeletters[] = $letter;
- } else {
- $checked = "";
- }
-
-?>
-
- <td>
-
- <input type="checkbox" <?php echo $checked; ?> name="<?php echo $internalname; ?>[]" value="<?php echo $options[$label]; ?>" />
-
- </td>
-
- <td >
-
- <div style="width: 25px; margin-bottom: 15px;">
-<?php
-
- echo $label;
-
-?>
- </div>
- </td>
- <td style="width: 300px; padding: 5px;">
-<?php
-
- echo $friend->name;
-
-?>
- </td>
-<?php
-
- $col++;
- if ($col == 3) echo "</tr>";
- }
- if ($col < 3) echo "</tr>";
-
- echo "</table>";
-
- }
-
-?>
-
- </div>
- </div>
-<?php
- if ($letter == 'Z') break;
- $letter++;
- }
-
-?>
- </div>
- </div>
- </div>
-</div>
-
-<script type="text/javascript">
- jQuery(window).bind("load", function() {
- // initialise picker
- $("div#friendsPicker<?php echo $friendspicker; ?>").friendsPicker();
- });
-</script>
-<script>
- jQuery(window).bind("load", function() {
- // manually add class to corresponding tab for panels that have content - needs to be automated eventually
-<?php
- if (sizeof($activeletters) > 0)
- $chararray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
- foreach($activeletters as $letter) {
- $tab = strpos($chararray, $letter) + 1;
-?>
- $("div#friendsPickerNavigation<?php echo $friendspicker - 1; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
-<?php
- }
-
-?>
- });
+<?php + + /** + * Elgg friends picker + * Lists the friends picker + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + * + * @uses $vars['entities'] The array of ElggUser objects + */ + + // Initialise internalname + if (!isset($vars['internalname'])) { + $internalname = "friend"; + } else { + $internalname = $vars['internalname']; + } + + // Initialise values + if (!isset($vars['value'])) { + $vars['value'] = array(); + } else { + if (!is_array($vars['value'])) { + $vars['value'] = (int) $vars['value']; + $vars['value'] = array($vars['value']); + } + } + + // We need to count the number of friends pickers on the page. + global $friendspicker; + if (!isset($friendspicker)) $friendspicker = 0; + $friendspicker++; + + $users = array(); + $activeletters = array(); + + // Sort users by letter + if (is_array($vars['entities']) && sizeof($vars['entities'])) + foreach($vars['entities'] as $user) { + + $letter = strtoupper(substr($user->name,0,1)); + if ($letter >= "0" && $letter <= "9") { + $letter = "0"; + } + if (!isset($users[$letter])) { + $users[$letter] = array(); + } + $users[$letter][$user->name] = $user; + + } + +?> + +<div class="friends_picker"> + <div class="friendsPicker_wrapper"> + <div id="friendsPicker<?php echo $friendspicker; ?>"> + <div class="friendsPicker_container"> +<?php + + // Initialise letters + $letter = 'A'; + while (1 == 1) { +?> + <div class="panel" title="<?php echo $letter; ?>"> + <div class="wrapper"> + <h3><?php echo $letter; ?></h3> + +<?php + + if (isset($users[$letter])) { + ksort($users[$letter]); + + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; + $col = 0; + + foreach($users[$letter] as $friend) { + if ($col == 0) echo "<tr>"; + + //echo "<p>" . $user->name . "</p>"; + $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny')); + $options[$label] = $friend->getGUID(); + if (in_array($friend->getGUID(),$vars['value'])) { + $checked = "checked = \"checked\""; + if (!in_array($letter,$activeletters)) + $activeletters[] = $letter; + } else { + $checked = ""; + } + +?> + + <td> + + <input type="checkbox" <?php echo $checked; ?> name="<?php echo $internalname; ?>[]" value="<?php echo $options[$label]; ?>" /> + + </td> + + <td > + + <div style="width: 25px; margin-bottom: 15px;"> +<?php + + echo $label; + +?> + </div> + </td> + <td style="width: 300px; padding: 5px;"> +<?php + + echo $friend->name; + +?> + </td> +<?php + + $col++; + if ($col == 3) echo "</tr>"; + } + if ($col < 3) echo "</tr>"; + + echo "</table>"; + + } + +?> + + </div> + </div> +<?php + if ($letter == 'Z') break; + $letter++; + } + +?> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> + //jQuery(window).bind("load", function() { + $(document).ready(function () { + // initialise picker + $("div#friendsPicker<?php echo $friendspicker; ?>").friendsPicker(); + }); +</script> +<script> + //jQuery(window).bind("load", function() { + $(document).ready(function () { + // manually add class to corresponding tab for panels that have content - needs to be automated eventually +<?php + if (sizeof($activeletters) > 0) + $chararray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + foreach($activeletters as $letter) { + $tab = strpos($chararray, $letter) + 1; +?> + $("div#friendsPickerNavigation<?php echo $friendspicker - 1; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent"); +<?php + } + +?> + }); </script>
\ No newline at end of file |