diff options
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/admin/plugins.php | 5 | ||||
-rw-r--r-- | views/default/annotation/default.php | 25 | ||||
-rw-r--r-- | views/default/annotation/generic_comment.php | 18 | ||||
-rw-r--r-- | views/default/css/elements/navigation.php | 12 | ||||
-rw-r--r-- | views/default/css/ie.php | 44 | ||||
-rw-r--r-- | views/default/css/lightbox.php | 371 | ||||
-rw-r--r-- | views/default/js/admin.php | 1 | ||||
-rw-r--r-- | views/default/navigation/menu/default.php | 2 | ||||
-rw-r--r-- | views/default/page/elements/head.php | 2 | ||||
-rw-r--r-- | views/default/page/elements/shortcut_icon.php | 6 |
10 files changed, 449 insertions, 37 deletions
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php index 1aa899fcc..cd0b83c00 100644 --- a/views/default/admin/plugins.php +++ b/views/default/admin/plugins.php @@ -20,6 +20,11 @@ $categories = array(); foreach ($installed_plugins as $id => $plugin) { if (!$plugin->isValid()) { + if ($plugin->isActive()) { + // force disable and warn + register_error(elgg_echo('ElggPlugin:InvalidAndDeactivated', array($plugin->getId()))); + $plugin->deactivate(); + } continue; } diff --git a/views/default/annotation/default.php b/views/default/annotation/default.php index a21fdee51..0e626ad9a 100644 --- a/views/default/annotation/default.php +++ b/views/default/annotation/default.php @@ -2,9 +2,9 @@ /** * Elgg default annotation view * + * @note To add or remove from the annotation menu, register handlers for the menu:annotation hook. + * * @uses $vars['annotation'] - * @uses $vars['delete_action'] A custom action for the delete button. - * The annotation ID is passed as 'annotation_id'. */ $annotation = $vars['annotation']; @@ -16,28 +16,19 @@ if (!$owner) { $icon = elgg_view_entity_icon($owner, 'tiny'); $owner_link = "<a href=\"{$owner->getURL()}\">$owner->name</a>"; -$delete_action = elgg_extract('delete_action', $vars, ''); +$menu = elgg_view_menu('annotation', array( + 'annotation' => $annotation, + 'sort_by' => 'priority', + 'class' => 'elgg-menu-hz right', +)); $text = elgg_view("output/longtext", array("value" => $annotation->value)); $friendlytime = elgg_view_friendly_time($annotation->time_created); -$delete_button = ''; -if ($delete_action && $annotation->canEdit()) { - $url = elgg_http_add_url_query_elements($delete_action, array( - 'annotation_id' => $annotation->id, - )); - $delete_button = elgg_view("output/confirmlink", array( - 'href' => $url, - 'text' => "<span class=\"elgg-icon elgg-icon-delete right\"></span>", - 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, - )); -} - $body = <<<HTML <div class="mbn"> - $delete_button + $menu $owner_link <span class="elgg-subtext"> $friendlytime diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 69520d102..a4fbf904e 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -29,23 +29,17 @@ $entity_title = $entity->title ? $entity->title : elgg_echo('untitled'); $entity_link = "<a href=\"{$entity->getURL()}\">$entity_title</a>"; if ($full_view) { - - $delete_button = ''; - if ($comment->canEdit()) { - $url = "action/comments/delete?annotation_id=$comment->id"; - $delete_button = elgg_view("output/confirmlink", array( - 'href' => $url, - 'text' => "<span class=\"elgg-icon elgg-icon-delete right\"></span>", - 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, - )); - } + $menu = elgg_view_menu('annotation', array( + 'annotation' => $comment, + 'sort_by' => 'priority', + 'class' => 'elgg-menu-hz right', + )); $comment_text = elgg_view("output/longtext", array("value" => $comment->value)); $body = <<<HTML <div class="mbn"> - $delete_button + $menu $commenter_link <span class="elgg-subtext"> $friendlytime diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index 64b7c47b4..b5388715e 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -424,10 +424,10 @@ li:hover > .elgg-menu-site-more { } /* *************************************** - ENTITY + ENTITY AND ANNOTATION *************************************** */ <?php // height depends on line height/font size ?> -.elgg-menu-entity { +.elgg-menu-entity, elgg-menu-annotation { float: right; margin-left: 15px; font-size: 90%; @@ -435,17 +435,17 @@ li:hover > .elgg-menu-site-more { line-height: 16px; height: 16px; } -.elgg-menu-entity > li { +.elgg-menu-entity > li, .elgg-menu-annotation > li { margin-left: 15px; } -.elgg-menu-entity > li > a { +.elgg-menu-entity > li > a, .elgg-menu-annotation > li > a { color: #aaa; } <?php // need to override .elgg-menu-hz ?> -.elgg-menu-entity > li > a { +.elgg-menu-entity > li > a, .elgg-menu-annotation > li > a { display: block; } -.elgg-menu-entity > li > span { +.elgg-menu-entity > li > span, .elgg-menu-annotation > li > span { vertical-align: baseline; } diff --git a/views/default/css/ie.php b/views/default/css/ie.php index 6760d3886..cb4ede0ae 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -71,4 +71,48 @@ } *:first-child+html #login-dropdown #signin-button a.signin.menu-open span { background-position:-150px -74px; +} + +/* Gallery */ +.elgg-gallery-fluid > li { + float: left; + margin: 2px; +} + + +/* navigation */ +.elgg-breadcrumbs > li { + display: inline; +} + +.elgg-breadcrumbs > li > a { + display: inline; + padding-right: 4px; + margin-right: 4px; + border-right: 1px solid #bababa; +} + +.elgg-menu-title > li { + display: block; +} + +.elgg-menu-title > li > a { + display: block; +} + +.elgg-menu-footer > li > a { + display: inline; +} + +.elgg-menu-river > li { + display: inline; +} + +li:hover > .elgg-menu-site-more { + display: none; +} + +/* admin */ +.elgg-menu-footer li { + display: inline; }
\ No newline at end of file diff --git a/views/default/css/lightbox.php b/views/default/css/lightbox.php new file mode 100644 index 000000000..55e6ec604 --- /dev/null +++ b/views/default/css/lightbox.php @@ -0,0 +1,371 @@ +<? +/** + * Fancybox lightbox CSS. + * + * Used as a view because we need to pass a full URL to AlphaImageLoader. + * + * @package Elgg.Core + * @subpackage UI + */ + +$jquery_path = elgg_get_site_url() . '/vendors/jquery/'; +?> + +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + width: 40px; + height: 40px; + margin-top: -20px; + margin-left: -20px; + cursor: pointer; + overflow: hidden; + z-index: 1104; + display: none; +} + +#fancybox-loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); +} + +#fancybox-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + z-index: 1100; + display: none; +} + +#fancybox-tmp { + padding: 0; + margin: 0; + border: 0; + overflow: auto; + display: none; +} + +#fancybox-wrap { + position: absolute; + top: 0; + left: 0; + padding: 20px; + z-index: 1101; + outline: none; + display: none; +} + +#fancybox-outer { + position: relative; + width: 100%; + height: 100%; + background: #fff; +} + +#fancybox-content { + width: 0; + height: 0; + padding: 0; + outline: none; + position: relative; + overflow: hidden; + z-index: 1102; + border: 0px solid #fff; +} + +#fancybox-hide-sel-frame { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; + z-index: 1101; +} + +#fancybox-close { + position: absolute; + top: -15px; + right: -15px; + width: 30px; + height: 30px; + background: transparent url('<?php echo $jquery_path; ?>fancybox/fancybox.png') -40px 0px; + cursor: pointer; + z-index: 1103; + display: none; +} + +#fancybox-error { + color: #444; + font: normal 12px/20px Arial; + padding: 14px; + margin: 0; +} + +#fancybox-img { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + border: none; + outline: none; + line-height: 0; + vertical-align: top; +} + +#fancybox-frame { + width: 100%; + height: 100%; + border: none; + display: block; +} + +#fancybox-left, #fancybox-right { + position: absolute; + bottom: 0px; + height: 100%; + width: 35%; + cursor: pointer; + outline: none; + background: transparent url('<?php echo $jquery_path; ?>fancybox/blank.gif'); + z-index: 1102; + display: none; +} + +#fancybox-left { + left: 0px; +} + +#fancybox-right { + right: 0px; +} + +#fancybox-left-ico, #fancybox-right-ico { + position: absolute; + top: 50%; + left: -9999px; + width: 30px; + height: 30px; + margin-top: -15px; + cursor: pointer; + z-index: 1102; + display: block; +} + +#fancybox-left-ico { + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); + background-position: -40px -30px; +} + +#fancybox-right-ico { + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); + background-position: -40px -60px; +} + +#fancybox-left:hover, #fancybox-right:hover { + visibility: visible; /* IE6 */ +} + +#fancybox-left:hover span { + left: 20px; +} + +#fancybox-right:hover span { + left: auto; + right: 20px; +} + +.fancybox-bg { + position: absolute; + padding: 0; + margin: 0; + border: 0; + width: 20px; + height: 20px; + z-index: 1001; +} + +#fancybox-bg-n { + top: -20px; + left: 0; + width: 100%; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox-x.png'); +} + +#fancybox-bg-ne { + top: -20px; + right: -20px; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); + background-position: -40px -162px; +} + +#fancybox-bg-e { + top: 0; + right: -20px; + height: 100%; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox-y.png'); + background-position: -20px 0px; +} + +#fancybox-bg-se { + bottom: -20px; + right: -20px; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); + background-position: -40px -182px; +} + +#fancybox-bg-s { + bottom: -20px; + left: 0; + width: 100%; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox-x.png'); + background-position: 0px -20px; +} + +#fancybox-bg-sw { + bottom: -20px; + left: -20px; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); + background-position: -40px -142px; +} + +#fancybox-bg-w { + top: 0; + left: -20px; + height: 100%; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox-y.png'); +} + +#fancybox-bg-nw { + top: -20px; + left: -20px; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancybox.png'); + background-position: -40px -122px; +} + +#fancybox-title { + font-family: Helvetica; + font-size: 12px; + z-index: 1102; +} + +.fancybox-title-inside { + padding-bottom: 10px; + text-align: center; + color: #333; + background: #fff; + position: relative; +} + +.fancybox-title-outside { + padding-top: 10px; + color: #fff; +} + +.fancybox-title-over { + position: absolute; + bottom: 0; + left: 0; + color: #FFF; + text-align: left; +} + +#fancybox-title-over { + padding: 10px; + background-image: url('<?php echo $jquery_path; ?>fancybox/fancy_title_over.png'); + display: block; +} + +.fancybox-title-float { + position: absolute; + left: 0; + bottom: -20px; + height: 32px; +} + +#fancybox-title-float-wrap { + border: none; + border-collapse: collapse; + width: auto; +} + +#fancybox-title-float-wrap td { + border: none; + white-space: nowrap; +} + +#fancybox-title-float-left { + padding: 0 0 0 15px; + background: url('<?php echo $jquery_path; ?>fancybox/fancybox.png') -40px -90px no-repeat; +} + +#fancybox-title-float-main { + color: #FFF; + line-height: 29px; + font-weight: bold; + padding: 0 0 3px 0; + background: url('<?php echo $jquery_path; ?>fancybox/fancybox-x.png') 0px -40px; +} + +#fancybox-title-float-right { + padding: 0 0 0 15px; + background: url('<?php echo $jquery_path; ?>fancybox/fancybox.png') -55px -90px no-repeat; +} + +/* IE6 */ + +.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_close.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_nav_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_nav_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } +.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_title_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_title_main.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_title_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { + height: expression(this.parentNode.clientHeight + "px"); +} + +#fancybox-loading.fancybox-ie6 { + position: absolute; margin-top: 0; + top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); +} + +#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_loading.png', sizingMethod='scale'); } + +/* IE6, IE7, IE8 */ +.fancybox-ie .fancybox-bg { background: transparent !important; } + +.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_n.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_e.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_se.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_s.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_w.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $jquery_path; ?>fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
\ No newline at end of file diff --git a/views/default/js/admin.php b/views/default/js/admin.php index 2f2f59287..253a73887 100644 --- a/views/default/js/admin.php +++ b/views/default/js/admin.php @@ -32,6 +32,7 @@ elgg.admin.init = function () { }); // in-line editing for custom profile fields. + // @note this requires jquery.jeditable plugin $(".elgg-state-editable").editable(elgg.admin.editProfileField, { type: 'text', onblur: 'submit', diff --git a/views/default/navigation/menu/default.php b/views/default/navigation/menu/default.php index 0dc6dd6b3..0fa391433 100644 --- a/views/default/navigation/menu/default.php +++ b/views/default/navigation/menu/default.php @@ -9,7 +9,7 @@ */ // we want css classes to use dashes -$vars['name'] = str_replace('_', '-', $vars['name']); +$vars['name'] = preg_replace('/[^a-z0-9\-]/i', '-', $vars['name']); $headers = elgg_extract('show_section_headers', $vars, false); $class = "elgg-menu elgg-menu-{$vars['name']}"; diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php index 048edec40..8776f07a7 100644 --- a/views/default/page/elements/head.php +++ b/views/default/page/elements/head.php @@ -40,7 +40,7 @@ $release = get_version(true); <meta name="ElggRelease" content="<?php echo $release; ?>" /> <meta name="ElggVersion" content="<?php echo $version; ?>" /> <title><?php echo $title; ?></title> - <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> + <?php echo elgg_view('page/elements/shortcut_icon', $vars); ?> <?php foreach ($css as $link) { ?> <link rel="stylesheet" href="<?php echo $link; ?>" type="text/css" /> diff --git a/views/default/page/elements/shortcut_icon.php b/views/default/page/elements/shortcut_icon.php new file mode 100644 index 000000000..12fe9c1f8 --- /dev/null +++ b/views/default/page/elements/shortcut_icon.php @@ -0,0 +1,6 @@ +<?php +/** + * Displays the default shortcut icon + */ +?> +<link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" />
\ No newline at end of file |