summaryrefslogtreecommitdiff
path: root/searx/static
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-09-27 10:23:05 +0200
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-05 14:40:46 +0200
commita538bed745a688d17c98372785dd2c0644e6019b (patch)
tree554785c22fb9e14227a4ba487bf5cce04db6abe8 /searx/static
parentef1ead9c4bfb6a68cc6c0f8727c4af8d99206eb8 (diff)
oscar template: implement search input, index page,...
Diffstat (limited to 'searx/static')
-rw-r--r--searx/static/oscar/img/searx.pngbin7647 -> 0 bytes
-rw-r--r--searx/static/oscar/img/searx_logo.pngbin0 -> 23498 bytes
-rw-r--r--searx/static/oscar/js/scripts.js24
3 files changed, 17 insertions, 7 deletions
diff --git a/searx/static/oscar/img/searx.png b/searx/static/oscar/img/searx.png
deleted file mode 100644
index e162da502..000000000
--- a/searx/static/oscar/img/searx.png
+++ /dev/null
Binary files differ
diff --git a/searx/static/oscar/img/searx_logo.png b/searx/static/oscar/img/searx_logo.png
new file mode 100644
index 000000000..26be6def7
--- /dev/null
+++ b/searx/static/oscar/img/searx_logo.png
Binary files differ
diff --git a/searx/static/oscar/js/scripts.js b/searx/static/oscar/js/scripts.js
index 1cef58896..1254b1581 100644
--- a/searx/static/oscar/js/scripts.js
+++ b/searx/static/oscar/js/scripts.js
@@ -12,15 +12,11 @@ $(document).ready(function(){
var btnClass = 'btn-' + $(this).data('btn-class');
var btnLabelDefault = $(this).data('btn-label-default');
var btnLabelToggled = $(this).data('btn-label-toggled');
- if(btnLabelToggled != '')
- {
- if($(this).hasClass('btn-default'))
- {
+ if(btnLabelToggled != '') {
+ if($(this).hasClass('btn-default')) {
var html = $(this).html().replace(btnLabelDefault, btnLabelToggled);
- }
- else
- {
+ } else {
var html = $(this).html().replace(btnLabelToggled, btnLabelDefault);
}
$(this).html(html);
@@ -28,4 +24,18 @@ $(document).ready(function(){
$(this).toggleClass(btnClass);
$(this).toggleClass('btn-default');
});
+
+ $('.btn-collapse').click(function() {
+ var btnTextCollapsed = $(this).data('btn-text-collapsed');
+ var btnTextNotCollapsed = $(this).data('btn-text-not-collapsed');
+
+ if(btnTextCollapsed != '' && btnTextNotCollapsed != '') {
+ if($(this).hasClass('collapsed')) {
+ var html = $(this).html().replace(btnTextCollapsed, btnTextNotCollapsed);
+ } else {
+ var html = $(this).html().replace(btnTextNotCollapsed, btnTextCollapsed);
+ }
+ $(this).html(html);
+ }
+ });
});