diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/admin/appearance/profile_fields/list.php | 9 | ||||
-rw-r--r-- | views/default/css/elements/misc.php | 2 | ||||
-rw-r--r-- | views/default/forms/avatar/crop.php | 50 | ||||
-rw-r--r-- | views/default/forms/profile/fields/add.php | 4 | ||||
-rw-r--r-- | views/default/input/reset.php | 3 | ||||
-rw-r--r-- | views/default/input/submit.php | 2 | ||||
-rw-r--r-- | views/default/js/admin.php | 4 | ||||
-rw-r--r-- | views/default/object/elements/full.php | 45 | ||||
-rw-r--r-- | views/default/object/elements/summary.php | 3 | ||||
-rw-r--r-- | views/default/page/components/module.php | 2 | ||||
-rw-r--r-- | views/failsafe/messages/exceptions/exception.php | 4 | ||||
-rw-r--r-- | views/failsafe/page/default.php | 6 | ||||
-rw-r--r-- | views/foaf/page/default.php | 4 | ||||
-rw-r--r-- | views/foaf/search/entity_list.php | 13 | ||||
-rw-r--r-- | views/foaf/user/default.php | 3 | ||||
-rw-r--r-- | views/ical/export/entity.php | 36 | ||||
-rw-r--r-- | views/ical/object/default.php | 2 | ||||
-rw-r--r-- | views/ical/page/default.php | 5 | ||||
-rw-r--r-- | views/ical/search/entity_list.php | 13 |
19 files changed, 98 insertions, 112 deletions
diff --git a/views/default/admin/appearance/profile_fields/list.php b/views/default/admin/appearance/profile_fields/list.php index f4ff1e986..b9440a95d 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" class="mvm"> <?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/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/profile/fields/add.php b/views/default/forms/profile/fields/add.php index bd58ae381..1ea9c57a9 100644 --- a/views/default/forms/profile/fields/add.php +++ b/views/default/forms/profile/fields/add.php @@ -20,8 +20,8 @@ $type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_val $submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add'))); $formbody = <<< END - <div class="elgg-foot">$label_text: $label_control - $type_text: $type_control + <div>$label_text: $label_control</div> + <div class="elgg-foot">$type_text: $type_control $submit_control</div> END; diff --git a/views/default/input/reset.php b/views/default/input/reset.php index 12866421e..082da8669 100644 --- a/views/default/input/reset.php +++ b/views/default/input/reset.php @@ -4,8 +4,11 @@ * * @package Elgg * @subpackage Core + * + * @uses $vars['class'] CSS class that replaces elgg-button-cancel */ $vars['type'] = 'reset'; +$vars['class'] = elgg_extract('class', $vars, 'elgg-button-cancel'); echo elgg_view('input/button', $vars);
\ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php index 64b135afa..df369b3b4 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -4,6 +4,8 @@ * * @package Elgg * @subpackage Core + * + * @uses $vars['class'] CSS class that replaces elgg-button-submit */ $vars['type'] = 'submit'; 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/default/object/elements/full.php b/views/default/object/elements/full.php new file mode 100644 index 000000000..4a2991442 --- /dev/null +++ b/views/default/object/elements/full.php @@ -0,0 +1,45 @@ +<?php +/** + * Object full rendering + * + * Sample output + * <h2>Title</h3> + * <div class="elgg-content"> + * <div class="elgg-image-block"> + * </div> + * <div class="elgg-output"> + * </div> + * </div> + * + * @uses $vars['entity'] ElggEntity + * @uses $vars['title'] Title (false for no title) + * @uses $vars['icon'] HTML for the content icon + * @uses $vars['summary'] HTML for the content summary + * @uses $vars['body'] HTML for the content body + * @uses $vars['class'] Optional additional class for the content wrapper + */ + +$title = elgg_extract('title', $vars); +$icon = elgg_extract('icon', $vars); +$summary = elgg_extract('summary', $vars); +$body = elgg_extract('body', $vars); +$class = elgg_extract('class', $vars); +if ($class) { + $class = "elgg-content $class"; +} else { + $class = "elgg-content"; +} + +if ($title) { + $title = elgg_view_title($title); +} + +$header = elgg_view_image_block($icon, $summary); + +echo <<<HTML +$title +<div class="$class"> +$header +$body +</div> +HTML; diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 3ca4de2be..8d82bc52a 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -49,6 +49,9 @@ if ($metadata) { echo "<h3>$title_link</h3>"; echo "<div class=\"elgg-subtext\">$subtitle</div>"; echo $tags; + +echo elgg_view('object/summary/extend', $vars); + if ($content) { echo "<div class=\"elgg-content\">$content</div>"; } diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php index f7b9da59c..b1198ee9a 100644 --- a/views/default/page/components/module.php +++ b/views/default/page/components/module.php @@ -42,6 +42,8 @@ if (isset($vars['footer'])) { if ($vars['footer']) { $footer = "<div class=\"elgg-foot\">$footer</div>"; } +} else { + $footer = "<div class=\"elgg-foot\"></div>"; } $contents = $header . $body . $footer; diff --git a/views/failsafe/messages/exceptions/exception.php b/views/failsafe/messages/exceptions/exception.php index 9fa7dc2a4..c35d80c87 100644 --- a/views/failsafe/messages/exceptions/exception.php +++ b/views/failsafe/messages/exceptions/exception.php @@ -11,7 +11,7 @@ ?> -<p class="messages_exception"> +<p class="elgg-messages-exception"> <span title="<?php echo get_class($vars['object']); ?>"> <?php @@ -26,7 +26,7 @@ if (elgg_get_config('debug')) { ?> -<p class="messages_exception"> +<p class="elgg-messages-exception"> <?php echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')); diff --git a/views/failsafe/page/default.php b/views/failsafe/page/default.php index 0ce63cc1d..6d628ebbb 100644 --- a/views/failsafe/page/default.php +++ b/views/failsafe/page/default.php @@ -33,7 +33,7 @@ header('Content-type: text/html; charset=utf-8'); p { margin: 0px 0px 15px 0; } - #wrapper { + #elgg-wrapper { background:white; width:570px; margin:auto; @@ -43,7 +43,7 @@ header('Content-type: text/html; charset=utf-8'); border-right: 1px solid #666666; border-bottom: 1px solid #666666; } - .messages_exception { + .elgg-messages-exception { background:#FDFFC3; display:block; padding:10px; @@ -52,7 +52,7 @@ header('Content-type: text/html; charset=utf-8'); </head> <body> - <div id="wrapper"> + <div id="elgg-wrapper"> <h1><?php echo $vars['title']; ?></h1> <?php echo $vars['body']; ?> </div> diff --git a/views/foaf/page/default.php b/views/foaf/page/default.php index 7dac2a0aa..fad46ed35 100644 --- a/views/foaf/page/default.php +++ b/views/foaf/page/default.php @@ -42,8 +42,6 @@ if (!$owner = elgg_get_page_owner_entity()) { <foaf:name><?php echo $owner->name; ?></foaf:name> <foaf:homepage rdf:resource="<?php echo $owner->getURL(); ?>" /> <foaf:depiction rdf:resource="<?php echo elgg_format_url($owner->getIconURL('large')); ?>" /> - <?php - echo $vars['body']; - ?> +<?php echo $vars['body']; ?> </foaf:Person> </rdf:RDF> diff --git a/views/foaf/search/entity_list.php b/views/foaf/search/entity_list.php deleted file mode 100644 index b786865d7..000000000 --- a/views/foaf/search/entity_list.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Elgg default layout - * - * @package Elgg - * @subpackage Core - */ -$entities = $vars['entities']; -if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) { - echo elgg_view_entity($entity); - } -}
\ No newline at end of file diff --git a/views/foaf/user/default.php b/views/foaf/user/default.php index 8d059bc6b..dcba55562 100644 --- a/views/foaf/user/default.php +++ b/views/foaf/user/default.php @@ -6,7 +6,8 @@ * @subpackage Core */ -$friends=get_user_friends(elgg_get_page_owner_guid(), $subtype = "", $limit = 10000, $offset = 0); +// @todo update when get_user_friends is deprecated in 1.9 +$friends = get_user_friends(elgg_get_page_owner_guid(), $subtype = "", $limit = 10000, $offset = 0); foreach ($friends as $friend) { ?> diff --git a/views/ical/export/entity.php b/views/ical/export/entity.php index caa60c7a5..eaa3b56d8 100644 --- a/views/ical/export/entity.php +++ b/views/ical/export/entity.php @@ -9,23 +9,25 @@ $entity = $vars['entity']; -if ( - ($entity instanceof Notable) && - ($entity->getCalendarStartTime()) && - ($entity->getCalendarEndTime()) -) -{ -?> +if ($entity instanceof Notable && + $entity->getCalendarStartTime() && + $entity->getCalendarEndTime()) { + + $timestamp = date("Ymd\THis\Z", $entity->getTimeCreated()); + $start = date("Ymd\THis\Z", $entity->getCalendarStartTime()); + $end = date("Ymd\THis\Z", $entity->getCalendarEndTime()); + $summary = $entity->title; + $modified = date("Ymd\THis\Z", $entity->getTimeUpdated()); + + echo <<< ICAL BEGIN:VEVENT -DTSTAMP:<?php echo date("Ymd\THis\Z", $entity->getTimeCreated()); ?> -DTSTART:<?php echo date("Ymd\THis\Z", $entity->getCalendarStartTime()); ?> -DTEND:<?php echo date("Ymd\THis\Z", $entity->getCalendarEndTime()); ?> -SUMMARY:<?php echo $event->title; ?> -LAST-MODIFIED:<?php echo date("Ymd\THis\Z", $entity->getTimeUpdated()); ?> +DTSTAMP:$timestamp +DTSTART:$start +DTEND:$end +SUMMARY:$summary +LAST-MODIFIED:$modified END:VEVENT -<?php -} -?> - if ( - )
\ No newline at end of file +ICAL; + +} diff --git a/views/ical/object/default.php b/views/ical/object/default.php index 678676133..77183bb8a 100644 --- a/views/ical/object/default.php +++ b/views/ical/object/default.php @@ -7,4 +7,4 @@ * */ -elgg_view('export/entity', $vars);
\ No newline at end of file +echo elgg_view('export/entity', $vars);
\ No newline at end of file diff --git a/views/ical/page/default.php b/views/ical/page/default.php index 9a529b24f..01bd9e86e 100644 --- a/views/ical/page/default.php +++ b/views/ical/page/default.php @@ -7,12 +7,13 @@ * */ +$site = elgg_get_site_entity(); + header("Content-Type: text/calendar"); -echo $vars['body']; ?> BEGIN:VCALENDAR VERSION:2.0 -PRODID:-//Curverider Ltd//NONSGML Elgg <?php echo get_version(true); ?>//EN +PRODID:-//Elgg//NONSGML <?php echo $site->name; ?>//EN <?php echo $vars['body']; ?> END:VCALENDAR diff --git a/views/ical/search/entity_list.php b/views/ical/search/entity_list.php deleted file mode 100644 index 38c19fbb7..000000000 --- a/views/ical/search/entity_list.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Elgg default layout - * - * @package Elgg - * @subpackage Core - */ - -$entities = $vars['entities']; -if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) - echo elgg_view_entity($entity); -}
\ No newline at end of file |