Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into ui_ux_changes
This commit is contained in:
BIN
app/assets/images/slider/s1.jpg
Normal file
BIN
app/assets/images/slider/s1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 199 KiB |
BIN
app/assets/images/slider/s2.jpg
Normal file
BIN
app/assets/images/slider/s2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
BIN
app/assets/images/slider/s3.jpg
Normal file
BIN
app/assets/images/slider/s3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
BIN
app/assets/images/slider/s4.jpg
Normal file
BIN
app/assets/images/slider/s4.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -366,6 +366,10 @@ $(function() {
|
||||
var items = $('.selected-instance');
|
||||
|
||||
if (items.length >= min_qty) {
|
||||
|
||||
item = get_set_item(items);
|
||||
customer_display_view(item,"set_add");
|
||||
|
||||
attribute_arr = []
|
||||
option_arr = []
|
||||
|
||||
@@ -400,6 +404,7 @@ $(function() {
|
||||
price = $(items[i]).attr('data-price');
|
||||
option = $(items[i]).attr('data-options');
|
||||
sub_item = $(items[i]).attr('data-sub-item');
|
||||
option = $(items[i]).attr('data-options');
|
||||
total = qty * price ;
|
||||
option_arr.push(option);
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
@@ -684,6 +689,8 @@ $(function() {
|
||||
$('.add_to_order').attr('data-attributes',JSON.stringify(attribute_arr));
|
||||
$('.add_to_order').attr('data-options',JSON.stringify(option_arr));
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data);
|
||||
customer_display_view(item,"add");
|
||||
show_item_detail(item_data);
|
||||
calculate_sub_total();
|
||||
|
||||
@@ -692,6 +699,8 @@ $(function() {
|
||||
// click plus icon for add
|
||||
$(document).on('click', '.add_icon', function(event){
|
||||
var item_data = $(this);
|
||||
item = get_item(item_data);
|
||||
customer_display_view(item,"add");
|
||||
show_item_detail(item_data);
|
||||
calculate_sub_total();
|
||||
}); //End Add Icon Click
|
||||
@@ -709,14 +718,22 @@ $(function() {
|
||||
instance = "("+data.attr('data-instance')+")";
|
||||
}
|
||||
|
||||
d_option = data.attr('data-options');
|
||||
if (d_option){
|
||||
option_name = "-"+data.attr('data-options');
|
||||
}else{
|
||||
option_name = '';
|
||||
}
|
||||
|
||||
var rowCount = $('.summary-items tbody tr').length+1;
|
||||
var item_row = $('.summary-items tbody tr');
|
||||
|
||||
$(item_row).each(function(i){
|
||||
item_code = $(item_row[i]).attr('data-code');
|
||||
instance_code = $(item_row[i]).attr('data-instance-code');
|
||||
r_option = $(item_row[i]).attr('data-options');
|
||||
|
||||
if (item_code == data.attr('data-item-code') && instance_code == data.attr('data-instance-code')) {
|
||||
if (item_code == data.attr('data-item-code') && instance_code == data.attr('data-instance-code')&&r_option==d_option) {
|
||||
if (qty > 1) {
|
||||
qty = parseInt($(item_row[i]).children('#item_qty').text()) + qty;
|
||||
}else{
|
||||
@@ -742,7 +759,7 @@ $(function() {
|
||||
+data.attr('data-attributes')+"' data-options ='"
|
||||
+data.attr('data-options')+"' data-row ='"+rowCount+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + data.attr('data-name')+ ' ' + instance +'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + data.attr('data-name')+ ' ' + instance +' ' + option_name +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(price).toFixed(2)
|
||||
@@ -759,17 +776,17 @@ $(function() {
|
||||
e.preventDefault();
|
||||
$("#oqs_loading_wrapper").show();
|
||||
|
||||
type = window.location.href.indexOf("quick_service");
|
||||
if (type != -1) {
|
||||
quick_service = window.location.href.indexOf("quick_service");
|
||||
if (quick_service != -1) {
|
||||
type = 'quick_service'
|
||||
var table_type = $('#table_type').text();
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').val();
|
||||
var customer_id = $('#customer_id').val();
|
||||
var booking_id = $('#booking_id').text();
|
||||
var ajax_url = 'addorders/create';
|
||||
}else{
|
||||
type = 'cashier'
|
||||
var table_type = $('#table_type').text();
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').text();
|
||||
var customer_id = $('#customer_id').text();
|
||||
var booking_id = $('#booking_id').text();
|
||||
@@ -795,17 +812,20 @@ $(function() {
|
||||
url: ajax_url,
|
||||
data: params,
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
success:function(result){
|
||||
console.log(type)
|
||||
console.log(table_type)
|
||||
if (type == "quick_service") {
|
||||
window.location.href = "/origami/quick_service"
|
||||
window.location.href = "/origami/quick_service"
|
||||
}else{
|
||||
if(table_type == "Table"){
|
||||
window.location.href = "/origami/table/" + table_id
|
||||
window.location.href = "/origami/table/" + table_id
|
||||
}
|
||||
else {
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
window.location.href = "/origami/room/" + table_id
|
||||
}
|
||||
}
|
||||
customer_display_view(null,"reload");
|
||||
}
|
||||
});
|
||||
// }else{
|
||||
@@ -824,9 +844,7 @@ $(function() {
|
||||
type = "quick_service"
|
||||
modify_order = window.location.href.indexOf("modify_order");
|
||||
$("#oqs_loading_wrapper").show();
|
||||
console.log(modify_order)
|
||||
if (modify_order !=-1) {
|
||||
console.log($('#sale_id').text())
|
||||
var ajax_url = '../../../quick_service/update_modify_order';
|
||||
var table_type = $('#table_type').text();
|
||||
var table_id = $('#table_id').text();
|
||||
@@ -861,7 +879,6 @@ $(function() {
|
||||
data: params,
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
console.log(result)
|
||||
if (result.status) {
|
||||
if (result.data == null){
|
||||
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
|
||||
@@ -1152,6 +1169,67 @@ $(function() {
|
||||
});
|
||||
//end Ajax
|
||||
}
|
||||
|
||||
/* Get Item rows */
|
||||
function get_item(data){
|
||||
var sale_items = [];
|
||||
|
||||
var sale_item = {};
|
||||
sale_item.qty = parseInt(data.attr('data-qty'))
|
||||
sale_item.name = data.attr('data-name');
|
||||
sale_item.price = data.attr('data-price');
|
||||
sale_item.item_code = data.attr('data-item-code')
|
||||
sale_item.instance_code = data.attr('data-instance-code')
|
||||
sale_item.attributes = data.attr('data-attributes')
|
||||
sale_item.options = data.attr('data-options')
|
||||
sale_item.instance = data.attr('data-instance')
|
||||
sale_items.push(sale_item);
|
||||
|
||||
return sale_items;
|
||||
}
|
||||
|
||||
/* Get Item rows */
|
||||
function get_set_item(items){
|
||||
var sale_items = [];
|
||||
var item = {};
|
||||
item.code = $('.set-item').attr('data-code');
|
||||
item.name = $('.set-item').attr('data-name');
|
||||
item.item_name = $('#set_name').text();
|
||||
item.qty = parseInt($('#set_count').val());
|
||||
item.item_code = $('#set_item_code').text();
|
||||
item.price = $('.set-item').attr('data-price');
|
||||
item.option = $('.set-item').attr('data-options');
|
||||
item.parent = $('.set-item').attr('data-parent');
|
||||
|
||||
sale_items.push(item);
|
||||
|
||||
$(items).each(function(i){
|
||||
var sale_item = {};
|
||||
sale_item.code = $(items[i]).attr('data-code');
|
||||
sale_item.name = $(items[i]).attr('data-name');
|
||||
sale_item.item_name = $('#set_name').text();
|
||||
sale_item.qty = parseInt($('#set_count').val());
|
||||
sale_item.item_code = $('#set_item_code').text();
|
||||
sale_item.price = $(items[i]).attr('data-price');
|
||||
sale_item.option = $(items[i]).attr('data-options');
|
||||
sale_item.sub_item = $(items[i]).attr('data-sub-item');
|
||||
sale_items.push(sale_item);
|
||||
});
|
||||
|
||||
|
||||
return sale_items;
|
||||
}
|
||||
|
||||
function customer_display_view(data,status) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '../../origami/customer_view',
|
||||
data: {"data":data,"status":status},
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
}
|
||||
});
|
||||
}
|
||||
/* $("input").keypress(function(){
|
||||
$("span").text(i += 1);
|
||||
});*/
|
||||
|
||||
38
app/assets/javascripts/channels/second_display.js
Normal file
38
app/assets/javascripts/channels/second_display.js
Normal file
@@ -0,0 +1,38 @@
|
||||
App.checkin = App.cable.subscriptions.create('SecondDisplayChannel', {
|
||||
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
|
||||
|
||||
connected: function() {},
|
||||
|
||||
disconnected: function() {},
|
||||
|
||||
received: function(data) {
|
||||
var data_obj = data.data;
|
||||
var status = data.status;
|
||||
var count = 0
|
||||
var sub_total = 0
|
||||
if (data.status == "order") {
|
||||
for(var i in data_obj) {
|
||||
|
||||
sub_total = sub_total + (data_obj[i].price * data_obj[i].qty)
|
||||
count += 1
|
||||
row ='<tr>'
|
||||
+'<td>'+count+'</td>'
|
||||
+'<td class="item-name">'+data_obj[i].item_name+'</td>'
|
||||
+'<td class="item-attr">'+data_obj[i].qty +'</td>'
|
||||
+ '<td class="item-attr">'+data_obj[i].qty*data_obj[i].price +'</td>'
|
||||
+'</tr>'
|
||||
$(".second_display_items").append(row);
|
||||
}//end looping
|
||||
}else{
|
||||
$('#s_sub_total').empty();
|
||||
$('#s_sub_total').append(data_obj.total_amount);
|
||||
$('#s_total_discount').empty();
|
||||
$('#s_total_discount').append(data_obj.total_discount);
|
||||
$('#s_tatal_tax').empty();
|
||||
$('#s_tatal_tax').append(data_obj.total_tax);
|
||||
$('#s_grand_total').empty();
|
||||
$('#s_grand_total').append(data_obj.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
156
app/assets/javascripts/channels/second_display_view.js
Normal file
156
app/assets/javascripts/channels/second_display_view.js
Normal file
@@ -0,0 +1,156 @@
|
||||
App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
||||
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
|
||||
|
||||
connected: function() {},
|
||||
|
||||
disconnected: function() {},
|
||||
|
||||
received: function(data) {
|
||||
var items = data.data;
|
||||
var tax = data.tax_profiles;
|
||||
var status= data.status
|
||||
if (status == "reload") {
|
||||
jQuery('#s_reload').click();
|
||||
}
|
||||
$('#second_display_slider').addClass("hidden")
|
||||
$('#second_display_items').removeClass("hidden")
|
||||
|
||||
|
||||
// append items
|
||||
if (status == "add") {
|
||||
for(var i in items) {
|
||||
qty = parseInt(items[i].qty);
|
||||
append = 0;
|
||||
price = items[i].price;
|
||||
|
||||
instance_name = items[i].instance;
|
||||
if (instance_name == "undefined"){
|
||||
instance = '';
|
||||
}else{
|
||||
instance = "("+items[i].instance+")";
|
||||
}
|
||||
|
||||
d_option = items[i].options;
|
||||
if (d_option){
|
||||
option_name = "-"+items[i].options;
|
||||
}else{
|
||||
option_name = '';
|
||||
}
|
||||
|
||||
var rowCount = $('.second_display_items tbody tr').length+1;
|
||||
var item_row = $('.second_display_items tbody tr');
|
||||
|
||||
$(item_row).each(function(j){
|
||||
var item_code = $(item_row[j]).attr('data-code');
|
||||
var instance_code = $(item_row[j]).attr('data-instance-code');
|
||||
var r_option = $(item_row[j]).attr('data-options');
|
||||
if (item_code == items[i].item_code && instance_code == items[i].instance_code && r_option==d_option) {
|
||||
if (qty > 1) {
|
||||
qty = parseInt($(item_row[j]).children('#item_qty').text()) + qty;
|
||||
}else{
|
||||
qty = parseInt($(item_row[j]).children('#item_qty').text()) + 1;
|
||||
}
|
||||
|
||||
$(item_row[j]).children('#item_qty').text(qty);
|
||||
parseFloat($(item_row[j]).children('#item_price').text(parseFloat(price*qty).toFixed(2)));
|
||||
append =1;
|
||||
}else{
|
||||
if (qty > 1) {
|
||||
qty = qty;
|
||||
}else{
|
||||
qty = 1;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (append===0) {
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' 'data-instance ='"
|
||||
+instance+ "' data-code='"+items[i].item_code+"' data-instance-code='"
|
||||
+items[i].instance_code+"' data-attributes='"
|
||||
+items[i].attributes+"' data-options ='"
|
||||
+items[i].options+"' data-row ='"+rowCount+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + items[i].name+ ' ' + instance + ' ' + option_name +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(price).toFixed(2)
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".second_display_items tbody").append(row);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (status == "set_add") {
|
||||
// var option_arr = [];
|
||||
var attribute_arr = [];
|
||||
var rowCount = $('.second_display_items tbody tr').length+1;
|
||||
for(var i in items) {
|
||||
code = items[i].code;
|
||||
item_code = items[i].item_code;
|
||||
name = items[i].name;
|
||||
item_name = items[i].item_name;
|
||||
qty = items[i].qty;
|
||||
price = items[i].price;
|
||||
option = items[i].option;
|
||||
sub_item = items[i].sub_item;
|
||||
total = qty * price ;
|
||||
// option_arr.push(option);
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
+option+"' data-row ='"+rowCount+ "' data-sub-item ='"+sub_item+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name + ''+option+'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(total).toFixed(2)
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".second_display_items tbody").append(row);
|
||||
rowCount = rowCount + 1;
|
||||
|
||||
}
|
||||
}
|
||||
//end apend items
|
||||
var total_price = 0;
|
||||
var taxable_amount = 0;
|
||||
var total_discount = 0
|
||||
var total_tax_amount = 0
|
||||
var item_row = $('.second_display_items tbody tr');
|
||||
//calculate Sub Total
|
||||
$(item_row).each(function(i){
|
||||
var unit_price = parseFloat($(item_row[i]).attr('data-price'));
|
||||
var qty = parseFloat($(item_row[i]).children('#item_qty').text());
|
||||
total_price += qty*unit_price;
|
||||
});
|
||||
//calculate Tax Amount
|
||||
for(var i in tax) {
|
||||
// substract , to give after discount
|
||||
var total_tax = total_price - total_discount
|
||||
// include or execulive
|
||||
if (tax[i].inclusive){
|
||||
rate = tax[i].rate
|
||||
divided_value = (100 + rate)/rate
|
||||
total_tax_amount = total_tax_amount + (total_tax / divided_value)
|
||||
}else{
|
||||
total_tax_amount = total_tax_amount + (total_tax * tax[i].rate / 100)
|
||||
}
|
||||
}
|
||||
//end calculate Tax amount
|
||||
var fixed_total_price = parseFloat(total_price).toFixed(2);
|
||||
var fixed_taxable_amount = parseFloat(total_tax_amount).toFixed(2);
|
||||
var fixed_grand_total = parseFloat(total_price + total_tax_amount).toFixed(2);
|
||||
|
||||
$('#s_sub_total').empty();
|
||||
$('#s_sub_total').append(fixed_total_price);
|
||||
$('#s_tatal_tax').empty();
|
||||
$('#s_tatal_tax').append(fixed_taxable_amount);
|
||||
$('#s_grand_total').empty();
|
||||
$('#s_grand_total').append(fixed_grand_total);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
1
app/assets/javascripts/wow_script.js
Normal file
1
app/assets/javascripts/wow_script.js
Normal file
@@ -0,0 +1 @@
|
||||
jQuery("#wowslider-container").wowSlider({effect:"rotate",prev:"",next:"",duration:20*100,delay:20*100,width:580,height:212,autoPlay:true,stopOnHover:false,loop:false,bullets:true,caption:true,captionEffect:"slide",controls:true,logo:"",images:0});
|
||||
337
app/assets/javascripts/wowslider.js
Normal file
337
app/assets/javascripts/wowslider.js
Normal file
@@ -0,0 +1,337 @@
|
||||
// -----------------------------------------------------------------------------------
|
||||
// http://wowslider.com/
|
||||
// JavaScript Wow Slider is a free software that helps you easily generate delicious
|
||||
// slideshows with gorgeous transition effects, in a few clicks without writing a single line of code.
|
||||
// Generated by WOW Slider 2.7
|
||||
jQuery.fn.wowSlider = function (d) {
|
||||
var e = jQuery;
|
||||
var h = this;
|
||||
var t = h.get(0);
|
||||
d = e.extend({
|
||||
prev: "",
|
||||
next: "",
|
||||
duration: 1000,
|
||||
delay: 20 * 100,
|
||||
width: 960,
|
||||
height: 360,
|
||||
controls: true,
|
||||
autoPlay: true,
|
||||
bullets: true,
|
||||
}, d);
|
||||
var a = e(".ws_images", h);
|
||||
var l = a.find("ul");
|
||||
|
||||
function u(D) {
|
||||
l.css({
|
||||
left: -D + "00%"
|
||||
})
|
||||
}
|
||||
e("<div>")
|
||||
.css({
|
||||
width: "100%",
|
||||
visibility: "hidden",
|
||||
"font-size": 0,
|
||||
"line-height": 0
|
||||
})
|
||||
.append(a.find("li:first img:first")
|
||||
.clone()
|
||||
.css({
|
||||
width: "100%"
|
||||
}))
|
||||
.prependTo(a);
|
||||
l.css({
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
animation: "none",
|
||||
"-moz-animation": "none",
|
||||
"-webkit-animation": "none"
|
||||
});
|
||||
var m = a.find("li");
|
||||
var v = m.length;
|
||||
|
||||
function i(D) {
|
||||
return ((D || 0) + v) % v
|
||||
}
|
||||
var C = navigator.userAgent;
|
||||
if ((e.browser.msie && parseInt(e.browser.version, 10) < 8) || (/Safari/.test(C))) {
|
||||
var b = Math.pow(10, Math.ceil(Math.LOG10E * Math.log(v)));
|
||||
l.css({
|
||||
width: b + "00%"
|
||||
});
|
||||
m.css({
|
||||
width: 100 / b + "%"
|
||||
})
|
||||
} else {
|
||||
l.css({
|
||||
width: v + "00%",
|
||||
display: "table"
|
||||
});
|
||||
m.css({
|
||||
display: "table-cell",
|
||||
"float": "none",
|
||||
width: "auto"
|
||||
})
|
||||
}
|
||||
u(0);
|
||||
var k = [];
|
||||
m.each(function (D) {
|
||||
var F = e(">img:first,>a:first,>div:first", this)
|
||||
.get(0);
|
||||
var G = e("<div></div>");
|
||||
for (var E = 0; E < this.childNodes.length;) {
|
||||
if (this.childNodes[E] != F) {
|
||||
G.append(this.childNodes[E])
|
||||
} else {
|
||||
E++
|
||||
}
|
||||
}
|
||||
if (!e(this)
|
||||
.data("descr")) {
|
||||
e(this)
|
||||
.data("descr", G.html()
|
||||
.replace(/^\s+|\s+$/g, ""))
|
||||
}
|
||||
e(this)
|
||||
.css({
|
||||
"font-size": 0
|
||||
});
|
||||
k[k.length] = e(">a>img", this)
|
||||
.get(0) || e(">*", this)
|
||||
.get(0)
|
||||
});
|
||||
k = e(k);
|
||||
k.css("visibility", "visible");
|
||||
|
||||
function f(F, D, E) {
|
||||
this.go = function (G) {
|
||||
E.find("ul")
|
||||
.stop(true)
|
||||
.animate({
|
||||
left: (G ? -G + "00%" : (/Safari/.test(navigator.userAgent) ? "0%" : 0))
|
||||
}, F.duration, "easeInOutExpo");
|
||||
return G
|
||||
}
|
||||
}
|
||||
var o = new f(d, k, a);
|
||||
var c = 0;
|
||||
|
||||
function r(F, E, D) {
|
||||
if (isNaN(F)) {
|
||||
F = c + 1
|
||||
}
|
||||
F = i(F);
|
||||
if (c == F) {
|
||||
return
|
||||
}
|
||||
s(F, E, D)
|
||||
}
|
||||
function s(F, E, D) {
|
||||
var F = o.go(F, c, E, D);
|
||||
if (F < 0) {
|
||||
return
|
||||
}
|
||||
q(F);
|
||||
j(m[F]);
|
||||
c = F;
|
||||
z()
|
||||
}
|
||||
var B = h.find(".ws_bullets");
|
||||
|
||||
function q(D) {
|
||||
if (B.length) {
|
||||
n(D)
|
||||
}
|
||||
}
|
||||
var p;
|
||||
|
||||
function z(D) {
|
||||
w();
|
||||
if (d.autoPlay) {
|
||||
p = setTimeout(function () {
|
||||
r()
|
||||
}, d.delay + (D ? 0 : d.duration))
|
||||
}
|
||||
}
|
||||
function w() {
|
||||
if (p) {
|
||||
clearTimeout(p)
|
||||
}
|
||||
p = null
|
||||
}
|
||||
function y(G, F, E, D) {
|
||||
w();
|
||||
G.preventDefault();
|
||||
r(F, E, D);
|
||||
z()
|
||||
}
|
||||
if (d.controls) {
|
||||
var x = e('<a href="#" class="ws_next">' + d.next + "</a>");
|
||||
var g = e('<a href="#" class="ws_prev">' + d.prev + "</a>");
|
||||
h.append(x);
|
||||
h.append(g);
|
||||
x.bind("click", function (D) {
|
||||
y(D, c + 1)
|
||||
});
|
||||
g.bind("click", function (D) {
|
||||
y(D, c - 1)
|
||||
})
|
||||
}
|
||||
function A() {
|
||||
h.find(".ws_bullets a")
|
||||
.click(function (L) {
|
||||
y(L, e(this)
|
||||
.index())
|
||||
});
|
||||
if (B.length) {
|
||||
var F = B.find(">div");
|
||||
var K = e("a", B);
|
||||
var I = K.find("IMG");
|
||||
if (I.length) {
|
||||
var H = e('<div class="ws_bulframe"/>')
|
||||
.appendTo(F);
|
||||
var E = e("<div/>")
|
||||
.css({
|
||||
width: I.length + 1 + "00%"
|
||||
})
|
||||
.appendTo(e("<div/>")
|
||||
.appendTo(H));
|
||||
I.appendTo(E);
|
||||
e("<span/>")
|
||||
.appendTo(H);
|
||||
var G = -1;
|
||||
|
||||
function J(N) {
|
||||
if (N < 0) {
|
||||
N = 0
|
||||
}
|
||||
e(K.get(G))
|
||||
.removeClass("ws_overbull");
|
||||
e(K.get(N))
|
||||
.addClass("ws_overbull");
|
||||
H.show();
|
||||
var O = {
|
||||
left: K.get(N)
|
||||
.offsetLeft - H.width() / 2,
|
||||
"margin-top": K.get(N)
|
||||
.offsetTop - K.get(0)
|
||||
.offsetTop + "px",
|
||||
"margin-bottom": -K.get(N)
|
||||
.offsetTop + K.get(K.length - 1)
|
||||
.offsetTop + "px"
|
||||
};
|
||||
var M = I.get(N);
|
||||
var L = {
|
||||
left: -M.offsetLeft + (e(M)
|
||||
.outerWidth(true) - e(M)
|
||||
.outerWidth()) / 2
|
||||
};
|
||||
if (G < 0) {
|
||||
H.css(O);
|
||||
E.css(L)
|
||||
} else {
|
||||
if (!document.all) {
|
||||
O.opacity = 1
|
||||
}
|
||||
H.stop()
|
||||
.animate(O, "fast");
|
||||
E.stop()
|
||||
.animate(L, "fast")
|
||||
}
|
||||
G = N
|
||||
}
|
||||
K.hover(function () {
|
||||
J(e(this)
|
||||
.index())
|
||||
});
|
||||
var D;
|
||||
F.hover(function () {
|
||||
if (D) {
|
||||
clearTimeout(D);
|
||||
D = 0
|
||||
}
|
||||
J(G)
|
||||
}, function () {
|
||||
K.removeClass("ws_overbull");
|
||||
if (document.all) {
|
||||
if (!D) {
|
||||
D = setTimeout(function () {
|
||||
H.hide();
|
||||
D = 0
|
||||
}, 400)
|
||||
}
|
||||
} else {
|
||||
H.stop()
|
||||
.animate({
|
||||
opacity: 0
|
||||
}, {
|
||||
duration: "fast",
|
||||
complete: function () {
|
||||
H.hide()
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
F.click(function (L) {
|
||||
y(L, e(L.target)
|
||||
.index())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
function n(D) {
|
||||
e("A", B)
|
||||
.each(function (E) {
|
||||
if (E == D) {
|
||||
e(this)
|
||||
.addClass("ws_selbull")
|
||||
} else {
|
||||
e(this)
|
||||
.removeClass("ws_selbull")
|
||||
}
|
||||
})
|
||||
}
|
||||
h.append("<div class='ws-title' style='display:none'></div>");
|
||||
|
||||
function j(E) {
|
||||
var G = e("img", E)
|
||||
.attr("title");
|
||||
var F = e(E)
|
||||
.data("descr");
|
||||
var D = e(".ws-title", h);
|
||||
D.stop(1, 1)
|
||||
.stop(1, 1)
|
||||
.fadeOut(1000 / 3, function () {
|
||||
if (G || F) {
|
||||
D.html((G ? "<span>" + G + "</span>" : "") + (F ? "<div>" + F + "</div>" : ""));
|
||||
D.fadeIn(400, function () {
|
||||
if (e.browser.msie) {
|
||||
e(this)
|
||||
.get(0)
|
||||
.style.removeAttribute("filter")
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (B.length) {
|
||||
A()
|
||||
}
|
||||
q(c);
|
||||
j(m[c]);
|
||||
z(1);
|
||||
return this
|
||||
};
|
||||
jQuery.extend(jQuery.easing, {
|
||||
easeInOutExpo: function (e, f, a, h, g) {
|
||||
if (f == 0) {
|
||||
return a
|
||||
}
|
||||
if (f == g) {
|
||||
return a + h
|
||||
}
|
||||
if ((f /= g / 2) < 1) {
|
||||
return h / 2 * Math.pow(2, 10 * (f - 1)) + a
|
||||
}
|
||||
return h / 2 * (-Math.pow(2, - 10 * --f) + 2) + a
|
||||
}
|
||||
});
|
||||
220
app/assets/stylesheets/wow_style.css
Normal file
220
app/assets/stylesheets/wow_style.css
Normal file
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* generated by WOW Slider 2.5
|
||||
* template Quiet
|
||||
*/
|
||||
@import url("http://fonts.googleapis.com/css?family=Oswald");
|
||||
#wowslider-container {
|
||||
zoom: 1;
|
||||
position: relative;
|
||||
max-width:580px;
|
||||
margin:0 auto;
|
||||
z-index:100;
|
||||
border:none;
|
||||
text-align:left; /* reset align=center */
|
||||
}
|
||||
* html #wowslider-container{ width:580px }
|
||||
#wowslider-container ul{
|
||||
position:relative;
|
||||
width: 10000%;
|
||||
height:auto;
|
||||
left:0;
|
||||
list-style:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
border-spacing:0;
|
||||
overflow: visible;
|
||||
/*table-layout:fixed;*/
|
||||
}
|
||||
#wowslider-container .ws_images ul li{
|
||||
width:1%;
|
||||
line-height:0; /*opera*/
|
||||
float:left;
|
||||
font-size:0;
|
||||
padding:0 0 0 0;
|
||||
margin:0 0 0 0;
|
||||
}
|
||||
|
||||
#wowslider-container .ws_images{
|
||||
position: relative;
|
||||
left:0;
|
||||
top:0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
#wowslider-container .ws_images a{
|
||||
width:100%;
|
||||
display:block;
|
||||
color:transparent;
|
||||
}
|
||||
|
||||
#wowslider-container .ws_images img{
|
||||
width:100%;
|
||||
border:none 0;
|
||||
max-width: none;
|
||||
}
|
||||
#wowslider-container a{
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#wowslider-container .ws_bullets {
|
||||
font-size: 0px;
|
||||
float: left;
|
||||
position:absolute;
|
||||
z-index:70;
|
||||
}
|
||||
#wowslider-container .ws_bullets div{
|
||||
position:relative;
|
||||
float:left;
|
||||
}
|
||||
#wowslider-container a.wsl{
|
||||
display:none;
|
||||
}
|
||||
#wowslider-container .ws_bullets {
|
||||
padding: 10px;
|
||||
}
|
||||
#wowslider-container .ws_bullets a {
|
||||
width:15px;
|
||||
height:15px;
|
||||
background: url(./bullet.png) left top;
|
||||
float: left;
|
||||
text-indent: -4000px;
|
||||
position:relative;
|
||||
margin-left:3px;
|
||||
color:transparent;
|
||||
}
|
||||
#wowslider-container .ws_bullets a:hover{
|
||||
background-position: 0 50%;
|
||||
}
|
||||
#wowslider-container .ws_bullets a.ws_selbull{
|
||||
background-position: 0 100%;
|
||||
}
|
||||
#wowslider-container a.ws_next, #wowslider-container a.ws_prev {
|
||||
position:absolute;
|
||||
display:none;
|
||||
top:50%;
|
||||
margin-top:-50px;
|
||||
z-index:60;
|
||||
height: 100px;
|
||||
width: 60px;
|
||||
background-image: url(./arrows.png);
|
||||
}
|
||||
#wowslider-container a.ws_next{
|
||||
background-position: 100% 0;
|
||||
right:0;
|
||||
}
|
||||
#wowslider-container a.ws_prev {
|
||||
left:0;
|
||||
background-position: 0 0;
|
||||
}
|
||||
* html #wowslider-container a.ws_next,* html #wowslider-container a.ws_prev{display:block}
|
||||
#wowslider-container:hover a.ws_next, #wowslider-container:hover a.ws_prev {display:block}
|
||||
/* bottom center */
|
||||
#wowslider-container .ws_bullets {
|
||||
top: 5px;
|
||||
right: 10px;
|
||||
}
|
||||
#wowslider-container .ws_bullets .ws_bulframe {
|
||||
top: 20px;
|
||||
}
|
||||
#wowslider-container .ws_bullets .ws_bulframe {
|
||||
top: 20px;
|
||||
}
|
||||
#wowslider-container .ws-title{
|
||||
position: absolute;
|
||||
bottom: 10%;
|
||||
left: 7%;
|
||||
z-index: 50;
|
||||
padding:12px;
|
||||
color: #000000;
|
||||
background:#fff;
|
||||
font-family:Oswald,Impact,Charcoal,sans-serif;
|
||||
font-size: 30px;
|
||||
text-shadow: 1px 1px 1px #BBBBBB;
|
||||
line-height: 30px;
|
||||
border-radius:5px;
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
opacity:0.5;
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
|
||||
}
|
||||
#wowslider-container .ws-title div{
|
||||
font-size: 25px;
|
||||
text-shadow: 1px 1px 1px #000000;
|
||||
}#wowslider-container ul{
|
||||
animation: wsBasic 12s infinite;
|
||||
-moz-animation: wsBasic 12s infinite;
|
||||
-webkit-animation: wsBasic 12s infinite;
|
||||
}
|
||||
@keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }
|
||||
@-moz-keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }
|
||||
@-webkit-keyframes wsBasic{0%{left:-0%} 16.67%{left:-0%} 33.33%{left:-100%} 50%{left:-100%} 66.67%{left:-200%} 83.33%{left:-200%} }
|
||||
|
||||
#wowslider-container .ws_shadow{
|
||||
background: url(./shadow.png) left 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-size:100%;
|
||||
width:100%;
|
||||
height:20%;
|
||||
position: absolute;
|
||||
left:0;
|
||||
bottom:-20%;
|
||||
z-index:-1;
|
||||
}
|
||||
* html #wowslider-container .ws_shadow{/*ie6*/
|
||||
background:none;
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( src='wowslider/install/shadow.png', sizingMethod='scale');
|
||||
}
|
||||
*+html #wowslider-container .ws_shadow{/*ie7*/
|
||||
background:none;
|
||||
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( src='wowslider/install/shadow.png', sizingMethod='scale');
|
||||
}
|
||||
#wowslider-container .ws_bullets a img{
|
||||
text-indent:0;
|
||||
display:block;
|
||||
top:15px;
|
||||
left:-123px;
|
||||
visibility:hidden;
|
||||
position:absolute;
|
||||
-moz-box-shadow: 0 0 5px #999999;
|
||||
box-shadow: 0 0 5px #999999;
|
||||
border: 5px solid #FFFFFF;
|
||||
max-width:none;
|
||||
}
|
||||
#wowslider-container .ws_bullets a:hover img{
|
||||
visibility:visible;
|
||||
}
|
||||
|
||||
#wowslider-container .ws_bulframe div div{
|
||||
height:90px;
|
||||
overflow:visible;
|
||||
position:relative;
|
||||
}
|
||||
#wowslider-container .ws_bulframe div {
|
||||
left:0;
|
||||
overflow:hidden;
|
||||
position:relative;
|
||||
width:246px;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
#wowslider-container .ws_bullets .ws_bulframe{
|
||||
display:none;
|
||||
overflow:visible;
|
||||
position:absolute;
|
||||
cursor:pointer;
|
||||
-moz-box-shadow: 0 0 5px #999999;
|
||||
box-shadow: 0 0 5px #999999;
|
||||
border: 5px solid #FFFFFF;
|
||||
}
|
||||
#wowslider-container .ws_bulframe span{
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:-11px;
|
||||
margin-left:-5px;
|
||||
left:123px;
|
||||
background:url(./triangle.png);
|
||||
width:15px;
|
||||
height:6px;
|
||||
}
|
||||
Reference in New Issue
Block a user