aboutsummaryrefslogtreecommitdiff
path: root/mod/search/views
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/search/views
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'mod/search/views')
-rw-r--r--mod/search/views/default/search/css.php10
-rw-r--r--mod/search/views/default/search/header.php6
-rw-r--r--mod/search/views/default/search/search_box.php12
-rw-r--r--mod/search/views/rss/search/list.php (renamed from mod/search/views/rss/search/listing.php)0
4 files changed, 19 insertions, 9 deletions
diff --git a/mod/search/views/default/search/css.php b/mod/search/views/default/search/css.php
index 601536c81..30ff45172 100644
--- a/mod/search/views/default/search/css.php
+++ b/mod/search/views/default/search/css.php
@@ -8,16 +8,16 @@
/**********************************
Search plugin
***********************************/
-.elgg-page-header .elgg-search {
+.elgg-search-header {
bottom: 5px;
height: 23px;
position: absolute;
right: 0;
}
-.elgg-page-header .elgg-search input[type=text] {
+.elgg-search input[type=text] {
width: 230px;
}
-.elgg-page-header .elgg-search input[type=submit] {
+.elgg-search input[type=submit] {
display: none;
}
.elgg-search input[type=text] {
@@ -30,11 +30,11 @@ Search plugin
font-size: 12px;
font-weight: bold;
padding: 2px 4px 2px 26px;
- background: transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat 2px -718px;
+ background: transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat 2px -934px;
}
.elgg-search input[type=text]:focus, .elgg-search input[type=text]:active {
background-color: white;
- background-position: 2px -700px;
+ background-position: 2px -916px;
border: 1px solid white;
color: #0054A7;
}
diff --git a/mod/search/views/default/search/header.php b/mod/search/views/default/search/header.php
new file mode 100644
index 000000000..6f8654c13
--- /dev/null
+++ b/mod/search/views/default/search/header.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Search box in page header
+ */
+
+echo elgg_view('search/search_box', array('class' => 'elgg-search-header')); \ No newline at end of file
diff --git a/mod/search/views/default/search/search_box.php b/mod/search/views/default/search/search_box.php
index ff5910937..9440dd1de 100644
--- a/mod/search/views/default/search/search_box.php
+++ b/mod/search/views/default/search/search_box.php
@@ -3,8 +3,7 @@
* Search box
*
* @uses $vars['value'] Current search query
- *
- * @todo Move javascript into something that extends elgg.js
+ * @uses $vars['class'] Additional class
*/
if (array_key_exists('value', $vars)) {
@@ -15,6 +14,11 @@ if (array_key_exists('value', $vars)) {
$value = elgg_echo('search');
}
+$class = "elgg-search";
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+
// @todo - why the strip slashes?
$value = stripslashes($value);
@@ -26,9 +30,9 @@ $display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false);
?>
-<form class="elgg-search" action="<?php echo elgg_get_site_url(); ?>search" method="get">
+<form class="<?php echo $class; ?>" action="<?php echo elgg_get_site_url(); ?>search" method="get">
<fieldset>
- <input type="text" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" class="search-input" />
+ <input type="text" class="search-input" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" />
<input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search-submit-button" />
</fieldset>
</form> \ No newline at end of file
diff --git a/mod/search/views/rss/search/listing.php b/mod/search/views/rss/search/list.php
index 32082fd31..32082fd31 100644
--- a/mod/search/views/rss/search/listing.php
+++ b/mod/search/views/rss/search/list.php