diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-12 18:36:45 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-12 18:36:45 +0000 |
commit | 6a1922d9aaf021d8919dbc87d8e59305c603ae59 (patch) | |
tree | 348e19a0e3f655eb22ee7ff29d7934f01b0e4bbe /mod | |
parent | 61e315012f9119ad479c18fa66c35ef8c0bb5756 (diff) | |
download | elgg-6a1922d9aaf021d8919dbc87d8e59305c603ae59.tar.gz elgg-6a1922d9aaf021d8919dbc87d8e59305c603ae59.tar.bz2 |
Updated custom profile fields admin area / list re-ordering ui.
git-svn-id: http://code.elgg.org/elgg/trunk@5704 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/profile/defaultprofile.php | 10 | ||||
-rw-r--r-- | mod/profile/languages/en.php | 2 | ||||
-rw-r--r-- | mod/profile/views/default/profile/css.php | 20 | ||||
-rw-r--r-- | mod/profile/views/default/profile/editdefaultprofileitems.php | 7 |
4 files changed, 30 insertions, 9 deletions
diff --git a/mod/profile/defaultprofile.php b/mod/profile/defaultprofile.php index 34e0af2d3..254b35567 100644 --- a/mod/profile/defaultprofile.php +++ b/mod/profile/defaultprofile.php @@ -1,6 +1,6 @@ <?php /** - * Elgg profile index + * Elgg profile - Admin area: edit default profile fields * * @package ElggProfile * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 @@ -39,15 +39,17 @@ if ($fieldlist = get_plugin_setting('user_defined_fields', 'profile')) { $listing = elgg_view('profile/editdefaultprofileitems',array('items' => $items, 'fieldlist' => $fieldlist)); -$listing .= elgg_view('input/form', +$resetlisting = elgg_view('input/form', array ( - 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'))), + 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'), 'class' => 'action_button disabled')), 'action' => $CONFIG->wwwroot . 'action/profile/editdefault/reset' ) ); + +$resetlisting = "<div class='default_profile_reset'>{$resetlisting}</div>"; set_context('admin'); -$body = elgg_view_layout("one_column_with_sidebar", $title . $form . $listing); +$body = elgg_view_layout("one_column_with_sidebar", $title . $form . $listing . $resetlisting); page_draw(elgg_echo('profile:edit:default'), $body);
\ No newline at end of file diff --git a/mod/profile/languages/en.php b/mod/profile/languages/en.php index dedcdcd97..431c5ff6d 100644 --- a/mod/profile/languages/en.php +++ b/mod/profile/languages/en.php @@ -63,7 +63,7 @@ $english = array( 'profile:defaultprofile:reset' => 'Default system profile reset', 'profile:resetdefault' => 'Reset default profile', - 'profile:explainchangefields' => 'You can replace the existing profile fields with your own using the form below. First you give the new profile field a label, for example, \'Favorite team\'. Next you need to select the field type, for example, tags, url, text and so on. At any time you can revert back to the default profile set up.', + 'profile:explainchangefields' => 'You can replace the existing profile fields with your own using the form below. <br /><br />Give the new profile field a label, for example, \'Favorite team\', then select the field type (eg. text, url, tags), and click the \'Add\' button. To re-order the fields drag on the handle next to the field label. To edit a field label - click on the label\'s text to make it editable. <br />At any time you can revert back to the default profile set up, but you will loose any information already entered into custom fields on profile pages.', /** diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index 61e85e1c7..e36aa1184 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -321,6 +321,26 @@ p.visit_twitter a { .default_profile_reset .action_button { float:right; } +/* field re-order */ +#sortable_profile_fields { + padding:0; + border-top:1px solid #cccccc; +} +#sortable_profile_fields li { + padding:5px 0 5px 0; + border-bottom:1px solid #cccccc; +} +#sortable_profile_fields li img.handle { + margin-right: 7px; + cursor: move; +} +#sortable_profile_fields .ui-sortable-helper { + background: #eeeeee; + color:#333333; + padding: 5px 0 5px 0; + margin: 0; + width:100%; +} /* *************************************** diff --git a/mod/profile/views/default/profile/editdefaultprofileitems.php b/mod/profile/views/default/profile/editdefaultprofileitems.php index 4cd5d68e9..4b0564d2d 100644 --- a/mod/profile/views/default/profile/editdefaultprofileitems.php +++ b/mod/profile/views/default/profile/editdefaultprofileitems.php @@ -2,7 +2,7 @@ <script language="javascript" type="text/javascript"> var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>'; function sortCallback(event, ui) { - var orderArr = $('#sortableList').sortable('toArray'); + var orderArr = $('#sortable_profile_fields').sortable('toArray'); var orderStr = orderArr.join(','); console.log(orderArr); console.log(orderStr); @@ -10,7 +10,7 @@ function sortCallback(event, ui) { } $(document).ready(function() { - $('#sortableList').sortable({ + $('#sortable_profile_fields').sortable({ items: 'li', handle: '.handle', stop: sortCallback @@ -18,10 +18,9 @@ $(document).ready(function() { }); </script> -<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/multiadmin/vendors/js/jquery.jeditable.js" ></script> <div id="list"> - <ul id="sortableList"> + <ul id="sortable_profile_fields"> <?php $save = elgg_echo('save'); |