]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
more css/html improvements - added .elgg-table and a featured module
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Feb 2011 12:40:18 +0000 (12:40 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Feb 2011 12:40:18 +0000 (12:40 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8043 36083f99-b078-4883-b0ff-0f9b5a30f544

documentation/theming/preview/objects.php
js/lib/elgglib.js
views/default/core/settings/statistics/numentities.php
views/default/core/settings/statistics/online.php
views/default/css/elements/chrome.php
views/default/css/elements/layout_objects.php
views/default/css/elements/page_layout.php
views/default/page/elements/messages.php

index fc3d3c532865670c39b868448478353af1cb0f72..179178c5ad015a80e6d125962eebfabe7848b884 100644 (file)
@@ -47,14 +47,21 @@ $url = current_page_url();
                                                'class' => 'elgg-module-info',
                                        ));
                                ?>
+                               <?php
+                                       echo elgg_view('layout/objects/module', array(
+                                               'title' => 'elgg-module-featured',
+                                               'body' => $ipsum,
+                                               'class' => 'elgg-module-featured',
+                                       ));
+                               ?>
                                </div>
                        </div>
                </div>
                <h2>Image Block</h2>
                <div class="mbl clearfix">
                <?php
-                       $src = elgg_view('icon/user/default/small');
-                       $image = "<img src=\"$src\" />";
+                       $user = new ElggUser();
+                       $image = elgg_view_entity_icon($user, 'small');
                        echo elgg_view_image_block($image, $ipsum);
                ?>
                </div>
@@ -70,6 +77,29 @@ $url = current_page_url();
                        echo elgg_view('layout/objects/list', array('items' => array($obj1, $obj2)));
                ?>
                </div>
+               <h2>Table</h2>
+               <div class="mbl clearfix">
+                       <table class="elgg-table">
+                       <?php
+                               echo "<thead><tr><th>column 1</th><th>column 2</th></tr></thead>";
+                               for ($i = 1; $i < 5; $i++) {
+                                       echo '<tr>';
+                                       for ($j = 1; $j < 3; $j++) {
+                                               echo "<td>value $j</td>";
+                                       }
+                                       echo '</tr>';
+                               }
+                       ?>
+                       </table>
+               </div>
+               <h2>Messages</h2>
+               <div class="mbl clearfix">
+                       <ul>
+                               <li class="elgg-message elgg-state-success mas">Success message</li>
+                               <li class="elgg-message elgg-state-error mas">Error message</li>
+                               <li class="elgg-message elgg-state-notice mas">Notice message</li>
+                       </ul>
+               </div>
        </div>
 </body>
 </html>
\ No newline at end of file
index c982c890452e8889c15ab1a4d61234cd37ef038e..f53809a83504c657c43cb1b826a82a24ea3ca879 100644 (file)
@@ -264,7 +264,7 @@ elgg.system_messages = function(msgs, delay, type) {
                return;
        }
 
-       var classes = ['radius8'],
+       var classes = ['elgg-message'],
                messages_html = [],
                appendMessage = function(msg) {
                        messages_html.push('<li class="' + classes.join(' ') + '"><div class="elgg-text"><p>' + msg + '</p></div></li>');
index fa393f14a3bc6b1617c81ea30f350db58952e9b6..388af0af68c7fbde9e782aa87b35f3225f03fe50 100644 (file)
@@ -16,7 +16,7 @@ if ($entity_stats) {
                <h3><?php echo elgg_echo('usersettings:statistics:label:numentities'); ?></h3>
        </div>
        <div class="elgg-body">
-               <table class="styled">
+               <table class="elgg-table-alt">
                <?php
                        foreach ($entity_stats as $k => $entry) {
                                foreach ($entry as $a => $b) {
index 76acec1830108ffc8595048d8c646cb32f79cdd1..df477d87188b85ca2c386750195a4d5f765abcc9 100644 (file)
@@ -21,7 +21,7 @@ if ($log) {
                <h3><?php echo elgg_echo('usersettings:statistics:yourdetails'); ?></h3>
        </div>
        <div class="elgg-body">
-               <table class="styled">
+               <table class="elgg-table-alt">
                        <tr class="odd"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:name'); ?></td><td><?php echo $user->name; ?></td></tr>
                        <tr class="even"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:email'); ?></td><td><?php echo $user->email; ?></td></tr>
                        <tr class="odd"><td class="column-one"><?php echo elgg_echo('usersettings:statistics:label:membersince'); ?></td><td><?php echo date("r",$user->time_created); ?></td></tr>
index dd2896ecf82b1942bfbb9e58ef63c2758159a2ba..7f1b45af0a98119d238ea30f9d48da0ea143a3f2 100644 (file)
@@ -24,13 +24,13 @@ a.selected {
        text-decoration: underline;
 }
 h1, h2, h3, h4, h5, h6 {
-       color:#0054A7;
+       color: #0054A7;
 }
 p {
-       margin-bottom:15px;
+       margin-bottom: 15px;
 }
 p:last-child {
-       margin-bottom:0;
+       margin-bottom: 0;
 }
 
 dt {
@@ -73,7 +73,6 @@ blockquote {
        GENERIC SELECTORS
 *************************************** */
 h2 {
-/*     border-bottom:1px solid #CCCCCC; */
        padding-bottom:5px;
 }
 
index efb3d29b31c00644055702eb665d4901b5fcd5eb..4f268e5cf6fb3909861d40a975bc0739a60026eb 100644 (file)
@@ -16,6 +16,9 @@
  * @todo check what happens with long <pre> tags or large images
  */
 ?>
+/* ***************************************
+       Body
+*************************************** */
 .elgg-body {
        width: auto;
        word-wrap: break-word;
 .elgg-gallery {
        border: none;
 }
+
 /* ***************************************
        Tables
 *************************************** */
-<?php //@todo prefix with elgg-.  Move to chrome.php ?>
-table.styled {
-       width:100%;
+.elgg-table {
+       width: 100%;
+       border-top: 1px solid #cccccc;
 }
-table.styled {
-       border-top:1px solid #cccccc;
+.elgg-table td, .elgg-table th {
+       padding: 4px 8px;
+       border: 1px solid #cccccc;
+}
+.elgg-table th {
+       background-color: #dddddd;
 }
-table.styled td {
-       padding:2px 4px 2px 4px;
-       border-bottom:1px solid #cccccc;
+.elgg-table tr:nth-child(odd), .elgg-table tr.odd {
+       background-color: #ffffff;
 }
-table.styled td.column-one {
-       width:200px;
+.elgg-table tr:nth-child(even), .elgg-table tr.even {
+       background-color: #f0f0f0;
 }
-table.styled tr:hover {
+.elgg-table-alt {
+       width: 100%;
+       border-top: 1px solid #cccccc;
+}
+.elgg-table-alt td {
+       padding: 2px 4px 2px 4px;
+       border-bottom: 1px solid #cccccc;
+}
+.elgg-table-alt td:first-child {
+       width: 200px;
+}
+.elgg-table-alt tr:hover {
        background: #E4E4E4;
 }
 
@@ -139,9 +157,25 @@ table.styled tr:hover {
        -webkit-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
        -moz-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
 }
+.elgg-module-featured {
+       border: 1px solid #4690D6;
+       -webkit-border-radius: 6px;
+       -moz-border-radius: 6px;
+       margin-bottom: 20px;
+}
+.elgg-module-featured > .elgg-head {
+       padding: 5px;
+       background-color: #4690D6;
+}
+.elgg-module-featured > .elgg-head h3 {
+       color: white;
+}
+.elgg-module-featured > .elgg-body {
+       padding: 10px;
+}
 
 /* ***************************************
-       OWNER BLOCK
+       Owner Block
 *************************************** */
 .elgg-owner-block {
        margin-bottom: 20px;
@@ -151,8 +185,9 @@ table.styled tr:hover {
        width: 50%;
        font-size: 90%;
 }
+
 /* ***************************************
-       WIDGETS
+       Widgets
 *************************************** */
 .elgg-widgets {
        float: right;
@@ -262,34 +297,33 @@ a.elgg-widget-edit-button:hover, a.elgg-widget-delete-button:hover {
        margin-bottom: 15px;
 }
 
-<?php //@todo push into page.php ?>
 /* ***************************************
-       SYSTEM MESSAGES
+       Messages
 *************************************** */
-
-.elgg-system-messages li {
-       color:white;
-       font-weight:bold;
-       display:block;
-       padding:3px 10px;
-       margin-top:10px;
-       cursor:pointer;
-       opacity:0.9;
-       -webkit-box-shadow:0 2px 5px rgba(0, 0, 0, 0.45);
-       -moz-box-shadow:0 2px 5px rgba(0, 0, 0, 0.45);
+.elgg-message {
+       color: white;
+       font-weight: bold;
+       display: block;
+       padding: 3px 10px;
+       cursor: pointer;
+       opacity: 0.9;
+       -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
+       -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
+       -webkit-border-radius: 8px;
+       -moz-border-radius: 8px;
 }
 .elgg-state-success {
-       background-color:black;
+       background-color: black;
 }
 .elgg-state-error {
-       background-color:red;
+       background-color: red;
 }
-.elgg-system-message p {
-       margin:0;
+.elgg-state-notice {
+       background-color: #4690D6;
 }
 
 /* ***************************************
-       RIVER
+       River
 *************************************** */
 .elgg-river {
        border-top: 1px solid #CCCCCC;
@@ -397,7 +431,7 @@ a.elgg-widget-edit-button:hover, a.elgg-widget-delete-button:hover {
 }
 
 /* ***************************************
-       LIKES
+       Likes
 *************************************** */
 .elgg-likes-list {
        width: 345px;
@@ -405,7 +439,7 @@ a.elgg-widget-edit-button:hover, a.elgg-widget-delete-button:hover {
 }
 
 /* ***************************************
-       TAGS
+       Tags
 *************************************** */
 .elgg-tags {
        background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png);
index 13c6ce1d1562d301fc437827920f26fc426ef33e..5b996b30f383378d25e0dcdd07a295a5c69d6a6b 100644 (file)
        max-width: 500px;
        z-index: 1000;
 }
+.elgg-system-messages li {
+       margin-top: 10px;
+}
+.elgg-system-messages li p {
+       margin: 0;
+}
 
 /***** PAGE HEADER ******/
 .elgg-page-header {
index f44d1204b53210d7aa26aad70a8ac134ca1b9fac..3663bb7968f60022c816ef8ee59de3829d8358c5 100644 (file)
@@ -15,7 +15,7 @@ if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object'
 
        foreach ($vars['object'] as $type => $list ) {
                foreach ($list as $message) {
-                       echo "<li class=\"elgg-state-$type radius8\">";
+                       echo "<li class=\"elgg-message elgg-state-$type\">";
                        echo elgg_view('output/longtext', array(
                                'value' => $message,
                                'parse_urls' => false