aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-03 21:30:30 -0400
committercash <cash.costello@gmail.com>2011-10-03 21:30:30 -0400
commitfa04d6615760a014f7557f2d28ff864eebce8551 (patch)
treed99d94d1829480388ca3ece75d5b986e6277aef4 /mod/embed/views
parentd7549a210074a29f004642d713ede6ce04703bcc (diff)
downloadelgg-fa04d6615760a014f7557f2d28ff864eebce8551.tar.gz
elgg-fa04d6615760a014f7557f2d28ff864eebce8551.tar.bz2
removed the sections from the menu to provide more flexibility in tab ordering
Diffstat (limited to 'mod/embed/views')
-rw-r--r--mod/embed/views/default/embed/css.php2
-rw-r--r--mod/embed/views/default/embed/layout.php25
-rw-r--r--mod/embed/views/default/js/embed/embed.php2
-rw-r--r--mod/embed/views/default/navigation/menu/embed.php19
4 files changed, 21 insertions, 27 deletions
diff --git a/mod/embed/views/default/embed/css.php b/mod/embed/views/default/embed/css.php
index 324ed1038..034c0fcfe 100644
--- a/mod/embed/views/default/embed/css.php
+++ b/mod/embed/views/default/embed/css.php
@@ -8,7 +8,7 @@
.embed-wrapper {
width: 730px;
min-height: 400px;
- margin: 15px;
+ margin: 20px 15px;
}
.embed-wrapper h2 {
color: #333333;
diff --git a/mod/embed/views/default/embed/layout.php b/mod/embed/views/default/embed/layout.php
index 73c26810d..c1e43f13c 100644
--- a/mod/embed/views/default/embed/layout.php
+++ b/mod/embed/views/default/embed/layout.php
@@ -8,20 +8,17 @@ $title = elgg_view_title(elgg_echo('embed:media'));
$menu = elgg_view_menu('embed');
$selected = elgg_get_config('embed_tab');
-switch ($selected->getData('tab_type')) {
- case 'select':
- $tab = elgg_list_entities(
- embed_get_list_options($selected->getData('options')),
- 'elgg_get_entities',
- 'embed_list_items'
- );
- if (!$tab) {
- $tab = elgg_echo('embed:no_section_content');
- }
- break;
- case 'upload':
- $tab = elgg_view($selected->getData('view'), $vars);
- break;
+if ($selected->getData('view')) {
+ $tab = elgg_view($selected->getData('view'), $vars);
+} else {
+ $tab = elgg_list_entities(
+ embed_get_list_options($selected->getData('options')),
+ 'elgg_get_entities',
+ 'embed_list_items'
+ );
+ if (!$tab) {
+ $tab = elgg_echo('embed:no_section_content');
+ }
}
echo <<<HTML
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php
index 840d8f89c..bb80919a9 100644
--- a/mod/embed/views/default/js/embed/embed.php
+++ b/mod/embed/views/default/js/embed/embed.php
@@ -18,7 +18,7 @@ elgg.embed.init = function() {
$('.embed-section').live('click', elgg.embed.forward);
- $('.embed-upload .elgg-form').live('submit', elgg.embed.submit);
+ $('.elgg-form-embed').live('submit', elgg.embed.submit);
}
/**
diff --git a/mod/embed/views/default/navigation/menu/embed.php b/mod/embed/views/default/navigation/menu/embed.php
index 36cedc47e..1a6a18f05 100644
--- a/mod/embed/views/default/navigation/menu/embed.php
+++ b/mod/embed/views/default/navigation/menu/embed.php
@@ -2,20 +2,17 @@
/**
* Embed tabs
*
- * @uses $vars['menu']['select']
- * @uses $vars['menu']['upload']
+ * @uses $vars['menu']['default']
*/
$tabs = array();
-foreach (array('select', 'upload') as $type) {
- foreach ($vars['menu'][$type] as $menu_item) {
- $tabs[] = array(
- 'title' => $menu_item->getText(),
- 'url' => 'embed/tab/' . $menu_item->getName(),
- 'url_class' => 'embed-section',
- 'selected' => $menu_item->getSelected(),
- );
- }
+foreach ($vars['menu']['default'] as $menu_item) {
+ $tabs[] = array(
+ 'title' => $menu_item->getText(),
+ 'url' => 'embed/tab/' . $menu_item->getName(),
+ 'url_class' => 'embed-section',
+ 'selected' => $menu_item->getSelected(),
+ );
}
echo elgg_view('navigation/tabs', array('tabs' => $tabs));