aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-04-16 11:52:37 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-04-16 11:52:37 -0400
commit309dff2bf948ab191ccb1e8d4a777e49ad498820 (patch)
tree813350181be64e239287c0bb587a3a49320a49b7 /views
parent119ec1f1425ab77ed29c696d99c0c80df3886791 (diff)
parent2b2afd98c05139c1a5c25f1752e2bb412e26e335 (diff)
downloadelgg-309dff2bf948ab191ccb1e8d4a777e49ad498820.tar.gz
elgg-309dff2bf948ab191ccb1e8d4a777e49ad498820.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'views')
-rw-r--r--views/default/admin/appearance/default_widgets.php16
-rw-r--r--views/default/css/admin.php3
-rw-r--r--views/default/css/elements/buttons.php1
-rw-r--r--views/default/css/elements/components.php17
-rw-r--r--views/default/css/elements/core.php108
-rw-r--r--views/default/css/elements/grid.php23
-rw-r--r--views/default/css/elements/helpers.php8
-rw-r--r--views/default/css/elements/icons.php1
-rw-r--r--views/default/css/elements/layout.php8
-rw-r--r--views/default/css/elements/navigation.php35
-rw-r--r--views/default/css/elgg.php3
-rw-r--r--views/default/js/elgg.php5
-rw-r--r--views/default/js/initialize_elgg.php13
-rw-r--r--views/default/page/admin.php11
-rw-r--r--views/default/page/default.php11
-rw-r--r--views/default/page/elements/foot.php11
-rw-r--r--views/default/page/elements/head.php5
-rw-r--r--views/default/page/walled_garden.php2
18 files changed, 155 insertions, 126 deletions
diff --git a/views/default/admin/appearance/default_widgets.php b/views/default/admin/appearance/default_widgets.php
index ce9f6a5c2..5ce0d0acf 100644
--- a/views/default/admin/appearance/default_widgets.php
+++ b/views/default/admin/appearance/default_widgets.php
@@ -6,6 +6,22 @@
* @subpackage Administration.DefaultWidgets
*/
+$object = elgg_get_entities(array(
+ 'type' => 'object',
+ 'subtype' => 'moddefaultwidgets',
+ 'limit' => 1,
+));
+
+if ($object) {
+ echo elgg_view('output/url', array(
+ 'text' => elgg_echo('upgrade'),
+ 'href' => 'action/widgets/upgrade',
+ 'is_action' => true,
+ 'class' => 'elgg_button elgg-button-submit',
+ 'title' => 'Upgrade your default widgets to work on Elgg 1.8',
+ ));
+}
+
elgg_push_context('default_widgets');
$widget_context = get_input('widget_context');
$list = elgg_trigger_plugin_hook('get_list', 'default_widgets', null, array());
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index 949824831..b41649c06 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -223,6 +223,7 @@ table.mceLayout {
padding: 10px;
margin-bottom: 10px;
border: 2px solid #ddd;
+ cursor: pointer;
}
/* ***************************************
@@ -871,9 +872,11 @@ a.elgg-longtext-control {
display: inline-block;
margin: 0 2px;
}
+.elgg-icon-delete:hover,
.elgg-icon-delete-alt:hover {
background-position: 0 -0px;
}
+.elgg-icon-delete,
.elgg-icon-delete-alt {
background-position: 0 -18px;
}
diff --git a/views/default/css/elements/buttons.php b/views/default/css/elements/buttons.php
index 6a2342942..e9c99cf96 100644
--- a/views/default/css/elements/buttons.php
+++ b/views/default/css/elements/buttons.php
@@ -19,7 +19,6 @@
-moz-border-radius: 5px;
border-radius: 5px;
- display: inline-block;
width: auto;
padding: 2px 4px;
cursor: pointer;
diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php
index bb573f4ec..0fcbe3619 100644
--- a/views/default/css/elements/components.php
+++ b/views/default/css/elements/components.php
@@ -21,23 +21,6 @@
?>
/* ***************************************
- Body
-*************************************** */
-.elgg-body {
- width: auto;
- word-wrap: break-word;
- overflow: hidden;
-}
-.elgg-body:after {
- display: block;
- visibility: hidden;
- height: 0 !important;
- line-height: 0;
- font-size: xx-large;
- content: " x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";
-}
-
-/* ***************************************
Image Block
*************************************** */
.elgg-image-block {
diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php
new file mode 100644
index 000000000..c5d99512f
--- /dev/null
+++ b/views/default/css/elements/core.php
@@ -0,0 +1,108 @@
+<?php
+/**
+ * Core CSS
+ *
+ * This file holds all the complicated/hacky stuff that you really
+ * shouldn't touch or override unless you're sure you know what you're doing.
+ *
+ * Provides classes that implement cross-browser support for the following features:
+ * * clearfix
+ * * fluid-width content area that doesn't wrap around floats
+ * * menu's with separators
+ * * inline-block
+ * * horizontal menus
+ * * fluid gallery without using tables
+ */
+?>
+
+/* Clearfix */
+.clearfix:after,
+.elgg-grid:after,
+.elgg-layout:after,
+.elgg-inner:after,
+.elgg-page-header:after,
+.elgg-page-footer:after,
+.elgg-head:after,
+.elgg-foot:after,
+.elgg-col:after,
+.elgg-image-block:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+/* Fluid width container that does not wrap floats */
+.elgg-body,
+.elgg-col-last {
+ display: block;
+ width: auto;
+ word-wrap: break-word;
+ overflow: hidden;
+
+ /* IE 6, 7 */
+ zoom:1;
+ *overflow:visible;
+}
+
+<?php //@todo isn't this only needed if we use display:table-cell? ?>
+.elgg-body:after,
+.elgg-col-last:after {
+ display: block;
+ visibility: hidden;
+ height: 0 !important;
+ line-height: 0;
+
+ /* Stretch to fill up available space */
+ font-size: xx-large;
+ content: " x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";
+}
+
+/* ***************************************
+ * MENUS
+ *
+ * To add separators to a menu:
+ * .elgg-menu-$menu > li:after {content: '|'; background: ...;}
+ *************************************** */
+/* Enabled nesting of dropdown/flyout menus */
+.elgg-menu > li { position: relative; }
+
+/* Separators should only come between list items */
+.elgg-menu > li:last-child:after { display: none }
+
+/* Maximize click target */
+.elgg-menu > li > a { display: block }
+
+/* Horizontal menus w/ separator support */
+.elgg-menu-hz > li,
+.elgg-menu-hz > li:after,
+.elgg-menu-hz > li > a,
+.elgg-menu-hz > li > span {
+ vertical-align: middle;
+}
+
+/* Allow inline image blocks in horizontal menus */
+.elgg-menu-hz .elgg-body:after { content: '.'; }
+
+<?php //@todo This isn't going to work as-is. Needs testing ?>
+/* Inline block */
+.elgg-gallery > li,
+.elgg-button,
+.elgg-icon,
+.elgg-menu-hz > li,
+.elgg-menu-hz > li:after,
+.elgg-menu-hz > li > a,
+.elgg-menu-hz > li > span {
+ /* Google says do this, but why? */
+ position: relative;
+
+ /* FF2 */
+ display: -moz-inline-box;
+
+ display: inline-block;
+
+ /* Inline-block: IE 6, 7 */
+ zoom: 1;
+ *display: inline;
+} \ No newline at end of file
diff --git a/views/default/css/elements/grid.php b/views/default/css/elements/grid.php
index 00cd448b9..fdbaf4aca 100644
--- a/views/default/css/elements/grid.php
+++ b/views/default/css/elements/grid.php
@@ -13,14 +13,6 @@
/* ***************************************
GRID
*************************************** */
-.elgg-grid:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
.elgg-col {
float: left;
}
@@ -60,18 +52,3 @@
.elgg-col-5of6 {
width: 83.33%;
}
-.elgg-col-last {
- width: auto;
- float: none;
- display: table-cell;
-}
-.elgg-col-last:after {
- clear: both;
- display: block;
- visibility: hidden;
- overflow: hidden;
- height: 0 !important;
- line-height: 0;
- font-size: xx-large;
- content: " x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";
-}
diff --git a/views/default/css/elements/helpers.php b/views/default/css/elements/helpers.php
index 21e3dd984..e6f59260d 100644
--- a/views/default/css/elements/helpers.php
+++ b/views/default/css/elements/helpers.php
@@ -13,14 +13,6 @@
clear: both;
}
-.clearfix:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
.hidden {
display: none;
}
diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php
index 8bbc919b3..08948df50 100644
--- a/views/default/css/elements/icons.php
+++ b/views/default/css/elements/icons.php
@@ -16,7 +16,6 @@
background: transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat left;
width: 16px;
height: 16px;
- display: inline-block;
margin: 0 2px;
}
.elgg-icon-arrow-left {
diff --git a/views/default/css/elements/layout.php b/views/default/css/elements/layout.php
index d512c3602..d52938aee 100644
--- a/views/default/css/elements/layout.php
+++ b/views/default/css/elements/layout.php
@@ -72,14 +72,6 @@
.elgg-layout {
min-height: 360px;
}
-<?php // elgg-layout gets clearfix ?>
-.elgg-layout:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
.elgg-layout-one-column {
padding: 10px 0;
}
diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php
index b72124001..25b45bbee 100644
--- a/views/default/css/elements/navigation.php
+++ b/views/default/css/elements/navigation.php
@@ -87,41 +87,6 @@
}
/* ***************************************
- * MENUS
- *
- * To add separators to a menu:
- * .elgg-menu-$menu > li:after {content: '|'; background: ...;}
- *************************************** */
-/* For dropdown/flyout menus */
-.elgg-menu > li {
- position: relative;
-}
-
-/* For separators */
-.elgg-menu > li:last-child:after {
- display: none
-}
-
-/* Maximize click target */
-.elgg-menu > li > a {
- display: block
-}
-
-/* Horizontal menus w/ separator support */
-.elgg-menu-hz > li,
-.elgg-menu-hz > li:after,
-.elgg-menu-hz > li > a,
-.elgg-menu-hz > li > span {
- display: inline-block;
- vertical-align: middle;
-}
-
-/* Allow inline image blocks in horizontal menus */
-.elgg-menu-hz .elgg-body:after {
- content: '.';
-}
-
-/* ***************************************
BREADCRUMBS
*************************************** */
.elgg-breadcrumbs {
diff --git a/views/default/css/elgg.php b/views/default/css/elgg.php
index 977eb9f2f..675af860d 100644
--- a/views/default/css/elgg.php
+++ b/views/default/css/elgg.php
@@ -25,11 +25,13 @@ if ($old_css_view != elgg_get_config('viewpath')) {
Base CSS
* CSS reset
+ * core
* helpers
* grid
*******************************************************************************/
echo elgg_view('css/elements/reset', $vars);
+echo elgg_view('css/elements/core', $vars);
echo elgg_view('css/elements/helpers', $vars);
echo elgg_view('css/elements/grid', $vars);
@@ -49,7 +51,6 @@ Skin CSS
*******************************************************************************/
echo elgg_view('css/elements/typography', $vars);
-echo elgg_view('css/elements/chrome', $vars);
echo elgg_view('css/elements/forms', $vars);
echo elgg_view('css/elements/buttons', $vars);
echo elgg_view('css/elements/icons', $vars);
diff --git a/views/default/js/elgg.php b/views/default/js/elgg.php
index a434afc7d..76388f80c 100644
--- a/views/default/js/elgg.php
+++ b/views/default/js/elgg.php
@@ -57,11 +57,6 @@ elgg.release = '<?php echo get_version(true); ?>';
elgg.config.wwwroot = '<?php echo elgg_get_site_url(); ?>';
elgg.security.interval = 5 * 60 * 1000; <?php //@todo make this configurable ?>
-//Mimic PHP engine boot process
-
-//Before the DOM is ready -- note that plugins aren't loaded yet
-elgg.trigger_hook('boot', 'system');
-
//After the DOM is ready
$(function() {
elgg.trigger_hook('init', 'system');
diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php
index 9032d8a63..09e0b27bc 100644
--- a/views/default/js/initialize_elgg.php
+++ b/views/default/js/initialize_elgg.php
@@ -1,6 +1,6 @@
<?php
/**
- *
+ * Initialize Elgg's js lib with the uncacheable data
*/
?>
@@ -8,11 +8,15 @@
* Don't want to cache these -- they could change for every request
*/
elgg.config.lastcache = <?php echo (int)elgg_get_config('lastcache'); ?>;
+elgg.config.viewtype = '<?php echo elgg_get_viewtype(); ?>';
+elgg.config.simplecache_enabled = <?php echo (int)elgg_is_simplecache_enabled(); ?>;
elgg.security.token.__elgg_ts = <?php echo $ts = time(); ?>;
elgg.security.token.__elgg_token = '<?php echo generate_action_token($ts); ?>';
<?php
+// @todo json export should be smoother than this...
+// @todo Might also be nice to make url exportable. $entity->url? yes please!
$page_owner = elgg_get_page_owner_entity();
if ($page_owner instanceof ElggEntity) {
@@ -24,7 +28,7 @@ if ($page_owner instanceof ElggEntity) {
$page_owner_json['subtype'] = $page_owner->getSubtype();
$page_owner_json['url'] = $page_owner->getURL();
- echo 'elgg.page_owner = '.json_encode($page_owner_json).';';
+ echo 'elgg.page_owner = ' . json_encode($page_owner_json) . ';';
}
$user = elgg_get_logged_in_user_entity();
@@ -38,6 +42,9 @@ if ($user instanceof ElggUser) {
$user_json['subtype'] = $user->getSubtype();
$user_json['url'] = $user->getURL();
- echo 'elgg.session.user = new elgg.ElggUser('.json_encode($user_json).');';
+ echo 'elgg.session.user = new elgg.ElggUser(' . json_encode($user_json) . ');';
}
?>
+
+//Before the DOM is ready, but elgg's js framework is fully initalized
+elgg.trigger_hook('boot', 'system'); \ No newline at end of file
diff --git a/views/default/page/admin.php b/views/default/page/admin.php
index d0e7915cc..2b2ec9e4a 100644
--- a/views/default/page/admin.php
+++ b/views/default/page/admin.php
@@ -55,16 +55,7 @@ if ($notices) {
</div>
</div>
</div>
-<?php
-
-echo elgg_view('footer/analytics');
-$js = elgg_get_loaded_js('footer');
-foreach ($js as $script) { ?>
- <script type="text/javascript" src="<?php echo $script; ?>"></script>
-<?php
-}
-
-?>
+ <?php echo elgg_view('page/elements/foot'); ?>
</body>
</html> \ No newline at end of file
diff --git a/views/default/page/default.php b/views/default/page/default.php
index 77f79157b..9effce1ec 100644
--- a/views/default/page/default.php
+++ b/views/default/page/default.php
@@ -60,15 +60,6 @@ header("Content-type: text/html; charset=UTF-8");
</div>
</div>
</div>
-<?php
-
-echo elgg_view('footer/analytics');
-$js = elgg_get_loaded_js('footer');
-foreach ($js as $script) { ?>
- <script type="text/javascript" src="<?php echo $script; ?>"></script>
-<?php
-}
-
-?>
+<?php echo elgg_view('page/elements/foot'); ?>
</body>
</html> \ No newline at end of file
diff --git a/views/default/page/elements/foot.php b/views/default/page/elements/foot.php
new file mode 100644
index 000000000..a56b373b4
--- /dev/null
+++ b/views/default/page/elements/foot.php
@@ -0,0 +1,11 @@
+<?php
+
+echo elgg_view('footer/analytics');
+
+$js = elgg_get_loaded_js('footer');
+foreach ($js as $script) { ?>
+ <script type="text/javascript" src="<?php echo $script; ?>"></script>
+<?php
+}
+
+?> \ No newline at end of file
diff --git a/views/default/page/elements/head.php b/views/default/page/elements/head.php
index 5f9bf4798..048edec40 100644
--- a/views/default/page/elements/head.php
+++ b/views/default/page/elements/head.php
@@ -70,7 +70,6 @@ echo $feedref;
$metatags = elgg_view('metatags', $vars);
if ($metatags) {
- elgg_deprecated_notice("The metatags view has been deprecated for html_head/extend", 1.8);
+ elgg_deprecated_notice("The metatags view has been deprecated. Extend page/elements/head instead", 1.8);
echo $metatags;
-}
-echo elgg_view('html_head/extend', $vars);
+} \ No newline at end of file
diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php
index 662e90f45..95d17fcff 100644
--- a/views/default/page/walled_garden.php
+++ b/views/default/page/walled_garden.php
@@ -39,6 +39,6 @@ $title = $site->name;
<div id="elgg-walledgarden-bottom"></div>
</div>
</div>
-<?php echo elgg_view('footer/analytics'); ?>
+<?php echo elgg_view('page/elements/foot'); ?>
</body>
</html> \ No newline at end of file