aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/friendspicker.php37
-rw-r--r--views/default/input/longtext.php2
-rw-r--r--views/default/input/plaintext.php2
-rw-r--r--views/default/input/text.php1
4 files changed, 15 insertions, 27 deletions
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/default/input/longtext.php b/views/default/input/longtext.php
index 2b1462635..61dc7ca19 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -19,6 +19,8 @@ if (isset($vars['class'])) {
$defaults = array(
'value' => '',
+ 'rows' => '10',
+ 'cols' => '50',
'id' => 'elgg-input-' . rand(), //@todo make this more robust
);
diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php
index cd0aaafcf..e92c61ced 100644
--- a/views/default/input/plaintext.php
+++ b/views/default/input/plaintext.php
@@ -20,6 +20,8 @@ if (isset($vars['class'])) {
$defaults = array(
'value' => '',
+ 'rows' => '10',
+ 'cols' => '50',
'disabled' => false,
);
diff --git a/views/default/input/text.php b/views/default/input/text.php
index 707a50179..07ce5c710 100644
--- a/views/default/input/text.php
+++ b/views/default/input/text.php
@@ -23,5 +23,4 @@ $defaults = array(
$vars = array_merge($defaults, $vars);
?>
-
<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file