aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/core/friends/collection.php2
-rw-r--r--views/default/css/admin.php217
-rw-r--r--views/default/css/elements/forms.php2
-rw-r--r--views/default/input/friendspicker.php37
-rw-r--r--views/json/export/entity.php5
-rw-r--r--views/json/group/default.php2
-rw-r--r--views/json/object/default.php2
-rw-r--r--views/json/site/default.php2
-rw-r--r--views/json/user/default.php2
9 files changed, 229 insertions, 42 deletions
diff --git a/views/default/core/friends/collection.php b/views/default/core/friends/collection.php
index b7913da5f..1a330af01 100644
--- a/views/default/core/friends/collection.php
+++ b/views/default/core/friends/collection.php
@@ -43,7 +43,7 @@ if ($friends) {
echo elgg_view('input/friendspicker', array(
'entities' => $friends,
- 'value' => $members,
+ 'value' => $vars['collection']->members,
'content' => $content,
'replacement' => '',
'friendspicker' => $vars['friendspicker'],
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index 65797172f..5dc15fe3e 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -127,14 +127,23 @@ p {
}
/* Clearfix! */
+.clearfix:after,
.elgg-grid:after,
-.clearfix:after {
+.elgg-layout:after,
+.elgg-inner:after,
+.elgg-page-header:after,
+.elgg-page-footer:after,
+.elgg-head:after,
+.elgg-foot:after,
+.elgg-col:after,
+.elgg-image-block:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
+
.elgg-body {
width: auto;
word-wrap: break-word;
@@ -287,14 +296,6 @@ p {
.elgg-main h2 {
color: #333333;
}
-<?php // elgg-layout gets clearfix ?>
-.elgg-layout:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
/* ***************************************
FOOTER
@@ -591,6 +592,204 @@ a.elgg-button {
}
/* ***************************************
+ AUTOCOMPLETE
+*************************************** */
+<?php //autocomplete will expand to fullscreen without max-width ?>
+.ui-autocomplete {
+ position: absolute;
+ cursor: default;
+}
+.elgg-autocomplete-item .elgg-body {
+ max-width: 600px;
+}
+.ui-autocomplete {
+ background-color: white;
+ border: 1px solid #ccc;
+ overflow: hidden;
+
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.ui-autocomplete .ui-menu-item {
+ padding: 0px 4px;
+
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.ui-autocomplete .ui-menu-item:hover {
+ background-color: #eee;
+}
+.ui-autocomplete a:hover {
+ text-decoration: none;
+ color: #4690D6;
+}
+
+/* ***************************************
+ USER PICKER
+*************************************** */
+.elgg-user-picker-list li:first-child {
+ border-top: 1px dotted #ccc;
+ margin-top: 5px;
+}
+.elgg-user-picker-list > li {
+ border-bottom: 1px dotted #ccc;
+}
+
+/* ***************************************
+ FRIENDS PICKER
+*************************************** */
+.friends-picker-main-wrapper {
+ margin-bottom: 15px;
+}
+.friends-picker-container h3 {
+ font-size:4em !important;
+ text-align: left;
+ margin:10px 0 20px !important;
+ color:#999 !important;
+ background: none !important;
+ padding:0 !important;
+}
+.friends-picker .friends-picker-container .panel ul {
+ text-align: left;
+ margin: 0;
+ padding:0;
+}
+.friends-picker-wrapper {
+ margin: 0;
+ padding:0;
+ position: relative;
+ width: 730px;
+}
+.friends-picker {
+ position: relative;
+ overflow: hidden;
+ margin: 0;
+ padding:0;
+ width: 730px;
+ height: auto;
+ background-color: #dedede;
+
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+}
+.friendspicker-savebuttons {
+ background: white;
+
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+
+ margin:0 10px 10px;
+}
+.friends-picker .friends-picker-container { /* long container used to house end-to-end panels. Width is calculated in JS */
+ position: relative;
+ left: 0;
+ top: 0;
+ width: 100%;
+ list-style-type: none;
+}
+.friends-picker .friends-picker-container .panel {
+ float:left;
+ height: 100%;
+ position: relative;
+ width: 730px;
+ margin: 0;
+ padding:0;
+}
+.friends-picker .friends-picker-container .panel .wrapper {
+ margin: 0;
+ padding:4px 10px 10px 10px;
+ min-height: 230px;
+}
+.friends-picker-navigation {
+ margin: 0 0 10px;
+ padding:0 0 10px;
+ border-bottom:1px solid #ccc;
+}
+.friends-picker-navigation ul {
+ list-style: none;
+ padding-left: 0;
+}
+.friends-picker-navigation ul li {
+ float: left;
+ margin:0;
+ background:white;
+}
+.friends-picker-navigation a {
+ font-weight: bold;
+ text-align: center;
+ background: white;
+ color: #999;
+ text-decoration: none;
+ display: block;
+ padding: 0;
+ width:20px;
+
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.tabHasContent {
+ background: white;
+ color:#333 !important;
+}
+.friends-picker-navigation li a:hover {
+ background: #333;
+ color:white !important;
+}
+.friends-picker-navigation li a.current {
+ background: #4690D6;
+ color:white !important;
+}
+.friends-picker-navigation-l, .friends-picker-navigation-r {
+ position: absolute;
+ top: 46px;
+ text-indent: -9000em;
+}
+.friends-picker-navigation-l a, .friends-picker-navigation-r a {
+ display: block;
+ height: 40px;
+ width: 40px;
+}
+.friends-picker-navigation-l {
+ right: 48px;
+ z-index:1;
+}
+.friends-picker-navigation-r {
+ right: 0;
+ z-index:1;
+}
+.friends-picker-navigation-l {
+ 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/friendspicker.png") no-repeat -60px top;
+}
+.friends-picker-navigation-l:hover {
+ 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/friendspicker.png") no-repeat -60px -44px;
+}
+.friendspicker-savebuttons .elgg-button-submit,
+.friendspicker-savebuttons .elgg-button-cancel {
+ margin:5px 20px 5px 5px;
+}
+.friendspicker-members-table {
+ background: #dedede;
+
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+
+ margin:10px 0 0;
+ padding:10px 10px 0;
+}
+
+/* ***************************************
PAGINATION
*************************************** */
.elgg-pagination {
diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php
index 81db81747..6f20ad23c 100644
--- a/views/default/css/elements/forms.php
+++ b/views/default/css/elements/forms.php
@@ -104,7 +104,7 @@ input[type="radio"] {
margin: 0;
padding:0;
position: relative;
- width: 100%;
+ width: 730px;
}
.friends-picker {
position: relative;
diff --git a/views/default/input/friendspicker.php b/views/default/input/friendspicker.php
index b41449fbf..40708c890 100644
--- a/views/default/input/friendspicker.php
+++ b/views/default/input/friendspicker.php
@@ -9,6 +9,10 @@
* @subpackage Core
*
* @uses $vars['entities'] The array of ElggUser objects
+ * @uses $vars['name']
+ * @uses $vars['value']
+ * @uses $vars['highlight']
+ * @uses $vars['callback']
*/
elgg_load_js('elgg.friendspicker');
@@ -74,13 +78,9 @@ if (isset($vars['formtarget'])) {
// Sort users by letter
if (is_array($vars['entities']) && sizeof($vars['entities'])) {
foreach($vars['entities'] as $user) {
- if (is_callable('mb_substr')) {
- $letter = strtoupper(mb_substr($user->name,0,1));
- } else {
- $letter = strtoupper(substr($user->name,0,1));
- }
+ $letter = elgg_strtoupper(elgg_substr($user->name, 0, 1));
- if (!substr_count($chararray,$letter)) {
+ if (!elgg_substr_count($chararray, $letter)) {
$letter = "*";
}
if (!isset($users[$letter])) {
@@ -162,11 +162,7 @@ if (!isset($vars['replacement'])) {
// Initialise letters
$chararray .= "*";
- if (is_callable('mb_substr')) {
- $letter = mb_substr($chararray,0,1);
- } else {
- $letter = substr($chararray,0,1);
- }
+ $letter = elgg_substr($chararray, 0, 1);
$letpos = 0;
while (1 == 1) {
?>
@@ -190,9 +186,7 @@ if (!isset($vars['replacement'])) {
$label = elgg_view_entity_icon($friend, 'tiny', array('use_hover' => false));
$options[$label] = $friend->getGUID();
- if ($vars['highlight'] == 'all'
- && !in_array($letter,$activeletters)) {
-
+ if ($vars['highlight'] == 'all' && !in_array($letter,$activeletters)) {
$activeletters[] = $letter;
}
@@ -243,23 +237,14 @@ if (!isset($vars['replacement'])) {
</div>
</div>
<?php
- //if ($letter == 'Z') break;
- if (is_callable('mb_substr')) {
- $substr = mb_substr($chararray,strlen($chararray) - 1,1);
- } else {
- $substr = substr($chararray,strlen($chararray) - 1,1);
- }
+ $substr = elgg_substr($chararray, elgg_strlen($chararray) - 1, 1);
if ($letter == $substr) {
break;
}
//$letter++;
$letpos++;
- if (is_callable('mb_substr')) {
- $letter = mb_substr($chararray,$letpos,1);
- } else {
- $letter = substr($chararray,$letpos,1);
- }
+ $letter = elgg_substr($chararray, $letpos, 1);
}
?>
@@ -319,7 +304,7 @@ $(document).ready(function () {
if (sizeof($activeletters) > 0)
//$chararray = elgg_echo('friendspicker:chararray');
foreach($activeletters as $letter) {
- $tab = strpos($chararray, $letter) + 1;
+ $tab = elgg_strpos($chararray, $letter) + 1;
?>
$("div#friends-picker-navigation<?php echo $friendspicker; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
<?php
diff --git a/views/json/export/entity.php b/views/json/export/entity.php
index 52cd9d244..36af5eaef 100644
--- a/views/json/export/entity.php
+++ b/views/json/export/entity.php
@@ -19,4 +19,7 @@ foreach ($exportable_values as $v) {
$export->url = $entity->getURL();
global $jsonexport;
-$jsonexport[$entity->getType()][$entity->getSubtype()][] = $export; \ No newline at end of file
+$jsonexport[$entity->getType()][$entity->getSubtype()][] = $export;
+
+// @todo hack to fix #4504
+echo "Fix for bug #4504";
diff --git a/views/json/group/default.php b/views/json/group/default.php
index 0b168fdb2..dd190d402 100644
--- a/views/json/group/default.php
+++ b/views/json/group/default.php
@@ -6,4 +6,4 @@
* @subpackage Core
*/
-elgg_view('export/entity', $vars); \ No newline at end of file
+echo elgg_view('export/entity', $vars);
diff --git a/views/json/object/default.php b/views/json/object/default.php
index d2e807621..8b88b3010 100644
--- a/views/json/object/default.php
+++ b/views/json/object/default.php
@@ -6,4 +6,4 @@
* @subpackage Core
*/
-elgg_view('export/entity', $vars); \ No newline at end of file
+echo elgg_view('export/entity', $vars);
diff --git a/views/json/site/default.php b/views/json/site/default.php
index 7efd46939..ee4eda489 100644
--- a/views/json/site/default.php
+++ b/views/json/site/default.php
@@ -6,4 +6,4 @@
* @subpackage Core
*/
-elgg_view('export/entity', $vars); \ No newline at end of file
+echo elgg_view('export/entity', $vars);
diff --git a/views/json/user/default.php b/views/json/user/default.php
index e23472252..4d44692c9 100644
--- a/views/json/user/default.php
+++ b/views/json/user/default.php
@@ -6,4 +6,4 @@
* @subpackage Core
*/
-elgg_view('export/entity', $vars); \ No newline at end of file
+echo elgg_view('export/entity', $vars);