aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/admin/appearance/profile_fields/list.php9
-rw-r--r--views/default/admin/plugins.php2
-rw-r--r--views/default/css/elements/misc.php2
-rw-r--r--views/default/forms/avatar/crop.php50
-rw-r--r--views/default/forms/widgets/save.php4
-rw-r--r--views/default/js/admin.php4
-rw-r--r--views/installation/input/access.php11
-rw-r--r--views/installation/input/button.php15
-rw-r--r--views/installation/input/checkbox.php8
-rw-r--r--views/installation/input/dropdown.php15
-rw-r--r--views/installation/input/form.php9
-rw-r--r--views/installation/input/password.php10
-rw-r--r--views/installation/input/text.php11
13 files changed, 44 insertions, 106 deletions
diff --git a/views/default/admin/appearance/profile_fields/list.php b/views/default/admin/appearance/profile_fields/list.php
index f4ff1e986..3e287ceac 100644
--- a/views/default/admin/appearance/profile_fields/list.php
+++ b/views/default/admin/appearance/profile_fields/list.php
@@ -26,8 +26,7 @@ if ($fieldlist) {
}
}
?>
-<div id="list">
- <ul id="sortable_profile_fields">
+<ul id="elgg-profile-fields">
<?php
$save = elgg_echo('save');
@@ -53,8 +52,4 @@ HTML;
}
?>
- </ul>
-</div>
-<div id="tempList"></div>
-
-<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $fieldlist; ?>" /> \ No newline at end of file
+</ul> \ No newline at end of file
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php
index 451936335..5bd0dd55d 100644
--- a/views/default/admin/plugins.php
+++ b/views/default/admin/plugins.php
@@ -93,7 +93,7 @@ switch ($sort) {
case 'alpha':
$plugin_list = array();
foreach ($installed_plugins as $plugin) {
- $plugin_list[$plugin->getManifest()->getName()] = $plugin;
+ $plugin_list[$plugin->getFriendlyName()] = $plugin;
}
ksort($plugin_list);
break;
diff --git a/views/default/css/elements/misc.php b/views/default/css/elements/misc.php
index ebac2b91f..d9622d34a 100644
--- a/views/default/css/elements/misc.php
+++ b/views/default/css/elements/misc.php
@@ -18,7 +18,7 @@
#avatar-croppingtool {
border-top: 1px solid #ccc;
}
-#user-avatar {
+#user-avatar-cropper {
float: left;
}
#user-avatar-preview {
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
index 1f39ff73c..f622fd60f 100644
--- a/views/default/forms/avatar/crop.php
+++ b/views/default/forms/avatar/crop.php
@@ -6,13 +6,17 @@
*/
elgg_load_js('jquery.imgareaselect');
+elgg_load_js('elgg.avatar_cropper');
elgg_load_css('jquery.imgareaselect');
$master_image = $vars['entity']->getIconUrl('master');
?>
<div class="clearfix">
- <img id="user-avatar" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" />
+ <img id="user-avatar-cropper" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" />
+ <div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>
+ <div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div>
+
</div>
<div class="elgg-foot">
<?php
@@ -27,47 +31,3 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
?>
</div>
-<!-- grab the required js for icon cropping -->
-<?php //@todo JS 1.8: no ?>
-<script type="text/javascript">
-
- // display a preview of the users cropped section
- function preview(img, selection) {
- // catch for the first click on the image
- if (selection.width == 0 || selection.height == 0) {
- return;
- }
-
- var origWidth = $("#user-avatar").width(); //get the width of the users master photo
- var origHeight = $("#user-avatar").height(); //get the height of the users master photo
- var scaleX = 100 / selection.width;
- var scaleY = 100 / selection.height;
- $('#user-avatar-preview > img').css({
- width: Math.round(scaleX * origWidth) + 'px',
- height: Math.round(scaleY * origHeight) + 'px',
- marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
- marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
- });
- }
-
- function selectChange(img, selection) {
- // populate the form with the correct coordinates once a user has cropped their image
- $('input[name=x1]').val(selection.x1);
- $('input[name=x2]').val(selection.x2);
- $('input[name=y1]').val(selection.y1);
- $('input[name=y2]').val(selection.y2);
- }
-
- $(document).ready(function() {
- $('<div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div>').insertAfter($('#user-avatar'));
- $('<div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>').insertBefore($('#user-avatar-preview'));
-
- // init the cropping
- $('#user-avatar').imgAreaSelect({
- selectionOpacity: 0,
- aspectRatio: '1:1',
- onSelectEnd: selectChange,
- onSelectChange: preview
- });
- });
-</script>
diff --git a/views/default/forms/widgets/save.php b/views/default/forms/widgets/save.php
index 4ba911cb5..6959b2a82 100644
--- a/views/default/forms/widgets/save.php
+++ b/views/default/forms/widgets/save.php
@@ -14,7 +14,7 @@ $custom_form_section = elgg_view($edit_view, array('entity' => $widget));
$access = '';
if ($show_access) {
- $access = elgg_view('input/access', array(
+ $access = elgg_echo('access') . ': ' . elgg_view('input/access', array(
'name' => 'params[access_id]',
'value' => $widget->access_id,
));
@@ -38,4 +38,4 @@ $body = <<<___END
</div>
___END;
-echo $body; \ No newline at end of file
+echo $body;
diff --git a/views/default/js/admin.php b/views/default/js/admin.php
index 253a73887..d4dd06822 100644
--- a/views/default/js/admin.php
+++ b/views/default/js/admin.php
@@ -42,7 +42,7 @@ elgg.admin.init = function () {
});
// draggable profile field reordering.
- $('#sortable_profile_fields').sortable({
+ $('#elgg-profile-fields').sortable({
items: 'li',
handle: 'span.elgg-state-draggable',
stop: elgg.admin.moveProfileField
@@ -143,7 +143,7 @@ elgg.admin.editProfileField = function(value, settings) {
* @return void
*/
elgg.admin.moveProfileField = function(e, ui) {
- var orderArr = $('#sortable_profile_fields').sortable('toArray');
+ var orderArr = $('#elgg-profile-fields').sortable('toArray');
var orderStr = orderArr.join(',');
elgg.action('profile/fields/reorder', {
diff --git a/views/installation/input/access.php b/views/installation/input/access.php
index 7665d8bca..c3d4713bc 100644
--- a/views/installation/input/access.php
+++ b/views/installation/input/access.php
@@ -8,12 +8,7 @@
*
*/
-if (isset($vars['class'])) {
- $class = $vars['class'];
-}
-if (!$class) {
- $class = "elgg-input-access";
-}
+$class = "elgg-input-access";
if ((!isset($vars['options'])) || (!is_array($vars['options']))) {
$vars['options'] = array();
@@ -24,7 +19,7 @@ if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
?>
- <select name="<?php echo $vars['name']; ?>" <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+ <select name="<?php echo $vars['name']; ?>" class="<?php echo $class; ?>">
<?php
foreach($vars['options'] as $key => $option) {
@@ -40,4 +35,4 @@ if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
<?php
-} \ No newline at end of file
+}
diff --git a/views/installation/input/button.php b/views/installation/input/button.php
index 29a37dd55..ec90fed9d 100644
--- a/views/installation/input/button.php
+++ b/views/installation/input/button.php
@@ -7,11 +7,18 @@
* @uses $vars['type'] submit or button.
*/
-$class = $vars['class'];
-if (!$class) {
+if (isset($vars['class'])) {
+ $class = $vars['class'];
+} else {
$class = "elgg-button-submit";
}
+if (isset($vars['name'])) {
+ $name = $vars['name'];
+} else {
+ $name = '';
+}
+
if (isset($vars['type'])) {
$type = strtolower($vars['type']);
} else {
@@ -28,6 +35,6 @@ switch ($type) {
}
$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
-$name = $vars['name'];
+
?>
-<input type="<?php echo $type; ?>" <?php if (isset($vars['id'])) echo "id=\"{$vars['id']}\"";?> value="<?php echo $value; ?>" class="<?php echo $class; ?>" /> \ No newline at end of file
+<input type="<?php echo $type; ?>" value="<?php echo $value; ?>" class="<?php echo $class; ?>" /> \ No newline at end of file
diff --git a/views/installation/input/checkbox.php b/views/installation/input/checkbox.php
index 378eae6fd..6fbe25169 100644
--- a/views/installation/input/checkbox.php
+++ b/views/installation/input/checkbox.php
@@ -5,15 +5,9 @@
*
* @uses $var['name']
* @uses $vars['value']
- * @uses $vars['id']
* @uses $vars['class']
*/
-if (isset($vars['id'])) {
- $id = "id=\"{$vars['id']}\"";
-} else {
- $id = '';
-}
if (isset($vars['class'])) {
$id = "class=\"{$vars['class']}\"";
@@ -27,4 +21,4 @@ if (!isset($vars['value'])) {
?>
-<input type="checkbox" <?php echo $id; ?> <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" /> \ No newline at end of file
+<input type="checkbox" <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" /> \ No newline at end of file
diff --git a/views/installation/input/dropdown.php b/views/installation/input/dropdown.php
index 46e15c657..cf875492e 100644
--- a/views/installation/input/dropdown.php
+++ b/views/installation/input/dropdown.php
@@ -10,16 +10,13 @@
* the value displayed on the button. Replaces $vars['options'] when defined.
*/
+$class = "elgg-input-dropdown";
-$class = $vars['class'];
-if (!$class) {
- $class = "elgg-input-dropdown";
-}
?>
-<select name="<?php echo $vars['name']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<select name="<?php echo $vars['name']; ?>" class="<?php echo $class; ?>">
<?php
-if ($vars['options_values']) {
- foreach($vars['options_values'] as $value => $option) {
+if (isset($vars['options_values'])) {
+ foreach ($vars['options_values'] as $value => $option) {
if ($value != $vars['value']) {
echo "<option value=\"$value\">{$option}</option>";
} else {
@@ -27,7 +24,7 @@ if ($vars['options_values']) {
}
}
} else {
- foreach($vars['options'] as $option) {
+ foreach ($vars['options'] as $option) {
if ($option != $vars['value']) {
echo "<option>{$option}</option>";
} else {
@@ -36,4 +33,4 @@ if ($vars['options_values']) {
}
}
?>
-</select> \ No newline at end of file
+</select>
diff --git a/views/installation/input/form.php b/views/installation/input/form.php
index f8730b4f5..3556413a8 100644
--- a/views/installation/input/form.php
+++ b/views/installation/input/form.php
@@ -5,20 +5,15 @@
* @uses $vars['body'] The body of the form (made up of other input/xxx views and html
* @uses $vars['action'] URL of the action being called
* @uses $vars['method'] Method (default POST)
- * @uses $vars['id'] Form id
* @uses $vars['name'] Form name
*/
-if (isset($vars['id'])) {
- $id = "id=\"{$vars['id']}\"";
-} else {
- $id = '';
-}
if (isset($vars['name'])) {
$name = "name=\"{$vars['name']}\"";
} else {
$name = '';
}
+
$body = $vars['body'];
$action = $vars['action'];
if (isset($vars['method'])) {
@@ -30,6 +25,6 @@ if (isset($vars['method'])) {
$method = strtolower($method);
?>
-<form <?php echo "$id $name"; ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>">
+<form <?php echo $name; ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>">
<?php echo $body; ?>
</form> \ No newline at end of file
diff --git a/views/installation/input/password.php b/views/installation/input/password.php
index 18811109b..2265ab117 100644
--- a/views/installation/input/password.php
+++ b/views/installation/input/password.php
@@ -8,10 +8,10 @@
*
*/
-$class = $vars['class'];
-if (!$class) {
- $class = "input-password";
-}
+$class = "input-password";
+
+$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
+
?>
-<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> name="<?php echo $vars['name']; ?>" <?php if (isset($vars['id'])) echo "id=\"{$vars['id']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" />
+<input type="password" name="<?php echo $vars['name']; ?>" value="<?php echo $value; ?>" class="<?php echo $class; ?>" />
diff --git a/views/installation/input/text.php b/views/installation/input/text.php
index ec8233461..375b91c44 100644
--- a/views/installation/input/text.php
+++ b/views/installation/input/text.php
@@ -6,20 +6,15 @@
* @uses $vars['value'] The current value, if any
* @uses $vars['name'] The name of the input field
* @uses $vars['class'] CSS class
- * @uses $vars['id'] CSS id
*/
if (isset($vars['class'])) {
$class = "class=\"{$vars['class']}\"";
} else {
- $class = "";
+ $class = "elgg-input-text";
}
-if (isset($vars['id'])) {
- $id = "id=\"{$vars['id']}\"";
-} else {
- $id = '';
-}
+$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
?>
-<input type="text" name="<?php echo $vars['name']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" <?php echo $class; ?> <?php echo $id; ?>/> \ No newline at end of file
+<input type="text" name="<?php echo $vars['name']; ?>" value="<?php echo $value; ?>" <?php echo $class; ?> /> \ No newline at end of file