]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated custom profile fields admin area / list re-ordering ui.
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 12 Apr 2010 18:36:45 +0000 (18:36 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 12 Apr 2010 18:36:45 +0000 (18:36 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5704 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/profile/defaultprofile.php
mod/profile/languages/en.php
mod/profile/views/default/profile/css.php
mod/profile/views/default/profile/editdefaultprofileitems.php

index 34e0af2d32b73d398c992e8e7fd707dd693a00a2..254b35567186c04e80ca57d740904191d21137f3 100644 (file)
@@ -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
index dedcdcd9733cf189ecbd8d0790c93eb3d53ddaeb..431c5ff6d49a174334690f901d635090a89c85c5 100644 (file)
@@ -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.',
 
 
 /**
index 61e85e1c7d24041df108f81d392124db78c1142c..e36aa1184f9d3216061b5f6d16ec57d8d0f90fcb 100644 (file)
@@ -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%;
+}
 
 
 /* ***************************************
index 4cd5d68e90cfc672089f2c3135561a6821105253..4b0564d2d68112a598c9a9825dd0c17c5cc17041 100644 (file)
@@ -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');