diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-30 11:45:37 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-30 11:45:37 +0000 |
commit | 9c7945b097038f6119cbe0c1a18c65411d2cb38a (patch) | |
tree | 1c7e096e435b3fac59ae941ebfc28a39eb096181 | |
parent | 942539d2865be193f93dd44c9c0ee44f25fbc70b (diff) | |
download | elgg-9c7945b097038f6119cbe0c1a18c65411d2cb38a.tar.gz elgg-9c7945b097038f6119cbe0c1a18c65411d2cb38a.tar.bz2 |
the beginnings of the tabbed friends picker
git-svn-id: https://code.elgg.org/elgg/trunk@1592 36083f99-b078-4883-b0ff-0f9b5a30f544
-rwxr-xr-x | javascript/friendsPickerv1.js | 6 | ||||
-rw-r--r-- | views/default/css.php | 54 | ||||
-rw-r--r-- | views/default/friends/collection.php | 4 | ||||
-rw-r--r-- | views/default/friends/picker.php | 17 |
4 files changed, 71 insertions, 10 deletions
diff --git a/javascript/friendsPickerv1.js b/javascript/friendsPickerv1.js index 71a919dd9..875a4990d 100755 --- a/javascript/friendsPickerv1.js +++ b/javascript/friendsPickerv1.js @@ -96,8 +96,10 @@ jQuery.fn.friendsPicker = function(settings) { //$("div#friendsPickerNavigation" + j + " li.tab22 a").addClass("tabHasContent"); // generate link to 'all friends in collection' - removed for now - $("div#friendsPickerNavigation" + j).append("<div class='friendsPickerNavigationAll'><a href='#' >Collection members<\/a></div><br />"); - //$("div#friendsPickerNavigation" + j).append("<br />"); + //$("div#friendsPickerNavigation" + j).append("<div class='friendsPickerNavigationAll'><a href='#' >Collection members<\/a></div><br />"); + $("div#friendsPickerNavigation" + j).append("<br />"); + + $("div#friendsPickerNavigation" + j).hide(); j++; diff --git a/views/default/css.php b/views/default/css.php index b4e5e30e1..1720e3067 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -1635,7 +1635,6 @@ div.expandall p { text-align:right; margin: 0; padding:0; - } @@ -1666,7 +1665,6 @@ div.expandall p { height: 270px; /*clear: right;*/ background: white; - } .friendsPicker .friendsPicker_container { /* long container used to house end-to-end panels. Width is calculated in JS */ @@ -1698,7 +1696,10 @@ div.expandall p { margin: 0 0 10px 0; padding:0; -} +/* + display:none; + +*/} .friendsPickerNavigation ul { list-style: none; @@ -1789,6 +1790,53 @@ div.expandall p { .friendsPickerNavigationR { background: url("<?php echo $vars['url']; ?>_graphics/friends_picker_arrow_right.gif") no-repeat center; } + + +/* picker tabbed navigation */ +#friendsPickerNavigationTabs { + margin:10px 0 10px 0; + padding: 0; + border-bottom: 1px solid #cccccc; + display:table; + width:100%; +} + +#friendsPickerNavigationTabs ul { + list-style: none; + padding: 0; + margin: 0; +} + +#friendsPickerNavigationTabs li { + float: left; + border: 1px solid #ffffff; + border-bottom-width: 0; + margin: 0; +} + +#friendsPickerNavigationTabs a { + text-decoration: none; + display: block; + padding: 0.24em 1em; + color: #666666; + text-align: center; +} + +#friendsPickerNavigationTabs a:hover { + color: #4690d6; +} + +#friendsPickerNavigationTabs .selected { + border-color: #cccccc; +} + +#friendsPickerNavigationTabs .selected a { + position: relative; + top: 1px; + background: white; + color: #4690d6; +} + diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php index b42b4467a..a9f2a392f 100644 --- a/views/default/friends/collection.php +++ b/views/default/friends/collection.php @@ -28,13 +28,13 @@ //as collections are private, check that the logged in user is the owner
if($coll->owner_guid == $_SESSION['user']->getGUID())
- echo "<div class=\"friends_collections_controls\"> (<a href=\"" . $vars['url'] . "mod/friends/edit.php?collection={$coll->id}\">" . elgg_echo('edit') . "</a>) (<a href=\"" . $vars['url'] . "action/friends/deletecollection?collection={$coll->id}\">" . elgg_echo('delete') . "</a>)";
+ echo "<div class=\"friends_collections_controls\"> <a href=\"" . $vars['url'] . "action/friends/deletecollection?collection={$coll->id}\" class=\"delete_collection\"><img src=\"" . $vars['url'] ."_graphics/icon_customise_remove.gif\"/></a>";
echo "</div>";
echo $coll->name;
echo " ({$count}) </h2>";
- // Ben - this is where the friends picker view needs to go
+ // individual collection panels
if($friends = $vars['collection']->entities){
$members = $vars['collection']->members;
echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members));
diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index 7a0c57c12..9f522ca29 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -57,6 +57,19 @@ ?> <div class="friends_picker"> + + + +<div id="friendsPickerNavigationTabs"> +<ul> +<li class="selected"><a href="#">Collection members</a></li> +<li><a href="#">Edit collection</a></li> +</ul> +</div> + + + + <div class="friendsPicker_wrapper"> <div id="friendsPicker<?php echo $friendspicker; ?>"> <div class="friendsPicker_container"> @@ -144,16 +157,14 @@ </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 + // manually add class to corresponding tab for panels that have content <?php if (sizeof($activeletters) > 0) $chararray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |