Permalink
Browse files

fix *ups

  • Loading branch information...
1 parent 8974b81 commit 3c80b0f1cde63ca12113eb7a0257d1a5d92ab5c9 @SunboX committed Jul 10, 2009
View
@@ -1,60 +0,0 @@
-
-/* ComBoo */
-
-.comBoo {
- border: 0;
-}
-
-.comBoo-label {
- background: #fff url(dropdown.gif) 93% 9px no-repeat;
- font-size: 12px;
- line-height: 18px;
- border: #ccc 1px solid;
- color: #000;
- z-index: 9000;
- height: 19px;
- padding: 0;
- padding-top: 1px;
- cursor: pointer;
- text-indent: 5px;
- overflow: hidden;
-}
-
-a:hover.comBoo-label, a:active.comBoo-label {
- text-decoration: none;
-}
-
-ul.comBoo-list {
- z-index: 9001;
- margin: 0;
- padding: 0;
- list-style: none;
- border: 0;
- margin-top: 20px;
- border: #ccc 1px solid;
- width: auto;
- background: #fff;
-}
-
-ul.comBoo-list li {
- display: block;
- min-width: 100px;
- padding: 0;
- margin: 0;
- line-height: 20px;
- cursor: pointer;
- font-weight: normal;
- font-size: 12px;
- background: #fff;
- color: #000;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-ul.comBoo-list li.selected {
- background: #ccc;
-}
-
-ul.comBoo-list li.choice-selected {
- background: #efefef;
-}
View
174 ComBoo.js
@@ -1,174 +0,0 @@
-/*
- Script: ComBoo.js
-
- Copyright:
- Copyright (c) 2009 Dipl.-Ing. (FH) André Fiedler <kontakt@visualdrugs.net>
-
- License:
- MIT-style license
-
- Version
- 0.9
-
- Credits:
- Based on ComboBoo by Bruno Torrinha - www.torrinha.com
-*/
-var ComBoo = new Class({
-
- Implements: [Events, Options],
-
- options: {
- className: 'comBoo',
- container: null
- },
-
- initialize: function(el, options){
- this.setOptions(options);
- this.options.container = this.options.container || document.body;
- this.oldCombo = $(el);
- this.bOpen = false;
- var posLink = this.oldCombo.getCoordinates(this.options.container);
- var posList = this.oldCombo.getCoordinates();
-
- this.comboLink = new Element('a', {
- 'class': this.options.className + '-label',
- 'id': this.oldCombo.name
- }).setStyles({
- position: 'absolute',
- top: posLink.top,
- left: posLink.left,
- width: posLink.width
- }).inject(this.options.container).set('text', this.oldCombo.options[this.oldCombo.options.selectedIndex].text);
-
- this.comboList = new Element('ul', {
- 'class': this.options.className + '-list',
- 'id': 'choices-' + this.oldCombo.name
- }).setStyles({
- display: 'none',
- position: 'absolute',
- top: posList.top,
- left: posList.left
- }).inject(document.body);
-
- this.comboList.fade('hide');
-
- this.addComboLinkEvents(this.comboLink);
-
- this.build();
- this.comboList.setStyle('display', 'block');
- this.oldCombo.fade('hide');
-
- this.oldCombo.store(this.options.className, this);
- },
-
- build: function(){
- this.comboList.empty();
- for (i = 0; i < this.oldCombo.length; i++) {
- var el2 = new Element('li').addClass(this.oldCombo.options[i].className).store('index', i).set('text', this.oldCombo.options[i].text);
- if(i == this.oldCombo.options.selectedIndex) el2.addClass('selected');
- this.addChoiceEvents(el2).inject(this.comboList);
- }
- this.comboLink.set('text', this.oldCombo.options[this.oldCombo.options.selectedIndex].text);
- this.items = this.comboList.getElements('li');
- },
-
- click: function(el){
- if (this.bOpen) {
- this.close();
- }
- else {
- this.open(true);
- }
-
- this.oldCombo.fireEvent('click');
- },
-
- close: function()
- {
- $(document.body).removeEvent('click', this.checkClickOutside);
- if (this.bOpen) {
- this.bOpen = false;
- this.comboList.fade('out');
- }
- },
-
- open: function(closeOnClickOutside)
- {
- if (!this.bOpen) {
- this.bOpen = true;
- this.comboList.fade('in');
- }
-
- // Check if User clicked Outside the Combobox
- if (closeOnClickOutside) {
- this.checkClickOutside = function(e){
- var clickedCombo = false;
- if (this.comboLink == e.target)
- clickedCombo = true;
- if (this.comboList == e.target)
- clickedCombo = true;
- this.items.each(function(li){
- if (li == e.target)
- clickedCombo = true;
- });
- if (!clickedCombo)
- this.close();
- }.bind(this);
- $(document.body).addEvent('click', this.checkClickOutside);
- }
- },
-
- comboOver: function(){
- this.oldCombo.fireEvent('mouseover');
- },
-
- comboOut: function(el){
- this.oldCombo.fireEvent('mouseout');
- },
-
- choiceOver: function(el){
- if (this.selected)
- this.selected.removeClass('choice-selected');
- this.selected = el.addClass('choice-selected');
- },
-
- choiceSelect: function(el){
- this.bOpen = false;
- this.comboList.fade('hide');
- this.comboLink.set('text', el.get('text'));
- var oldIndex = this.oldCombo.selectedIndex;
- this.oldCombo.selectedIndex = el.retrieve('index');
-
- if(this.oldCombo.selectedIndex != oldIndex) this.oldCombo.fireEvent('change');
- this.oldCombo.fireEvent('blur');
-
- this.items.removeClass('selected');
- el.addClass('selected');
- },
-
- addComboLinkEvents: function(el){
- return el.addEvents({
- click: this.click.bind(this, [el]),
- mouseover: this.comboOver.bind(this, [el]),
- mouseleave: this.comboOut.bind(this, [el])
- });
- },
-
- addChoiceEvents: function(el){
- return el.addEvents({
- mouseover: this.choiceOver.bind(this, [el]),
- mousedown: this.choiceSelect.bind(this, [el])
- });
- },
-
- getElement: function(){
- return this.comboLink;
- },
-
- destroy: function()
- {
- this.close();
- this.comboLink.destroy();
- this.comboList.destroy();
- }
-});
View
@@ -1,34 +1,24 @@
-ComBoo, Comboboxes for Mootools
+Request.Binary
===
-With ComBoo you can easily replace any Combobox (Select Box, Dropdown) in your site.
-Every replaced Combobox is full styleable and hast more Features like Open/Close Control through JavaScript.
+With Request.Binary you can download files in binary format through an AJAX (XHR) call.
It requires Mootools and is tested with v1.2.3.
-Best Feature: All Comboboxes look the same in every Browser! ;o)
-
-Demo
----
-
-[http://visualdrugs.net/dev/comboo/demo/](http://visualdrugs.net/dev/comboo/demo/)
-
Syntax
---
-<pre><code>var combo = new ComBoo('combobox1');</code></pre>
-
-<pre><code>$('combobox_linux').addEvent('change', function(){
- alert(this.options[this.selectedIndex].value);
-});
-
-new ComBoo('combobox_linux', {className: 'linuxCombobox'});</code></pre>
+<pre><code>var req = new Request.Binary({url: 'demo.jpg'});</code></pre>
Options
---
-className - (string: defaults to 'comBoo') CSS Class Name to attach to the generated ComBoo Box.
+range - (array[2]) Startbit and endbit of the sequenz to download (can be used to download a file in more than one steps)
+
+acceptRanges - (boolean) Try to perform a HTTP range request
+
+<b>for more information about options and usage see:</b>
-container - (element: defaults to document.body) Element to place the ComBoo Box inside.
+[Mootools Class: Request](http://mootools.net/docs/core/Request/Request)
License
---
View
Deleted file not rendered
View
Deleted file not rendered
View
@@ -1,65 +0,0 @@
-
-/* Glossy */
-
-.glossyCombobox {
- border: 0;
- font-family: Arial, Helvetica, sans-serif;
-}
-
-.glossyCombobox-label {
- background: #000 url(bg-label.gif) 0 0 repeat-x;
- font-size: 14px;
- font-weight: bold;
- line-height: 18px;
- color: #fff;
- z-index: 9000;
- width: 140px;
- height: 24px;
- padding: 0;
- padding-top: 6px;
- cursor: pointer;
- overflow: hidden;
- border-top: #cdd4e9 1px solid;
- border-left: #9aa3b8 1px solid;
- border-right: #9aa3b8 1px solid;
- text-align: center;
-}
-
-a:hover.glossyCombobox-label, a:active.glossyCombobox-label {
- text-decoration: none;
-}
-
-ul.glossyCombobox-list {
- z-index: 9001;
- margin: 0;
- padding: 10px;
- padding-bottom: 15px;
- list-style: none;
- border: 0;
- margin-top: 28px;
- width: auto;
- background: #000 url(bg-list.gif) right bottom no-repeat;
- border-left: #9aa3b8 1px solid;
- border-right: #9aa3b8 1px solid;
-}
-
-ul.glossyCombobox-list li {
- display: block;
- width: 200px;
- padding: 5px;
- margin: 0;
- cursor: pointer;
- font-weight: normal;
- font-size: 14px;
- color: #fff;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-ul.glossyCombobox-list li.selected {
- background: #333;
-}
-
-ul.glossyCombobox-list li.choice-selected {
- background: #666; color: #fff;
-}
Oops, something went wrong.

0 comments on commit 3c80b0f

Please sign in to comment.