Skip to content
Browse files

RC1 version ;)

  • Loading branch information...
1 parent 2c9b0ce commit a2f23d864f85f280f8b23cbd3acce2af438bca56 @lstalis lstalis committed Aug 3, 2012
View
2 config.xml
@@ -8,7 +8,7 @@
<preference name="time" value="7"/>
<preference name="categories" value=""/>
<feature name="opera:speeddial" required="false">
- <param name="url" value="www.centrumzakupow.pl"/>
+ <param name="url" value="http://centrumkuponow.com/?a=2136980"/>
</feature>
<access origin="*"/>
</widget>
View
BIN images/buttons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/cat_input.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/cat_star.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/coupon_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/footer_bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/header_bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/header_hr_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/header_hr_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/hr.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/hr_content.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/itembg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/opera_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/pagination_arrows.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/pagination_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/par_logo_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/scissors_content.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/scissors_header.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
45 index.html
@@ -30,14 +30,14 @@
<title>Centrum Kuponów</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link href="styles/fonts.css" type="text/css" media="all" rel="stylesheet">
- <link href="styles/styles.css" type="text/css" media="all" rel="stylesheet">
+ <link href="styles/index.css" type="text/css" media="all" rel="stylesheet">
<script src="scripts/index.js" type="text/javascript"></script>
</head>
- <body id="sd" class="loading">
+ <body id="sd">
<div id="bg">
<div id="bgWrap">
<div id="list">
- <section id="current">
+ <section id="current" class="empty">
<div class="logoLeft">
<div class="logoRight">
<div class="logo">
@@ -65,46 +65,9 @@
</header>
<p></p>
</section>
- <!--<section id="current"></section>
- <section id="next"></section>-->
</div>
</div>
</div>
<div id="logo">Centrum zakupów</div>
- <!--
- <div id="content">
- <div class="wrap">
- <div id="list">
- <section id="current">
- <div class="logoLeft">
- <div class="logoRight">
- <div class="logo">
- <img src="" alt="">
- </div>
- </div>
- </div>
- <header>
- <h2></h2>
- <h1><strong><span class="promoName"></span><span class="sdLine"></span></strong></h1>
- </header>
- <p></p>
- </section>
- <section id="next">
- <div class="logoLeft">
- <div class="logoRight">
- <div class="logo">
- <img src="" alt="">
- </div>
- </div>
- </div>
- <header>
- <h2></h2>
- <h1><strong><span class="promoName"></span><span class="sdLine"></span></strong></h1>
- </header>
- <p></p>
- </section>
- </div>
- </div>
- </div>-->
</body>
-</html>
+</html>
View
98 list.html
@@ -29,9 +29,99 @@
<head>
<title>Centrum Kuponów</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
- <link href="styles/all.css" type="text/css" media="all" rel="stylesheet">
- <script src="scritps/common.js" type="text/javascript"></script>
- <script src="scripts/index.js" type="text/javascript"></script>
+ <link href="styles/fonts.css" type="text/css" media="all" rel="stylesheet">
+ <link href="styles/list.css" type="text/css" media="all" rel="stylesheet">
+ <script src="scripts/list.js" type="text/javascript"></script>
</head>
- <body>Lista</body>
+ <body id="list">
+ <div id="wrapper">
+ <header id="header">
+ <div id="logo"><img src="images/coupon_logo.png" alt="Centrum kuponów"></div>
+ <div id="top" class="wrap">
+ <dl class="clearfix">
+ <dt>Kategorie kuponów:</dt>
+ <dd></dd>
+ </dl>
+ <div id="summary" class="clearfix">
+ <div class="col colL">
+ <span data-id="0">Wszystkie</span>
+ <span data-id="86">Książki, muzyka, film</span>
+ <span data-id="40">RTV AGD, komputery</span>
+ <span data-id="68">Bielizna, odzież, obówie</span>
+ <span data-id="70">Biżuteria i perfumy</span>
+ <span data-id="107">Kwiaty, czekoladki</span>
+ </div>
+ <div class="col colC">
+ <span data-id="114">Zdrowie i uroda</span>
+ <span data-id="101">Gadżety i hobby</span>
+ <span data-id="89">Delikatesy spożywcze</span>
+ <span data-id="361">Nauka i szkolenia</span>
+ <span data-id="838">Fotoprezenty</span>
+ <span data-id="304">Artykuły zoologiczne</span>
+ </div>
+ <div class="col colR">
+ <span data-id="163">Podróże</span>
+ <span data-id="54">Telefony i usługi telekomunikacyjne</span>
+ <span data-id="121">Dom i ogród</span>
+ <span data-id="261">Artykuły biurowe</span>
+ <span data-id="142713">Zakupy grupowe</span>
+ </div>
+ </div>
+ </div>
+ </header>
+ <div id="content" class="wrap">
+ <section id="promoted" class="loading">
+ <header>
+ <h1>Rabat tygodnia</h1>
+ </header>
+ <p class="loadingTxt">Trwa ładowanie</p>
+ <article class="last clearfix">
+ <span class="brand"><img src="" alt=""></span>
+ <header>
+ <h2></h2>
+ <h1></h1>
+ <p></p>
+ </header>
+ <footer>
+ <a href="#">Zobacz pormocję</a>
+ <dl><dt>Ważny do</dt><dd></dd></dl>
+ </footer>
+ </article>
+ </section>
+ <section id="filtered" class="loading single">
+ <header>
+ <h1>Kupony rabatowe i promocje</h1>
+ </header>
+ <p class="loadingTxt">Trwa ładowanie</p>
+ <p class="emptyTxt">Brak kuponów w wybranych kategoriach</p>
+ <article class="clearfix">
+ <span class="brand"><img src="" alt=""></span>
+ <header>
+ <h2></h2>
+ <h1></h1>
+ <p></p>
+ </header>
+ <footer>
+ <a href="#">Zobacz pormocję</a>
+ <dl><dt>Ważny do</dt><dd></dd></dl>
+ </footer>
+ </article>
+ <div class="pagination">
+ <span class="prev">Poprzednie</span>
+ <span class="next">Następne</span>
+ <span class="current">1</span>
+ <span class="page">2</span>
+ <span class="sep">...</span>
+ </div>
+ </section>
+ </div>
+ <div id="push"></div>
+ </div>
+ <footer id="footer">
+ <div class="wrap clearfix">
+ <p class="col">Copyright &copy; 2012 <a href="http://opera.com/">Opera Software ASA</a>. Wszystkie prawa zastrzeżone.</p>
+ <p class="colR">More than <a href="http://opera.com/">250 milion</a> users worldwide</p>
+ </div>
+ </footer>
+ </body>
</html>
View
117 options.html
@@ -0,0 +1,117 @@
+<!--
+Copyright (c) 2012, Opera Software ASA
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Opera Software ASA nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY OPERA SOFTWARE ASA AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL OPERA SOFTWARE ASA AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Preferencje</title>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <link href="styles/fonts.css" type="text/css" media="all" rel="stylesheet">
+ <link href="styles/options.css" type="text/css" media="all" rel="stylesheet">
+ <script src="scripts/options.js" type="text/javascript"></script>
+ </head>
+ <body id="options">
+ <div class="form">
+ <h1>Preferencje</h1>
+ <div class="row clearfix">
+ <label class="cat" for="intv">Czas ekspozycji:</label>
+ <div class="items">
+ <input type="number" min="3" max="60" step value="7" id="intv">
+ <label>sec.</label>
+ </div>
+ </div>
+ <div class="row clearfix">
+ <label class="cat">Kategorie:</label>
+ <div class="items scroll">
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="86" id="c1">
+ <label for="c1">Książki, muzyka, film</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="40" id="c2">
+ <label for="c2">RTV AGD, komputery</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="68" id="c3">
+ <label for="c3">Bielizna, odzież, obuwie</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="70" id="c4">
+ <label for="c4">Biżuteria i perfumy</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="107" id="c5">
+ <label for="c5">Kwiaty, czekoladki</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="114" id="c6">
+ <label for="c6">Zdrowie i uroda</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="101" id="c7">
+ <label for="c7">Gadżety i hobby</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="89" id="c8">
+ <label for="c8">Delikatesy spożywcze</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="361" id="c9">
+ <label for="c9">Nauka i szkolenia</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="838" id="c10">
+ <label for="c10">Fotoprezenty</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="304" id="c11">
+ <label for="c11">Artykuły zoologiczne</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="163" id="c12">
+ <label for="c12">Podróże</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="54" id="c13">
+ <label for="c13">Telefony i usługi telekomunikacyjne</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="121" id="c14">
+ <label for="c14">Dom i ogród</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="261" id="c15">
+ <label for="c15">Artykuły biurowe</label>
+ </div>
+ <div class="itemRow clearfix">
+ <input type="checkbox" value="142713" id="c16">
+ <label for="c16">Zakupy grupowe</label>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
View
162 scripts/index.js
@@ -10,6 +10,8 @@ var Data = function(url){
var data = [];
for(var i=0;i<products.length;i++){
var item = {
+ id: parseInt(products[i].getElementsByTagName('TDProductId')[0].textContent),
+ category: parseInt(products[i].getElementsByTagName('TDCategoryID')[0].textContent),
logo: products[i].getElementsByTagName('fields')[0].getElementsByTagName('logo_bigger')[0].textContent || products[i].getElementsByTagName('programLogoPath')[0].textContent,
brand: products[i].getElementsByTagName('name')[0].textContent,
name: products[i].getElementsByTagName('shortDescription')[0].textContent,
@@ -20,25 +22,63 @@ var Data = function(url){
if((item.name.length==0&&item.tag.length!=0)||item.name==item.tag){
item.name = item.tag;
item.tag = '';
- }
- data.push(item);
+ };
+ data[i] = item;
};
- console.log(products[0].getElementsByTagName('fields')[0].getElementsByTagName('logo_bigger')[0].textContent||products[i].getElementsByTagName('programLogoPath')[0].textContent);
-
return data;
};
+ var cData = null;
+ var categories = '';
+ var updateList = function(){
+ var cats = widget.preferences.categories.split(',').sort();
+
+ if(categories==('|'+cats.join('|')+'|'))return;
+
+ cData = [];
+
+ if(widget.preferences.categories.length==0){
+
+ for(var i=0;i<self.data.length;i++)cData.push(i);
+
+ return;
+ };
+
+ categories = '|'+cats.join('|')+'|';
+
+ for(var i=0;i<self.data.length;i++)if(cats.indexOf(String(self.data[i].category))!=-1)cData.push(i);
+ };
+ this.getNext = function(index){
+ updateList();
+
+ if(cData.length==0)return -1;
+
+ if(index<0)return cData[0];
+
+ var item = cData.indexOf(index);
+
+ if(item==-1)for(var i=0;i<cData.length;i++)if(index<cData[i]){
+ item = i;
+ break;
+ };
+
+ return cData[(item+1)%cData.length];
+ };
+
rq.addEventListener('readystatechange',function(){
if (rq.readyState==4 && rq.status==200){
self.data = parseData(rq.responseXML.querySelectorAll('products product'));
+ updateList();
if(domLoaded&&(typeof Carousel == 'function'))Carousel = new Carousel();
};
},false);
rq.open('GET',url,true);
rq.send();
+
+
};
var Carousel = function(){
@@ -47,25 +87,64 @@ var Carousel = function(){
var lock = false;
var current = -1;
var elements = [document.getElementById('current'),document.getElementById('next')];
- this.fill = function(section,data){
- section.getElementsByTagName('img')[0].src = data.logo;
- section.getElementsByTagName('img')[0].alt = data.brand;
+
+ this.fill = function(section,i,callback){
+ section.classList.remove('empty');
+
+ if(i==-1){
+ section.classList.add('empty');
+ current = -1;
+ callback();
+ return;
+ };
+
+ var data = Data.data[i];
+ current = i;
+ var maxW = parseInt(window.getComputedStyle(document.querySelector('#list section .logo img')).maxWidth);
+ var maxH = parseInt(window.getComputedStyle(document.querySelector('#list section .logo img')).maxHeight);
+
+ var img = section.getElementsByTagName('img')[0];
+ img.onload = function(){
+ var ow = this.width;
+ var oh = this.height;
+ if(ow/oh>maxW/maxH){
+ var w = ow>maxW?maxW:ow;
+ this.style.width = w+'px';
+ this.style.marginTop = parseInt(maxH*0.5-w*oh/ow*0.5)+'px';
+ } else {
+ var h = oh>maxH?maxH:oh;
+ this.style.height = h+'px';
+ this.style.marginTop = parseInt(maxH*0.5-h/2)+'px';
+ };
+ callback();
+ };
+ img.src = data.logo;
+ img.alt = data.brand;
+
section.getElementsByClassName('promoName')[0].textContent = data.name;
section.getElementsByTagName('h2')[0].textContent = data.tag;
section.getElementsByTagName('p')[0].textContent = data.description;
};
elements[0].style.left = 0;
- this.fill(elements[1],Data.data[0]);
+
var intv = null;
- this.rotate = function(){
- if(lock)return;
- lock = true;
- current = (current+1)%Data.data.length;
+
+ var loadedIntv = null;
+ var rotateMove = function(){
+ if(loadedIntv==null)return;
+
+ clearTimeout(loadedIntv);
+ loadedIntv = null;
+
+ intv = setTimeout(function(){
+ self.rotate();
+ },widget.preferences.time*1000);
+
+ if(elements[0].classList.contains('empty')&&elements[1].classList.contains('empty')){
+ lock = false;
+ return;
+ };
- if(intv!=null){
- clearTimeout(intv);
- intv = null;
- }
if(parseInt(elements[0].style.left)==0){
elements[1].style.left = 0;
@@ -75,39 +154,50 @@ var Carousel = function(){
elements[1].style.left = '-150%';
};
-
- setTimeout(function(){
-
- if(document.body.classList.contains('loading'))document.body.classList.remove('loading');
+ setTimeout(function(){
var next = elements[parseInt(elements[0].style.left) == 0?1:0];
- next.style.OTransitionProperty = 'none';
-
+ next.style.OTransitionProperty = 'none';
next.style.left = '150%';
setTimeout(function(){
- lock = false;
- self.fill(next,Data.data[(current+1)%Data.data.length]);
next.style.OTransitionProperty = 'left';
-
- intv = setTimeout(function(){
- self.rotate();
- },parseInt(widget.preferences.getItem('time'))*1000);
-
-
+ lock = false;
},100);
- },500);
+ },500);
+
};
- setTimeout(function(){
+ this.rotate = function(){
+ if(lock)return;
+ lock = true;
+
+ if(intv!=null){
+ clearTimeout(intv);
+ intv = null;
+ };
+
+ loadedIntv = setTimeout(function(){
+ clearTimeout(loadedIntv);
+ loadedIntv = null;
+
+ lock = false;
+
+ intv = setTimeout(function(){
+ self.rotate();
+ },widget.preferences.time*1000);
+
+ },10000);
+
+ self.fill(elements[parseInt(elements[0].style.left)==0?1:0],Data.getNext(current),rotateMove);
+ };
+
+ intv = setTimeout(function(){
self.rotate();
},600);
-
-
};
-
-Data = new Data('http://centrumkuponow.com/feed?a=2136980');
+Data = new Data('http://centrumkuponow.com/feed?a=2136980&foo='+(new Date()).getTime());
opera.contexts.speeddial.url = 'list.html';
//initialize app
View
435 scripts/list.js
@@ -0,0 +1,435 @@
+var Categories = function(instance){
+ var self = this;
+ var links = document.getElementById('summary').getElementsByTagName('span');
+ var cats = [];
+ var all = null;
+ var linksLength = links.length;
+ var swap = [];
+ for(var l = 0;l<linksLength;l++){
+ if(links[l].getAttribute('data-id')==0){
+ all = links[l];
+ all.addEventListener('click',function(e){
+
+ e.preventDefault();
+
+ if(this.classList.contains('selected'))return;
+
+ self.restore();
+
+ this.classList.add('selected');
+
+ self.save();
+ self.update();
+ },false);
+ } else {
+ swap.push(links[l]);
+ links[l].addEventListener('click',function(e){
+
+ var select = !this.classList.contains('selected');
+
+ self.restore();
+
+ all.classList.remove('selected');
+
+ if(select)this.classList.add('selected');
+ else {
+ this.classList.remove('selected');
+ if(document.getElementById('summary').getElementsByClassName('selected').length==0)all.classList.add('selected');
+ };
+
+
+ if(document.getElementById('summary').getElementsByClassName('selected').length==linksLength)all.classList.add('selected');
+
+ self.save();
+ self.update();
+
+ e.preventDefault();
+
+ },false);
+ };
+ };
+
+ links = swap;
+
+ linksLength = links.length;
+ var lastCategories = null;
+
+ this.update = function(){
+
+ if(lastCategories!=widget.preferences.categories.split(',').sort().join(',')&&FilteredList.update){
+ lastCategories = widget.preferences.categories.split(',').sort().join(',');
+ FilteredList.update();
+ };
+ };
+ this.restore = function(){
+
+ if(widget.preferences.categories.length==0){
+ for(var l = 0;l<linksLength;l++)links[l].classList.remove('selected');
+ all.classList.add('selected');
+ input.textContent = all.textContent;
+ cats = [];
+ return;
+ };
+
+ cats = widget.preferences.categories.split(',');
+ var title = [];
+
+ all.classList.remove('selected');
+
+ for(var l = 0;l<linksLength;l++){
+ if(cats.indexOf(links[l].getAttribute('data-id'))!=-1){
+ title.push(links[l].textContent);
+ links[l].classList.add('selected');
+ } else links[l].classList.remove('selected');
+ };
+
+ input.textContent = title.join(', ');
+ };
+ this.save = function(){
+
+ if(all.classList.contains('selected')){
+ widget.preferences.categories = '';
+ this.restore();
+ return;
+ };
+
+ var c = [];
+
+ for(var l = 0;l<linksLength;l++)if(links[l].classList.contains('selected'))c.push(links[l].getAttribute('data-id'));
+
+ widget.preferences.categories = c.join(',');
+
+ this.restore();
+ };
+
+ this.getActiveCatsData = function(){
+
+ var cData = [];
+ var lg = Data.data.length;
+
+ if(cats.length==0)for(var i=0;i<lg;i++)cData.push(i);
+ else for(var i=0;i<lg;i++)if(cats.indexOf(String(Data.data[i].category))!=-1)cData.push(i);
+
+ return cData;
+
+
+ };
+
+ var input = instance.getElementsByTagName('dd')[0];
+
+ input.addEventListener('click',function(e){
+ if(instance.classList.contains('open'))instance.classList.remove('open');
+ else {
+ self.restore();
+ self.update();
+ instance.classList.add('open');
+ };
+
+ e.preventDefault();
+ },false);
+
+ this.restore();
+
+};
+
+
+var Data = function(url,onready){
+ var self = this;
+ this.data = null;
+ this.rq = new XMLHttpRequest();
+ var rq = this.rq;
+ this.couponOfTheWeekIndex = -1;
+ function parseData(products){
+ var data = [];
+ for(var i=0;i<products.length;i++){
+ var fields = products[i].getElementsByTagName('fields')[0];
+ var item = {
+ id: parseInt(products[i].getElementsByTagName('TDProductId')[0].textContent),
+ category: parseInt(products[i].getElementsByTagName('TDCategoryID')[0].textContent),
+ logo: fields.getElementsByTagName('logo_bigger')[0].textContent || products[i].getElementsByTagName('programLogoPath')[0].textContent,
+ brand: products[i].getElementsByTagName('name')[0].textContent,
+ name: products[i].getElementsByTagName('shortDescription')[0].textContent,
+ tag: products[i].getElementsByTagName('promoText')[0].textContent,
+ description: products[i].getElementsByTagName('description')[0].textContent,
+ ends: fields.getElementsByTagName('endDate')[0].textContent,
+ isCoupon: fields.getElementsByTagName('couponcode')[0].textContent.length>0?true:false
+ };
+
+ if((item.name.length==0&&item.tag.length!=0)||item.name==item.tag){
+ item.name = item.tag;
+ item.tag = '';
+ };
+ item.ends = item.ends.substring(0,item.ends.indexOf(' '))+' r.';
+
+ if(fields.getElementsByTagName('couponOfTheWeek').length>0&&fields.getElementsByTagName('couponOfTheWeek')[0].textContent=='true')self.couponOfTheWeekIndex = i;
+
+ data[i] = item;
+
+ };
+ return data;
+ };
+
+ rq.addEventListener('readystatechange',function(){
+ if (rq.readyState==4 && rq.status==200){
+ self.data = parseData(rq.responseXML.querySelectorAll('products product'));
+ onready(self.data);
+ };
+ },false);
+
+ rq.open('GET',url,true);
+ rq.send();
+};
+function getCoupon(href,rel){
+ var Tabs = opera.extension.bgProcess.opera.extension.tabs;
+ //var TabList = Tabs.getAll();
+ var Current = Tabs.getSelected();
+ //var index = TabList.indexOf(Tabs.getSelected());
+
+
+ Tabs.create({url: href,focused: true});
+
+ if(rel&&rel.length>0){
+ var x = window.outerWidth/2 - 300;
+ var y = window.outerHeight/2 - 150;
+
+ var coupon = window.open(rel,"coupon", "width=600,height=300,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");
+ coupon.moveTo(x<0?0:x,y<0?0:y);
+ };
+}
+
+var PromotedList = function(instance,data){
+ var self = this;
+ this.data = null;
+ if(data.length==0||Data.couponOfTheWeekIndex==-1){
+ instance.classList.add('empty');
+ instance.classList.remove('loading');
+ return;
+ };
+ this.data = data[Data.couponOfTheWeekIndex];
+
+ this.fill(instance.getElementsByTagName('article')[0],this.data);
+
+ instance.addEventListener('click',function(e){
+
+ if(e.target.tagName.toLowerCase()=='a'&&e.target.parentNode.tagName.toLowerCase()=='footer'){
+ e.preventDefault();
+ getCoupon(e.target.href,e.target.rel);
+ };
+ },false);
+
+
+ instance.classList.remove('loading');
+
+};
+var FilteredList = function(instance,data){
+ var self = this;
+ this.data = null;
+ if(data.length==0){
+ instance.classList.add('empty');
+ instance.classList.remove('loading');
+ return;
+ };
+ var tpl = instance.getElementsByTagName('article')[0];
+ instance.removeChild(tpl);
+
+ this.pagination = new Pagination(instance.getElementsByClassName('pagination')[0],function(){
+ if(self.pagination.total<2)instance.classList.add('single');
+ else instance.classList.remove('single');
+
+ var from = (self.pagination.current-1)*5;
+ var to = from+4;
+ if(to>self.data.length-1)to = self.data.length-1;
+
+ self.show(from,to);
+ });
+
+ this.update = function(){
+ this.data = Categories.getActiveCatsData(data);
+
+ if(this.data.length==0){
+ instance.classList.add('empty');
+ this.pagination.refresh(1,1);
+ } else {
+ instance.classList.remove('empty');
+ this.pagination.refresh(1,Math.floor(this.data.length/5)+(this.data.length%5==0?0:1));
+ };
+ };
+
+ this.show = function(from,to){
+ instance.classList.add('loading');
+ //remove items
+ while(instance.getElementsByTagName('article').length>0)instance.removeChild(instance.getElementsByTagName('article')[0]);
+
+ var insert = instance.getElementsByClassName('pagination')[0];
+ for(var i=from;i<=to;i++){
+ var section = tpl.cloneNode(true);
+
+ this.fill(section,data[i])
+
+ if(i==to)section.classList.add('last');
+ instance.insertBefore(section,insert);
+ };
+
+ instance.classList.remove('loading');
+ };
+
+ this.update();
+
+ instance.addEventListener('click',function(e){
+
+ if(e.target.tagName.toLowerCase()=='a'&&e.target.parentNode.tagName.toLowerCase()=='footer'){
+ e.preventDefault();
+ getCoupon(e.target.href,e.target.rel);
+ };
+ },false);
+
+ instance.classList.remove('loading');
+};
+FilteredList.prototype.fill = PromotedList.prototype.fill = function(section, data){
+ section.getElementsByTagName('h1')[0].textContent = data.name;
+ section.getElementsByTagName('h2')[0].textContent = data.tag;
+ section.getElementsByTagName('p')[0].textContent = data.description;
+
+ var maxW = parseInt(window.getComputedStyle(document.querySelector('.brand img')).maxWidth);
+ var maxH = parseInt(window.getComputedStyle(document.querySelector('.brand img')).maxHeight);
+
+ var img = section.getElementsByTagName('img')[0];
+ img.style.opacity = 0;
+ img.onload = function(){
+ var ow = this.width;
+ var oh = this.height;
+ if(ow/oh>maxW/maxH){
+ var w = ow>maxW?maxW:ow;
+ this.style.width = w+'px';
+ this.style.marginTop = parseInt(maxH*0.5-w*oh/ow*0.5)+'px';
+ } else {
+ var h = oh>maxH?maxH:oh;
+ this.style.height = h+'px';
+ this.style.marginTop = parseInt(maxH*0.5-h/2)+'px';
+ };
+ this.style.opacity = 1;
+ };
+ img.src = data.logo;
+ img.alt = data.brand;
+ var link = section.getElementsByTagName('footer')[0].getElementsByTagName('a')[0];
+ link.href = "http://centrumkuponow.com/?a=2136980&r=" + data.id;
+
+ section.getElementsByTagName('dd')[0].textContent = data.ends;
+ if(data.isCoupon){
+ section.classList.add('coupon');
+ link.textContent = 'Pobierz kupon';
+ link.rel = "http://centrumkuponow.com/?a=2136980&c=" + data.id;
+ };
+}
+
+
+var Pagination = function(instance,onChange){
+ var tpl = {};
+ tpl.next = instance.getElementsByClassName('next')[0];
+ tpl.prev = instance.getElementsByClassName('prev')[0];
+ tpl.sep = instance.getElementsByClassName('sep')[0];
+ tpl.current = instance.getElementsByClassName('current')[0];
+ tpl.page = instance.getElementsByClassName('page')[0];
+
+ instance.removeChild(tpl.next);
+ instance.removeChild(tpl.prev);
+ instance.removeChild(tpl.sep);
+ instance.removeChild(tpl.current);
+ instance.removeChild(tpl.page);
+
+ var self = this;
+
+ this.total = 0;
+ this.current = 0;
+
+ this.refresh = function(current,total){
+ if(current<0)current = 0;
+ else if(current>total)current = total;
+
+ if(this.current!=current||this.total!=total){
+ this.current = current;
+ this.total = total;
+
+ this.build();
+ onChange();
+ };
+ };
+
+ this.build = function(){
+ instance.innerHTML = '';
+
+ if(this.total<2)return;//single
+
+
+ var pages = ['prev'];
+ for(var i=1;i<=this.total;i++)pages.push(i);
+ pages.push('next');
+
+ if(this.current==1)pages.shift();
+ if(this.current==this.total)pages.pop();
+
+ if(this.total==10&&this.current!=1&&this.current!=10){
+ pages[this.current>5?2:8]='sep';
+ pages.splice(this.current>5?3:9,1);
+ } else if(this.total>10){
+ var index = this.current==1?this.current:this.current+1;
+ if(index<6){
+ pages.splice(8,pages.length-11);
+ pages[pages.length-3] = 'sep';
+ } else if(index>this.total-5){
+ pages.splice(3,pages.length-11);
+ pages[2] = 'sep';
+ } else {
+ pages[2] = 'sep';
+ pages[pages.length-3] = 'sep';
+ pages.splice(3,pages.length-6,this.current+2);
+ pages.splice(3,0,this.current+1);
+ pages.splice(3,0,this.current);
+ pages.splice(3,0,this.current-1);
+ pages.splice(3,0,this.current-2);
+ };
+ };
+
+
+
+ for(var i=0;i<pages.length;i++)switch(pages[i]){
+ case 'prev': instance.appendChild(tpl.prev.cloneNode(true));break;
+ case 'next': instance.appendChild(tpl.next.cloneNode(true));break;
+ case 'sep': instance.appendChild(tpl.sep.cloneNode(true));break;
+ default: {
+ var p = pages[i]==this.current?tpl.current.cloneNode(true):tpl.page.cloneNode(true);
+ p.textContent = pages[i];
+ instance.appendChild(p);
+ }; break;
+ };
+
+ };
+
+ instance.addEventListener('click',function(e){
+ var link = e.target;
+
+ if(link.tagName.toLowerCase()!='span'&&!link.classList.contains('current')&&!link.classList.contains('sep'))return;
+
+ if(e.target.classList.contains('page'))self.refresh(parseInt(e.target.textContent),self.total);
+ else if(e.target.classList.contains('next'))self.refresh(self.current+1,self.total);
+ else if(e.target.classList.contains('prev'))self.refresh(self.current-1,self.total);
+
+ document.documentElement.scrollTop = 0;
+
+ e.preventDefault();
+ },false);
+
+};
+
+
+//initialize app
+window.addEventListener("DOMContentLoaded",function(e){
+ Categories = new Categories(document.getElementById('top'));
+},false);
+
+window.addEventListener("load",function(e){
+ Data = new Data('http://centrumkuponow.com/feed?a=2136980&foo='+(new Date()).getTime(),function(data){
+ PromotedList = new PromotedList(document.getElementById('promoted'),data);
+ FilteredList = new FilteredList(document.getElementById('filtered'),data);
+ });
+},false);
View
45 scripts/options.js
@@ -0,0 +1,45 @@
+//initialize app
+window.addEventListener("load",function(e){
+ var time = document.getElementById('intv');
+ time.value = widget.preferences.time;
+ time.addEventListener('change',function(e){
+ widget.preferences.time = this.value;
+
+ },false);
+
+
+
+ var checkboxes = document.getElementsByClassName('row')[1].getElementsByTagName('input');
+ var cl = checkboxes.length;
+
+ function update(){
+ var cats = widget.preferences.categories.split(',');
+
+ if(widget.preferences.categories.length==0)for(var c = 0;c<cl;c++)checkboxes[c].checked = true;
+ else for(var c = 0;c<cl;c++)checkboxes[c].checked = cats.indexOf(checkboxes[c].value)!=-1?true:false;
+ };
+ function save(){
+ var cats = [];
+ for(var c = 0;c<cl;c++)if(checkboxes[c].checked == true)cats.push(checkboxes[c].value);
+
+ if(cats.length==cl)widget.preferences.categories = '';
+ else widget.preferences.categories = cats.join(',');
+ };
+
+ for(var c = 0;c<cl;c++)checkboxes[c].addEventListener('change',function(){
+ var checked = this.checked;
+
+ update();
+
+ this.checked = checked;
+
+ save();
+
+ },false);
+
+ update();
+
+
+},false);
+
+
View
6 styles/fonts.css
6 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
49 styles/styles.css → styles/index.css
@@ -11,6 +11,8 @@ body{
font-size: 14px;
margin: 0;
padding: 0;
+ width: 100%;
+ height: 100%;
color: #948670;
line-height: 22px;
background-color: #fff;
@@ -25,10 +27,6 @@ body{
top: -9999px;
font-size: 0;
}
-body#sd{
- width: 100%;
- height: 100%;
-}
#logo{
display: none;
position: absolute;
@@ -85,6 +83,7 @@ body#sd{
padding: 0;
height: 66px;
overflow: hidden;
+ text-overflow: -o-ellipsis-lastline;
}
#list section h2{
font-family: AbrilFatfaceRegular;
@@ -134,39 +133,52 @@ body#sd{
padding-left: 42px;
background: transparent url(../images/coupon_ends.png) no-repeat 0 0;
}
-#sd .logoRight{
+.logoRight{
padding-right: 42px;
background: transparent url(../images/coupon_ends.png) no-repeat 100% 100%;
}
#list section .logo img{
display: inline-block;
- height: 100%;
- max-width: 100%;
+ max-height: 80px;
+ max-width: 306px;
}
@media (min-width: 460px){
- .loading #list section#current{
+ #list section.empty{
height: 260px;
background: transparent url(../images/ck_logo_280.png) no-repeat 50% 50%;
background-size: 280px 112px;
}
- .loading #list section#current header,
- .loading #list section#current p,
- .loading #list section#current .logoLeft{
+ #list section.empty header,
+ #list section.empty p,
+ #list section.empty .logoLeft{
visibility: hidden;
}
}
@media (max-width: 460px) and (min-width: 340px){
+ #list section.empty{
+ height: 180px;
+ background: transparent url(../images/ck_logo_280.png) no-repeat 50% 50%;
+ background-size: 280px 112px;
+ }
+ #list section.empty header,
+ #list section.empty p,
+ #list section.empty .logoLeft{
+ visibility: hidden;
+ }
#list{
width: 300px;
margin: -90px 0 0 -150px;
}
+ #list section .logo img{
+ max-width: 222px;
+ }
#list section p{
display: none;
}
}
@media (max-width: 340px){
- body#sd #bg{display: none;}
- body#sd{
+ body #bg{display: none;}
+ body{
display: block;
background: #ebe7e0 url(../images/lines_bg.png) repeat 50% 0;
}
@@ -197,4 +209,13 @@ body#sd{
background-image: url(../images/ck_logo_62.png);
background-size: 60px 24px;
}
-}
+}
+
+
+
+
+
+
+
+
+
View
420 styles/list.css
@@ -0,0 +1,420 @@
+html{
+ height: 100%;
+ margin: 0;
+ padding: 0;
+}
+body{
+ font-family: OpenSansRegular, Arial, sans-serif;
+ font-weight: normal;
+ font-size: 14px;
+ margin: 0;
+ padding: 0;
+ color: #948670;
+ line-height: 22px;
+ background-color: #fff;
+ height: 100%;
+}
+.clearfix:after{
+ display: block; visibility: hidden; clear: both;
+ height: 0;
+ content: ".";
+}
+.aural{
+ position: absolute;
+ top: -9999px;
+ font-size: 0;
+}
+a,a:focus,a:active{
+ color: #948670;
+ text-decoration: underline;
+}
+a:hover{
+ color: #948670;
+ text-decoration: none;
+}
+#wrapper{
+ min-height: 100%;
+ margin-bottom: -228px;
+}
+#push{
+ height: 228px;
+}
+#footer{
+ padding-top: 50px;
+ height: 178px;
+ background: transparent url(../images/footer_bg.jpg) repeat-x 50% 0;
+}
+#footer .col{
+ float: left;
+ padding-left: 62px;
+ background: transparent url(../images/opera_logo.png) no-repeat 0 50%;
+}
+#footer .colR{
+ float: right;
+}
+.wrap{
+ margin: 0 auto;
+ width: 960px;
+}
+#footer a{
+ font-weight: normal;
+ font-family: OpenSansBold;
+}
+#footer p{
+ margin: 0;
+ padding: 0;
+ line-height: 20px;
+}
+#header{
+ background: transparent url(../images/header_bg.jpg) repeat-x 50% 100%;
+ padding: 50px 0;
+ width: 100%;
+ overflow: hidden;
+}
+#header #logo{
+ position: relative;
+ width: 318px;
+ height: 127px;
+ margin: 0 auto 40px auto;
+}
+#header #logo::before{
+ position: absolute;
+ top: 36px;
+ right: 328px;
+ width: 3280px;
+ height: 32px;
+ background-color: transparent;
+ background-image: url(../images/header_hr_left.png), url(../images/scissors_header.png);
+ background-repeat: repeat-x, no-repeat;
+ background-position: 100% 100%, 2965px 0;
+ content: '';
+}
+#header #logo::after{
+ position: absolute;
+ top: 36px;
+ left: 328px;
+ width: 3280px;
+ height: 32px;
+ background-color: transparent;
+ background-image: url(../images/header_hr_right.png), url(../images/scissors_header.png);
+ background-repeat: repeat-x, no-repeat;
+ background-position: 0 100%, 280px 0;
+ content: '.';
+ text-indent: -9999px;
+}
+#top{
+ width: 730px;
+}
+#top dl{
+ margin: 0 auto;
+ width: 720px;
+}
+#top dl dt{
+ float: left;
+ height: 43px;
+ line-height: 43px;
+ font-weight: normal;
+ font-family: AbrilFatfaceRegular;
+ font-size: 18px;
+}
+#top dl dd{
+ position: relative;
+ overflow: hidden;
+ float: right;
+ width: 455px;
+ height: 43px;
+ line-height: 46px;
+ margin-left: 0;
+ padding: 0 56px 0 16px;
+ cursor: pointer;
+ color: #cf1f22;
+ font-family: OpenSansBold;
+ font-weight: normal;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ background: transparent url(../images/cat_input.png) no-repeat 0 0;
+}
+#top dl dd::after{
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 40px;
+ height: 43px;
+ cursor: pointer;
+ content: '';
+ text-indent: -9999px;
+ background: transparent url(../images/cat_input.png) no-repeat 0 -129px;
+}
+#top dl dd:hover::after{
+ background-position: 0 -172px;
+}
+#top.open dl dd::after{
+ background-position: 0 -43px;
+}
+#top.open dl dd:hover::after{
+ background-position: 0 -86px;
+}
+#summary{
+ display: none;
+ padding-top: 30px;
+}
+#top.open #summary{
+ display: block;
+}
+#summary .col{
+ float: left;
+ width: 220px;
+}
+#summary .colR{
+ width: 290px;
+}
+#summary span{
+ display: block;
+ line-height: 18px;
+ margin: 15px 5px 0 5px;
+ cursor: pointer;
+
+}
+#summary span:hover{
+ text-decoration: underline;
+}
+#summary span.selected{
+ padding-left: 22px;
+ font-family: OpenSansBold;
+ font-weight: normal;
+ text-decoration: underline;
+ background: transparent url(../images/cat_star.png) no-repeat 0 50%;
+}
+#content{
+ min-height: 300px;
+ padding-bottom: 60px;
+}
+.pagination{
+ border-top: 2px solid #ebe7e1;
+ margin: 4px 0 0 0;
+ padding: 30px 0 0 0;
+ text-align: center;
+}
+.single .pagination{
+ display: none;
+}
+.pagination span{
+ display: inline-block;
+ width: 43px;
+ height: 43px;
+ margin: 0 2px;
+ line-height: 43px;
+ font-family: OpenSansBold;
+ cursor: pointer;
+ background: transparent url(../images/pagination_bg.png) no-repeat 0 100%;
+}
+.pagination span:hover{
+ background-position: 0 0;
+ color: #fff;
+}
+.pagination span.current,.pagination span.current:hover{
+ background-position: 0 0;
+ color: #fff;
+ cursor: default;
+}
+.pagination span.sep,.pagination span.sep:hover{
+ background-image: none;
+ color: #948670;
+ margin: 0;
+ width: 30px;
+}
+.pagination span.prev{
+ position: relative;
+ margin: 0 34px 0 0;
+ text-indent: -9999px;
+ background-image: url(../images/pagination_arrows.png);
+ background-position: 0 0;
+}
+.pagination span.prev:hover{
+ background-position: 0 100%;
+}
+.pagination span.prev::after{
+ position: absolute;
+ width: 1px;
+ height: 29px;
+ top: 7px;
+ left: 60px;
+ background-color: #ebe7e1;
+ content: '';
+}
+.pagination span.next{
+ position: relative;
+ margin: 0 0 0 34px;
+ text-indent: -9999px;
+ background-image: url(../images/pagination_arrows.png);
+ background-position: 100% 0;
+}
+.pagination span.next:hover{
+ background-position: 100% 100%;
+}
+.pagination span.next::after{
+ position: absolute;
+ width: 1px;
+ height: 29px;
+ top: 7px;
+ right: 62px;
+ background-color: #ebe7e1;
+ content: '';
+}
+#content section > header{
+ overflow: hidden;
+ margin-top: 28px;
+ padding-top: 14px;
+ background: transparent url(../images/scissors_content.png) no-repeat 100% 6px;
+}
+#content section#promoted > header{
+ margin-top: 38px;
+}
+#content section > header h1{
+ font-family: AbrilFatfaceRegular;
+ font-weight: normal;
+ display: inline-block;
+ position: relative;
+ margin: 0;
+ padding: 0;
+ line-height: 38px;
+ font-size: 28px;
+}
+#content section#promoted > header h1{
+ color: #cf1f22;
+}
+#content section > header h1::after{
+ position: absolute;
+ left: 100%;
+ top: 50%;
+ width: 960px;
+ margin: -2px 0 0 8px;
+ height: 9px;
+ content: '';
+ background: transparent url(../images/hr_content.png) repeat-x 100% 0;
+}
+#content article{
+ position: relative;
+ padding: 28px 0;
+ background: transparent url(../images/hr.jpg) repeat-x -4px 100%;
+}
+#content article::before{
+ position: absolute;
+ display: block;
+ bottom: 3px;
+ right: 0;
+ width: 35px;
+ height: 22px;
+ content: '';
+ background: transparent url(../images/scissors_content.png) no-repeat 0 0;
+}
+#content #promoted article::before,#content section.single article.last::before{
+ display: none;
+}
+#content #promoted article.last,#content section.single article.last{
+ padding-bottom: 0;
+ background-image: none;
+}
+#content article header{
+ float: left;
+ width: 480px;
+ padding-top: 4px;
+}
+#content article h2{
+ margin: 0;
+ padding: 0;
+ line-height: 22px;
+ font-size: 18px;
+ font-weight: normal;
+ font-family: AbrilFatfaceRegular;
+}
+#content article h1{
+ margin: 0;
+ padding: 0;
+ font-size: 24px;
+ line-height: 26px;
+ color: #CF1F22;
+ font-weight: normal;
+ font-family: AbrilFatfaceRegular;
+}
+#content article p{
+ margin: 12px 0 0 0;
+}
+#content article footer{
+ float: right;
+ border-radius: 5px;
+ padding: 5px 5px 8px 5px;
+ border: 1px solid #d6cebf;
+ background: #fff url(../images/itembg.jpg) repeat-x 0 0;
+}
+#content article footer dl{
+ margin: 8px 0 0 0;
+ padding: 0;
+ font-size: 13px;
+ text-align: center;
+}
+#content article footer dl dt{
+ display: inline;
+ padding: 0 6px 0 0;
+ margin: 0;
+}
+#content article footer dl dd{
+ display: inline;
+ padding: 0;
+ margin: 0;
+ font-family: OpenSansBold;
+}
+#content article footer a{
+ display: block;
+ height: 47px;
+ width: 197px;
+ outline: none;
+ text-indent: -9999px;
+ background: transparent url(../images/buttons.png) no-repeat 0 0;
+}
+#content article footer a:hover{
+ background-position: 0 -47px;
+}
+#content article.coupon footer a{
+ width: 178px;
+ background-position: 0 -94px;
+}
+#content article.coupon footer a:hover{
+ background-position: 0 -141px;
+}
+#content article .brand{
+ float: left;
+ width: 198px;
+ height: 100px;
+ padding: 14px 0;
+ margin-right: 40px;
+ text-align: center;
+ overflow: hidden;
+ background: transparent url(../images/par_logo_bg.png) no-repeat 0 0;
+}
+#content article .brand img{
+ display: inline-block;
+ max-width: 140px;
+ max-height: 100px;
+}
+.loadingTxt,.emptyTxt{
+ display: none;
+ text-align: center;
+ margin: 0;
+ padding: 0;
+ line-height: 150px;
+ min-height: 150px;
+}
+.loading .loadingTxt{
+ display: block;
+}
+.loading article,.loading .pagination,.single .pagination{
+ display: none;
+}
+#content section#promoted.empty,#content section#filtered.empty .pagination,
+#content section#filtered.empty article,#content section#filtered.empty .loadingTxt{
+ display: none;
+}
+#content section#filtered.empty .emptyTxt{
+ display: block;
+}
View
75 styles/options.css
@@ -0,0 +1,75 @@
+html{
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+}
+body{
+ font-family: OpenSansRegular, Arial, sans-serif;
+ font-weight: normal;
+ overflow: hidden;
+ font-size: 14px;
+ margin: 0;
+ padding: 0;
+ color: #4a4a4a;
+ line-height: 22px;
+ background-color: #e3e3e3;
+}
+.clearfix:after{
+ display: block; visibility: hidden; clear: both;
+ height: 0;
+ content: ".";
+}
+.aural{
+ position: absolute;
+ top: -9999px;
+ font-size: 0;
+}
+
+.row{
+ margin: 0 0 15px 0;
+ border-radius: 5px;
+ box-shadow: 1px 3px 3px #cac3b9;
+ background-color: #fff;
+ padding: 24px 12px;
+}
+.form{
+ margin: 0 auto;
+ padding: 15px;
+ width: 440px;
+}
+@media (max-height: 400px){
+ .scroll{
+ height: 140px;
+ overflow-y: scroll;
+ }
+}
+h1{
+ font-size: 26px;
+ margin: 0 0 24px 0;
+ padding: 0;
+}
+label.cat{
+ float: left;
+ width: 140px;
+ font-size: 16px;
+ line-height: 20px;
+ font-weight: bold;
+}
+.items{
+ float: right;
+ width: 260px;
+}
+.itemRow{
+ margin-bottom: 4px;
+}
+.itemRow input{
+ float: left;
+ width: 15px;
+ height: 15px;
+}
+.itemRow label{
+ margin-left: 5px;
+ float: left;
+ width: 215px;
+}

0 comments on commit a2f23d8

Please sign in to comment.
Something went wrong with that request. Please try again.