Commit 86c29e75 authored by Sven Franck's avatar Sven Franck

clean up folder structure

parent f144c000
......@@ -8,11 +8,13 @@
, paths: {
// core
app: '../js/app'
, polyfill: '../js/polyfill'
, overrides: '../js/overrides'
, utilities: '../js/utilities'
, extensions: '../modules/extensions/extensions'
app: '../modules/core/app/app'
, config: '../modules/core/config/config'
, polyfill: '../modules/core/polyfill/polyfill'
, overrides: '../modules/core/overrides/overrides'
, utilities: '../modules/core/utilities/utilities'
, extensions: '../modules/core/extensions/extensions'
, storage: '../modules/core/storage/storage'
// requireJs
, almond: '../js/libs/require/almond'
......@@ -22,13 +24,15 @@
, json: '../js/plugins/requirejs-plugins/json'
, async: '../js/plugins/requirejs-plugins/async'
// support
, modernizr: '../js/plugins/modernizr'
, selectivzr: '../js/plugins/selectivzr'
// plugins/libs
, jquery: '../js/libs/jquery/jquery'
, jqm: '../js/libs/jquery-mobile/jquery-mobile'
, i18next: '../js/plugins/i18next/i18next'
, renderjs: '../js/plugins/renderjs/renderjs'
, modernizr: '../js/plugins/modernizr'
, selectivzr: '../js/plugins/selectivzr'
, jio: '../js/libs/jio/jio'
, md5: '../js/libs/jio/md5'
, localstorage: '../js/libs/jio/localstorage'
......@@ -37,36 +41,34 @@
, validval: '../js/plugins/validval/validval'
// page gadgets
, address: '../modules/address/address'
, basket: '../modules/basket/basket'
, browser: '../modules/browser/browser'
, config: '../modules/config/config'
, confirm: '../modules/confirm/confirm'
, description: '../modules/description/description'
, details: '../modules/details/details'
, footer: '../modules/footer/footer'
, gallery: '../modules/gallery/gallery'
, header: '../modules/header/header'
, index: '../modules/index/index'
, item: '../modules/item/item'
, items: '../modules/items/items'
, login: '../modules/login/login'
, media: '../modules/media/media'
, payment: '../modules/payment/payment'
, refine: '../modules/refine/refine'
, register: '../modules/register/register'
, products: '../modules/products/products'
, searchbar: '../modules/searchbar/searchbar'
, seo: '../modules/seo/seo'
, shipment: '../modules/shipment/shipment'
, sorting: '../modules/sorting/sorting'
, storage: '../modules/storage/storage'
, summary: '../modules/summary/summary'
, teaser: '../modules/teaser/teaser'
, terms: '../modules/terms/terms'
, translate: '../modules/translate/translate'
, pageheader: '../modules/pageheader/pageheader'
, pagefooter: '../modules/pagefooter/pagefooter'
, address: '../modules/ui/address/address'
, basket: '../modules/ui/basket/basket'
, browser: '../modules/ui/browser/browser'
, confirm: '../modules/ui/confirm/confirm'
, description: '../modules/ui/description/description'
, details: '../modules/ui/details/details'
, footer: '../modules/ui/footer/footer'
, gallery: '../modules/ui/gallery/gallery'
, header: '../modules/ui/header/header'
, index: '../modules/ui/index/index'
, item: '../modules/ui/item/item'
, items: '../modules/ui/items/items'
, login: '../modules/ui/login/login'
, media: '../modules/ui/media/media'
, payment: '../modules/ui/payment/payment'
, refine: '../modules/ui/refine/refine'
, register: '../modules/ui/register/register'
, products: '../modules/ui/products/products'
, searchbar: '../modules/ui/searchbar/searchbar'
, seo: '../modules/ui/seo/seo'
, shipment: '../modules/ui/shipment/shipment'
, sorting: '../modules/ui/sorting/sorting'
, summary: '../modules/ui/summary/summary'
, teaser: '../modules/ui/teaser/teaser'
, terms: '../modules/ui/terms/terms'
, translate: '../modules/ui/translate/translate'
, pageheader: '../modules/ui/pageheader/pageheader'
, pagefooter: '../modules/ui/pagefooter/pagefooter'
}
, shim: {
'jqm': { deps: ['jquery'], exports: 'mobile' }
......
File mode changed from 100755 to 100644
/* =========================== action button ========================*/
.ui-input-search-no-pseudo:after {
content: none;
}
.ui-input-search .ui-input-action {
position: absolute;
right: 0;
top: 50%;
margin: -15px .3125em 0;
border: 0;
background-color: transparent;
}
/* =========================== carousel widget ========================*/
.ui-carousel {
list-style: none outside none;
margin: 0 auto;
padding: 0;
position: relative;
text-align: center;
width: auto;
min-height: 25em;
overflow: hidden; /* firefox seems the only browser to properly overflow-hide round corners... */
margin: 0 -15px;
}
.ui-carousel-inset {
margin: 1em auto;
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
border-radius: 1em;
}
.ui-carousel li {
list-style: none;
width: 100%;
position: absolute;
display: none;
height: 100%;
-webkit-border-radius: inherit;
-moz-border-radius: inherit;
border-radius: inherit;
overflow: inherit;
min-height: inherit;
}
.ui-carousel li.ui-carousel-transitioning {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.ui-carousel li.ui-carousel-active {
display: block;
}
.ui-carousel li a {
height: inherit;
-webkit-border-radius: inherit;
-moz-border-radius: inherit;
border-radius: inherit;
overflow: inherit;
min-height: inherit;
}
.ui-carousel img {
width: 100%;
display: block;
-webkit-border-radius: inherit;
-moz-border-radius: inherit;
border-radius: inherit;
min-height: inherit;
}
.ui-carousel-controls {
text-align: center;
}
.ui-carousel-controls .ui-radio {
display: inline-block;
padding: 0 0.25em;
}
.ui-carousel-controls .ui-radio input:checked {
border: 1px solid red !important;
}
.ui-carousel-captions .ui-carousel-captions-heading {
margin: 0;
padding: 0;
}
.ui-carousel-captions-content {
left: 0;
margin: 0;
padding: 0.5em 0;
position: absolute;
right: 0;
}
.ui-carousel-captions-bottom {
bottom: 0;
}
.ui-carousel-captions-top {
top: 0;
}
@media (max-width: 77.5em) {
.ui-carousel.ui-responsive {
max-width: 80%;
}
}
@media (max-width: 45em) {
.ui-carousel.ui-responsive {
max-width: 85%;
}
}
@media (max-width: 40em) {
.ui-carousel.ui-responsive {
max-width: 90%;
}
}
@media (max-width: 30em) {
.ui-carousel.ui-responsive {
max-width: 90%;
}
}
@media (max-width: 20em) {
.ui-carousel.ui-responsive {
max-width: 90%;
}
}
\ No newline at end of file
This diff is collapsed.
/* ============================ CAROUSEL WIDGET ========================== */
(function( $, undefined ) {
"use strict";
$.widget("mobile.carousel", $.mobile.widget, {
options: {
bullets: null,
bulletsPos: null,
inset: null,
captions: null,
captionpos: null,
captiontheme: null,
carouseltransition: null,
heading: "h1,h2,h3,h4,h5,h6,legend"
},
_transitionEndEvents : "webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd",
_create: function () {
var el = this.element[0],
o = this.options,
getAttrFixed = $.mobile.getAttribute;
// only time we read the DOM config
o.inset = getAttrFixed(el, "inset", true) || false;
o.carouseltransition = getAttrFixed(el, "transition", true) || "slide";
o.bullets = getAttrFixed(el, "bullets", true) || true;
o.captions = getAttrFixed(el, "captions", true) || false;
if (o.captions) {
o.captionspos = getAttrFixed(el, "captions-pos", true) || "bottom";
o.captionstheme = getAttrFixed(el, "captions-theme", true) || "a";
}
if (o.bullets) {
o.bulletsPos = getAttrFixed(el, "bulletsPos", true) || "bottom";
}
this.refresh(true);
},
refresh: function (create) {
var o = this.options,
el = this.element,
items = el.children(),
fragment = document.createDocumentFragment(),
classes = "ui-carousel",
label,
radio,
barrel,
item,
i,
transition,
containsLinks,
captionsContent,
captionsHeading;
// loop over images
for (i = 0; i < items.length; i += 1) {
var item = items[i];
// create captions
if (o.captions) {
containsLinks = item.children.length === 1 && item.children[0].tagName === "A";
captionsContent = $( item )
.find(containsLinks ? "a *" : "*")
.not("img")
.wrap( "<div class='ui-carousel-captions-content ui-bar-" + o.captionstheme + " ui-carousel-captions-" + o.captionspos + "'></div>")
.parent();
captionsHeading = captionsContent.find(o.heading).addClass("ui-carousel-captions-heading");
}
// create radios
if (o.bullets) {
// TODO: do this in jQuery...
radio = document.createElement("input");
radio.setAttribute("type", 'radio');
radio.setAttribute("name", 'radio-' + this.uuid );
radio.setAttribute("value",'radio-' + this.uuid + '-' + i);
if (i === 0) {
radio.checked = true;
$(item).addClass("ui-carousel-active");
}
// and use data()
radio.reference = $(item);
label = document.createElement("label");
label.setAttribute("data-" + $.mobile.ns + "iconpos", "notext");
label.appendChild( radio );
fragment.appendChild( label )
}
}
if (o.inset) {
classes += " ui-carousel-inset";
}
if (o.captions) {
classes += " ui-carousel-captions";
}
if (o.bullets) {
classes += " ui-carousel-bullets";
barrel = $("<div class='ui-carousel-controls ui-carousel-controls-" + o.bulletPos +"' />");
while ( fragment.firstChild ) {
// browser hangs up if calling this inside append()
$(fragment.firstChild).children().checkboxradio();
barrel.append(
fragment.firstChild
);
}
// this always needs to go before the slider
el[o.bulletPos === "top" ? "before" : "after"](barrel);
this._on(barrel.find("input"), { change: "_onChange"});
}
// all set, add classes
el.addClass(classes);
},
// _handleKeydown: function( event ) {
// var index = this._value();
// if ( this.options.disabled ) {
// return;
// }
//
// // In all cases prevent the default and mark the handle as active
// switch ( event.keyCode ) {
// case $.mobile.keyCode.RIGHT:
// case $.mobile.keyCode.LEFT:
// event.preventDefault();
//
// if ( !this._keySliding ) {
// this._keySliding = true;
// this.handle.addClass( "ui-state-active" ); /* TODO: We don't use this class for styling. Do we need to add it? */
// }
//
// break;
// }
//
// // move the slider according to the keypress
// switch ( event.keyCode ) {
// case $.mobile.keyCode.RIGHT:
// this.refresh( index + this.step );
// break;
// case $.mobile.keyCode.LEFT:
// this.refresh( index - this.step );
// break;
// }
// }, // remove active mark
//
// _handleKeyup: function(/* event */) {
// if ( this._keySliding ) {
// this._keySliding = false;
// this.handle.removeClass( "ui-state-active" ); /* See comment above. */
// }
// },
// _bindSwipeEvents: function() {
// var self = this,
// area = self.element;
//
// // on swipe, change to the next/previous image
// if( !!self.options.swipeClose ) {
// if ( self.options.position === "left" ) {
// area.on( "swipeleft.carousel", function(/* e */) {
// // self.close();
// });
// } else {
// area.on( "swiperight.carousel", function(/* e */) {
// // self.close();
// });
// }
// }
// },
_completeTransition: function (current, next, events) {
var self = this,
o = self.options;
console.log("3. NEXT: removing 'in out slide'")
next.removeClass("in out " + o.carouseltransition)
.off( events );
console.log("4. CURRENT: setting bindings");
current
.on( events, self._cleanupTransition(current, events) )
},
_cleanupTransition: function (current, events) {
var self = this,
o = self.options;
var classes = o.carouseltransition + " out in";
console.log("5. CURRENT: removing 'in out slide'");
current.removeClass(classes)
console.log("6. CURRENT: removing 'active'");
current.removeClass("ui-carousel-active").off(events);
},
_onChange: function (e) {
var self = this,
events = self._transitionEndEvents,
el = self.element,
o = self.options,
// elements
currentActive = el.children().filter(".ui-carousel-active"),
nextActive = e.target.reference,
classes = o.carouseltransition + " out in",
transition = $.mobile._maybeDegradeTransition( o.carouseltransition );
// click on active radio
if (nextActive.hasClass("ui-carousel-active")) {
return;
}
// initialize
nextActive
.on( events, self._completeTransition(currentActive, nextActive, events));
console.log("2. NEXT: adding 'slide in active'");
nextActive
.addClass(transition + " ui-carousel-active in ");
}
});
$.mobile.carousel.initSelector = ":jqmData(role='carousel')";
//auto self-init widgets
$.mobile._enhancer.add( "mobile.carousel" );
})( jQuery );
/* tranistion workflow
// first slide
if (init) {
current.removeClass("ui-carousel-active in out reverse slide")
next.css('z-index','-10')
.addClass("ui-carousel-active ui-carousel-opaque")
.css('z-index','')
if (transition !== "none") {
// > once animation is complete!
// current.removeClass("ui-carousel-active in out reverse slide")
// next.removeClass("out in reverse slide")
next.removeClass("ui-carousel-opaque")
.addClass("slide in reverse")
} else {
current.removeClass("ui-carousel-active in out reverse slide")
next.removeClass("out in reverse slide")
}
} else {
// > once animation is complete
current.removeClass("ui-carousel-active in out reverse slide")
next.css('z-index','-10')
.addClass("ui-carousel-active ui-carousel-opaque")
.css('z-index','')
if (transition !== "none") {
// > once animation is complete!
// current.removeClass("ui-carousel-active in out reverse slide")
// next.removeClass("out in reverse slide")
next.removeClass("ui-carousel-opaque")
.addClass("slide in reverse")
} else {
current.removeClass("ui-carousel-active in out reverse slide")
next.removeClass("out in reverse slide")
}
current.addClass("slide out reverse");
}
*/
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment